diff --git a/.github/readme/synth.metadata/synth.metadata b/.github/readme/synth.metadata/synth.metadata index 45eef153a..b3cbc5caa 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": "5475de2aa0099893cb2ee4988161c636a5152991" + "sha": "43e69a4025d88eeaa80fb0341b76465baeb53367" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "f15b57ccfd71106c2299e9b89835fe6e55015662" + "sha": "8c5628b86cfa8386de7b8fc1675e6b528b552d57" } } ] diff --git a/.github/workflows/auto-release.yaml b/.github/workflows/auto-release.yaml index 2b6cdbc97..7c8816a7d 100644 --- a/.github/workflows/auto-release.yaml +++ b/.github/workflows/auto-release.yaml @@ -4,7 +4,7 @@ name: auto-release jobs: approve: runs-on: ubuntu-latest - if: contains(github.head_ref, 'release-v') + if: contains(github.head_ref, 'release-please') steps: - uses: actions/github-script@v3 with: @@ -16,8 +16,8 @@ jobs: return; } - // only approve PRs like "chore: release " - if ( !context.payload.pull_request.title.startsWith("chore: release") ) { + // only approve PRs like "chore(master): release " + if ( !context.payload.pull_request.title.startsWith("chore(master): release") ) { return; } diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 683022075..def8b3a2c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -54,7 +54,11 @@ jobs: with: java-version: 8 - run: java -version - - run: .kokoro/linkage-monitor.sh + - name: Install artifacts to local Maven repository + run: .kokoro/build.sh + shell: bash + - name: Validate any conflicts with regard to com.google.cloud:libraries-bom (latest release) + uses: GoogleCloudPlatform/cloud-opensource-java/linkage-monitor@v1-linkagemonitor lint: runs-on: ubuntu-latest steps: diff --git a/.kokoro/build.sh b/.kokoro/build.sh index e594535ac..3f3f160d7 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -114,8 +114,8 @@ bash .kokoro/coerce_logs.sh if [[ "${ENABLE_BUILD_COP}" == "true" ]] then - chmod +x ${KOKORO_GFILE_DIR}/linux_amd64/buildcop - ${KOKORO_GFILE_DIR}/linux_amd64/buildcop -repo=googleapis/java-aiplatform + chmod +x ${KOKORO_GFILE_DIR}/linux_amd64/flakybot + ${KOKORO_GFILE_DIR}/linux_amd64/flakybot -repo=googleapis/java-aiplatform fi echo "exiting with ${RETURN_CODE}" diff --git a/.kokoro/dependencies.sh b/.kokoro/dependencies.sh index c91e5a569..0fb8c8436 100755 --- a/.kokoro/dependencies.sh +++ b/.kokoro/dependencies.sh @@ -31,7 +31,7 @@ export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=128m" # this should run maven enforcer retry_with_backoff 3 10 \ - mvn install -B -V \ + mvn install -B -V -ntp \ -DskipTests=true \ -Dclirr.skip=true @@ -86,4 +86,4 @@ then else msg "Errors found. See log statements above." exit 1 -fi \ No newline at end of file +fi diff --git a/.kokoro/linkage-monitor.sh b/.kokoro/linkage-monitor.sh deleted file mode 100755 index 759ab4e2c..000000000 --- a/.kokoro/linkage-monitor.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash -# Copyright 2019 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -eo pipefail -# Display commands being run. -set -x - -## Get the directory of the build script -scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}")) -## cd to the parent directory, i.e. the root of the git repo -cd ${scriptDir}/.. - -# include common functions -source ${scriptDir}/common.sh - -# Print out Java version -java -version -echo ${JOB_TYPE} - -# attempt to install 3 times with exponential backoff (starting with 10 seconds) -retry_with_backoff 3 10 \ - mvn install -B -V \ - -DskipTests=true \ - -Dclirr.skip=true \ - -Denforcer.skip=true \ - -Dmaven.javadoc.skip=true \ - -Dgcloud.download.skip=true - -# Kokoro job cloud-opensource-java/ubuntu/linkage-monitor-gcs creates this JAR -JAR=linkage-monitor-latest-all-deps.jar -curl -v -O "https://storage.googleapis.com/cloud-opensource-java-linkage-monitor/${JAR}" - -# Fails if there's new linkage errors compared with baseline -java -jar ${JAR} com.google.cloud:libraries-bom diff --git a/.kokoro/release/publish_javadoc.cfg b/.kokoro/release/publish_javadoc.cfg index 810186bdc..ac7264203 100644 --- a/.kokoro/release/publish_javadoc.cfg +++ b/.kokoro/release/publish_javadoc.cfg @@ -7,10 +7,10 @@ env_vars: { value: "docs-staging" } +# cloud-rad staging env_vars: { key: "STAGING_BUCKET_V2" - value: "docs-staging-v2" - # Production will be at: docs-staging-v2 + value: "docs-staging-v2-staging" } env_vars: { @@ -26,4 +26,4 @@ before_action { keyname: "docuploader_service_account" } } -} +} \ No newline at end of file diff --git a/.kokoro/release/publish_javadoc.sh b/.kokoro/release/publish_javadoc.sh index bf5fdf868..d8ad859f3 100755 --- a/.kokoro/release/publish_javadoc.sh +++ b/.kokoro/release/publish_javadoc.sh @@ -71,7 +71,7 @@ python3 -m docuploader create-metadata \ --version ${VERSION} \ --language java -# upload docs +# upload docs to staging bucket python3 -m docuploader upload . \ --credentials ${CREDENTIALS} \ --staging-bucket ${STAGING_BUCKET_V2} diff --git a/.kokoro/release/publish_javadoc11.cfg b/.kokoro/release/publish_javadoc11.cfg new file mode 100644 index 000000000..8573cece0 --- /dev/null +++ b/.kokoro/release/publish_javadoc11.cfg @@ -0,0 +1,30 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# cloud-rad production +env_vars: { + key: "STAGING_BUCKET_V2" + value: "docs-staging-v2" +} + +# Configure the docker image for kokoro-trampoline +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java11" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-aiplatform/.kokoro/release/publish_javadoc11.sh" +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "docuploader_service_account" + } + } +} + +# Downloads docfx doclet resource. This will be in ${KOKORO_GFILE_DIR}/ +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/docfx" diff --git a/.kokoro/release/publish_javadoc11.sh b/.kokoro/release/publish_javadoc11.sh new file mode 100755 index 000000000..5905726d8 --- /dev/null +++ b/.kokoro/release/publish_javadoc11.sh @@ -0,0 +1,55 @@ +#!/bin/bash +# Copyright 2021 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eo pipefail + +if [[ -z "${CREDENTIALS}" ]]; then + CREDENTIALS=${KOKORO_KEYSTORE_DIR}/73713_docuploader_service_account +fi + +if [[ -z "${STAGING_BUCKET_V2}" ]]; then + echo "Need to set STAGING_BUCKET_V2 environment variable" + exit 1 +fi + +# work from the git root directory +pushd $(dirname "$0")/../../ + +# install docuploader package +python3 -m pip install gcp-docuploader + +# compile all packages +mvn clean install -B -q -DskipTests=true + +export NAME=google-cloud-aiplatform +export VERSION=$(grep ${NAME}: versions.txt | cut -d: -f3) + +# V3 generates docfx yml from javadoc +# generate yml +mvn clean site -B -q -P docFX + +pushd target/docfx-yml + +# create metadata +python3 -m docuploader create-metadata \ + --name ${NAME} \ + --version ${VERSION} \ + --language java + +# upload yml to production bucket +python3 -m docuploader upload . \ + --credentials ${CREDENTIALS} \ + --staging-bucket ${STAGING_BUCKET_V2} \ + --destination-prefix docfx- diff --git a/CHANGELOG.md b/CHANGELOG.md index cf8aae651..fb859d939 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,34 @@ # Changelog +## [0.3.0](https://www.github.com/googleapis/java-aiplatform/compare/v0.2.0...v0.3.0) (2021-02-26) + + +### Features + +* add encryption_spec to aiplatform v1beta1 ([#167](https://www.github.com/googleapis/java-aiplatform/issues/167)) ([f1523a2](https://www.github.com/googleapis/java-aiplatform/commit/f1523a2be87331d2298d740da041eb5275fb4813)) +* add encryption_spec to aiplatform v1beta1 ([#155](https://www.github.com/googleapis/java-aiplatform/issues/155)) ([fbeb273](https://www.github.com/googleapis/java-aiplatform/commit/fbeb273ac6e21ca01a39de3b4964cf28cc441efd)) +* updates library for v1 service ([#157](https://www.github.com/googleapis/java-aiplatform/issues/157)) ([587b2fa](https://www.github.com/googleapis/java-aiplatform/commit/587b2fab293ca50fe42512569cf35997f9099269)) + + +### Bug Fixes + +* reduces image object detection test resource file size ([#154](https://www.github.com/googleapis/java-aiplatform/issues/154)) ([8cf8cc6](https://www.github.com/googleapis/java-aiplatform/commit/8cf8cc6b36e127c8dfdc9677906195c49065c7ea)) + + +### Dependencies + +* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.18.0 ([#131](https://www.github.com/googleapis/java-aiplatform/issues/131)) ([d56e6ab](https://www.github.com/googleapis/java-aiplatform/commit/d56e6ab0c7022ef508c96ba04330b1926a08088d)) +* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.19.0 ([#172](https://www.github.com/googleapis/java-aiplatform/issues/172)) ([871e976](https://www.github.com/googleapis/java-aiplatform/commit/871e9761e560b2220d9e3611f48d58c0091b966e)) +* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.20.0 ([#184](https://www.github.com/googleapis/java-aiplatform/issues/184)) ([e79f59d](https://www.github.com/googleapis/java-aiplatform/commit/e79f59d4d46b7193eed00032b349b86c14213825)) +* update dependency com.google.cloud:google-cloud-storage to v1.113.10 ([#164](https://www.github.com/googleapis/java-aiplatform/issues/164)) ([c49ac84](https://www.github.com/googleapis/java-aiplatform/commit/c49ac8463d342c141cf59af5c19f1ef7f28fd8a5)) +* update dependency com.google.cloud:google-cloud-storage to v1.113.11 ([#175](https://www.github.com/googleapis/java-aiplatform/issues/175)) ([74efed2](https://www.github.com/googleapis/java-aiplatform/commit/74efed25aba13f526b3745baeb9b1146c3a6c357)) +* update dependency com.google.cloud:google-cloud-storage to v1.113.9 ([#132](https://www.github.com/googleapis/java-aiplatform/issues/132)) ([bc8826a](https://www.github.com/googleapis/java-aiplatform/commit/bc8826aea48191fea3a2a392f2beaaa192edc777)) + + +### Documentation + +* updates prediction to new hostname ([#173](https://www.github.com/googleapis/java-aiplatform/issues/173)) ([ea1afeb](https://www.github.com/googleapis/java-aiplatform/commit/ea1afeba05cc830a30c27032e8b71b270183656e)) + ## [0.2.0](https://www.github.com/googleapis/java-aiplatform/compare/v0.1.0...v0.2.0) (2021-01-07) diff --git a/LICENSE b/LICENSE index d64569567..261eeb9e9 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,3 @@ - Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ diff --git a/README.md b/README.md index bdd0867b0..e2017d681 100644 --- a/README.md +++ b/README.md @@ -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.1.1-SNAPSHOT + 0.2.0 ``` @@ -30,25 +30,25 @@ If you are using Maven without BOM, add this to your dependencies: com.google.cloud google-cloud-aiplatform - 0.1.0 + 0.2.0 ``` If you are using Gradle 5.x or later, add this to your dependencies ```Groovy -implementation platform('com.google.cloud:libraries-bom:16.2.1') +implementation platform('com.google.cloud:libraries-bom:18.0.0') 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' +compile 'com.google.cloud:google-cloud-aiplatform:0.2.0' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-aiplatform" % "0.1.0" +libraryDependencies += "com.google.cloud" % "google-cloud-aiplatform" % "0.2.0" ``` ## Authentication diff --git a/google-cloud-aiplatform-bom/pom.xml b/google-cloud-aiplatform-bom/pom.xml index 02bb03006..23ea97d79 100644 --- a/google-cloud-aiplatform-bom/pom.xml +++ b/google-cloud-aiplatform-bom/pom.xml @@ -3,12 +3,12 @@ 4.0.0 com.google.cloud google-cloud-aiplatform-bom - 0.2.0 + 0.3.0 pom com.google.cloud google-cloud-shared-config - 0.9.4 + 0.11.0 Google AI Platform BOM @@ -68,17 +68,27 @@ com.google.cloud google-cloud-aiplatform - 0.2.0 + 0.3.0 com.google.api.grpc proto-google-cloud-aiplatform-v1beta1 - 0.2.0 + 0.3.0 + + + com.google.api.grpc + proto-google-cloud-aiplatform-v1 + 0.3.0 com.google.api.grpc grpc-google-cloud-aiplatform-v1beta1 - 0.2.0 + 0.3.0 + + + com.google.api.grpc + grpc-google-cloud-aiplatform-v1 + 0.3.0 diff --git a/google-cloud-aiplatform/pom.xml b/google-cloud-aiplatform/pom.xml index f996b65ab..b0f8852fc 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.2.0 + 0.3.0 jar Google AI Platform https://github.com/googleapis/java-aiplatform @@ -11,7 +11,7 @@ com.google.cloud google-cloud-aiplatform-parent - 0.2.0 + 0.3.0 google-cloud-aiplatform @@ -46,6 +46,10 @@ com.google.api.grpc proto-google-cloud-aiplatform-v1beta1 + + com.google.api.grpc + proto-google-cloud-aiplatform-v1 + com.google.guava guava @@ -68,7 +72,7 @@ junit junit test - 4.13.1 + 4.13.2 @@ -76,6 +80,11 @@ grpc-google-cloud-aiplatform-v1beta1 test + + com.google.api.grpc + grpc-google-cloud-aiplatform-v1 + test + com.google.api diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/DatasetServiceClient.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/DatasetServiceClient.java new file mode 100644 index 000000000..7811aa7ab --- /dev/null +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/DatasetServiceClient.java @@ -0,0 +1,1015 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1.stub.DatasetServiceStub; +import com.google.cloud.aiplatform.v1.stub.DatasetServiceStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.longrunning.Operation; +import com.google.longrunning.OperationsClient; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * 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 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 + * methods: + * + *

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

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

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

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

To customize credentials: + * + *

{@code
+ * DatasetServiceSettings datasetServiceSettings =
+ *     DatasetServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * DatasetServiceClient datasetServiceClient = DatasetServiceClient.create(datasetServiceSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

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

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class DatasetServiceClient implements BackgroundResource { + private final DatasetServiceSettings settings; + private final DatasetServiceStub stub; + private final OperationsClient operationsClient; + + /** Constructs an instance of DatasetServiceClient with default settings. */ + public static final DatasetServiceClient create() throws IOException { + return create(DatasetServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of DatasetServiceClient, using the given settings. The channels are + * created based on the settings passed in, or defaults for any settings that are not set. + */ + public static final DatasetServiceClient create(DatasetServiceSettings settings) + throws IOException { + return new DatasetServiceClient(settings); + } + + /** + * Constructs an instance of DatasetServiceClient, using the given stub for making calls. This is + * 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) { + return new DatasetServiceClient(stub); + } + + /** + * Constructs an instance of DatasetServiceClient, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected DatasetServiceClient(DatasetServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((DatasetServiceStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + protected DatasetServiceClient(DatasetServiceStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + public final DatasetServiceSettings getSettings() { + return settings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public DatasetServiceStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final OperationsClient getOperationsClient() { + return operationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a Dataset. + * + * @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 + */ + public final OperationFuture createDatasetAsync( + LocationName parent, Dataset dataset) { + CreateDatasetRequest request = + CreateDatasetRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setDataset(dataset) + .build(); + return createDatasetAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a Dataset. + * + * @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 + */ + public final OperationFuture createDatasetAsync( + String parent, Dataset dataset) { + CreateDatasetRequest request = + CreateDatasetRequest.newBuilder().setParent(parent).setDataset(dataset).build(); + return createDatasetAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a Dataset. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createDatasetAsync( + CreateDatasetRequest request) { + return createDatasetOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a Dataset. + * + *

Sample code: + */ + public final OperationCallable + createDatasetOperationCallable() { + return stub.createDatasetOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a Dataset. + * + *

Sample code: + */ + public final UnaryCallable createDatasetCallable() { + return stub.createDatasetCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a Dataset. + * + * @param name Required. The name of the Dataset resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Dataset getDataset(DatasetName name) { + GetDatasetRequest request = + GetDatasetRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getDataset(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a Dataset. + * + * @param name Required. The name of the Dataset resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Dataset getDataset(String name) { + GetDatasetRequest request = GetDatasetRequest.newBuilder().setName(name).build(); + return getDataset(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a Dataset. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Dataset getDataset(GetDatasetRequest request) { + return getDatasetCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a Dataset. + * + *

Sample code: + */ + public final UnaryCallable getDatasetCallable() { + return stub.getDatasetCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a Dataset. + * + * @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 [FieldMask](https://tinyurl.com/protobufs/google.protobuf#fieldmask). + * Updatable fields: + *

* `display_name` * `description` * `labels` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Dataset updateDataset(Dataset dataset, FieldMask updateMask) { + UpdateDatasetRequest request = + UpdateDatasetRequest.newBuilder().setDataset(dataset).setUpdateMask(updateMask).build(); + return updateDataset(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a Dataset. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Dataset updateDataset(UpdateDatasetRequest request) { + return updateDatasetCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a Dataset. + * + *

Sample code: + */ + public final UnaryCallable updateDatasetCallable() { + return stub.updateDatasetCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Datasets in a Location. + * + * @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 + */ + public final ListDatasetsPagedResponse listDatasets(LocationName parent) { + ListDatasetsRequest request = + ListDatasetsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listDatasets(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Datasets in a Location. + * + * @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 + */ + public final ListDatasetsPagedResponse listDatasets(String parent) { + ListDatasetsRequest request = ListDatasetsRequest.newBuilder().setParent(parent).build(); + return listDatasets(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Datasets in a Location. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDatasetsPagedResponse listDatasets(ListDatasetsRequest request) { + return listDatasetsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Datasets in a Location. + * + *

Sample code: + */ + public final UnaryCallable + listDatasetsPagedCallable() { + return stub.listDatasetsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Datasets in a Location. + * + *

Sample code: + */ + public final UnaryCallable listDatasetsCallable() { + return stub.listDatasetsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a Dataset. + * + * @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 + */ + public final OperationFuture deleteDatasetAsync( + DatasetName name) { + DeleteDatasetRequest request = + DeleteDatasetRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deleteDatasetAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a Dataset. + * + * @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 + */ + public final OperationFuture deleteDatasetAsync(String name) { + DeleteDatasetRequest request = DeleteDatasetRequest.newBuilder().setName(name).build(); + return deleteDatasetAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a Dataset. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteDatasetAsync( + DeleteDatasetRequest request) { + return deleteDatasetOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a Dataset. + * + *

Sample code: + */ + public final OperationCallable + deleteDatasetOperationCallable() { + return stub.deleteDatasetOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a Dataset. + * + *

Sample code: + */ + public final UnaryCallable deleteDatasetCallable() { + return stub.deleteDatasetCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Imports data into a Dataset. + * + * @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 + */ + public final OperationFuture importDataAsync( + DatasetName name, List importConfigs) { + ImportDataRequest request = + ImportDataRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .addAllImportConfigs(importConfigs) + .build(); + return importDataAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Imports data into a Dataset. + * + * @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 + */ + public final OperationFuture importDataAsync( + String name, List importConfigs) { + ImportDataRequest request = + ImportDataRequest.newBuilder().setName(name).addAllImportConfigs(importConfigs).build(); + return importDataAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Imports data into a Dataset. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture importDataAsync( + ImportDataRequest request) { + return importDataOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Imports data into a Dataset. + * + *

Sample code: + */ + public final OperationCallable + importDataOperationCallable() { + return stub.importDataOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Imports data into a Dataset. + * + *

Sample code: + */ + public final UnaryCallable importDataCallable() { + return stub.importDataCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Exports data from a Dataset. + * + * @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 + */ + public final OperationFuture exportDataAsync( + DatasetName name, ExportDataConfig exportConfig) { + ExportDataRequest request = + ExportDataRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setExportConfig(exportConfig) + .build(); + return exportDataAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Exports data from a Dataset. + * + * @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 + */ + public final OperationFuture exportDataAsync( + String name, ExportDataConfig exportConfig) { + ExportDataRequest request = + ExportDataRequest.newBuilder().setName(name).setExportConfig(exportConfig).build(); + return exportDataAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Exports data from a Dataset. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture exportDataAsync( + ExportDataRequest request) { + return exportDataOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Exports data from a Dataset. + * + *

Sample code: + */ + public final OperationCallable + exportDataOperationCallable() { + return stub.exportDataOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Exports data from a Dataset. + * + *

Sample code: + */ + public final UnaryCallable exportDataCallable() { + return stub.exportDataCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DataItems in a Dataset. + * + * @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 + */ + public final ListDataItemsPagedResponse listDataItems(DatasetName parent) { + ListDataItemsRequest request = + ListDataItemsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listDataItems(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DataItems in a Dataset. + * + * @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 + */ + public final ListDataItemsPagedResponse listDataItems(String parent) { + ListDataItemsRequest request = ListDataItemsRequest.newBuilder().setParent(parent).build(); + return listDataItems(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DataItems in a Dataset. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDataItemsPagedResponse listDataItems(ListDataItemsRequest request) { + return listDataItemsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DataItems in a Dataset. + * + *

Sample code: + */ + public final UnaryCallable + listDataItemsPagedCallable() { + return stub.listDataItemsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DataItems in a Dataset. + * + *

Sample code: + */ + public final UnaryCallable listDataItemsCallable() { + return stub.listDataItemsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets an AnnotationSpec. + * + * @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 + */ + public final AnnotationSpec getAnnotationSpec(AnnotationSpecName name) { + GetAnnotationSpecRequest request = + GetAnnotationSpecRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getAnnotationSpec(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets an AnnotationSpec. + * + * @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 + */ + public final AnnotationSpec getAnnotationSpec(String name) { + GetAnnotationSpecRequest request = GetAnnotationSpecRequest.newBuilder().setName(name).build(); + return getAnnotationSpec(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets an AnnotationSpec. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AnnotationSpec getAnnotationSpec(GetAnnotationSpecRequest request) { + return getAnnotationSpecCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets an AnnotationSpec. + * + *

Sample code: + */ + public final UnaryCallable getAnnotationSpecCallable() { + return stub.getAnnotationSpecCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Annotations belongs to a dataitem + * + * @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 + */ + public final ListAnnotationsPagedResponse listAnnotations(DataItemName parent) { + ListAnnotationsRequest request = + ListAnnotationsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listAnnotations(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Annotations belongs to a dataitem + * + * @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 + */ + public final ListAnnotationsPagedResponse listAnnotations(String parent) { + ListAnnotationsRequest request = ListAnnotationsRequest.newBuilder().setParent(parent).build(); + return listAnnotations(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Annotations belongs to a dataitem + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAnnotationsPagedResponse listAnnotations(ListAnnotationsRequest request) { + return listAnnotationsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Annotations belongs to a dataitem + * + *

Sample code: + */ + public final UnaryCallable + listAnnotationsPagedCallable() { + return stub.listAnnotationsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Annotations belongs to a dataitem + * + *

Sample code: + */ + public final UnaryCallable + listAnnotationsCallable() { + return stub.listAnnotationsCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListDatasetsPagedResponse + extends AbstractPagedListResponse< + ListDatasetsRequest, + ListDatasetsResponse, + Dataset, + ListDatasetsPage, + ListDatasetsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListDatasetsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListDatasetsPagedResponse apply(ListDatasetsPage input) { + return new ListDatasetsPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListDatasetsPagedResponse(ListDatasetsPage page) { + super(page, ListDatasetsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListDatasetsPage + extends AbstractPage { + + private ListDatasetsPage( + PageContext context, + ListDatasetsResponse response) { + super(context, response); + } + + private static ListDatasetsPage createEmptyPage() { + return new ListDatasetsPage(null, null); + } + + @Override + protected ListDatasetsPage createPage( + PageContext context, + ListDatasetsResponse response) { + return new ListDatasetsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListDatasetsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListDatasetsRequest, + ListDatasetsResponse, + Dataset, + ListDatasetsPage, + ListDatasetsFixedSizeCollection> { + + private ListDatasetsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListDatasetsFixedSizeCollection createEmptyCollection() { + return new ListDatasetsFixedSizeCollection(null, 0); + } + + @Override + protected ListDatasetsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListDatasetsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListDataItemsPagedResponse + extends AbstractPagedListResponse< + ListDataItemsRequest, + ListDataItemsResponse, + DataItem, + ListDataItemsPage, + ListDataItemsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListDataItemsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListDataItemsPagedResponse apply(ListDataItemsPage input) { + return new ListDataItemsPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListDataItemsPagedResponse(ListDataItemsPage page) { + super(page, ListDataItemsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListDataItemsPage + extends AbstractPage< + ListDataItemsRequest, ListDataItemsResponse, DataItem, ListDataItemsPage> { + + private ListDataItemsPage( + PageContext context, + ListDataItemsResponse response) { + super(context, response); + } + + private static ListDataItemsPage createEmptyPage() { + return new ListDataItemsPage(null, null); + } + + @Override + protected ListDataItemsPage createPage( + PageContext context, + ListDataItemsResponse response) { + return new ListDataItemsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListDataItemsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListDataItemsRequest, + ListDataItemsResponse, + DataItem, + ListDataItemsPage, + ListDataItemsFixedSizeCollection> { + + private ListDataItemsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListDataItemsFixedSizeCollection createEmptyCollection() { + return new ListDataItemsFixedSizeCollection(null, 0); + } + + @Override + protected ListDataItemsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListDataItemsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListAnnotationsPagedResponse + extends AbstractPagedListResponse< + ListAnnotationsRequest, + ListAnnotationsResponse, + Annotation, + ListAnnotationsPage, + ListAnnotationsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListAnnotationsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListAnnotationsPagedResponse apply(ListAnnotationsPage input) { + return new ListAnnotationsPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListAnnotationsPagedResponse(ListAnnotationsPage page) { + super(page, ListAnnotationsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListAnnotationsPage + extends AbstractPage< + ListAnnotationsRequest, ListAnnotationsResponse, Annotation, ListAnnotationsPage> { + + private ListAnnotationsPage( + PageContext context, + ListAnnotationsResponse response) { + super(context, response); + } + + private static ListAnnotationsPage createEmptyPage() { + return new ListAnnotationsPage(null, null); + } + + @Override + protected ListAnnotationsPage createPage( + PageContext context, + ListAnnotationsResponse response) { + return new ListAnnotationsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListAnnotationsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListAnnotationsRequest, + ListAnnotationsResponse, + Annotation, + ListAnnotationsPage, + ListAnnotationsFixedSizeCollection> { + + private ListAnnotationsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListAnnotationsFixedSizeCollection createEmptyCollection() { + return new ListAnnotationsFixedSizeCollection(null, 0); + } + + @Override + protected ListAnnotationsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListAnnotationsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/DatasetServiceSettings.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/DatasetServiceSettings.java new file mode 100644 index 000000000..31e905828 --- /dev/null +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/DatasetServiceSettings.java @@ -0,0 +1,342 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1; + +import static com.google.cloud.aiplatform.v1.DatasetServiceClient.ListAnnotationsPagedResponse; +import static com.google.cloud.aiplatform.v1.DatasetServiceClient.ListDataItemsPagedResponse; +import static com.google.cloud.aiplatform.v1.DatasetServiceClient.ListDatasetsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.aiplatform.v1.stub.DatasetServiceStubSettings; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link DatasetServiceClient}. + * + *

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

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

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

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

{@code
+ * DatasetServiceSettings.Builder datasetServiceSettingsBuilder =
+ *     DatasetServiceSettings.newBuilder();
+ * datasetServiceSettingsBuilder
+ *     .getDatasetSettings()
+ *     .setRetrySettings(
+ *         datasetServiceSettingsBuilder
+ *             .getDatasetSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * DatasetServiceSettings datasetServiceSettings = datasetServiceSettingsBuilder.build();
+ * }
+ */ +@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. */ + public OperationCallSettings + createDatasetOperationSettings() { + return ((DatasetServiceStubSettings) getStubSettings()).createDatasetOperationSettings(); + } + + /** Returns the object with the settings used for calls to getDataset. */ + public UnaryCallSettings getDatasetSettings() { + return ((DatasetServiceStubSettings) getStubSettings()).getDatasetSettings(); + } + + /** Returns the object with the settings used for calls to updateDataset. */ + public UnaryCallSettings updateDatasetSettings() { + return ((DatasetServiceStubSettings) getStubSettings()).updateDatasetSettings(); + } + + /** Returns the object with the settings used for calls to listDatasets. */ + public PagedCallSettings + listDatasetsSettings() { + return ((DatasetServiceStubSettings) getStubSettings()).listDatasetsSettings(); + } + + /** Returns the object with the settings used for calls to deleteDataset. */ + public UnaryCallSettings deleteDatasetSettings() { + return ((DatasetServiceStubSettings) getStubSettings()).deleteDatasetSettings(); + } + + /** Returns the object with the settings used for calls to deleteDataset. */ + public OperationCallSettings + deleteDatasetOperationSettings() { + return ((DatasetServiceStubSettings) getStubSettings()).deleteDatasetOperationSettings(); + } + + /** Returns the object with the settings used for calls to importData. */ + public UnaryCallSettings importDataSettings() { + return ((DatasetServiceStubSettings) getStubSettings()).importDataSettings(); + } + + /** Returns the object with the settings used for calls to importData. */ + public OperationCallSettings + importDataOperationSettings() { + return ((DatasetServiceStubSettings) getStubSettings()).importDataOperationSettings(); + } + + /** Returns the object with the settings used for calls to exportData. */ + public UnaryCallSettings exportDataSettings() { + return ((DatasetServiceStubSettings) getStubSettings()).exportDataSettings(); + } + + /** Returns the object with the settings used for calls to exportData. */ + public OperationCallSettings + exportDataOperationSettings() { + return ((DatasetServiceStubSettings) getStubSettings()).exportDataOperationSettings(); + } + + /** Returns the object with the settings used for calls to listDataItems. */ + public PagedCallSettings + listDataItemsSettings() { + return ((DatasetServiceStubSettings) getStubSettings()).listDataItemsSettings(); + } + + /** Returns the object with the settings used for calls to getAnnotationSpec. */ + public UnaryCallSettings getAnnotationSpecSettings() { + return ((DatasetServiceStubSettings) getStubSettings()).getAnnotationSpecSettings(); + } + + /** Returns the object with the settings used for calls to listAnnotations. */ + public PagedCallSettings< + ListAnnotationsRequest, ListAnnotationsResponse, ListAnnotationsPagedResponse> + listAnnotationsSettings() { + return ((DatasetServiceStubSettings) getStubSettings()).listAnnotationsSettings(); + } + + public static final DatasetServiceSettings create(DatasetServiceStubSettings stub) + throws IOException { + return new DatasetServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return DatasetServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return DatasetServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DatasetServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return DatasetServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return DatasetServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return DatasetServiceStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return DatasetServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected DatasetServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for DatasetServiceSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(DatasetServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(DatasetServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + 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'. + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to createDataset. */ + public UnaryCallSettings.Builder createDatasetSettings() { + return getStubSettingsBuilder().createDatasetSettings(); + } + + /** Returns the builder for the settings used for calls to createDataset. */ + public OperationCallSettings.Builder< + CreateDatasetRequest, Dataset, CreateDatasetOperationMetadata> + createDatasetOperationSettings() { + return getStubSettingsBuilder().createDatasetOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getDataset. */ + public UnaryCallSettings.Builder getDatasetSettings() { + return getStubSettingsBuilder().getDatasetSettings(); + } + + /** Returns the builder for the settings used for calls to updateDataset. */ + public UnaryCallSettings.Builder updateDatasetSettings() { + return getStubSettingsBuilder().updateDatasetSettings(); + } + + /** Returns the builder for the settings used for calls to listDatasets. */ + public PagedCallSettings.Builder< + ListDatasetsRequest, ListDatasetsResponse, ListDatasetsPagedResponse> + listDatasetsSettings() { + return getStubSettingsBuilder().listDatasetsSettings(); + } + + /** Returns the builder for the settings used for calls to deleteDataset. */ + public UnaryCallSettings.Builder deleteDatasetSettings() { + return getStubSettingsBuilder().deleteDatasetSettings(); + } + + /** Returns the builder for the settings used for calls to deleteDataset. */ + public OperationCallSettings.Builder + deleteDatasetOperationSettings() { + return getStubSettingsBuilder().deleteDatasetOperationSettings(); + } + + /** Returns the builder for the settings used for calls to importData. */ + public UnaryCallSettings.Builder importDataSettings() { + return getStubSettingsBuilder().importDataSettings(); + } + + /** Returns the builder for the settings used for calls to importData. */ + public OperationCallSettings.Builder< + ImportDataRequest, ImportDataResponse, ImportDataOperationMetadata> + importDataOperationSettings() { + return getStubSettingsBuilder().importDataOperationSettings(); + } + + /** Returns the builder for the settings used for calls to exportData. */ + public UnaryCallSettings.Builder exportDataSettings() { + return getStubSettingsBuilder().exportDataSettings(); + } + + /** Returns the builder for the settings used for calls to exportData. */ + public OperationCallSettings.Builder< + ExportDataRequest, ExportDataResponse, ExportDataOperationMetadata> + exportDataOperationSettings() { + return getStubSettingsBuilder().exportDataOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listDataItems. */ + public PagedCallSettings.Builder< + ListDataItemsRequest, ListDataItemsResponse, ListDataItemsPagedResponse> + listDataItemsSettings() { + return getStubSettingsBuilder().listDataItemsSettings(); + } + + /** Returns the builder for the settings used for calls to getAnnotationSpec. */ + public UnaryCallSettings.Builder + getAnnotationSpecSettings() { + return getStubSettingsBuilder().getAnnotationSpecSettings(); + } + + /** Returns the builder for the settings used for calls to listAnnotations. */ + public PagedCallSettings.Builder< + ListAnnotationsRequest, ListAnnotationsResponse, ListAnnotationsPagedResponse> + listAnnotationsSettings() { + return getStubSettingsBuilder().listAnnotationsSettings(); + } + + @Override + public DatasetServiceSettings build() throws IOException { + return new DatasetServiceSettings(this); + } + } +} diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/EndpointServiceClient.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/EndpointServiceClient.java new file mode 100644 index 000000000..32a714218 --- /dev/null +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/EndpointServiceClient.java @@ -0,0 +1,739 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1.stub.EndpointServiceStub; +import com.google.cloud.aiplatform.v1.stub.EndpointServiceStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.longrunning.Operation; +import com.google.longrunning.OperationsClient; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import java.io.IOException; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * 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 + * such as threads. In the example above, try-with-resources is used, which automatically calls + * close(). + * + *

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

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

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

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

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

To customize credentials: + * + *

{@code
+ * EndpointServiceSettings endpointServiceSettings =
+ *     EndpointServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * EndpointServiceClient endpointServiceClient =
+ *     EndpointServiceClient.create(endpointServiceSettings);
+ * }
+ * + *

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-java") +public class EndpointServiceClient implements BackgroundResource { + private final EndpointServiceSettings settings; + private final EndpointServiceStub stub; + private final OperationsClient operationsClient; + + /** Constructs an instance of EndpointServiceClient with default settings. */ + public static final EndpointServiceClient create() throws IOException { + return create(EndpointServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of EndpointServiceClient, using the given settings. The channels are + * created based on the settings passed in, or defaults for any settings that are not set. + */ + public static final EndpointServiceClient create(EndpointServiceSettings settings) + throws IOException { + return new EndpointServiceClient(settings); + } + + /** + * Constructs an instance of EndpointServiceClient, using the given stub for making calls. This is + * 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) { + return new EndpointServiceClient(stub); + } + + /** + * Constructs an instance of EndpointServiceClient, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected EndpointServiceClient(EndpointServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((EndpointServiceStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + protected EndpointServiceClient(EndpointServiceStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + public final EndpointServiceSettings getSettings() { + return settings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public EndpointServiceStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final OperationsClient getOperationsClient() { + return operationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an Endpoint. + * + * @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 + */ + public final OperationFuture createEndpointAsync( + LocationName parent, Endpoint endpoint) { + CreateEndpointRequest request = + CreateEndpointRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setEndpoint(endpoint) + .build(); + return createEndpointAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an Endpoint. + * + * @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 + */ + public final OperationFuture createEndpointAsync( + String parent, Endpoint endpoint) { + CreateEndpointRequest request = + CreateEndpointRequest.newBuilder().setParent(parent).setEndpoint(endpoint).build(); + return createEndpointAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an Endpoint. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createEndpointAsync( + CreateEndpointRequest request) { + return createEndpointOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an Endpoint. + * + *

Sample code: + */ + public final OperationCallable + createEndpointOperationCallable() { + return stub.createEndpointOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an Endpoint. + * + *

Sample code: + */ + public final UnaryCallable createEndpointCallable() { + return stub.createEndpointCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets an Endpoint. + * + * @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 + */ + public final Endpoint getEndpoint(EndpointName name) { + GetEndpointRequest request = + GetEndpointRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getEndpoint(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets an Endpoint. + * + * @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 + */ + public final Endpoint getEndpoint(String name) { + GetEndpointRequest request = GetEndpointRequest.newBuilder().setName(name).build(); + return getEndpoint(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets an Endpoint. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Endpoint getEndpoint(GetEndpointRequest request) { + return getEndpointCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets an Endpoint. + * + *

Sample code: + */ + public final UnaryCallable getEndpointCallable() { + return stub.getEndpointCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Endpoints in a Location. + * + * @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 + */ + public final ListEndpointsPagedResponse listEndpoints(LocationName parent) { + ListEndpointsRequest request = + ListEndpointsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listEndpoints(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Endpoints in a Location. + * + * @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 + */ + public final ListEndpointsPagedResponse listEndpoints(String parent) { + ListEndpointsRequest request = ListEndpointsRequest.newBuilder().setParent(parent).build(); + return listEndpoints(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Endpoints in a Location. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListEndpointsPagedResponse listEndpoints(ListEndpointsRequest request) { + return listEndpointsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Endpoints in a Location. + * + *

Sample code: + */ + public final UnaryCallable + listEndpointsPagedCallable() { + return stub.listEndpointsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Endpoints in a Location. + * + *

Sample code: + */ + public final UnaryCallable listEndpointsCallable() { + return stub.listEndpointsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates an Endpoint. + * + * @param endpoint Required. The Endpoint which replaces the resource on the server. + * @param updateMask Required. The update mask applies to the resource. See + * [FieldMask](https://tinyurl.com/protobufs/google.protobuf#fieldmask). + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Endpoint updateEndpoint(Endpoint endpoint, FieldMask updateMask) { + UpdateEndpointRequest request = + UpdateEndpointRequest.newBuilder().setEndpoint(endpoint).setUpdateMask(updateMask).build(); + return updateEndpoint(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates an Endpoint. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Endpoint updateEndpoint(UpdateEndpointRequest request) { + return updateEndpointCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates an Endpoint. + * + *

Sample code: + */ + public final UnaryCallable updateEndpointCallable() { + return stub.updateEndpointCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an Endpoint. + * + * @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 + */ + public final OperationFuture deleteEndpointAsync( + EndpointName name) { + DeleteEndpointRequest request = + DeleteEndpointRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deleteEndpointAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an Endpoint. + * + * @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 + */ + public final OperationFuture deleteEndpointAsync(String name) { + DeleteEndpointRequest request = DeleteEndpointRequest.newBuilder().setName(name).build(); + return deleteEndpointAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an Endpoint. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteEndpointAsync( + DeleteEndpointRequest request) { + return deleteEndpointOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an Endpoint. + * + *

Sample code: + */ + public final OperationCallable + deleteEndpointOperationCallable() { + return stub.deleteEndpointOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an Endpoint. + * + *

Sample code: + */ + public final UnaryCallable deleteEndpointCallable() { + return stub.deleteEndpointCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deploys a Model into this Endpoint, creating a DeployedModel within it. + * + * @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 + * [Endpoint.traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] must be updated + * for the DeployedModel to start receiving traffic, either as part of this call, or via + * [EndpointService.UpdateEndpoint][google.cloud.aiplatform.v1.EndpointService.UpdateEndpoint]. + * @param trafficSplit A map from a DeployedModel's ID to the percentage of this Endpoint's + * traffic that should be forwarded to that DeployedModel. + *

If this field is non-empty, then the Endpoint's + * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be overwritten with + * it. To refer to the ID of the just being deployed Model, a "0" should be used, and the + * actual ID of the new DeployedModel will be filled in its place by this method. The traffic + * percentage values must add up to 100. + *

If this field is empty, then the Endpoint's + * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] is not updated. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deployModelAsync( + EndpointName endpoint, DeployedModel deployedModel, Map trafficSplit) { + DeployModelRequest request = + DeployModelRequest.newBuilder() + .setEndpoint(endpoint == null ? null : endpoint.toString()) + .setDeployedModel(deployedModel) + .putAllTrafficSplit(trafficSplit) + .build(); + return deployModelAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deploys a Model into this Endpoint, creating a DeployedModel within it. + * + * @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 + * [Endpoint.traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] must be updated + * for the DeployedModel to start receiving traffic, either as part of this call, or via + * [EndpointService.UpdateEndpoint][google.cloud.aiplatform.v1.EndpointService.UpdateEndpoint]. + * @param trafficSplit A map from a DeployedModel's ID to the percentage of this Endpoint's + * traffic that should be forwarded to that DeployedModel. + *

If this field is non-empty, then the Endpoint's + * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be overwritten with + * it. To refer to the ID of the just being deployed Model, a "0" should be used, and the + * actual ID of the new DeployedModel will be filled in its place by this method. The traffic + * percentage values must add up to 100. + *

If this field is empty, then the Endpoint's + * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] is not updated. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deployModelAsync( + String endpoint, DeployedModel deployedModel, Map trafficSplit) { + DeployModelRequest request = + DeployModelRequest.newBuilder() + .setEndpoint(endpoint) + .setDeployedModel(deployedModel) + .putAllTrafficSplit(trafficSplit) + .build(); + return deployModelAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deploys a Model into this Endpoint, creating a DeployedModel within it. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deployModelAsync( + DeployModelRequest request) { + return deployModelOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deploys a Model into this Endpoint, creating a DeployedModel within it. + * + *

Sample code: + */ + public final OperationCallable< + DeployModelRequest, DeployModelResponse, DeployModelOperationMetadata> + deployModelOperationCallable() { + return stub.deployModelOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deploys a Model into this Endpoint, creating a DeployedModel within it. + * + *

Sample code: + */ + public final UnaryCallable deployModelCallable() { + return stub.deployModelCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Undeploys a Model from an Endpoint, removing a DeployedModel from it, and freeing all resources + * it's using. + * + * @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 + * Endpoint. + * @param trafficSplit If this field is provided, then the Endpoint's + * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be overwritten with + * it. If last DeployedModel is being undeployed from the Endpoint, the + * [Endpoint.traffic_split] will always end up empty when this call returns. A DeployedModel + * will be successfully undeployed only if it doesn't have any traffic assigned to it when + * this method executes, or if this field unassigns any traffic to it. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + undeployModelAsync( + EndpointName endpoint, String deployedModelId, Map trafficSplit) { + UndeployModelRequest request = + UndeployModelRequest.newBuilder() + .setEndpoint(endpoint == null ? null : endpoint.toString()) + .setDeployedModelId(deployedModelId) + .putAllTrafficSplit(trafficSplit) + .build(); + return undeployModelAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Undeploys a Model from an Endpoint, removing a DeployedModel from it, and freeing all resources + * it's using. + * + * @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 + * Endpoint. + * @param trafficSplit If this field is provided, then the Endpoint's + * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be overwritten with + * it. If last DeployedModel is being undeployed from the Endpoint, the + * [Endpoint.traffic_split] will always end up empty when this call returns. A DeployedModel + * will be successfully undeployed only if it doesn't have any traffic assigned to it when + * this method executes, or if this field unassigns any traffic to it. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + undeployModelAsync( + String endpoint, String deployedModelId, Map trafficSplit) { + UndeployModelRequest request = + UndeployModelRequest.newBuilder() + .setEndpoint(endpoint) + .setDeployedModelId(deployedModelId) + .putAllTrafficSplit(trafficSplit) + .build(); + return undeployModelAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Undeploys a Model from an Endpoint, removing a DeployedModel from it, and freeing all resources + * it's using. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + undeployModelAsync(UndeployModelRequest request) { + return undeployModelOperationCallable().futureCall(request); + } + + // 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: + */ + public final OperationCallable< + UndeployModelRequest, UndeployModelResponse, UndeployModelOperationMetadata> + undeployModelOperationCallable() { + return stub.undeployModelOperationCallable(); + } + + // 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: + */ + public final UnaryCallable undeployModelCallable() { + return stub.undeployModelCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListEndpointsPagedResponse + extends AbstractPagedListResponse< + ListEndpointsRequest, + ListEndpointsResponse, + Endpoint, + ListEndpointsPage, + ListEndpointsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListEndpointsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListEndpointsPagedResponse apply(ListEndpointsPage input) { + return new ListEndpointsPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListEndpointsPagedResponse(ListEndpointsPage page) { + super(page, ListEndpointsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListEndpointsPage + extends AbstractPage< + ListEndpointsRequest, ListEndpointsResponse, Endpoint, ListEndpointsPage> { + + private ListEndpointsPage( + PageContext context, + ListEndpointsResponse response) { + super(context, response); + } + + private static ListEndpointsPage createEmptyPage() { + return new ListEndpointsPage(null, null); + } + + @Override + protected ListEndpointsPage createPage( + PageContext context, + ListEndpointsResponse response) { + return new ListEndpointsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListEndpointsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListEndpointsRequest, + ListEndpointsResponse, + Endpoint, + ListEndpointsPage, + ListEndpointsFixedSizeCollection> { + + private ListEndpointsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListEndpointsFixedSizeCollection createEmptyCollection() { + return new ListEndpointsFixedSizeCollection(null, 0); + } + + @Override + protected ListEndpointsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListEndpointsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/EndpointServiceSettings.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/EndpointServiceSettings.java new file mode 100644 index 000000000..533f2f4b4 --- /dev/null +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/EndpointServiceSettings.java @@ -0,0 +1,304 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1; + +import static com.google.cloud.aiplatform.v1.EndpointServiceClient.ListEndpointsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.aiplatform.v1.stub.EndpointServiceStubSettings; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link EndpointServiceClient}. + * + *

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

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

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

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

{@code
+ * EndpointServiceSettings.Builder endpointServiceSettingsBuilder =
+ *     EndpointServiceSettings.newBuilder();
+ * endpointServiceSettingsBuilder
+ *     .getEndpointSettings()
+ *     .setRetrySettings(
+ *         endpointServiceSettingsBuilder
+ *             .getEndpointSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * EndpointServiceSettings endpointServiceSettings = endpointServiceSettingsBuilder.build();
+ * }
+ */ +@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. */ + public OperationCallSettings + createEndpointOperationSettings() { + return ((EndpointServiceStubSettings) getStubSettings()).createEndpointOperationSettings(); + } + + /** Returns the object with the settings used for calls to getEndpoint. */ + public UnaryCallSettings getEndpointSettings() { + return ((EndpointServiceStubSettings) getStubSettings()).getEndpointSettings(); + } + + /** Returns the object with the settings used for calls to listEndpoints. */ + public PagedCallSettings + listEndpointsSettings() { + return ((EndpointServiceStubSettings) getStubSettings()).listEndpointsSettings(); + } + + /** Returns the object with the settings used for calls to updateEndpoint. */ + public UnaryCallSettings updateEndpointSettings() { + return ((EndpointServiceStubSettings) getStubSettings()).updateEndpointSettings(); + } + + /** Returns the object with the settings used for calls to deleteEndpoint. */ + public UnaryCallSettings deleteEndpointSettings() { + return ((EndpointServiceStubSettings) getStubSettings()).deleteEndpointSettings(); + } + + /** Returns the object with the settings used for calls to deleteEndpoint. */ + public OperationCallSettings + deleteEndpointOperationSettings() { + return ((EndpointServiceStubSettings) getStubSettings()).deleteEndpointOperationSettings(); + } + + /** Returns the object with the settings used for calls to deployModel. */ + public UnaryCallSettings deployModelSettings() { + return ((EndpointServiceStubSettings) getStubSettings()).deployModelSettings(); + } + + /** Returns the object with the settings used for calls to deployModel. */ + public OperationCallSettings< + DeployModelRequest, DeployModelResponse, DeployModelOperationMetadata> + deployModelOperationSettings() { + return ((EndpointServiceStubSettings) getStubSettings()).deployModelOperationSettings(); + } + + /** Returns the object with the settings used for calls to undeployModel. */ + public UnaryCallSettings undeployModelSettings() { + return ((EndpointServiceStubSettings) getStubSettings()).undeployModelSettings(); + } + + /** Returns the object with the settings used for calls to undeployModel. */ + public OperationCallSettings< + UndeployModelRequest, UndeployModelResponse, UndeployModelOperationMetadata> + undeployModelOperationSettings() { + return ((EndpointServiceStubSettings) getStubSettings()).undeployModelOperationSettings(); + } + + public static final EndpointServiceSettings create(EndpointServiceStubSettings stub) + throws IOException { + return new EndpointServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return EndpointServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return EndpointServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return EndpointServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return EndpointServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return EndpointServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return EndpointServiceStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return EndpointServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected EndpointServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for EndpointServiceSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(EndpointServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(EndpointServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + 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'. + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to createEndpoint. */ + public UnaryCallSettings.Builder createEndpointSettings() { + return getStubSettingsBuilder().createEndpointSettings(); + } + + /** Returns the builder for the settings used for calls to createEndpoint. */ + public OperationCallSettings.Builder< + CreateEndpointRequest, Endpoint, CreateEndpointOperationMetadata> + createEndpointOperationSettings() { + return getStubSettingsBuilder().createEndpointOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getEndpoint. */ + public UnaryCallSettings.Builder getEndpointSettings() { + return getStubSettingsBuilder().getEndpointSettings(); + } + + /** Returns the builder for the settings used for calls to listEndpoints. */ + public PagedCallSettings.Builder< + ListEndpointsRequest, ListEndpointsResponse, ListEndpointsPagedResponse> + listEndpointsSettings() { + return getStubSettingsBuilder().listEndpointsSettings(); + } + + /** Returns the builder for the settings used for calls to updateEndpoint. */ + public UnaryCallSettings.Builder updateEndpointSettings() { + return getStubSettingsBuilder().updateEndpointSettings(); + } + + /** Returns the builder for the settings used for calls to deleteEndpoint. */ + public UnaryCallSettings.Builder deleteEndpointSettings() { + return getStubSettingsBuilder().deleteEndpointSettings(); + } + + /** Returns the builder for the settings used for calls to deleteEndpoint. */ + public OperationCallSettings.Builder + deleteEndpointOperationSettings() { + return getStubSettingsBuilder().deleteEndpointOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deployModel. */ + public UnaryCallSettings.Builder deployModelSettings() { + return getStubSettingsBuilder().deployModelSettings(); + } + + /** Returns the builder for the settings used for calls to deployModel. */ + public OperationCallSettings.Builder< + DeployModelRequest, DeployModelResponse, DeployModelOperationMetadata> + deployModelOperationSettings() { + return getStubSettingsBuilder().deployModelOperationSettings(); + } + + /** Returns the builder for the settings used for calls to undeployModel. */ + public UnaryCallSettings.Builder undeployModelSettings() { + return getStubSettingsBuilder().undeployModelSettings(); + } + + /** Returns the builder for the settings used for calls to undeployModel. */ + public OperationCallSettings.Builder< + UndeployModelRequest, UndeployModelResponse, UndeployModelOperationMetadata> + undeployModelOperationSettings() { + return getStubSettingsBuilder().undeployModelOperationSettings(); + } + + @Override + public EndpointServiceSettings build() throws IOException { + return new EndpointServiceSettings(this); + } + } +} diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/JobServiceClient.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/JobServiceClient.java new file mode 100644 index 000000000..28ea8877f --- /dev/null +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/JobServiceClient.java @@ -0,0 +1,1828 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1.stub.JobServiceStub; +import com.google.cloud.aiplatform.v1.stub.JobServiceStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.longrunning.Operation; +import com.google.longrunning.OperationsClient; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// 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: + * + *

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 + * methods: + * + *

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

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

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

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

To customize credentials: + * + *

{@code
+ * JobServiceSettings jobServiceSettings =
+ *     JobServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * JobServiceClient jobServiceClient = JobServiceClient.create(jobServiceSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

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

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class JobServiceClient implements BackgroundResource { + private final JobServiceSettings settings; + private final JobServiceStub stub; + private final OperationsClient operationsClient; + + /** Constructs an instance of JobServiceClient with default settings. */ + public static final JobServiceClient create() throws IOException { + return create(JobServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of JobServiceClient, using the given settings. The channels are created + * based on the settings passed in, or defaults for any settings that are not set. + */ + public static final JobServiceClient create(JobServiceSettings settings) throws IOException { + return new JobServiceClient(settings); + } + + /** + * Constructs an instance of JobServiceClient, using the given stub for making calls. This is for + * 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) { + return new JobServiceClient(stub); + } + + /** + * Constructs an instance of JobServiceClient, using the given settings. This is protected so that + * it is easy to make a subclass, but otherwise, the static factory methods should be preferred. + */ + protected JobServiceClient(JobServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((JobServiceStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + protected JobServiceClient(JobServiceStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + public final JobServiceSettings getSettings() { + return settings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public JobServiceStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final OperationsClient getOperationsClient() { + return operationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a CustomJob. A created CustomJob right away will be attempted to be run. + * + * @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. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final CustomJob createCustomJob(LocationName parent, CustomJob customJob) { + CreateCustomJobRequest request = + CreateCustomJobRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setCustomJob(customJob) + .build(); + return createCustomJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a CustomJob. A created CustomJob right away will be attempted to be run. + * + * @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. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final CustomJob createCustomJob(String parent, CustomJob customJob) { + CreateCustomJobRequest request = + CreateCustomJobRequest.newBuilder().setParent(parent).setCustomJob(customJob).build(); + return createCustomJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a CustomJob. A created CustomJob right away will be attempted to be run. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final CustomJob createCustomJob(CreateCustomJobRequest request) { + return createCustomJobCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a CustomJob. A created CustomJob right away will be attempted to be run. + * + *

Sample code: + */ + public final UnaryCallable createCustomJobCallable() { + return stub.createCustomJobCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a CustomJob. + * + * @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 + */ + public final CustomJob getCustomJob(CustomJobName name) { + GetCustomJobRequest request = + GetCustomJobRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getCustomJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a CustomJob. + * + * @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 + */ + public final CustomJob getCustomJob(String name) { + GetCustomJobRequest request = GetCustomJobRequest.newBuilder().setName(name).build(); + return getCustomJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a CustomJob. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final CustomJob getCustomJob(GetCustomJobRequest request) { + return getCustomJobCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a CustomJob. + * + *

Sample code: + */ + public final UnaryCallable getCustomJobCallable() { + return stub.getCustomJobCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists CustomJobs in a Location. + * + * @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 + */ + public final ListCustomJobsPagedResponse listCustomJobs(LocationName parent) { + ListCustomJobsRequest request = + ListCustomJobsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listCustomJobs(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists CustomJobs in a Location. + * + * @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 + */ + public final ListCustomJobsPagedResponse listCustomJobs(String parent) { + ListCustomJobsRequest request = ListCustomJobsRequest.newBuilder().setParent(parent).build(); + return listCustomJobs(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists CustomJobs in a Location. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListCustomJobsPagedResponse listCustomJobs(ListCustomJobsRequest request) { + return listCustomJobsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists CustomJobs in a Location. + * + *

Sample code: + */ + public final UnaryCallable + listCustomJobsPagedCallable() { + return stub.listCustomJobsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists CustomJobs in a Location. + * + *

Sample code: + */ + public final UnaryCallable + listCustomJobsCallable() { + return stub.listCustomJobsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a CustomJob. + * + * @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 + */ + public final OperationFuture deleteCustomJobAsync( + CustomJobName name) { + DeleteCustomJobRequest request = + DeleteCustomJobRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deleteCustomJobAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a CustomJob. + * + * @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 + */ + public final OperationFuture deleteCustomJobAsync(String name) { + DeleteCustomJobRequest request = DeleteCustomJobRequest.newBuilder().setName(name).build(); + return deleteCustomJobAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a CustomJob. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteCustomJobAsync( + DeleteCustomJobRequest request) { + return deleteCustomJobOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a CustomJob. + * + *

Sample code: + */ + public final OperationCallable + deleteCustomJobOperationCallable() { + return stub.deleteCustomJobOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a CustomJob. + * + *

Sample code: + */ + public final UnaryCallable deleteCustomJobCallable() { + return stub.deleteCustomJobCallable(); + } + + // 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 + * [JobService.GetCustomJob][google.cloud.aiplatform.v1.JobService.GetCustomJob] or other methods + * to check whether the cancellation succeeded or whether the job completed despite cancellation. + * On successful cancellation, the CustomJob is not deleted; instead it becomes a job with a + * [CustomJob.error][google.cloud.aiplatform.v1.CustomJob.error] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`, and + * [CustomJob.state][google.cloud.aiplatform.v1.CustomJob.state] is set to `CANCELLED`. + * + * @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 + */ + public final void cancelCustomJob(CustomJobName name) { + CancelCustomJobRequest request = + CancelCustomJobRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + cancelCustomJob(request); + } + + // 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 + * [JobService.GetCustomJob][google.cloud.aiplatform.v1.JobService.GetCustomJob] or other methods + * to check whether the cancellation succeeded or whether the job completed despite cancellation. + * On successful cancellation, the CustomJob is not deleted; instead it becomes a job with a + * [CustomJob.error][google.cloud.aiplatform.v1.CustomJob.error] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`, and + * [CustomJob.state][google.cloud.aiplatform.v1.CustomJob.state] is set to `CANCELLED`. + * + * @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 + */ + public final void cancelCustomJob(String name) { + CancelCustomJobRequest request = CancelCustomJobRequest.newBuilder().setName(name).build(); + cancelCustomJob(request); + } + + // 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 + * [JobService.GetCustomJob][google.cloud.aiplatform.v1.JobService.GetCustomJob] or other methods + * to check whether the cancellation succeeded or whether the job completed despite cancellation. + * On successful cancellation, the CustomJob is not deleted; instead it becomes a job with a + * [CustomJob.error][google.cloud.aiplatform.v1.CustomJob.error] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`, and + * [CustomJob.state][google.cloud.aiplatform.v1.CustomJob.state] is set to `CANCELLED`. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void cancelCustomJob(CancelCustomJobRequest request) { + cancelCustomJobCallable().call(request); + } + + // 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 + * [JobService.GetCustomJob][google.cloud.aiplatform.v1.JobService.GetCustomJob] or other methods + * to check whether the cancellation succeeded or whether the job completed despite cancellation. + * On successful cancellation, the CustomJob is not deleted; instead it becomes a job with a + * [CustomJob.error][google.cloud.aiplatform.v1.CustomJob.error] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`, and + * [CustomJob.state][google.cloud.aiplatform.v1.CustomJob.state] is set to `CANCELLED`. + * + *

Sample code: + */ + public final UnaryCallable cancelCustomJobCallable() { + return stub.cancelCustomJobCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a DataLabelingJob. + * + * @param parent Required. The parent of the DataLabelingJob. Format: + * `projects/{project}/locations/{location}` + * @param dataLabelingJob Required. The DataLabelingJob to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DataLabelingJob createDataLabelingJob( + LocationName parent, DataLabelingJob dataLabelingJob) { + CreateDataLabelingJobRequest request = + CreateDataLabelingJobRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setDataLabelingJob(dataLabelingJob) + .build(); + return createDataLabelingJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a DataLabelingJob. + * + * @param parent Required. The parent of the DataLabelingJob. Format: + * `projects/{project}/locations/{location}` + * @param dataLabelingJob Required. The DataLabelingJob to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DataLabelingJob createDataLabelingJob( + String parent, DataLabelingJob dataLabelingJob) { + CreateDataLabelingJobRequest request = + CreateDataLabelingJobRequest.newBuilder() + .setParent(parent) + .setDataLabelingJob(dataLabelingJob) + .build(); + return createDataLabelingJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a DataLabelingJob. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DataLabelingJob createDataLabelingJob(CreateDataLabelingJobRequest request) { + return createDataLabelingJobCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a DataLabelingJob. + * + *

Sample code: + */ + public final UnaryCallable + createDataLabelingJobCallable() { + return stub.createDataLabelingJobCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a DataLabelingJob. + * + * @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 + */ + public final DataLabelingJob getDataLabelingJob(DataLabelingJobName name) { + GetDataLabelingJobRequest request = + GetDataLabelingJobRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getDataLabelingJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a DataLabelingJob. + * + * @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 + */ + public final DataLabelingJob getDataLabelingJob(String name) { + GetDataLabelingJobRequest request = + GetDataLabelingJobRequest.newBuilder().setName(name).build(); + return getDataLabelingJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a DataLabelingJob. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DataLabelingJob getDataLabelingJob(GetDataLabelingJobRequest request) { + return getDataLabelingJobCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a DataLabelingJob. + * + *

Sample code: + */ + public final UnaryCallable + getDataLabelingJobCallable() { + return stub.getDataLabelingJobCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DataLabelingJobs in a Location. + * + * @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 + */ + public final ListDataLabelingJobsPagedResponse listDataLabelingJobs(LocationName parent) { + ListDataLabelingJobsRequest request = + ListDataLabelingJobsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listDataLabelingJobs(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DataLabelingJobs in a Location. + * + * @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 + */ + public final ListDataLabelingJobsPagedResponse listDataLabelingJobs(String parent) { + ListDataLabelingJobsRequest request = + ListDataLabelingJobsRequest.newBuilder().setParent(parent).build(); + return listDataLabelingJobs(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DataLabelingJobs in a Location. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDataLabelingJobsPagedResponse listDataLabelingJobs( + ListDataLabelingJobsRequest request) { + return listDataLabelingJobsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DataLabelingJobs in a Location. + * + *

Sample code: + */ + public final UnaryCallable + listDataLabelingJobsPagedCallable() { + return stub.listDataLabelingJobsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DataLabelingJobs in a Location. + * + *

Sample code: + */ + public final UnaryCallable + listDataLabelingJobsCallable() { + return stub.listDataLabelingJobsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a DataLabelingJob. + * + * @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 + */ + public final OperationFuture deleteDataLabelingJobAsync( + DataLabelingJobName name) { + DeleteDataLabelingJobRequest request = + DeleteDataLabelingJobRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return deleteDataLabelingJobAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a DataLabelingJob. + * + * @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 + */ + public final OperationFuture deleteDataLabelingJobAsync( + String name) { + DeleteDataLabelingJobRequest request = + DeleteDataLabelingJobRequest.newBuilder().setName(name).build(); + return deleteDataLabelingJobAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a DataLabelingJob. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteDataLabelingJobAsync( + DeleteDataLabelingJobRequest request) { + return deleteDataLabelingJobOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a DataLabelingJob. + * + *

Sample code: + */ + public final OperationCallable + deleteDataLabelingJobOperationCallable() { + return stub.deleteDataLabelingJobOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a DataLabelingJob. + * + *

Sample code: + */ + public final UnaryCallable + deleteDataLabelingJobCallable() { + return stub.deleteDataLabelingJobCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Cancels a DataLabelingJob. Success of cancellation is not guaranteed. + * + * @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 + */ + public final void cancelDataLabelingJob(DataLabelingJobName name) { + CancelDataLabelingJobRequest request = + CancelDataLabelingJobRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + cancelDataLabelingJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Cancels a DataLabelingJob. Success of cancellation is not guaranteed. + * + * @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 + */ + public final void cancelDataLabelingJob(String name) { + CancelDataLabelingJobRequest request = + CancelDataLabelingJobRequest.newBuilder().setName(name).build(); + cancelDataLabelingJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Cancels a DataLabelingJob. Success of cancellation is not guaranteed. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void cancelDataLabelingJob(CancelDataLabelingJobRequest request) { + cancelDataLabelingJobCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Cancels a DataLabelingJob. Success of cancellation is not guaranteed. + * + *

Sample code: + */ + public final UnaryCallable cancelDataLabelingJobCallable() { + return stub.cancelDataLabelingJobCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a 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. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final HyperparameterTuningJob createHyperparameterTuningJob( + LocationName parent, HyperparameterTuningJob hyperparameterTuningJob) { + CreateHyperparameterTuningJobRequest request = + CreateHyperparameterTuningJobRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setHyperparameterTuningJob(hyperparameterTuningJob) + .build(); + return createHyperparameterTuningJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a 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. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final HyperparameterTuningJob createHyperparameterTuningJob( + String parent, HyperparameterTuningJob hyperparameterTuningJob) { + CreateHyperparameterTuningJobRequest request = + CreateHyperparameterTuningJobRequest.newBuilder() + .setParent(parent) + .setHyperparameterTuningJob(hyperparameterTuningJob) + .build(); + return createHyperparameterTuningJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a HyperparameterTuningJob + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final HyperparameterTuningJob createHyperparameterTuningJob( + CreateHyperparameterTuningJobRequest request) { + return createHyperparameterTuningJobCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a HyperparameterTuningJob + * + *

Sample code: + */ + public final UnaryCallable + createHyperparameterTuningJobCallable() { + return stub.createHyperparameterTuningJobCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a HyperparameterTuningJob + * + * @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 + */ + public final HyperparameterTuningJob getHyperparameterTuningJob( + HyperparameterTuningJobName name) { + GetHyperparameterTuningJobRequest request = + GetHyperparameterTuningJobRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getHyperparameterTuningJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a HyperparameterTuningJob + * + * @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 + */ + public final HyperparameterTuningJob getHyperparameterTuningJob(String name) { + GetHyperparameterTuningJobRequest request = + GetHyperparameterTuningJobRequest.newBuilder().setName(name).build(); + return getHyperparameterTuningJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a HyperparameterTuningJob + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final HyperparameterTuningJob getHyperparameterTuningJob( + GetHyperparameterTuningJobRequest request) { + return getHyperparameterTuningJobCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a HyperparameterTuningJob + * + *

Sample code: + */ + public final UnaryCallable + getHyperparameterTuningJobCallable() { + return stub.getHyperparameterTuningJobCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists HyperparameterTuningJobs in a Location. + * + * @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 + */ + public final ListHyperparameterTuningJobsPagedResponse listHyperparameterTuningJobs( + LocationName parent) { + ListHyperparameterTuningJobsRequest request = + ListHyperparameterTuningJobsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listHyperparameterTuningJobs(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists HyperparameterTuningJobs in a Location. + * + * @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 + */ + public final ListHyperparameterTuningJobsPagedResponse listHyperparameterTuningJobs( + String parent) { + ListHyperparameterTuningJobsRequest request = + ListHyperparameterTuningJobsRequest.newBuilder().setParent(parent).build(); + return listHyperparameterTuningJobs(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists HyperparameterTuningJobs in a Location. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListHyperparameterTuningJobsPagedResponse listHyperparameterTuningJobs( + ListHyperparameterTuningJobsRequest request) { + return listHyperparameterTuningJobsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists HyperparameterTuningJobs in a Location. + * + *

Sample code: + */ + public final UnaryCallable< + ListHyperparameterTuningJobsRequest, ListHyperparameterTuningJobsPagedResponse> + listHyperparameterTuningJobsPagedCallable() { + return stub.listHyperparameterTuningJobsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists HyperparameterTuningJobs in a Location. + * + *

Sample code: + */ + public final UnaryCallable< + ListHyperparameterTuningJobsRequest, ListHyperparameterTuningJobsResponse> + listHyperparameterTuningJobsCallable() { + return stub.listHyperparameterTuningJobsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a HyperparameterTuningJob. + * + * @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 + */ + public final OperationFuture deleteHyperparameterTuningJobAsync( + HyperparameterTuningJobName name) { + DeleteHyperparameterTuningJobRequest request = + DeleteHyperparameterTuningJobRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return deleteHyperparameterTuningJobAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a HyperparameterTuningJob. + * + * @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 + */ + public final OperationFuture deleteHyperparameterTuningJobAsync( + String name) { + DeleteHyperparameterTuningJobRequest request = + DeleteHyperparameterTuningJobRequest.newBuilder().setName(name).build(); + return deleteHyperparameterTuningJobAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a HyperparameterTuningJob. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteHyperparameterTuningJobAsync( + DeleteHyperparameterTuningJobRequest request) { + return deleteHyperparameterTuningJobOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a HyperparameterTuningJob. + * + *

Sample code: + */ + public final OperationCallable< + DeleteHyperparameterTuningJobRequest, Empty, DeleteOperationMetadata> + deleteHyperparameterTuningJobOperationCallable() { + return stub.deleteHyperparameterTuningJobOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a HyperparameterTuningJob. + * + *

Sample code: + */ + public final UnaryCallable + deleteHyperparameterTuningJobCallable() { + return stub.deleteHyperparameterTuningJobCallable(); + } + + // 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 + * guaranteed. Clients can use + * [JobService.GetHyperparameterTuningJob][google.cloud.aiplatform.v1.JobService.GetHyperparameterTuningJob] + * or other methods to check whether the cancellation succeeded or whether the job completed + * despite cancellation. On successful cancellation, the HyperparameterTuningJob is not deleted; + * instead it becomes a job with a + * [HyperparameterTuningJob.error][google.cloud.aiplatform.v1.HyperparameterTuningJob.error] value + * with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`, and + * [HyperparameterTuningJob.state][google.cloud.aiplatform.v1.HyperparameterTuningJob.state] is + * set to `CANCELLED`. + * + * @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 + */ + public final void cancelHyperparameterTuningJob(HyperparameterTuningJobName name) { + CancelHyperparameterTuningJobRequest request = + CancelHyperparameterTuningJobRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + cancelHyperparameterTuningJob(request); + } + + // 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 + * guaranteed. Clients can use + * [JobService.GetHyperparameterTuningJob][google.cloud.aiplatform.v1.JobService.GetHyperparameterTuningJob] + * or other methods to check whether the cancellation succeeded or whether the job completed + * despite cancellation. On successful cancellation, the HyperparameterTuningJob is not deleted; + * instead it becomes a job with a + * [HyperparameterTuningJob.error][google.cloud.aiplatform.v1.HyperparameterTuningJob.error] value + * with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`, and + * [HyperparameterTuningJob.state][google.cloud.aiplatform.v1.HyperparameterTuningJob.state] is + * set to `CANCELLED`. + * + * @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 + */ + public final void cancelHyperparameterTuningJob(String name) { + CancelHyperparameterTuningJobRequest request = + CancelHyperparameterTuningJobRequest.newBuilder().setName(name).build(); + cancelHyperparameterTuningJob(request); + } + + // 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 + * guaranteed. Clients can use + * [JobService.GetHyperparameterTuningJob][google.cloud.aiplatform.v1.JobService.GetHyperparameterTuningJob] + * or other methods to check whether the cancellation succeeded or whether the job completed + * despite cancellation. On successful cancellation, the HyperparameterTuningJob is not deleted; + * instead it becomes a job with a + * [HyperparameterTuningJob.error][google.cloud.aiplatform.v1.HyperparameterTuningJob.error] value + * with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`, and + * [HyperparameterTuningJob.state][google.cloud.aiplatform.v1.HyperparameterTuningJob.state] is + * set to `CANCELLED`. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void cancelHyperparameterTuningJob(CancelHyperparameterTuningJobRequest request) { + cancelHyperparameterTuningJobCallable().call(request); + } + + // 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 + * guaranteed. Clients can use + * [JobService.GetHyperparameterTuningJob][google.cloud.aiplatform.v1.JobService.GetHyperparameterTuningJob] + * or other methods to check whether the cancellation succeeded or whether the job completed + * despite cancellation. On successful cancellation, the HyperparameterTuningJob is not deleted; + * instead it becomes a job with a + * [HyperparameterTuningJob.error][google.cloud.aiplatform.v1.HyperparameterTuningJob.error] value + * with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`, and + * [HyperparameterTuningJob.state][google.cloud.aiplatform.v1.HyperparameterTuningJob.state] is + * set to `CANCELLED`. + * + *

Sample code: + */ + public final UnaryCallable + cancelHyperparameterTuningJobCallable() { + return stub.cancelHyperparameterTuningJobCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a BatchPredictionJob. A BatchPredictionJob once created will right away be attempted to + * start. + * + * @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. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BatchPredictionJob createBatchPredictionJob( + LocationName parent, BatchPredictionJob batchPredictionJob) { + CreateBatchPredictionJobRequest request = + CreateBatchPredictionJobRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setBatchPredictionJob(batchPredictionJob) + .build(); + return createBatchPredictionJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a BatchPredictionJob. A BatchPredictionJob once created will right away be attempted to + * start. + * + * @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. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BatchPredictionJob createBatchPredictionJob( + String parent, BatchPredictionJob batchPredictionJob) { + CreateBatchPredictionJobRequest request = + CreateBatchPredictionJobRequest.newBuilder() + .setParent(parent) + .setBatchPredictionJob(batchPredictionJob) + .build(); + return createBatchPredictionJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a BatchPredictionJob. A BatchPredictionJob once created will right away be attempted to + * start. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BatchPredictionJob createBatchPredictionJob( + CreateBatchPredictionJobRequest request) { + return createBatchPredictionJobCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a BatchPredictionJob. A BatchPredictionJob once created will right away be attempted to + * start. + * + *

Sample code: + */ + public final UnaryCallable + createBatchPredictionJobCallable() { + return stub.createBatchPredictionJobCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a BatchPredictionJob + * + * @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 + */ + public final BatchPredictionJob getBatchPredictionJob(BatchPredictionJobName name) { + GetBatchPredictionJobRequest request = + GetBatchPredictionJobRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getBatchPredictionJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a BatchPredictionJob + * + * @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 + */ + public final BatchPredictionJob getBatchPredictionJob(String name) { + GetBatchPredictionJobRequest request = + GetBatchPredictionJobRequest.newBuilder().setName(name).build(); + return getBatchPredictionJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a BatchPredictionJob + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BatchPredictionJob getBatchPredictionJob(GetBatchPredictionJobRequest request) { + return getBatchPredictionJobCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a BatchPredictionJob + * + *

Sample code: + */ + public final UnaryCallable + getBatchPredictionJobCallable() { + return stub.getBatchPredictionJobCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists BatchPredictionJobs in a Location. + * + * @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 + */ + public final ListBatchPredictionJobsPagedResponse listBatchPredictionJobs(LocationName parent) { + ListBatchPredictionJobsRequest request = + ListBatchPredictionJobsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listBatchPredictionJobs(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists BatchPredictionJobs in a Location. + * + * @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 + */ + public final ListBatchPredictionJobsPagedResponse listBatchPredictionJobs(String parent) { + ListBatchPredictionJobsRequest request = + ListBatchPredictionJobsRequest.newBuilder().setParent(parent).build(); + return listBatchPredictionJobs(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists BatchPredictionJobs in a Location. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListBatchPredictionJobsPagedResponse listBatchPredictionJobs( + ListBatchPredictionJobsRequest request) { + return listBatchPredictionJobsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists BatchPredictionJobs in a Location. + * + *

Sample code: + */ + public final UnaryCallable + listBatchPredictionJobsPagedCallable() { + return stub.listBatchPredictionJobsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists BatchPredictionJobs in a Location. + * + *

Sample code: + */ + public final UnaryCallable + listBatchPredictionJobsCallable() { + return stub.listBatchPredictionJobsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a BatchPredictionJob. Can only be called on jobs that already finished. + * + * @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 + */ + public final OperationFuture deleteBatchPredictionJobAsync( + BatchPredictionJobName name) { + DeleteBatchPredictionJobRequest request = + DeleteBatchPredictionJobRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return deleteBatchPredictionJobAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a BatchPredictionJob. Can only be called on jobs that already finished. + * + * @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 + */ + public final OperationFuture deleteBatchPredictionJobAsync( + String name) { + DeleteBatchPredictionJobRequest request = + DeleteBatchPredictionJobRequest.newBuilder().setName(name).build(); + return deleteBatchPredictionJobAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a BatchPredictionJob. Can only be called on jobs that already finished. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteBatchPredictionJobAsync( + DeleteBatchPredictionJobRequest request) { + return deleteBatchPredictionJobOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a BatchPredictionJob. Can only be called on jobs that already finished. + * + *

Sample code: + */ + public final OperationCallable + deleteBatchPredictionJobOperationCallable() { + return stub.deleteBatchPredictionJobOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a BatchPredictionJob. Can only be called on jobs that already finished. + * + *

Sample code: + */ + public final UnaryCallable + deleteBatchPredictionJobCallable() { + return stub.deleteBatchPredictionJobCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Cancels a BatchPredictionJob. + * + *

Starts asynchronous cancellation on the BatchPredictionJob. The server makes the best effort + * to cancel the job, but success is not guaranteed. Clients can use + * [JobService.GetBatchPredictionJob][google.cloud.aiplatform.v1.JobService.GetBatchPredictionJob] + * or other methods to check whether the cancellation succeeded or whether the job completed + * despite cancellation. On a successful cancellation, the BatchPredictionJob is not + * deleted;instead its + * [BatchPredictionJob.state][google.cloud.aiplatform.v1.BatchPredictionJob.state] is set to + * `CANCELLED`. Any files already outputted by the job are not deleted. + * + * @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 + */ + public final void cancelBatchPredictionJob(BatchPredictionJobName name) { + CancelBatchPredictionJobRequest request = + CancelBatchPredictionJobRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + cancelBatchPredictionJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Cancels a BatchPredictionJob. + * + *

Starts asynchronous cancellation on the BatchPredictionJob. The server makes the best effort + * to cancel the job, but success is not guaranteed. Clients can use + * [JobService.GetBatchPredictionJob][google.cloud.aiplatform.v1.JobService.GetBatchPredictionJob] + * or other methods to check whether the cancellation succeeded or whether the job completed + * despite cancellation. On a successful cancellation, the BatchPredictionJob is not + * deleted;instead its + * [BatchPredictionJob.state][google.cloud.aiplatform.v1.BatchPredictionJob.state] is set to + * `CANCELLED`. Any files already outputted by the job are not deleted. + * + * @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 + */ + public final void cancelBatchPredictionJob(String name) { + CancelBatchPredictionJobRequest request = + CancelBatchPredictionJobRequest.newBuilder().setName(name).build(); + cancelBatchPredictionJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Cancels a BatchPredictionJob. + * + *

Starts asynchronous cancellation on the BatchPredictionJob. The server makes the best effort + * to cancel the job, but success is not guaranteed. Clients can use + * [JobService.GetBatchPredictionJob][google.cloud.aiplatform.v1.JobService.GetBatchPredictionJob] + * or other methods to check whether the cancellation succeeded or whether the job completed + * despite cancellation. On a successful cancellation, the BatchPredictionJob is not + * deleted;instead its + * [BatchPredictionJob.state][google.cloud.aiplatform.v1.BatchPredictionJob.state] is set to + * `CANCELLED`. Any files already outputted by the job are not deleted. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void cancelBatchPredictionJob(CancelBatchPredictionJobRequest request) { + cancelBatchPredictionJobCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Cancels a BatchPredictionJob. + * + *

Starts asynchronous cancellation on the BatchPredictionJob. The server makes the best effort + * to cancel the job, but success is not guaranteed. Clients can use + * [JobService.GetBatchPredictionJob][google.cloud.aiplatform.v1.JobService.GetBatchPredictionJob] + * or other methods to check whether the cancellation succeeded or whether the job completed + * despite cancellation. On a successful cancellation, the BatchPredictionJob is not + * deleted;instead its + * [BatchPredictionJob.state][google.cloud.aiplatform.v1.BatchPredictionJob.state] is set to + * `CANCELLED`. Any files already outputted by the job are not deleted. + * + *

Sample code: + */ + public final UnaryCallable + cancelBatchPredictionJobCallable() { + return stub.cancelBatchPredictionJobCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListCustomJobsPagedResponse + extends AbstractPagedListResponse< + ListCustomJobsRequest, + ListCustomJobsResponse, + CustomJob, + ListCustomJobsPage, + ListCustomJobsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListCustomJobsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListCustomJobsPagedResponse apply(ListCustomJobsPage input) { + return new ListCustomJobsPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListCustomJobsPagedResponse(ListCustomJobsPage page) { + super(page, ListCustomJobsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListCustomJobsPage + extends AbstractPage< + ListCustomJobsRequest, ListCustomJobsResponse, CustomJob, ListCustomJobsPage> { + + private ListCustomJobsPage( + PageContext context, + ListCustomJobsResponse response) { + super(context, response); + } + + private static ListCustomJobsPage createEmptyPage() { + return new ListCustomJobsPage(null, null); + } + + @Override + protected ListCustomJobsPage createPage( + PageContext context, + ListCustomJobsResponse response) { + return new ListCustomJobsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListCustomJobsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListCustomJobsRequest, + ListCustomJobsResponse, + CustomJob, + ListCustomJobsPage, + ListCustomJobsFixedSizeCollection> { + + private ListCustomJobsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListCustomJobsFixedSizeCollection createEmptyCollection() { + return new ListCustomJobsFixedSizeCollection(null, 0); + } + + @Override + protected ListCustomJobsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListCustomJobsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListDataLabelingJobsPagedResponse + extends AbstractPagedListResponse< + ListDataLabelingJobsRequest, + ListDataLabelingJobsResponse, + DataLabelingJob, + ListDataLabelingJobsPage, + ListDataLabelingJobsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListDataLabelingJobsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListDataLabelingJobsPagedResponse apply(ListDataLabelingJobsPage input) { + return new ListDataLabelingJobsPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListDataLabelingJobsPagedResponse(ListDataLabelingJobsPage page) { + super(page, ListDataLabelingJobsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListDataLabelingJobsPage + extends AbstractPage< + ListDataLabelingJobsRequest, + ListDataLabelingJobsResponse, + DataLabelingJob, + ListDataLabelingJobsPage> { + + private ListDataLabelingJobsPage( + PageContext + context, + ListDataLabelingJobsResponse response) { + super(context, response); + } + + private static ListDataLabelingJobsPage createEmptyPage() { + return new ListDataLabelingJobsPage(null, null); + } + + @Override + protected ListDataLabelingJobsPage createPage( + PageContext + context, + ListDataLabelingJobsResponse response) { + return new ListDataLabelingJobsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListDataLabelingJobsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListDataLabelingJobsRequest, + ListDataLabelingJobsResponse, + DataLabelingJob, + ListDataLabelingJobsPage, + ListDataLabelingJobsFixedSizeCollection> { + + private ListDataLabelingJobsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListDataLabelingJobsFixedSizeCollection createEmptyCollection() { + return new ListDataLabelingJobsFixedSizeCollection(null, 0); + } + + @Override + protected ListDataLabelingJobsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListDataLabelingJobsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListHyperparameterTuningJobsPagedResponse + extends AbstractPagedListResponse< + ListHyperparameterTuningJobsRequest, + ListHyperparameterTuningJobsResponse, + HyperparameterTuningJob, + ListHyperparameterTuningJobsPage, + ListHyperparameterTuningJobsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + ListHyperparameterTuningJobsRequest, + ListHyperparameterTuningJobsResponse, + HyperparameterTuningJob> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListHyperparameterTuningJobsPage.createEmptyPage() + .createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction< + ListHyperparameterTuningJobsPage, ListHyperparameterTuningJobsPagedResponse>() { + @Override + public ListHyperparameterTuningJobsPagedResponse apply( + ListHyperparameterTuningJobsPage input) { + return new ListHyperparameterTuningJobsPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListHyperparameterTuningJobsPagedResponse(ListHyperparameterTuningJobsPage page) { + super(page, ListHyperparameterTuningJobsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListHyperparameterTuningJobsPage + extends AbstractPage< + ListHyperparameterTuningJobsRequest, + ListHyperparameterTuningJobsResponse, + HyperparameterTuningJob, + ListHyperparameterTuningJobsPage> { + + private ListHyperparameterTuningJobsPage( + PageContext< + ListHyperparameterTuningJobsRequest, + ListHyperparameterTuningJobsResponse, + HyperparameterTuningJob> + context, + ListHyperparameterTuningJobsResponse response) { + super(context, response); + } + + private static ListHyperparameterTuningJobsPage createEmptyPage() { + return new ListHyperparameterTuningJobsPage(null, null); + } + + @Override + protected ListHyperparameterTuningJobsPage createPage( + PageContext< + ListHyperparameterTuningJobsRequest, + ListHyperparameterTuningJobsResponse, + HyperparameterTuningJob> + context, + ListHyperparameterTuningJobsResponse response) { + return new ListHyperparameterTuningJobsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext< + ListHyperparameterTuningJobsRequest, + ListHyperparameterTuningJobsResponse, + HyperparameterTuningJob> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListHyperparameterTuningJobsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListHyperparameterTuningJobsRequest, + ListHyperparameterTuningJobsResponse, + HyperparameterTuningJob, + ListHyperparameterTuningJobsPage, + ListHyperparameterTuningJobsFixedSizeCollection> { + + private ListHyperparameterTuningJobsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListHyperparameterTuningJobsFixedSizeCollection createEmptyCollection() { + return new ListHyperparameterTuningJobsFixedSizeCollection(null, 0); + } + + @Override + protected ListHyperparameterTuningJobsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListHyperparameterTuningJobsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListBatchPredictionJobsPagedResponse + extends AbstractPagedListResponse< + ListBatchPredictionJobsRequest, + ListBatchPredictionJobsResponse, + BatchPredictionJob, + ListBatchPredictionJobsPage, + ListBatchPredictionJobsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + ListBatchPredictionJobsRequest, ListBatchPredictionJobsResponse, BatchPredictionJob> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListBatchPredictionJobsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListBatchPredictionJobsPagedResponse apply(ListBatchPredictionJobsPage input) { + return new ListBatchPredictionJobsPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListBatchPredictionJobsPagedResponse(ListBatchPredictionJobsPage page) { + super(page, ListBatchPredictionJobsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListBatchPredictionJobsPage + extends AbstractPage< + ListBatchPredictionJobsRequest, + ListBatchPredictionJobsResponse, + BatchPredictionJob, + ListBatchPredictionJobsPage> { + + private ListBatchPredictionJobsPage( + PageContext< + ListBatchPredictionJobsRequest, ListBatchPredictionJobsResponse, BatchPredictionJob> + context, + ListBatchPredictionJobsResponse response) { + super(context, response); + } + + private static ListBatchPredictionJobsPage createEmptyPage() { + return new ListBatchPredictionJobsPage(null, null); + } + + @Override + protected ListBatchPredictionJobsPage createPage( + PageContext< + ListBatchPredictionJobsRequest, ListBatchPredictionJobsResponse, BatchPredictionJob> + context, + ListBatchPredictionJobsResponse response) { + return new ListBatchPredictionJobsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext< + ListBatchPredictionJobsRequest, ListBatchPredictionJobsResponse, BatchPredictionJob> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListBatchPredictionJobsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListBatchPredictionJobsRequest, + ListBatchPredictionJobsResponse, + BatchPredictionJob, + ListBatchPredictionJobsPage, + ListBatchPredictionJobsFixedSizeCollection> { + + private ListBatchPredictionJobsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListBatchPredictionJobsFixedSizeCollection createEmptyCollection() { + return new ListBatchPredictionJobsFixedSizeCollection(null, 0); + } + + @Override + protected ListBatchPredictionJobsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListBatchPredictionJobsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/JobServiceSettings.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/JobServiceSettings.java new file mode 100644 index 000000000..279a21ffb --- /dev/null +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/JobServiceSettings.java @@ -0,0 +1,482 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1; + +import static com.google.cloud.aiplatform.v1.JobServiceClient.ListBatchPredictionJobsPagedResponse; +import static com.google.cloud.aiplatform.v1.JobServiceClient.ListCustomJobsPagedResponse; +import static com.google.cloud.aiplatform.v1.JobServiceClient.ListDataLabelingJobsPagedResponse; +import static com.google.cloud.aiplatform.v1.JobServiceClient.ListHyperparameterTuningJobsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.aiplatform.v1.stub.JobServiceStubSettings; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link JobServiceClient}. + * + *

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

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

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

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

{@code
+ * JobServiceSettings.Builder jobServiceSettingsBuilder = JobServiceSettings.newBuilder();
+ * jobServiceSettingsBuilder
+ *     .createCustomJobSettings()
+ *     .setRetrySettings(
+ *         jobServiceSettingsBuilder
+ *             .createCustomJobSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * JobServiceSettings jobServiceSettings = jobServiceSettingsBuilder.build();
+ * }
+ */ +@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(); + } + + /** Returns the object with the settings used for calls to getCustomJob. */ + public UnaryCallSettings getCustomJobSettings() { + return ((JobServiceStubSettings) getStubSettings()).getCustomJobSettings(); + } + + /** Returns the object with the settings used for calls to listCustomJobs. */ + public PagedCallSettings< + ListCustomJobsRequest, ListCustomJobsResponse, ListCustomJobsPagedResponse> + listCustomJobsSettings() { + return ((JobServiceStubSettings) getStubSettings()).listCustomJobsSettings(); + } + + /** Returns the object with the settings used for calls to deleteCustomJob. */ + public UnaryCallSettings deleteCustomJobSettings() { + return ((JobServiceStubSettings) getStubSettings()).deleteCustomJobSettings(); + } + + /** Returns the object with the settings used for calls to deleteCustomJob. */ + public OperationCallSettings + deleteCustomJobOperationSettings() { + return ((JobServiceStubSettings) getStubSettings()).deleteCustomJobOperationSettings(); + } + + /** Returns the object with the settings used for calls to cancelCustomJob. */ + public UnaryCallSettings cancelCustomJobSettings() { + return ((JobServiceStubSettings) getStubSettings()).cancelCustomJobSettings(); + } + + /** Returns the object with the settings used for calls to createDataLabelingJob. */ + public UnaryCallSettings + createDataLabelingJobSettings() { + return ((JobServiceStubSettings) getStubSettings()).createDataLabelingJobSettings(); + } + + /** Returns the object with the settings used for calls to getDataLabelingJob. */ + public UnaryCallSettings + getDataLabelingJobSettings() { + return ((JobServiceStubSettings) getStubSettings()).getDataLabelingJobSettings(); + } + + /** Returns the object with the settings used for calls to listDataLabelingJobs. */ + public PagedCallSettings< + ListDataLabelingJobsRequest, + ListDataLabelingJobsResponse, + ListDataLabelingJobsPagedResponse> + listDataLabelingJobsSettings() { + return ((JobServiceStubSettings) getStubSettings()).listDataLabelingJobsSettings(); + } + + /** Returns the object with the settings used for calls to deleteDataLabelingJob. */ + public UnaryCallSettings + deleteDataLabelingJobSettings() { + return ((JobServiceStubSettings) getStubSettings()).deleteDataLabelingJobSettings(); + } + + /** Returns the object with the settings used for calls to deleteDataLabelingJob. */ + public OperationCallSettings + deleteDataLabelingJobOperationSettings() { + return ((JobServiceStubSettings) getStubSettings()).deleteDataLabelingJobOperationSettings(); + } + + /** Returns the object with the settings used for calls to cancelDataLabelingJob. */ + public UnaryCallSettings cancelDataLabelingJobSettings() { + return ((JobServiceStubSettings) getStubSettings()).cancelDataLabelingJobSettings(); + } + + /** Returns the object with the settings used for calls to createHyperparameterTuningJob. */ + public UnaryCallSettings + createHyperparameterTuningJobSettings() { + return ((JobServiceStubSettings) getStubSettings()).createHyperparameterTuningJobSettings(); + } + + /** Returns the object with the settings used for calls to getHyperparameterTuningJob. */ + public UnaryCallSettings + getHyperparameterTuningJobSettings() { + return ((JobServiceStubSettings) getStubSettings()).getHyperparameterTuningJobSettings(); + } + + /** Returns the object with the settings used for calls to listHyperparameterTuningJobs. */ + public PagedCallSettings< + ListHyperparameterTuningJobsRequest, + ListHyperparameterTuningJobsResponse, + ListHyperparameterTuningJobsPagedResponse> + listHyperparameterTuningJobsSettings() { + return ((JobServiceStubSettings) getStubSettings()).listHyperparameterTuningJobsSettings(); + } + + /** Returns the object with the settings used for calls to deleteHyperparameterTuningJob. */ + public UnaryCallSettings + deleteHyperparameterTuningJobSettings() { + return ((JobServiceStubSettings) getStubSettings()).deleteHyperparameterTuningJobSettings(); + } + + /** Returns the object with the settings used for calls to deleteHyperparameterTuningJob. */ + public OperationCallSettings + deleteHyperparameterTuningJobOperationSettings() { + return ((JobServiceStubSettings) getStubSettings()) + .deleteHyperparameterTuningJobOperationSettings(); + } + + /** Returns the object with the settings used for calls to cancelHyperparameterTuningJob. */ + public UnaryCallSettings + cancelHyperparameterTuningJobSettings() { + return ((JobServiceStubSettings) getStubSettings()).cancelHyperparameterTuningJobSettings(); + } + + /** Returns the object with the settings used for calls to createBatchPredictionJob. */ + public UnaryCallSettings + createBatchPredictionJobSettings() { + return ((JobServiceStubSettings) getStubSettings()).createBatchPredictionJobSettings(); + } + + /** Returns the object with the settings used for calls to getBatchPredictionJob. */ + public UnaryCallSettings + getBatchPredictionJobSettings() { + return ((JobServiceStubSettings) getStubSettings()).getBatchPredictionJobSettings(); + } + + /** Returns the object with the settings used for calls to listBatchPredictionJobs. */ + public PagedCallSettings< + ListBatchPredictionJobsRequest, + ListBatchPredictionJobsResponse, + ListBatchPredictionJobsPagedResponse> + listBatchPredictionJobsSettings() { + return ((JobServiceStubSettings) getStubSettings()).listBatchPredictionJobsSettings(); + } + + /** Returns the object with the settings used for calls to deleteBatchPredictionJob. */ + public UnaryCallSettings + deleteBatchPredictionJobSettings() { + return ((JobServiceStubSettings) getStubSettings()).deleteBatchPredictionJobSettings(); + } + + /** Returns the object with the settings used for calls to deleteBatchPredictionJob. */ + public OperationCallSettings + deleteBatchPredictionJobOperationSettings() { + return ((JobServiceStubSettings) getStubSettings()).deleteBatchPredictionJobOperationSettings(); + } + + /** Returns the object with the settings used for calls to cancelBatchPredictionJob. */ + public UnaryCallSettings + cancelBatchPredictionJobSettings() { + return ((JobServiceStubSettings) getStubSettings()).cancelBatchPredictionJobSettings(); + } + + public static final JobServiceSettings create(JobServiceStubSettings stub) throws IOException { + return new JobServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return JobServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return JobServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return JobServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return JobServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return JobServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return JobServiceStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return JobServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected JobServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for JobServiceSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(JobServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(JobServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + 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'. + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to createCustomJob. */ + public UnaryCallSettings.Builder createCustomJobSettings() { + return getStubSettingsBuilder().createCustomJobSettings(); + } + + /** Returns the builder for the settings used for calls to getCustomJob. */ + public UnaryCallSettings.Builder getCustomJobSettings() { + return getStubSettingsBuilder().getCustomJobSettings(); + } + + /** Returns the builder for the settings used for calls to listCustomJobs. */ + public PagedCallSettings.Builder< + ListCustomJobsRequest, ListCustomJobsResponse, ListCustomJobsPagedResponse> + listCustomJobsSettings() { + return getStubSettingsBuilder().listCustomJobsSettings(); + } + + /** Returns the builder for the settings used for calls to deleteCustomJob. */ + public UnaryCallSettings.Builder deleteCustomJobSettings() { + return getStubSettingsBuilder().deleteCustomJobSettings(); + } + + /** Returns the builder for the settings used for calls to deleteCustomJob. */ + public OperationCallSettings.Builder + deleteCustomJobOperationSettings() { + return getStubSettingsBuilder().deleteCustomJobOperationSettings(); + } + + /** Returns the builder for the settings used for calls to cancelCustomJob. */ + public UnaryCallSettings.Builder cancelCustomJobSettings() { + return getStubSettingsBuilder().cancelCustomJobSettings(); + } + + /** Returns the builder for the settings used for calls to createDataLabelingJob. */ + public UnaryCallSettings.Builder + createDataLabelingJobSettings() { + return getStubSettingsBuilder().createDataLabelingJobSettings(); + } + + /** Returns the builder for the settings used for calls to getDataLabelingJob. */ + public UnaryCallSettings.Builder + getDataLabelingJobSettings() { + return getStubSettingsBuilder().getDataLabelingJobSettings(); + } + + /** Returns the builder for the settings used for calls to listDataLabelingJobs. */ + public PagedCallSettings.Builder< + ListDataLabelingJobsRequest, + ListDataLabelingJobsResponse, + ListDataLabelingJobsPagedResponse> + listDataLabelingJobsSettings() { + return getStubSettingsBuilder().listDataLabelingJobsSettings(); + } + + /** Returns the builder for the settings used for calls to deleteDataLabelingJob. */ + public UnaryCallSettings.Builder + deleteDataLabelingJobSettings() { + return getStubSettingsBuilder().deleteDataLabelingJobSettings(); + } + + /** Returns the builder for the settings used for calls to deleteDataLabelingJob. */ + public OperationCallSettings.Builder< + DeleteDataLabelingJobRequest, Empty, DeleteOperationMetadata> + deleteDataLabelingJobOperationSettings() { + return getStubSettingsBuilder().deleteDataLabelingJobOperationSettings(); + } + + /** Returns the builder for the settings used for calls to cancelDataLabelingJob. */ + public UnaryCallSettings.Builder + cancelDataLabelingJobSettings() { + return getStubSettingsBuilder().cancelDataLabelingJobSettings(); + } + + /** Returns the builder for the settings used for calls to createHyperparameterTuningJob. */ + public UnaryCallSettings.Builder + createHyperparameterTuningJobSettings() { + return getStubSettingsBuilder().createHyperparameterTuningJobSettings(); + } + + /** Returns the builder for the settings used for calls to getHyperparameterTuningJob. */ + public UnaryCallSettings.Builder + getHyperparameterTuningJobSettings() { + return getStubSettingsBuilder().getHyperparameterTuningJobSettings(); + } + + /** Returns the builder for the settings used for calls to listHyperparameterTuningJobs. */ + public PagedCallSettings.Builder< + ListHyperparameterTuningJobsRequest, + ListHyperparameterTuningJobsResponse, + ListHyperparameterTuningJobsPagedResponse> + listHyperparameterTuningJobsSettings() { + return getStubSettingsBuilder().listHyperparameterTuningJobsSettings(); + } + + /** Returns the builder for the settings used for calls to deleteHyperparameterTuningJob. */ + public UnaryCallSettings.Builder + deleteHyperparameterTuningJobSettings() { + return getStubSettingsBuilder().deleteHyperparameterTuningJobSettings(); + } + + /** Returns the builder for the settings used for calls to deleteHyperparameterTuningJob. */ + public OperationCallSettings.Builder< + DeleteHyperparameterTuningJobRequest, Empty, DeleteOperationMetadata> + deleteHyperparameterTuningJobOperationSettings() { + return getStubSettingsBuilder().deleteHyperparameterTuningJobOperationSettings(); + } + + /** Returns the builder for the settings used for calls to cancelHyperparameterTuningJob. */ + public UnaryCallSettings.Builder + cancelHyperparameterTuningJobSettings() { + return getStubSettingsBuilder().cancelHyperparameterTuningJobSettings(); + } + + /** Returns the builder for the settings used for calls to createBatchPredictionJob. */ + public UnaryCallSettings.Builder + createBatchPredictionJobSettings() { + return getStubSettingsBuilder().createBatchPredictionJobSettings(); + } + + /** Returns the builder for the settings used for calls to getBatchPredictionJob. */ + public UnaryCallSettings.Builder + getBatchPredictionJobSettings() { + return getStubSettingsBuilder().getBatchPredictionJobSettings(); + } + + /** Returns the builder for the settings used for calls to listBatchPredictionJobs. */ + public PagedCallSettings.Builder< + ListBatchPredictionJobsRequest, + ListBatchPredictionJobsResponse, + ListBatchPredictionJobsPagedResponse> + listBatchPredictionJobsSettings() { + return getStubSettingsBuilder().listBatchPredictionJobsSettings(); + } + + /** Returns the builder for the settings used for calls to deleteBatchPredictionJob. */ + public UnaryCallSettings.Builder + deleteBatchPredictionJobSettings() { + return getStubSettingsBuilder().deleteBatchPredictionJobSettings(); + } + + /** Returns the builder for the settings used for calls to deleteBatchPredictionJob. */ + public OperationCallSettings.Builder< + DeleteBatchPredictionJobRequest, Empty, DeleteOperationMetadata> + deleteBatchPredictionJobOperationSettings() { + return getStubSettingsBuilder().deleteBatchPredictionJobOperationSettings(); + } + + /** Returns the builder for the settings used for calls to cancelBatchPredictionJob. */ + public UnaryCallSettings.Builder + cancelBatchPredictionJobSettings() { + return getStubSettingsBuilder().cancelBatchPredictionJobSettings(); + } + + @Override + public JobServiceSettings build() throws IOException { + return new JobServiceSettings(this); + } + } +} diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/MigrationServiceClient.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/MigrationServiceClient.java new file mode 100644 index 000000000..646448a57 --- /dev/null +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/MigrationServiceClient.java @@ -0,0 +1,455 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1.stub.MigrationServiceStub; +import com.google.cloud.aiplatform.v1.stub.MigrationServiceStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.longrunning.Operation; +import com.google.longrunning.OperationsClient; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// 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. + * + *

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 MigrationServiceClient object to clean up resources + * such as threads. In the example above, try-with-resources is used, which automatically calls + * close(). + * + *

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

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

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

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

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

To customize credentials: + * + *

{@code
+ * MigrationServiceSettings migrationServiceSettings =
+ *     MigrationServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * MigrationServiceClient migrationServiceClient =
+ *     MigrationServiceClient.create(migrationServiceSettings);
+ * }
+ * + *

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-java") +public class MigrationServiceClient implements BackgroundResource { + private final MigrationServiceSettings settings; + private final MigrationServiceStub stub; + private final OperationsClient operationsClient; + + /** Constructs an instance of MigrationServiceClient with default settings. */ + public static final MigrationServiceClient create() throws IOException { + return create(MigrationServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of MigrationServiceClient, using the given settings. The channels are + * created based on the settings passed in, or defaults for any settings that are not set. + */ + public static final MigrationServiceClient create(MigrationServiceSettings settings) + throws IOException { + return new MigrationServiceClient(settings); + } + + /** + * Constructs an instance of MigrationServiceClient, using the given stub for making calls. This + * 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) { + return new MigrationServiceClient(stub); + } + + /** + * Constructs an instance of MigrationServiceClient, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected MigrationServiceClient(MigrationServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((MigrationServiceStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + protected MigrationServiceClient(MigrationServiceStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + public final MigrationServiceSettings getSettings() { + return settings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public MigrationServiceStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final OperationsClient getOperationsClient() { + return operationsClient; + } + + // 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. + * + * @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}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SearchMigratableResourcesPagedResponse searchMigratableResources( + LocationName parent) { + SearchMigratableResourcesRequest request = + SearchMigratableResourcesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return searchMigratableResources(request); + } + + // 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. + * + * @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}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SearchMigratableResourcesPagedResponse searchMigratableResources(String parent) { + SearchMigratableResourcesRequest request = + SearchMigratableResourcesRequest.newBuilder().setParent(parent).build(); + return searchMigratableResources(request); + } + + // 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. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SearchMigratableResourcesPagedResponse searchMigratableResources( + SearchMigratableResourcesRequest request) { + return searchMigratableResourcesPagedCallable().call(request); + } + + // 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: + */ + public final UnaryCallable< + SearchMigratableResourcesRequest, SearchMigratableResourcesPagedResponse> + searchMigratableResourcesPagedCallable() { + return stub.searchMigratableResourcesPagedCallable(); + } + + // 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: + */ + public final UnaryCallable + searchMigratableResourcesCallable() { + return stub.searchMigratableResourcesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Batch migrates resources from ml.googleapis.com, automl.googleapis.com, and + * datalabeling.googleapis.com to AI Platform (Unified). + * + * @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 + * migrate. They must be in the same location as the destination. Up to 50 resources can be + * migrated in one batch. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture< + BatchMigrateResourcesResponse, BatchMigrateResourcesOperationMetadata> + batchMigrateResourcesAsync( + LocationName parent, List migrateResourceRequests) { + BatchMigrateResourcesRequest request = + BatchMigrateResourcesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .addAllMigrateResourceRequests(migrateResourceRequests) + .build(); + return batchMigrateResourcesAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Batch migrates resources from ml.googleapis.com, automl.googleapis.com, and + * datalabeling.googleapis.com to AI Platform (Unified). + * + * @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 + * migrate. They must be in the same location as the destination. Up to 50 resources can be + * migrated in one batch. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture< + BatchMigrateResourcesResponse, BatchMigrateResourcesOperationMetadata> + batchMigrateResourcesAsync( + String parent, List migrateResourceRequests) { + BatchMigrateResourcesRequest request = + BatchMigrateResourcesRequest.newBuilder() + .setParent(parent) + .addAllMigrateResourceRequests(migrateResourceRequests) + .build(); + return batchMigrateResourcesAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Batch migrates resources from ml.googleapis.com, automl.googleapis.com, and + * datalabeling.googleapis.com to AI Platform (Unified). + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture< + BatchMigrateResourcesResponse, BatchMigrateResourcesOperationMetadata> + batchMigrateResourcesAsync(BatchMigrateResourcesRequest request) { + return batchMigrateResourcesOperationCallable().futureCall(request); + } + + // 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: + */ + public final OperationCallable< + BatchMigrateResourcesRequest, + BatchMigrateResourcesResponse, + BatchMigrateResourcesOperationMetadata> + batchMigrateResourcesOperationCallable() { + return stub.batchMigrateResourcesOperationCallable(); + } + + // 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: + */ + public final UnaryCallable + batchMigrateResourcesCallable() { + return stub.batchMigrateResourcesCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class SearchMigratableResourcesPagedResponse + extends AbstractPagedListResponse< + SearchMigratableResourcesRequest, + SearchMigratableResourcesResponse, + MigratableResource, + SearchMigratableResourcesPage, + SearchMigratableResourcesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + SearchMigratableResourcesRequest, + SearchMigratableResourcesResponse, + MigratableResource> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + SearchMigratableResourcesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public SearchMigratableResourcesPagedResponse apply( + SearchMigratableResourcesPage input) { + return new SearchMigratableResourcesPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private SearchMigratableResourcesPagedResponse(SearchMigratableResourcesPage page) { + super(page, SearchMigratableResourcesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class SearchMigratableResourcesPage + extends AbstractPage< + SearchMigratableResourcesRequest, + SearchMigratableResourcesResponse, + MigratableResource, + SearchMigratableResourcesPage> { + + private SearchMigratableResourcesPage( + PageContext< + SearchMigratableResourcesRequest, + SearchMigratableResourcesResponse, + MigratableResource> + context, + SearchMigratableResourcesResponse response) { + super(context, response); + } + + private static SearchMigratableResourcesPage createEmptyPage() { + return new SearchMigratableResourcesPage(null, null); + } + + @Override + protected SearchMigratableResourcesPage createPage( + PageContext< + SearchMigratableResourcesRequest, + SearchMigratableResourcesResponse, + MigratableResource> + context, + SearchMigratableResourcesResponse response) { + return new SearchMigratableResourcesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext< + SearchMigratableResourcesRequest, + SearchMigratableResourcesResponse, + MigratableResource> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class SearchMigratableResourcesFixedSizeCollection + extends AbstractFixedSizeCollection< + SearchMigratableResourcesRequest, + SearchMigratableResourcesResponse, + MigratableResource, + SearchMigratableResourcesPage, + SearchMigratableResourcesFixedSizeCollection> { + + private SearchMigratableResourcesFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static SearchMigratableResourcesFixedSizeCollection createEmptyCollection() { + return new SearchMigratableResourcesFixedSizeCollection(null, 0); + } + + @Override + protected SearchMigratableResourcesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new SearchMigratableResourcesFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/MigrationServiceSettings.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/MigrationServiceSettings.java new file mode 100644 index 000000000..db19d116a --- /dev/null +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/MigrationServiceSettings.java @@ -0,0 +1,226 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1; + +import static com.google.cloud.aiplatform.v1.MigrationServiceClient.SearchMigratableResourcesPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.aiplatform.v1.stub.MigrationServiceStubSettings; +import com.google.longrunning.Operation; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link MigrationServiceClient}. + * + *

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

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

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

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

{@code
+ * MigrationServiceSettings.Builder migrationServiceSettingsBuilder =
+ *     MigrationServiceSettings.newBuilder();
+ * migrationServiceSettingsBuilder
+ *     .searchMigratableResourcesSettings()
+ *     .setRetrySettings(
+ *         migrationServiceSettingsBuilder
+ *             .searchMigratableResourcesSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * MigrationServiceSettings migrationServiceSettings = migrationServiceSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class MigrationServiceSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to searchMigratableResources. */ + public PagedCallSettings< + SearchMigratableResourcesRequest, + SearchMigratableResourcesResponse, + SearchMigratableResourcesPagedResponse> + searchMigratableResourcesSettings() { + return ((MigrationServiceStubSettings) getStubSettings()).searchMigratableResourcesSettings(); + } + + /** Returns the object with the settings used for calls to batchMigrateResources. */ + public UnaryCallSettings + batchMigrateResourcesSettings() { + return ((MigrationServiceStubSettings) getStubSettings()).batchMigrateResourcesSettings(); + } + + /** Returns the object with the settings used for calls to batchMigrateResources. */ + public OperationCallSettings< + BatchMigrateResourcesRequest, + BatchMigrateResourcesResponse, + BatchMigrateResourcesOperationMetadata> + batchMigrateResourcesOperationSettings() { + return ((MigrationServiceStubSettings) getStubSettings()) + .batchMigrateResourcesOperationSettings(); + } + + public static final MigrationServiceSettings create(MigrationServiceStubSettings stub) + throws IOException { + return new MigrationServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return MigrationServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return MigrationServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return MigrationServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return MigrationServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return MigrationServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return MigrationServiceStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return MigrationServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected MigrationServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for MigrationServiceSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(MigrationServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(MigrationServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + 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'. + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to searchMigratableResources. */ + public PagedCallSettings.Builder< + SearchMigratableResourcesRequest, + SearchMigratableResourcesResponse, + SearchMigratableResourcesPagedResponse> + searchMigratableResourcesSettings() { + return getStubSettingsBuilder().searchMigratableResourcesSettings(); + } + + /** Returns the builder for the settings used for calls to batchMigrateResources. */ + public UnaryCallSettings.Builder + batchMigrateResourcesSettings() { + return getStubSettingsBuilder().batchMigrateResourcesSettings(); + } + + /** Returns the builder for the settings used for calls to batchMigrateResources. */ + public OperationCallSettings.Builder< + BatchMigrateResourcesRequest, + BatchMigrateResourcesResponse, + BatchMigrateResourcesOperationMetadata> + batchMigrateResourcesOperationSettings() { + return getStubSettingsBuilder().batchMigrateResourcesOperationSettings(); + } + + @Override + public MigrationServiceSettings build() throws IOException { + return new MigrationServiceSettings(this); + } + } +} diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/ModelServiceClient.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/ModelServiceClient.java new file mode 100644 index 000000000..ea2d1cc0b --- /dev/null +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/ModelServiceClient.java @@ -0,0 +1,1051 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1.stub.ModelServiceStub; +import com.google.cloud.aiplatform.v1.stub.ModelServiceStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.longrunning.Operation; +import com.google.longrunning.OperationsClient; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND 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: + * + *

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 + * methods: + * + *

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

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

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

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

To customize credentials: + * + *

{@code
+ * ModelServiceSettings modelServiceSettings =
+ *     ModelServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * ModelServiceClient modelServiceClient = ModelServiceClient.create(modelServiceSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

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

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class ModelServiceClient implements BackgroundResource { + private final ModelServiceSettings settings; + private final ModelServiceStub stub; + private final OperationsClient operationsClient; + + /** Constructs an instance of ModelServiceClient with default settings. */ + public static final ModelServiceClient create() throws IOException { + return create(ModelServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of ModelServiceClient, using the given settings. The channels are + * created based on the settings passed in, or defaults for any settings that are not set. + */ + public static final ModelServiceClient create(ModelServiceSettings settings) throws IOException { + return new ModelServiceClient(settings); + } + + /** + * Constructs an instance of ModelServiceClient, using the given stub for making calls. This is + * 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) { + return new ModelServiceClient(stub); + } + + /** + * Constructs an instance of ModelServiceClient, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected ModelServiceClient(ModelServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((ModelServiceStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + protected ModelServiceClient(ModelServiceStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + public final ModelServiceSettings getSettings() { + return settings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public ModelServiceStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final OperationsClient getOperationsClient() { + return operationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Uploads a Model artifact into AI Platform. + * + * @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 + */ + public final OperationFuture uploadModelAsync( + LocationName parent, Model model) { + UploadModelRequest request = + UploadModelRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setModel(model) + .build(); + return uploadModelAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Uploads a Model artifact into AI Platform. + * + * @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 + */ + public final OperationFuture uploadModelAsync( + String parent, Model model) { + UploadModelRequest request = + UploadModelRequest.newBuilder().setParent(parent).setModel(model).build(); + return uploadModelAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Uploads a Model artifact into AI Platform. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture uploadModelAsync( + UploadModelRequest request) { + return uploadModelOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Uploads a Model artifact into AI Platform. + * + *

Sample code: + */ + public final OperationCallable< + UploadModelRequest, UploadModelResponse, UploadModelOperationMetadata> + uploadModelOperationCallable() { + return stub.uploadModelOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Uploads a Model artifact into AI Platform. + * + *

Sample code: + */ + public final UnaryCallable uploadModelCallable() { + return stub.uploadModelCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a Model. + * + * @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 + */ + public final Model getModel(ModelName name) { + GetModelRequest request = + GetModelRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getModel(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a Model. + * + * @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 + */ + public final Model getModel(String name) { + GetModelRequest request = GetModelRequest.newBuilder().setName(name).build(); + return getModel(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a Model. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Model getModel(GetModelRequest request) { + return getModelCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a Model. + * + *

Sample code: + */ + public final UnaryCallable getModelCallable() { + return stub.getModelCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Models in a Location. + * + * @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 + */ + public final ListModelsPagedResponse listModels(LocationName parent) { + ListModelsRequest request = + ListModelsRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build(); + return listModels(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Models in a Location. + * + * @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 + */ + public final ListModelsPagedResponse listModels(String parent) { + ListModelsRequest request = ListModelsRequest.newBuilder().setParent(parent).build(); + return listModels(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Models in a Location. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListModelsPagedResponse listModels(ListModelsRequest request) { + return listModelsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Models in a Location. + * + *

Sample code: + */ + public final UnaryCallable listModelsPagedCallable() { + return stub.listModelsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Models in a Location. + * + *

Sample code: + */ + public final UnaryCallable listModelsCallable() { + return stub.listModelsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a Model. + * + * @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 [FieldMask](https://tinyurl.com/protobufs/google.protobuf#fieldmask). + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Model updateModel(Model model, FieldMask updateMask) { + UpdateModelRequest request = + UpdateModelRequest.newBuilder().setModel(model).setUpdateMask(updateMask).build(); + return updateModel(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a Model. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Model updateModel(UpdateModelRequest request) { + return updateModelCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a Model. + * + *

Sample code: + */ + public final UnaryCallable updateModelCallable() { + return stub.updateModelCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a Model. Note: Model can only be deleted if there are no DeployedModels created from + * it. + * + * @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 + */ + public final OperationFuture deleteModelAsync(ModelName name) { + DeleteModelRequest request = + DeleteModelRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deleteModelAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a Model. Note: Model can only be deleted if there are no DeployedModels created from + * it. + * + * @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 + */ + public final OperationFuture deleteModelAsync(String name) { + DeleteModelRequest request = DeleteModelRequest.newBuilder().setName(name).build(); + return deleteModelAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a Model. Note: Model can only be deleted if there are no DeployedModels created from + * it. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteModelAsync( + DeleteModelRequest request) { + return deleteModelOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a Model. Note: Model can only be deleted if there are no DeployedModels created from + * it. + * + *

Sample code: + */ + public final OperationCallable + deleteModelOperationCallable() { + return stub.deleteModelOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a Model. Note: Model can only be deleted if there are no DeployedModels created from + * it. + * + *

Sample code: + */ + public final UnaryCallable deleteModelCallable() { + return stub.deleteModelCallable(); + } + + // 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.v1.Model.supported_export_formats]. + * + * @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 + */ + public final OperationFuture exportModelAsync( + ModelName name, ExportModelRequest.OutputConfig outputConfig) { + ExportModelRequest request = + ExportModelRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setOutputConfig(outputConfig) + .build(); + return exportModelAsync(request); + } + + // 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.v1.Model.supported_export_formats]. + * + * @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 + */ + public final OperationFuture exportModelAsync( + String name, ExportModelRequest.OutputConfig outputConfig) { + ExportModelRequest request = + ExportModelRequest.newBuilder().setName(name).setOutputConfig(outputConfig).build(); + return exportModelAsync(request); + } + + // 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.v1.Model.supported_export_formats]. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture exportModelAsync( + ExportModelRequest request) { + return exportModelOperationCallable().futureCall(request); + } + + // 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.v1.Model.supported_export_formats]. + * + *

Sample code: + */ + public final OperationCallable< + ExportModelRequest, ExportModelResponse, ExportModelOperationMetadata> + exportModelOperationCallable() { + return stub.exportModelOperationCallable(); + } + + // 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.v1.Model.supported_export_formats]. + * + *

Sample code: + */ + public final UnaryCallable exportModelCallable() { + return stub.exportModelCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a ModelEvaluation. + * + * @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 + */ + public final ModelEvaluation getModelEvaluation(ModelEvaluationName name) { + GetModelEvaluationRequest request = + GetModelEvaluationRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getModelEvaluation(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a ModelEvaluation. + * + * @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 + */ + public final ModelEvaluation getModelEvaluation(String name) { + GetModelEvaluationRequest request = + GetModelEvaluationRequest.newBuilder().setName(name).build(); + return getModelEvaluation(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a ModelEvaluation. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ModelEvaluation getModelEvaluation(GetModelEvaluationRequest request) { + return getModelEvaluationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a ModelEvaluation. + * + *

Sample code: + */ + public final UnaryCallable + getModelEvaluationCallable() { + return stub.getModelEvaluationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists ModelEvaluations in a Model. + * + * @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 + */ + public final ListModelEvaluationsPagedResponse listModelEvaluations(ModelName parent) { + ListModelEvaluationsRequest request = + ListModelEvaluationsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listModelEvaluations(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists ModelEvaluations in a Model. + * + * @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 + */ + public final ListModelEvaluationsPagedResponse listModelEvaluations(String parent) { + ListModelEvaluationsRequest request = + ListModelEvaluationsRequest.newBuilder().setParent(parent).build(); + return listModelEvaluations(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists ModelEvaluations in a Model. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListModelEvaluationsPagedResponse listModelEvaluations( + ListModelEvaluationsRequest request) { + return listModelEvaluationsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists ModelEvaluations in a Model. + * + *

Sample code: + */ + public final UnaryCallable + listModelEvaluationsPagedCallable() { + return stub.listModelEvaluationsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists ModelEvaluations in a Model. + * + *

Sample code: + */ + public final UnaryCallable + listModelEvaluationsCallable() { + return stub.listModelEvaluationsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a ModelEvaluationSlice. + * + * @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 + */ + public final ModelEvaluationSlice getModelEvaluationSlice(ModelEvaluationSliceName name) { + GetModelEvaluationSliceRequest request = + GetModelEvaluationSliceRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getModelEvaluationSlice(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a ModelEvaluationSlice. + * + * @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 + */ + public final ModelEvaluationSlice getModelEvaluationSlice(String name) { + GetModelEvaluationSliceRequest request = + GetModelEvaluationSliceRequest.newBuilder().setName(name).build(); + return getModelEvaluationSlice(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a ModelEvaluationSlice. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ModelEvaluationSlice getModelEvaluationSlice( + GetModelEvaluationSliceRequest request) { + return getModelEvaluationSliceCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a ModelEvaluationSlice. + * + *

Sample code: + */ + public final UnaryCallable + getModelEvaluationSliceCallable() { + return stub.getModelEvaluationSliceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists ModelEvaluationSlices in a ModelEvaluation. + * + * @param parent Required. The resource name of the ModelEvaluation to list the + * ModelEvaluationSlices from. Format: + *

`projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListModelEvaluationSlicesPagedResponse listModelEvaluationSlices( + ModelEvaluationName parent) { + ListModelEvaluationSlicesRequest request = + ListModelEvaluationSlicesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listModelEvaluationSlices(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists ModelEvaluationSlices in a ModelEvaluation. + * + * @param parent Required. The resource name of the ModelEvaluation to list the + * ModelEvaluationSlices from. Format: + *

`projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListModelEvaluationSlicesPagedResponse listModelEvaluationSlices(String parent) { + ListModelEvaluationSlicesRequest request = + ListModelEvaluationSlicesRequest.newBuilder().setParent(parent).build(); + return listModelEvaluationSlices(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists ModelEvaluationSlices in a ModelEvaluation. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListModelEvaluationSlicesPagedResponse listModelEvaluationSlices( + ListModelEvaluationSlicesRequest request) { + return listModelEvaluationSlicesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists ModelEvaluationSlices in a ModelEvaluation. + * + *

Sample code: + */ + public final UnaryCallable< + ListModelEvaluationSlicesRequest, ListModelEvaluationSlicesPagedResponse> + listModelEvaluationSlicesPagedCallable() { + return stub.listModelEvaluationSlicesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists ModelEvaluationSlices in a ModelEvaluation. + * + *

Sample code: + */ + public final UnaryCallable + listModelEvaluationSlicesCallable() { + return stub.listModelEvaluationSlicesCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListModelsPagedResponse + extends AbstractPagedListResponse< + ListModelsRequest, + ListModelsResponse, + Model, + ListModelsPage, + ListModelsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListModelsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListModelsPagedResponse apply(ListModelsPage input) { + return new ListModelsPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListModelsPagedResponse(ListModelsPage page) { + super(page, ListModelsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListModelsPage + extends AbstractPage { + + private ListModelsPage( + PageContext context, + ListModelsResponse response) { + super(context, response); + } + + private static ListModelsPage createEmptyPage() { + return new ListModelsPage(null, null); + } + + @Override + protected ListModelsPage createPage( + PageContext context, + ListModelsResponse response) { + return new ListModelsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListModelsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListModelsRequest, + ListModelsResponse, + Model, + ListModelsPage, + ListModelsFixedSizeCollection> { + + private ListModelsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListModelsFixedSizeCollection createEmptyCollection() { + return new ListModelsFixedSizeCollection(null, 0); + } + + @Override + protected ListModelsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListModelsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListModelEvaluationsPagedResponse + extends AbstractPagedListResponse< + ListModelEvaluationsRequest, + ListModelEvaluationsResponse, + ModelEvaluation, + ListModelEvaluationsPage, + ListModelEvaluationsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListModelEvaluationsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListModelEvaluationsPagedResponse apply(ListModelEvaluationsPage input) { + return new ListModelEvaluationsPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListModelEvaluationsPagedResponse(ListModelEvaluationsPage page) { + super(page, ListModelEvaluationsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListModelEvaluationsPage + extends AbstractPage< + ListModelEvaluationsRequest, + ListModelEvaluationsResponse, + ModelEvaluation, + ListModelEvaluationsPage> { + + private ListModelEvaluationsPage( + PageContext + context, + ListModelEvaluationsResponse response) { + super(context, response); + } + + private static ListModelEvaluationsPage createEmptyPage() { + return new ListModelEvaluationsPage(null, null); + } + + @Override + protected ListModelEvaluationsPage createPage( + PageContext + context, + ListModelEvaluationsResponse response) { + return new ListModelEvaluationsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListModelEvaluationsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListModelEvaluationsRequest, + ListModelEvaluationsResponse, + ModelEvaluation, + ListModelEvaluationsPage, + ListModelEvaluationsFixedSizeCollection> { + + private ListModelEvaluationsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListModelEvaluationsFixedSizeCollection createEmptyCollection() { + return new ListModelEvaluationsFixedSizeCollection(null, 0); + } + + @Override + protected ListModelEvaluationsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListModelEvaluationsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListModelEvaluationSlicesPagedResponse + extends AbstractPagedListResponse< + ListModelEvaluationSlicesRequest, + ListModelEvaluationSlicesResponse, + ModelEvaluationSlice, + ListModelEvaluationSlicesPage, + ListModelEvaluationSlicesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + ListModelEvaluationSlicesRequest, + ListModelEvaluationSlicesResponse, + ModelEvaluationSlice> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListModelEvaluationSlicesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListModelEvaluationSlicesPagedResponse apply( + ListModelEvaluationSlicesPage input) { + return new ListModelEvaluationSlicesPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListModelEvaluationSlicesPagedResponse(ListModelEvaluationSlicesPage page) { + super(page, ListModelEvaluationSlicesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListModelEvaluationSlicesPage + extends AbstractPage< + ListModelEvaluationSlicesRequest, + ListModelEvaluationSlicesResponse, + ModelEvaluationSlice, + ListModelEvaluationSlicesPage> { + + private ListModelEvaluationSlicesPage( + PageContext< + ListModelEvaluationSlicesRequest, + ListModelEvaluationSlicesResponse, + ModelEvaluationSlice> + context, + ListModelEvaluationSlicesResponse response) { + super(context, response); + } + + private static ListModelEvaluationSlicesPage createEmptyPage() { + return new ListModelEvaluationSlicesPage(null, null); + } + + @Override + protected ListModelEvaluationSlicesPage createPage( + PageContext< + ListModelEvaluationSlicesRequest, + ListModelEvaluationSlicesResponse, + ModelEvaluationSlice> + context, + ListModelEvaluationSlicesResponse response) { + return new ListModelEvaluationSlicesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext< + ListModelEvaluationSlicesRequest, + ListModelEvaluationSlicesResponse, + ModelEvaluationSlice> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListModelEvaluationSlicesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListModelEvaluationSlicesRequest, + ListModelEvaluationSlicesResponse, + ModelEvaluationSlice, + ListModelEvaluationSlicesPage, + ListModelEvaluationSlicesFixedSizeCollection> { + + private ListModelEvaluationSlicesFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListModelEvaluationSlicesFixedSizeCollection createEmptyCollection() { + return new ListModelEvaluationSlicesFixedSizeCollection(null, 0); + } + + @Override + protected ListModelEvaluationSlicesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListModelEvaluationSlicesFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/ModelServiceSettings.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/ModelServiceSettings.java new file mode 100644 index 000000000..463e2e324 --- /dev/null +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/ModelServiceSettings.java @@ -0,0 +1,341 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1; + +import static com.google.cloud.aiplatform.v1.ModelServiceClient.ListModelEvaluationSlicesPagedResponse; +import static com.google.cloud.aiplatform.v1.ModelServiceClient.ListModelEvaluationsPagedResponse; +import static com.google.cloud.aiplatform.v1.ModelServiceClient.ListModelsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.aiplatform.v1.stub.ModelServiceStubSettings; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link ModelServiceClient}. + * + *

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

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

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

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

{@code
+ * ModelServiceSettings.Builder modelServiceSettingsBuilder = ModelServiceSettings.newBuilder();
+ * modelServiceSettingsBuilder
+ *     .getModelSettings()
+ *     .setRetrySettings(
+ *         modelServiceSettingsBuilder
+ *             .getModelSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * ModelServiceSettings modelServiceSettings = modelServiceSettingsBuilder.build();
+ * }
+ */ +@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. */ + public OperationCallSettings< + UploadModelRequest, UploadModelResponse, UploadModelOperationMetadata> + uploadModelOperationSettings() { + return ((ModelServiceStubSettings) getStubSettings()).uploadModelOperationSettings(); + } + + /** Returns the object with the settings used for calls to getModel. */ + public UnaryCallSettings getModelSettings() { + return ((ModelServiceStubSettings) getStubSettings()).getModelSettings(); + } + + /** Returns the object with the settings used for calls to listModels. */ + public PagedCallSettings + listModelsSettings() { + return ((ModelServiceStubSettings) getStubSettings()).listModelsSettings(); + } + + /** Returns the object with the settings used for calls to updateModel. */ + public UnaryCallSettings updateModelSettings() { + return ((ModelServiceStubSettings) getStubSettings()).updateModelSettings(); + } + + /** Returns the object with the settings used for calls to deleteModel. */ + public UnaryCallSettings deleteModelSettings() { + return ((ModelServiceStubSettings) getStubSettings()).deleteModelSettings(); + } + + /** Returns the object with the settings used for calls to deleteModel. */ + public OperationCallSettings + deleteModelOperationSettings() { + return ((ModelServiceStubSettings) getStubSettings()).deleteModelOperationSettings(); + } + + /** Returns the object with the settings used for calls to exportModel. */ + public UnaryCallSettings exportModelSettings() { + return ((ModelServiceStubSettings) getStubSettings()).exportModelSettings(); + } + + /** Returns the object with the settings used for calls to exportModel. */ + public OperationCallSettings< + ExportModelRequest, ExportModelResponse, ExportModelOperationMetadata> + exportModelOperationSettings() { + return ((ModelServiceStubSettings) getStubSettings()).exportModelOperationSettings(); + } + + /** Returns the object with the settings used for calls to getModelEvaluation. */ + public UnaryCallSettings + getModelEvaluationSettings() { + return ((ModelServiceStubSettings) getStubSettings()).getModelEvaluationSettings(); + } + + /** Returns the object with the settings used for calls to listModelEvaluations. */ + public PagedCallSettings< + ListModelEvaluationsRequest, + ListModelEvaluationsResponse, + ListModelEvaluationsPagedResponse> + listModelEvaluationsSettings() { + return ((ModelServiceStubSettings) getStubSettings()).listModelEvaluationsSettings(); + } + + /** Returns the object with the settings used for calls to getModelEvaluationSlice. */ + public UnaryCallSettings + getModelEvaluationSliceSettings() { + return ((ModelServiceStubSettings) getStubSettings()).getModelEvaluationSliceSettings(); + } + + /** Returns the object with the settings used for calls to listModelEvaluationSlices. */ + public PagedCallSettings< + ListModelEvaluationSlicesRequest, + ListModelEvaluationSlicesResponse, + ListModelEvaluationSlicesPagedResponse> + listModelEvaluationSlicesSettings() { + return ((ModelServiceStubSettings) getStubSettings()).listModelEvaluationSlicesSettings(); + } + + public static final ModelServiceSettings create(ModelServiceStubSettings stub) + throws IOException { + return new ModelServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return ModelServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return ModelServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return ModelServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return ModelServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return ModelServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return ModelServiceStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ModelServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected ModelServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for ModelServiceSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(ModelServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(ModelServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + 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'. + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to uploadModel. */ + public UnaryCallSettings.Builder uploadModelSettings() { + return getStubSettingsBuilder().uploadModelSettings(); + } + + /** Returns the builder for the settings used for calls to uploadModel. */ + public OperationCallSettings.Builder< + UploadModelRequest, UploadModelResponse, UploadModelOperationMetadata> + uploadModelOperationSettings() { + return getStubSettingsBuilder().uploadModelOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getModel. */ + public UnaryCallSettings.Builder getModelSettings() { + return getStubSettingsBuilder().getModelSettings(); + } + + /** Returns the builder for the settings used for calls to listModels. */ + public PagedCallSettings.Builder + listModelsSettings() { + return getStubSettingsBuilder().listModelsSettings(); + } + + /** Returns the builder for the settings used for calls to updateModel. */ + public UnaryCallSettings.Builder updateModelSettings() { + return getStubSettingsBuilder().updateModelSettings(); + } + + /** Returns the builder for the settings used for calls to deleteModel. */ + public UnaryCallSettings.Builder deleteModelSettings() { + return getStubSettingsBuilder().deleteModelSettings(); + } + + /** Returns the builder for the settings used for calls to deleteModel. */ + public OperationCallSettings.Builder + deleteModelOperationSettings() { + return getStubSettingsBuilder().deleteModelOperationSettings(); + } + + /** Returns the builder for the settings used for calls to exportModel. */ + public UnaryCallSettings.Builder exportModelSettings() { + return getStubSettingsBuilder().exportModelSettings(); + } + + /** Returns the builder for the settings used for calls to exportModel. */ + public OperationCallSettings.Builder< + ExportModelRequest, ExportModelResponse, ExportModelOperationMetadata> + exportModelOperationSettings() { + return getStubSettingsBuilder().exportModelOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getModelEvaluation. */ + public UnaryCallSettings.Builder + getModelEvaluationSettings() { + return getStubSettingsBuilder().getModelEvaluationSettings(); + } + + /** Returns the builder for the settings used for calls to listModelEvaluations. */ + public PagedCallSettings.Builder< + ListModelEvaluationsRequest, + ListModelEvaluationsResponse, + ListModelEvaluationsPagedResponse> + listModelEvaluationsSettings() { + return getStubSettingsBuilder().listModelEvaluationsSettings(); + } + + /** Returns the builder for the settings used for calls to getModelEvaluationSlice. */ + public UnaryCallSettings.Builder + getModelEvaluationSliceSettings() { + return getStubSettingsBuilder().getModelEvaluationSliceSettings(); + } + + /** Returns the builder for the settings used for calls to listModelEvaluationSlices. */ + public PagedCallSettings.Builder< + ListModelEvaluationSlicesRequest, + ListModelEvaluationSlicesResponse, + ListModelEvaluationSlicesPagedResponse> + listModelEvaluationSlicesSettings() { + return getStubSettingsBuilder().listModelEvaluationSlicesSettings(); + } + + @Override + public ModelServiceSettings build() throws IOException { + return new ModelServiceSettings(this); + } + } +} diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/PipelineServiceClient.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/PipelineServiceClient.java new file mode 100644 index 000000000..b95b13edb --- /dev/null +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/PipelineServiceClient.java @@ -0,0 +1,614 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1.stub.PipelineServiceStub; +import com.google.cloud.aiplatform.v1.stub.PipelineServiceStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.longrunning.Operation; +import com.google.longrunning.OperationsClient; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// 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: + * + *

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(). + * + *

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

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

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

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

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

To customize credentials: + * + *

{@code
+ * PipelineServiceSettings pipelineServiceSettings =
+ *     PipelineServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * PipelineServiceClient pipelineServiceClient =
+ *     PipelineServiceClient.create(pipelineServiceSettings);
+ * }
+ * + *

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-java") +public class PipelineServiceClient implements BackgroundResource { + private final PipelineServiceSettings settings; + private final PipelineServiceStub stub; + private final OperationsClient operationsClient; + + /** Constructs an instance of PipelineServiceClient with default settings. */ + public static final PipelineServiceClient create() throws IOException { + return create(PipelineServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of PipelineServiceClient, using the given settings. The channels are + * created based on the settings passed in, or defaults for any settings that are not set. + */ + public static final PipelineServiceClient create(PipelineServiceSettings settings) + throws IOException { + return new PipelineServiceClient(settings); + } + + /** + * Constructs an instance of PipelineServiceClient, using the given stub for making calls. This is + * 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) { + return new PipelineServiceClient(stub); + } + + /** + * Constructs an instance of PipelineServiceClient, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected PipelineServiceClient(PipelineServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((PipelineServiceStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + protected PipelineServiceClient(PipelineServiceStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + public final PipelineServiceSettings getSettings() { + return settings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public PipelineServiceStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final OperationsClient getOperationsClient() { + return operationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a TrainingPipeline. A created TrainingPipeline right away will be attempted to be run. + * + * @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. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TrainingPipeline createTrainingPipeline( + LocationName parent, TrainingPipeline trainingPipeline) { + CreateTrainingPipelineRequest request = + CreateTrainingPipelineRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setTrainingPipeline(trainingPipeline) + .build(); + return createTrainingPipeline(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a TrainingPipeline. A created TrainingPipeline right away will be attempted to be run. + * + * @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. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TrainingPipeline createTrainingPipeline( + String parent, TrainingPipeline trainingPipeline) { + CreateTrainingPipelineRequest request = + CreateTrainingPipelineRequest.newBuilder() + .setParent(parent) + .setTrainingPipeline(trainingPipeline) + .build(); + return createTrainingPipeline(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a TrainingPipeline. A created TrainingPipeline right away will be attempted to be run. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TrainingPipeline createTrainingPipeline(CreateTrainingPipelineRequest request) { + return createTrainingPipelineCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a TrainingPipeline. A created TrainingPipeline right away will be attempted to be run. + * + *

Sample code: + */ + public final UnaryCallable + createTrainingPipelineCallable() { + return stub.createTrainingPipelineCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a TrainingPipeline. + * + * @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 + */ + public final TrainingPipeline getTrainingPipeline(TrainingPipelineName name) { + GetTrainingPipelineRequest request = + GetTrainingPipelineRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getTrainingPipeline(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a TrainingPipeline. + * + * @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 + */ + public final TrainingPipeline getTrainingPipeline(String name) { + GetTrainingPipelineRequest request = + GetTrainingPipelineRequest.newBuilder().setName(name).build(); + return getTrainingPipeline(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a TrainingPipeline. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TrainingPipeline getTrainingPipeline(GetTrainingPipelineRequest request) { + return getTrainingPipelineCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a TrainingPipeline. + * + *

Sample code: + */ + public final UnaryCallable + getTrainingPipelineCallable() { + return stub.getTrainingPipelineCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists TrainingPipelines in a Location. + * + * @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 + */ + public final ListTrainingPipelinesPagedResponse listTrainingPipelines(LocationName parent) { + ListTrainingPipelinesRequest request = + ListTrainingPipelinesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listTrainingPipelines(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists TrainingPipelines in a Location. + * + * @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 + */ + public final ListTrainingPipelinesPagedResponse listTrainingPipelines(String parent) { + ListTrainingPipelinesRequest request = + ListTrainingPipelinesRequest.newBuilder().setParent(parent).build(); + return listTrainingPipelines(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists TrainingPipelines in a Location. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListTrainingPipelinesPagedResponse listTrainingPipelines( + ListTrainingPipelinesRequest request) { + return listTrainingPipelinesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists TrainingPipelines in a Location. + * + *

Sample code: + */ + public final UnaryCallable + listTrainingPipelinesPagedCallable() { + return stub.listTrainingPipelinesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists TrainingPipelines in a Location. + * + *

Sample code: + */ + public final UnaryCallable + listTrainingPipelinesCallable() { + return stub.listTrainingPipelinesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a TrainingPipeline. + * + * @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 + */ + public final OperationFuture deleteTrainingPipelineAsync( + TrainingPipelineName name) { + DeleteTrainingPipelineRequest request = + DeleteTrainingPipelineRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return deleteTrainingPipelineAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a TrainingPipeline. + * + * @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 + */ + public final OperationFuture deleteTrainingPipelineAsync( + String name) { + DeleteTrainingPipelineRequest request = + DeleteTrainingPipelineRequest.newBuilder().setName(name).build(); + return deleteTrainingPipelineAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a TrainingPipeline. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteTrainingPipelineAsync( + DeleteTrainingPipelineRequest request) { + return deleteTrainingPipelineOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a TrainingPipeline. + * + *

Sample code: + */ + public final OperationCallable + deleteTrainingPipelineOperationCallable() { + return stub.deleteTrainingPipelineOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a TrainingPipeline. + * + *

Sample code: + */ + public final UnaryCallable + deleteTrainingPipelineCallable() { + return stub.deleteTrainingPipelineCallable(); + } + + // 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 + * use + * [PipelineService.GetTrainingPipeline][google.cloud.aiplatform.v1.PipelineService.GetTrainingPipeline] + * or other methods to check whether the cancellation succeeded or whether the pipeline completed + * despite cancellation. On successful cancellation, the TrainingPipeline is not deleted; instead + * it becomes a pipeline with a + * [TrainingPipeline.error][google.cloud.aiplatform.v1.TrainingPipeline.error] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`, and + * [TrainingPipeline.state][google.cloud.aiplatform.v1.TrainingPipeline.state] is set to + * `CANCELLED`. + * + * @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 + */ + public final void cancelTrainingPipeline(TrainingPipelineName name) { + CancelTrainingPipelineRequest request = + CancelTrainingPipelineRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + cancelTrainingPipeline(request); + } + + // 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 + * use + * [PipelineService.GetTrainingPipeline][google.cloud.aiplatform.v1.PipelineService.GetTrainingPipeline] + * or other methods to check whether the cancellation succeeded or whether the pipeline completed + * despite cancellation. On successful cancellation, the TrainingPipeline is not deleted; instead + * it becomes a pipeline with a + * [TrainingPipeline.error][google.cloud.aiplatform.v1.TrainingPipeline.error] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`, and + * [TrainingPipeline.state][google.cloud.aiplatform.v1.TrainingPipeline.state] is set to + * `CANCELLED`. + * + * @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 + */ + public final void cancelTrainingPipeline(String name) { + CancelTrainingPipelineRequest request = + CancelTrainingPipelineRequest.newBuilder().setName(name).build(); + cancelTrainingPipeline(request); + } + + // 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 + * use + * [PipelineService.GetTrainingPipeline][google.cloud.aiplatform.v1.PipelineService.GetTrainingPipeline] + * or other methods to check whether the cancellation succeeded or whether the pipeline completed + * despite cancellation. On successful cancellation, the TrainingPipeline is not deleted; instead + * it becomes a pipeline with a + * [TrainingPipeline.error][google.cloud.aiplatform.v1.TrainingPipeline.error] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`, and + * [TrainingPipeline.state][google.cloud.aiplatform.v1.TrainingPipeline.state] is set to + * `CANCELLED`. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void cancelTrainingPipeline(CancelTrainingPipelineRequest request) { + cancelTrainingPipelineCallable().call(request); + } + + // 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 + * use + * [PipelineService.GetTrainingPipeline][google.cloud.aiplatform.v1.PipelineService.GetTrainingPipeline] + * or other methods to check whether the cancellation succeeded or whether the pipeline completed + * despite cancellation. On successful cancellation, the TrainingPipeline is not deleted; instead + * it becomes a pipeline with a + * [TrainingPipeline.error][google.cloud.aiplatform.v1.TrainingPipeline.error] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`, and + * [TrainingPipeline.state][google.cloud.aiplatform.v1.TrainingPipeline.state] is set to + * `CANCELLED`. + * + *

Sample code: + */ + public final UnaryCallable + cancelTrainingPipelineCallable() { + return stub.cancelTrainingPipelineCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListTrainingPipelinesPagedResponse + extends AbstractPagedListResponse< + ListTrainingPipelinesRequest, + ListTrainingPipelinesResponse, + TrainingPipeline, + ListTrainingPipelinesPage, + ListTrainingPipelinesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListTrainingPipelinesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListTrainingPipelinesPagedResponse apply(ListTrainingPipelinesPage input) { + return new ListTrainingPipelinesPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListTrainingPipelinesPagedResponse(ListTrainingPipelinesPage page) { + super(page, ListTrainingPipelinesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListTrainingPipelinesPage + extends AbstractPage< + ListTrainingPipelinesRequest, + ListTrainingPipelinesResponse, + TrainingPipeline, + ListTrainingPipelinesPage> { + + private ListTrainingPipelinesPage( + PageContext + context, + ListTrainingPipelinesResponse response) { + super(context, response); + } + + private static ListTrainingPipelinesPage createEmptyPage() { + return new ListTrainingPipelinesPage(null, null); + } + + @Override + protected ListTrainingPipelinesPage createPage( + PageContext + context, + ListTrainingPipelinesResponse response) { + return new ListTrainingPipelinesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListTrainingPipelinesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListTrainingPipelinesRequest, + ListTrainingPipelinesResponse, + TrainingPipeline, + ListTrainingPipelinesPage, + ListTrainingPipelinesFixedSizeCollection> { + + private ListTrainingPipelinesFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListTrainingPipelinesFixedSizeCollection createEmptyCollection() { + return new ListTrainingPipelinesFixedSizeCollection(null, 0); + } + + @Override + protected ListTrainingPipelinesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListTrainingPipelinesFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/PipelineServiceSettings.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/PipelineServiceSettings.java new file mode 100644 index 000000000..5b30d3709 --- /dev/null +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/PipelineServiceSettings.java @@ -0,0 +1,257 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1; + +import static com.google.cloud.aiplatform.v1.PipelineServiceClient.ListTrainingPipelinesPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.aiplatform.v1.stub.PipelineServiceStubSettings; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link PipelineServiceClient}. + * + *

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

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

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

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

{@code
+ * PipelineServiceSettings.Builder pipelineServiceSettingsBuilder =
+ *     PipelineServiceSettings.newBuilder();
+ * pipelineServiceSettingsBuilder
+ *     .createTrainingPipelineSettings()
+ *     .setRetrySettings(
+ *         pipelineServiceSettingsBuilder
+ *             .createTrainingPipelineSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * PipelineServiceSettings pipelineServiceSettings = pipelineServiceSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class PipelineServiceSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to createTrainingPipeline. */ + public UnaryCallSettings + createTrainingPipelineSettings() { + return ((PipelineServiceStubSettings) getStubSettings()).createTrainingPipelineSettings(); + } + + /** Returns the object with the settings used for calls to getTrainingPipeline. */ + public UnaryCallSettings + getTrainingPipelineSettings() { + return ((PipelineServiceStubSettings) getStubSettings()).getTrainingPipelineSettings(); + } + + /** Returns the object with the settings used for calls to listTrainingPipelines. */ + public PagedCallSettings< + ListTrainingPipelinesRequest, + ListTrainingPipelinesResponse, + ListTrainingPipelinesPagedResponse> + listTrainingPipelinesSettings() { + return ((PipelineServiceStubSettings) getStubSettings()).listTrainingPipelinesSettings(); + } + + /** Returns the object with the settings used for calls to deleteTrainingPipeline. */ + public UnaryCallSettings + deleteTrainingPipelineSettings() { + return ((PipelineServiceStubSettings) getStubSettings()).deleteTrainingPipelineSettings(); + } + + /** Returns the object with the settings used for calls to deleteTrainingPipeline. */ + public OperationCallSettings + deleteTrainingPipelineOperationSettings() { + return ((PipelineServiceStubSettings) getStubSettings()) + .deleteTrainingPipelineOperationSettings(); + } + + /** Returns the object with the settings used for calls to cancelTrainingPipeline. */ + public UnaryCallSettings cancelTrainingPipelineSettings() { + return ((PipelineServiceStubSettings) getStubSettings()).cancelTrainingPipelineSettings(); + } + + public static final PipelineServiceSettings create(PipelineServiceStubSettings stub) + throws IOException { + return new PipelineServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return PipelineServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return PipelineServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return PipelineServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return PipelineServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return PipelineServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return PipelineServiceStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return PipelineServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected PipelineServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for PipelineServiceSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(PipelineServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(PipelineServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + 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'. + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to createTrainingPipeline. */ + public UnaryCallSettings.Builder + createTrainingPipelineSettings() { + return getStubSettingsBuilder().createTrainingPipelineSettings(); + } + + /** Returns the builder for the settings used for calls to getTrainingPipeline. */ + public UnaryCallSettings.Builder + getTrainingPipelineSettings() { + return getStubSettingsBuilder().getTrainingPipelineSettings(); + } + + /** Returns the builder for the settings used for calls to listTrainingPipelines. */ + public PagedCallSettings.Builder< + ListTrainingPipelinesRequest, + ListTrainingPipelinesResponse, + ListTrainingPipelinesPagedResponse> + listTrainingPipelinesSettings() { + return getStubSettingsBuilder().listTrainingPipelinesSettings(); + } + + /** Returns the builder for the settings used for calls to deleteTrainingPipeline. */ + public UnaryCallSettings.Builder + deleteTrainingPipelineSettings() { + return getStubSettingsBuilder().deleteTrainingPipelineSettings(); + } + + /** Returns the builder for the settings used for calls to deleteTrainingPipeline. */ + public OperationCallSettings.Builder< + DeleteTrainingPipelineRequest, Empty, DeleteOperationMetadata> + deleteTrainingPipelineOperationSettings() { + return getStubSettingsBuilder().deleteTrainingPipelineOperationSettings(); + } + + /** Returns the builder for the settings used for calls to cancelTrainingPipeline. */ + public UnaryCallSettings.Builder + cancelTrainingPipelineSettings() { + return getStubSettingsBuilder().cancelTrainingPipelineSettings(); + } + + @Override + public PipelineServiceSettings build() throws IOException { + return new PipelineServiceSettings(this); + } + } +} diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/PredictionServiceClient.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/PredictionServiceClient.java new file mode 100644 index 000000000..e08a935f6 --- /dev/null +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/PredictionServiceClient.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. + */ + +package com.google.cloud.aiplatform.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1.stub.PredictionServiceStub; +import com.google.cloud.aiplatform.v1.stub.PredictionServiceStubSettings; +import com.google.protobuf.Value; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// 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: + * + *

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

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

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

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

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

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

To customize credentials: + * + *

{@code
+ * PredictionServiceSettings predictionServiceSettings =
+ *     PredictionServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * PredictionServiceClient predictionServiceClient =
+ *     PredictionServiceClient.create(predictionServiceSettings);
+ * }
+ * + *

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-java") +public class PredictionServiceClient implements BackgroundResource { + private final PredictionServiceSettings settings; + private final PredictionServiceStub stub; + + /** Constructs an instance of PredictionServiceClient with default settings. */ + public static final PredictionServiceClient create() throws IOException { + return create(PredictionServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of PredictionServiceClient, using the given settings. The channels are + * created based on the settings passed in, or defaults for any settings that are not set. + */ + public static final PredictionServiceClient create(PredictionServiceSettings settings) + throws IOException { + return new PredictionServiceClient(settings); + } + + /** + * Constructs an instance of PredictionServiceClient, using the given stub for making calls. This + * is for advanced usage - prefer 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) { + return new PredictionServiceClient(stub); + } + + /** + * Constructs an instance of PredictionServiceClient, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected PredictionServiceClient(PredictionServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((PredictionServiceStubSettings) settings.getStubSettings()).createStub(); + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + protected PredictionServiceClient(PredictionServiceStub stub) { + this.settings = null; + this.stub = stub; + } + + public final PredictionServiceSettings getSettings() { + return settings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public PredictionServiceStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Perform an online prediction. + * + * @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 + * DeployedModel may have an upper limit on the number of instances it supports per request, + * and when it is exceeded the prediction call errors in case of AutoML Models, or, in case of + * customer created Models, the behaviour is as documented by that Model. The schema of any + * single instance may be specified via Endpoint's DeployedModels' + * [Model's][google.cloud.aiplatform.v1.DeployedModel.model] + * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata] + * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]. + * @param parameters The parameters that govern the prediction. The schema of the parameters may + * be specified via Endpoint's DeployedModels' [Model's + * ][google.cloud.aiplatform.v1.DeployedModel.model] + * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata] + * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri]. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final PredictResponse predict( + EndpointName endpoint, List instances, Value parameters) { + PredictRequest request = + PredictRequest.newBuilder() + .setEndpoint(endpoint == null ? null : endpoint.toString()) + .addAllInstances(instances) + .setParameters(parameters) + .build(); + return predict(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Perform an online prediction. + * + * @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 + * DeployedModel may have an upper limit on the number of instances it supports per request, + * and when it is exceeded the prediction call errors in case of AutoML Models, or, in case of + * customer created Models, the behaviour is as documented by that Model. The schema of any + * single instance may be specified via Endpoint's DeployedModels' + * [Model's][google.cloud.aiplatform.v1.DeployedModel.model] + * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata] + * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]. + * @param parameters The parameters that govern the prediction. The schema of the parameters may + * be specified via Endpoint's DeployedModels' [Model's + * ][google.cloud.aiplatform.v1.DeployedModel.model] + * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata] + * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri]. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final PredictResponse predict(String endpoint, List instances, Value parameters) { + PredictRequest request = + PredictRequest.newBuilder() + .setEndpoint(endpoint) + .addAllInstances(instances) + .setParameters(parameters) + .build(); + return predict(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Perform an online prediction. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final PredictResponse predict(PredictRequest request) { + return predictCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Perform an online prediction. + * + *

Sample code: + */ + public final UnaryCallable predictCallable() { + return stub.predictCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } +} diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/PredictionServiceSettings.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/PredictionServiceSettings.java new file mode 100644 index 000000000..c2947a287 --- /dev/null +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/PredictionServiceSettings.java @@ -0,0 +1,182 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.aiplatform.v1.stub.PredictionServiceStubSettings; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link PredictionServiceClient}. + * + *

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

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

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

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

{@code
+ * PredictionServiceSettings.Builder predictionServiceSettingsBuilder =
+ *     PredictionServiceSettings.newBuilder();
+ * predictionServiceSettingsBuilder
+ *     .predictSettings()
+ *     .setRetrySettings(
+ *         predictionServiceSettingsBuilder
+ *             .predictSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * PredictionServiceSettings predictionServiceSettings = predictionServiceSettingsBuilder.build();
+ * }
+ */ +@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(); + } + + public static final PredictionServiceSettings create(PredictionServiceStubSettings stub) + throws IOException { + return new PredictionServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return PredictionServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return PredictionServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return PredictionServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return PredictionServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return PredictionServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return PredictionServiceStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return PredictionServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected PredictionServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for PredictionServiceSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(PredictionServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(PredictionServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + 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'. + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to predict. */ + public UnaryCallSettings.Builder predictSettings() { + return getStubSettingsBuilder().predictSettings(); + } + + @Override + public PredictionServiceSettings build() throws IOException { + return new PredictionServiceSettings(this); + } + } +} diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/SpecialistPoolServiceClient.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/SpecialistPoolServiceClient.java new file mode 100644 index 000000000..d0a5235b4 --- /dev/null +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/SpecialistPoolServiceClient.java @@ -0,0 +1,591 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1.stub.SpecialistPoolServiceStub; +import com.google.cloud.aiplatform.v1.stub.SpecialistPoolServiceStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.longrunning.Operation; +import com.google.longrunning.OperationsClient; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND 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 + * to label the data. Customers can add/remove Managers for the Specialist Pool on Cloud console, + * then Managers will get email notifications to manage Specialists and tasks on CrowdCompute + * console. + * + *

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 SpecialistPoolServiceClient object to clean up + * resources such as threads. In the example above, try-with-resources is used, which automatically + * calls close(). + * + *

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

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

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

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

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

To customize credentials: + * + *

{@code
+ * SpecialistPoolServiceSettings specialistPoolServiceSettings =
+ *     SpecialistPoolServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * SpecialistPoolServiceClient specialistPoolServiceClient =
+ *     SpecialistPoolServiceClient.create(specialistPoolServiceSettings);
+ * }
+ * + *

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-java") +public class SpecialistPoolServiceClient implements BackgroundResource { + private final SpecialistPoolServiceSettings settings; + private final SpecialistPoolServiceStub stub; + private final OperationsClient operationsClient; + + /** Constructs an instance of SpecialistPoolServiceClient with default settings. */ + public static final SpecialistPoolServiceClient create() throws IOException { + return create(SpecialistPoolServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of SpecialistPoolServiceClient, using the given settings. The channels + * are created based on the settings passed in, or defaults for any settings that are not set. + */ + public static final SpecialistPoolServiceClient create(SpecialistPoolServiceSettings settings) + throws IOException { + return new SpecialistPoolServiceClient(settings); + } + + /** + * Constructs an instance of SpecialistPoolServiceClient, using the given stub for making calls. + * 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) { + return new SpecialistPoolServiceClient(stub); + } + + /** + * Constructs an instance of SpecialistPoolServiceClient, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected SpecialistPoolServiceClient(SpecialistPoolServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((SpecialistPoolServiceStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + protected SpecialistPoolServiceClient(SpecialistPoolServiceStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + public final SpecialistPoolServiceSettings getSettings() { + return settings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public SpecialistPoolServiceStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final OperationsClient getOperationsClient() { + return operationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a SpecialistPool. + * + * @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 + */ + public final OperationFuture + createSpecialistPoolAsync(LocationName parent, SpecialistPool specialistPool) { + CreateSpecialistPoolRequest request = + CreateSpecialistPoolRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setSpecialistPool(specialistPool) + .build(); + return createSpecialistPoolAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a SpecialistPool. + * + * @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 + */ + public final OperationFuture + createSpecialistPoolAsync(String parent, SpecialistPool specialistPool) { + CreateSpecialistPoolRequest request = + CreateSpecialistPoolRequest.newBuilder() + .setParent(parent) + .setSpecialistPool(specialistPool) + .build(); + return createSpecialistPoolAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a SpecialistPool. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + createSpecialistPoolAsync(CreateSpecialistPoolRequest request) { + return createSpecialistPoolOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a SpecialistPool. + * + *

Sample code: + */ + public final OperationCallable< + CreateSpecialistPoolRequest, SpecialistPool, CreateSpecialistPoolOperationMetadata> + createSpecialistPoolOperationCallable() { + return stub.createSpecialistPoolOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a SpecialistPool. + * + *

Sample code: + */ + public final UnaryCallable + createSpecialistPoolCallable() { + return stub.createSpecialistPoolCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a SpecialistPool. + * + * @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 + */ + public final SpecialistPool getSpecialistPool(SpecialistPoolName name) { + GetSpecialistPoolRequest request = + GetSpecialistPoolRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getSpecialistPool(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a SpecialistPool. + * + * @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 + */ + public final SpecialistPool getSpecialistPool(String name) { + GetSpecialistPoolRequest request = GetSpecialistPoolRequest.newBuilder().setName(name).build(); + return getSpecialistPool(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a SpecialistPool. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SpecialistPool getSpecialistPool(GetSpecialistPoolRequest request) { + return getSpecialistPoolCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a SpecialistPool. + * + *

Sample code: + */ + public final UnaryCallable getSpecialistPoolCallable() { + return stub.getSpecialistPoolCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists SpecialistPools in a Location. + * + * @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 + */ + public final ListSpecialistPoolsPagedResponse listSpecialistPools(LocationName parent) { + ListSpecialistPoolsRequest request = + ListSpecialistPoolsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listSpecialistPools(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists SpecialistPools in a Location. + * + * @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 + */ + public final ListSpecialistPoolsPagedResponse listSpecialistPools(String parent) { + ListSpecialistPoolsRequest request = + ListSpecialistPoolsRequest.newBuilder().setParent(parent).build(); + return listSpecialistPools(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists SpecialistPools in a Location. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListSpecialistPoolsPagedResponse listSpecialistPools( + ListSpecialistPoolsRequest request) { + return listSpecialistPoolsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists SpecialistPools in a Location. + * + *

Sample code: + */ + public final UnaryCallable + listSpecialistPoolsPagedCallable() { + return stub.listSpecialistPoolsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists SpecialistPools in a Location. + * + *

Sample code: + */ + public final UnaryCallable + listSpecialistPoolsCallable() { + return stub.listSpecialistPoolsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a SpecialistPool as well as all Specialists in the pool. + * + * @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 + */ + public final OperationFuture deleteSpecialistPoolAsync( + SpecialistPoolName name) { + DeleteSpecialistPoolRequest request = + DeleteSpecialistPoolRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return deleteSpecialistPoolAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a SpecialistPool as well as all Specialists in the pool. + * + * @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 + */ + public final OperationFuture deleteSpecialistPoolAsync( + String name) { + DeleteSpecialistPoolRequest request = + DeleteSpecialistPoolRequest.newBuilder().setName(name).build(); + return deleteSpecialistPoolAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a SpecialistPool as well as all Specialists in the pool. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteSpecialistPoolAsync( + DeleteSpecialistPoolRequest request) { + return deleteSpecialistPoolOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a SpecialistPool as well as all Specialists in the pool. + * + *

Sample code: + */ + public final OperationCallable + deleteSpecialistPoolOperationCallable() { + return stub.deleteSpecialistPoolOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a SpecialistPool as well as all Specialists in the pool. + * + *

Sample code: + */ + public final UnaryCallable + deleteSpecialistPoolCallable() { + return stub.deleteSpecialistPoolCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a SpecialistPool. + * + * @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 + */ + public final OperationFuture + updateSpecialistPoolAsync(SpecialistPool specialistPool, FieldMask updateMask) { + UpdateSpecialistPoolRequest request = + UpdateSpecialistPoolRequest.newBuilder() + .setSpecialistPool(specialistPool) + .setUpdateMask(updateMask) + .build(); + return updateSpecialistPoolAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a SpecialistPool. + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + updateSpecialistPoolAsync(UpdateSpecialistPoolRequest request) { + return updateSpecialistPoolOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a SpecialistPool. + * + *

Sample code: + */ + public final OperationCallable< + UpdateSpecialistPoolRequest, SpecialistPool, UpdateSpecialistPoolOperationMetadata> + updateSpecialistPoolOperationCallable() { + return stub.updateSpecialistPoolOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a SpecialistPool. + * + *

Sample code: + */ + public final UnaryCallable + updateSpecialistPoolCallable() { + return stub.updateSpecialistPoolCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListSpecialistPoolsPagedResponse + extends AbstractPagedListResponse< + ListSpecialistPoolsRequest, + ListSpecialistPoolsResponse, + SpecialistPool, + ListSpecialistPoolsPage, + ListSpecialistPoolsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListSpecialistPoolsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListSpecialistPoolsPagedResponse apply(ListSpecialistPoolsPage input) { + return new ListSpecialistPoolsPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListSpecialistPoolsPagedResponse(ListSpecialistPoolsPage page) { + super(page, ListSpecialistPoolsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListSpecialistPoolsPage + extends AbstractPage< + ListSpecialistPoolsRequest, + ListSpecialistPoolsResponse, + SpecialistPool, + ListSpecialistPoolsPage> { + + private ListSpecialistPoolsPage( + PageContext + context, + ListSpecialistPoolsResponse response) { + super(context, response); + } + + private static ListSpecialistPoolsPage createEmptyPage() { + return new ListSpecialistPoolsPage(null, null); + } + + @Override + protected ListSpecialistPoolsPage createPage( + PageContext + context, + ListSpecialistPoolsResponse response) { + return new ListSpecialistPoolsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListSpecialistPoolsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListSpecialistPoolsRequest, + ListSpecialistPoolsResponse, + SpecialistPool, + ListSpecialistPoolsPage, + ListSpecialistPoolsFixedSizeCollection> { + + private ListSpecialistPoolsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListSpecialistPoolsFixedSizeCollection createEmptyCollection() { + return new ListSpecialistPoolsFixedSizeCollection(null, 0); + } + + @Override + protected ListSpecialistPoolsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListSpecialistPoolsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/SpecialistPoolServiceSettings.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/SpecialistPoolServiceSettings.java new file mode 100644 index 000000000..e21e2506d --- /dev/null +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/SpecialistPoolServiceSettings.java @@ -0,0 +1,284 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1; + +import static com.google.cloud.aiplatform.v1.SpecialistPoolServiceClient.ListSpecialistPoolsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.aiplatform.v1.stub.SpecialistPoolServiceStubSettings; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link SpecialistPoolServiceClient}. + * + *

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

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

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

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

{@code
+ * SpecialistPoolServiceSettings.Builder specialistPoolServiceSettingsBuilder =
+ *     SpecialistPoolServiceSettings.newBuilder();
+ * specialistPoolServiceSettingsBuilder
+ *     .getSpecialistPoolSettings()
+ *     .setRetrySettings(
+ *         specialistPoolServiceSettingsBuilder
+ *             .getSpecialistPoolSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * SpecialistPoolServiceSettings specialistPoolServiceSettings =
+ *     specialistPoolServiceSettingsBuilder.build();
+ * }
+ */ +@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. */ + public OperationCallSettings< + CreateSpecialistPoolRequest, SpecialistPool, CreateSpecialistPoolOperationMetadata> + createSpecialistPoolOperationSettings() { + return ((SpecialistPoolServiceStubSettings) getStubSettings()) + .createSpecialistPoolOperationSettings(); + } + + /** Returns the object with the settings used for calls to getSpecialistPool. */ + public UnaryCallSettings getSpecialistPoolSettings() { + return ((SpecialistPoolServiceStubSettings) getStubSettings()).getSpecialistPoolSettings(); + } + + /** Returns the object with the settings used for calls to listSpecialistPools. */ + public PagedCallSettings< + ListSpecialistPoolsRequest, ListSpecialistPoolsResponse, ListSpecialistPoolsPagedResponse> + listSpecialistPoolsSettings() { + return ((SpecialistPoolServiceStubSettings) getStubSettings()).listSpecialistPoolsSettings(); + } + + /** Returns the object with the settings used for calls to deleteSpecialistPool. */ + public UnaryCallSettings deleteSpecialistPoolSettings() { + return ((SpecialistPoolServiceStubSettings) getStubSettings()).deleteSpecialistPoolSettings(); + } + + /** Returns the object with the settings used for calls to deleteSpecialistPool. */ + public OperationCallSettings + deleteSpecialistPoolOperationSettings() { + return ((SpecialistPoolServiceStubSettings) getStubSettings()) + .deleteSpecialistPoolOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateSpecialistPool. */ + public UnaryCallSettings updateSpecialistPoolSettings() { + return ((SpecialistPoolServiceStubSettings) getStubSettings()).updateSpecialistPoolSettings(); + } + + /** Returns the object with the settings used for calls to updateSpecialistPool. */ + public OperationCallSettings< + UpdateSpecialistPoolRequest, SpecialistPool, UpdateSpecialistPoolOperationMetadata> + updateSpecialistPoolOperationSettings() { + return ((SpecialistPoolServiceStubSettings) getStubSettings()) + .updateSpecialistPoolOperationSettings(); + } + + public static final SpecialistPoolServiceSettings create(SpecialistPoolServiceStubSettings stub) + throws IOException { + return new SpecialistPoolServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return SpecialistPoolServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return SpecialistPoolServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return SpecialistPoolServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return SpecialistPoolServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return SpecialistPoolServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return SpecialistPoolServiceStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return SpecialistPoolServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected SpecialistPoolServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for SpecialistPoolServiceSettings. */ + public static class Builder + extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(SpecialistPoolServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(SpecialistPoolServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + 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'. + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to createSpecialistPool. */ + public UnaryCallSettings.Builder + createSpecialistPoolSettings() { + return getStubSettingsBuilder().createSpecialistPoolSettings(); + } + + /** Returns the builder for the settings used for calls to createSpecialistPool. */ + public OperationCallSettings.Builder< + CreateSpecialistPoolRequest, SpecialistPool, CreateSpecialistPoolOperationMetadata> + createSpecialistPoolOperationSettings() { + return getStubSettingsBuilder().createSpecialistPoolOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getSpecialistPool. */ + public UnaryCallSettings.Builder + getSpecialistPoolSettings() { + return getStubSettingsBuilder().getSpecialistPoolSettings(); + } + + /** Returns the builder for the settings used for calls to listSpecialistPools. */ + public PagedCallSettings.Builder< + ListSpecialistPoolsRequest, + ListSpecialistPoolsResponse, + ListSpecialistPoolsPagedResponse> + listSpecialistPoolsSettings() { + return getStubSettingsBuilder().listSpecialistPoolsSettings(); + } + + /** Returns the builder for the settings used for calls to deleteSpecialistPool. */ + public UnaryCallSettings.Builder + deleteSpecialistPoolSettings() { + return getStubSettingsBuilder().deleteSpecialistPoolSettings(); + } + + /** Returns the builder for the settings used for calls to deleteSpecialistPool. */ + public OperationCallSettings.Builder< + DeleteSpecialistPoolRequest, Empty, DeleteOperationMetadata> + deleteSpecialistPoolOperationSettings() { + return getStubSettingsBuilder().deleteSpecialistPoolOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateSpecialistPool. */ + public UnaryCallSettings.Builder + updateSpecialistPoolSettings() { + return getStubSettingsBuilder().updateSpecialistPoolSettings(); + } + + /** Returns the builder for the settings used for calls to updateSpecialistPool. */ + public OperationCallSettings.Builder< + UpdateSpecialistPoolRequest, SpecialistPool, UpdateSpecialistPoolOperationMetadata> + updateSpecialistPoolOperationSettings() { + return getStubSettingsBuilder().updateSpecialistPoolOperationSettings(); + } + + @Override + public SpecialistPoolServiceSettings build() throws IOException { + return new SpecialistPoolServiceSettings(this); + } + } +} diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/package-info.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/package-info.java new file mode 100644 index 000000000..1065b05de --- /dev/null +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/package-info.java @@ -0,0 +1,72 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * The interfaces provided are listed below, along with usage samples. + * + *

======================= DatasetServiceClient ======================= + * + *

Sample for DatasetServiceClient: + * + *

======================= EndpointServiceClient ======================= + * + *

Sample for EndpointServiceClient: + * + *

======================= JobServiceClient ======================= + * + *

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

Sample for JobServiceClient: + * + *

======================= 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: + * + *

======================= ModelServiceClient ======================= + * + *

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

Sample for ModelServiceClient: + * + *

======================= PipelineServiceClient ======================= + * + *

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

Sample for PipelineServiceClient: + * + *

======================= PredictionServiceClient ======================= + * + *

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

Sample for PredictionServiceClient: + * + *

======================= 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 + * Specialists to label the data. Customers can add/remove Managers for the Specialist Pool on Cloud + * console, then Managers will get email notifications to manage Specialists and tasks on + * CrowdCompute console. + * + *

Sample for SpecialistPoolServiceClient: + */ +@Generated("by gapic-generator-java") +package com.google.cloud.aiplatform.v1; + +import javax.annotation.Generated; diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/DatasetServiceStub.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/DatasetServiceStub.java new file mode 100644 index 000000000..bc5ff2d39 --- /dev/null +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/DatasetServiceStub.java @@ -0,0 +1,141 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1.stub; + +import static com.google.cloud.aiplatform.v1.DatasetServiceClient.ListAnnotationsPagedResponse; +import static com.google.cloud.aiplatform.v1.DatasetServiceClient.ListDataItemsPagedResponse; +import static com.google.cloud.aiplatform.v1.DatasetServiceClient.ListDatasetsPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1.AnnotationSpec; +import com.google.cloud.aiplatform.v1.CreateDatasetOperationMetadata; +import com.google.cloud.aiplatform.v1.CreateDatasetRequest; +import com.google.cloud.aiplatform.v1.Dataset; +import com.google.cloud.aiplatform.v1.DeleteDatasetRequest; +import com.google.cloud.aiplatform.v1.DeleteOperationMetadata; +import com.google.cloud.aiplatform.v1.ExportDataOperationMetadata; +import com.google.cloud.aiplatform.v1.ExportDataRequest; +import com.google.cloud.aiplatform.v1.ExportDataResponse; +import com.google.cloud.aiplatform.v1.GetAnnotationSpecRequest; +import com.google.cloud.aiplatform.v1.GetDatasetRequest; +import com.google.cloud.aiplatform.v1.ImportDataOperationMetadata; +import com.google.cloud.aiplatform.v1.ImportDataRequest; +import com.google.cloud.aiplatform.v1.ImportDataResponse; +import com.google.cloud.aiplatform.v1.ListAnnotationsRequest; +import com.google.cloud.aiplatform.v1.ListAnnotationsResponse; +import com.google.cloud.aiplatform.v1.ListDataItemsRequest; +import com.google.cloud.aiplatform.v1.ListDataItemsResponse; +import com.google.cloud.aiplatform.v1.ListDatasetsRequest; +import com.google.cloud.aiplatform.v1.ListDatasetsResponse; +import com.google.cloud.aiplatform.v1.UpdateDatasetRequest; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the DatasetService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class DatasetServiceStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + throw new UnsupportedOperationException("Not implemented: getOperationsStub()"); + } + + public OperationCallable + createDatasetOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createDatasetOperationCallable()"); + } + + public UnaryCallable createDatasetCallable() { + throw new UnsupportedOperationException("Not implemented: createDatasetCallable()"); + } + + public UnaryCallable getDatasetCallable() { + throw new UnsupportedOperationException("Not implemented: getDatasetCallable()"); + } + + public UnaryCallable updateDatasetCallable() { + throw new UnsupportedOperationException("Not implemented: updateDatasetCallable()"); + } + + public UnaryCallable listDatasetsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listDatasetsPagedCallable()"); + } + + public UnaryCallable listDatasetsCallable() { + throw new UnsupportedOperationException("Not implemented: listDatasetsCallable()"); + } + + public OperationCallable + deleteDatasetOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteDatasetOperationCallable()"); + } + + public UnaryCallable deleteDatasetCallable() { + throw new UnsupportedOperationException("Not implemented: deleteDatasetCallable()"); + } + + public OperationCallable + importDataOperationCallable() { + throw new UnsupportedOperationException("Not implemented: importDataOperationCallable()"); + } + + public UnaryCallable importDataCallable() { + throw new UnsupportedOperationException("Not implemented: importDataCallable()"); + } + + public OperationCallable + exportDataOperationCallable() { + throw new UnsupportedOperationException("Not implemented: exportDataOperationCallable()"); + } + + public UnaryCallable exportDataCallable() { + throw new UnsupportedOperationException("Not implemented: exportDataCallable()"); + } + + public UnaryCallable + listDataItemsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listDataItemsPagedCallable()"); + } + + public UnaryCallable listDataItemsCallable() { + throw new UnsupportedOperationException("Not implemented: listDataItemsCallable()"); + } + + public UnaryCallable getAnnotationSpecCallable() { + throw new UnsupportedOperationException("Not implemented: getAnnotationSpecCallable()"); + } + + public UnaryCallable + listAnnotationsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listAnnotationsPagedCallable()"); + } + + public UnaryCallable listAnnotationsCallable() { + throw new UnsupportedOperationException("Not implemented: listAnnotationsCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/DatasetServiceStubSettings.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/DatasetServiceStubSettings.java new file mode 100644 index 000000000..5faa30878 --- /dev/null +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/DatasetServiceStubSettings.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. + */ + +package com.google.cloud.aiplatform.v1.stub; + +import static com.google.cloud.aiplatform.v1.DatasetServiceClient.ListAnnotationsPagedResponse; +import static com.google.cloud.aiplatform.v1.DatasetServiceClient.ListDataItemsPagedResponse; +import static com.google.cloud.aiplatform.v1.DatasetServiceClient.ListDatasetsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1.Annotation; +import com.google.cloud.aiplatform.v1.AnnotationSpec; +import com.google.cloud.aiplatform.v1.CreateDatasetOperationMetadata; +import com.google.cloud.aiplatform.v1.CreateDatasetRequest; +import com.google.cloud.aiplatform.v1.DataItem; +import com.google.cloud.aiplatform.v1.Dataset; +import com.google.cloud.aiplatform.v1.DeleteDatasetRequest; +import com.google.cloud.aiplatform.v1.DeleteOperationMetadata; +import com.google.cloud.aiplatform.v1.ExportDataOperationMetadata; +import com.google.cloud.aiplatform.v1.ExportDataRequest; +import com.google.cloud.aiplatform.v1.ExportDataResponse; +import com.google.cloud.aiplatform.v1.GetAnnotationSpecRequest; +import com.google.cloud.aiplatform.v1.GetDatasetRequest; +import com.google.cloud.aiplatform.v1.ImportDataOperationMetadata; +import com.google.cloud.aiplatform.v1.ImportDataRequest; +import com.google.cloud.aiplatform.v1.ImportDataResponse; +import com.google.cloud.aiplatform.v1.ListAnnotationsRequest; +import com.google.cloud.aiplatform.v1.ListAnnotationsResponse; +import com.google.cloud.aiplatform.v1.ListDataItemsRequest; +import com.google.cloud.aiplatform.v1.ListDataItemsResponse; +import com.google.cloud.aiplatform.v1.ListDatasetsRequest; +import com.google.cloud.aiplatform.v1.ListDatasetsResponse; +import com.google.cloud.aiplatform.v1.UpdateDatasetRequest; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link DatasetServiceStub}. + * + *

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

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

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

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

{@code
+ * DatasetServiceStubSettings.Builder datasetServiceSettingsBuilder =
+ *     DatasetServiceStubSettings.newBuilder();
+ * datasetServiceSettingsBuilder
+ *     .getDatasetSettings()
+ *     .setRetrySettings(
+ *         datasetServiceSettingsBuilder
+ *             .getDatasetSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * DatasetServiceStubSettings datasetServiceSettings = datasetServiceSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class DatasetServiceStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final UnaryCallSettings createDatasetSettings; + private final OperationCallSettings + createDatasetOperationSettings; + private final UnaryCallSettings getDatasetSettings; + private final UnaryCallSettings updateDatasetSettings; + private final PagedCallSettings< + ListDatasetsRequest, ListDatasetsResponse, ListDatasetsPagedResponse> + listDatasetsSettings; + private final UnaryCallSettings deleteDatasetSettings; + private final OperationCallSettings + deleteDatasetOperationSettings; + private final UnaryCallSettings importDataSettings; + private final OperationCallSettings< + ImportDataRequest, ImportDataResponse, ImportDataOperationMetadata> + importDataOperationSettings; + private final UnaryCallSettings exportDataSettings; + private final OperationCallSettings< + ExportDataRequest, ExportDataResponse, ExportDataOperationMetadata> + exportDataOperationSettings; + private final PagedCallSettings< + ListDataItemsRequest, ListDataItemsResponse, ListDataItemsPagedResponse> + listDataItemsSettings; + private final UnaryCallSettings + getAnnotationSpecSettings; + private final PagedCallSettings< + ListAnnotationsRequest, ListAnnotationsResponse, ListAnnotationsPagedResponse> + 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. */ + public OperationCallSettings + createDatasetOperationSettings() { + return createDatasetOperationSettings; + } + + /** Returns the object with the settings used for calls to getDataset. */ + public UnaryCallSettings getDatasetSettings() { + return getDatasetSettings; + } + + /** Returns the object with the settings used for calls to updateDataset. */ + public UnaryCallSettings updateDatasetSettings() { + return updateDatasetSettings; + } + + /** Returns the object with the settings used for calls to listDatasets. */ + public PagedCallSettings + listDatasetsSettings() { + return listDatasetsSettings; + } + + /** Returns the object with the settings used for calls to deleteDataset. */ + public UnaryCallSettings deleteDatasetSettings() { + return deleteDatasetSettings; + } + + /** Returns the object with the settings used for calls to deleteDataset. */ + public OperationCallSettings + deleteDatasetOperationSettings() { + return deleteDatasetOperationSettings; + } + + /** Returns the object with the settings used for calls to importData. */ + public UnaryCallSettings importDataSettings() { + return importDataSettings; + } + + /** Returns the object with the settings used for calls to importData. */ + public OperationCallSettings + importDataOperationSettings() { + return importDataOperationSettings; + } + + /** Returns the object with the settings used for calls to exportData. */ + public UnaryCallSettings exportDataSettings() { + return exportDataSettings; + } + + /** Returns the object with the settings used for calls to exportData. */ + public OperationCallSettings + exportDataOperationSettings() { + return exportDataOperationSettings; + } + + /** Returns the object with the settings used for calls to listDataItems. */ + public PagedCallSettings + listDataItemsSettings() { + return listDataItemsSettings; + } + + /** Returns the object with the settings used for calls to getAnnotationSpec. */ + public UnaryCallSettings getAnnotationSpecSettings() { + return getAnnotationSpecSettings; + } + + /** Returns the object with the settings used for calls to listAnnotations. */ + public PagedCallSettings< + ListAnnotationsRequest, ListAnnotationsResponse, ListAnnotationsPagedResponse> + listAnnotationsSettings() { + return listAnnotationsSettings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public DatasetServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcDatasetServiceStub.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(DatasetServiceStubSettings.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 DatasetServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + createDatasetSettings = settingsBuilder.createDatasetSettings().build(); + createDatasetOperationSettings = settingsBuilder.createDatasetOperationSettings().build(); + getDatasetSettings = settingsBuilder.getDatasetSettings().build(); + updateDatasetSettings = settingsBuilder.updateDatasetSettings().build(); + listDatasetsSettings = settingsBuilder.listDatasetsSettings().build(); + deleteDatasetSettings = settingsBuilder.deleteDatasetSettings().build(); + deleteDatasetOperationSettings = settingsBuilder.deleteDatasetOperationSettings().build(); + importDataSettings = settingsBuilder.importDataSettings().build(); + importDataOperationSettings = settingsBuilder.importDataOperationSettings().build(); + exportDataSettings = settingsBuilder.exportDataSettings().build(); + exportDataOperationSettings = settingsBuilder.exportDataOperationSettings().build(); + listDataItemsSettings = settingsBuilder.listDataItemsSettings().build(); + getAnnotationSpecSettings = settingsBuilder.getAnnotationSpecSettings().build(); + listAnnotationsSettings = settingsBuilder.listAnnotationsSettings().build(); + } + + /** 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> + createDatasetOperationSettings; + private final UnaryCallSettings.Builder getDatasetSettings; + private final UnaryCallSettings.Builder updateDatasetSettings; + private final PagedCallSettings.Builder< + ListDatasetsRequest, ListDatasetsResponse, ListDatasetsPagedResponse> + listDatasetsSettings; + private final UnaryCallSettings.Builder deleteDatasetSettings; + private final OperationCallSettings.Builder< + DeleteDatasetRequest, Empty, DeleteOperationMetadata> + deleteDatasetOperationSettings; + private final UnaryCallSettings.Builder importDataSettings; + private final OperationCallSettings.Builder< + ImportDataRequest, ImportDataResponse, ImportDataOperationMetadata> + importDataOperationSettings; + private final UnaryCallSettings.Builder exportDataSettings; + private final OperationCallSettings.Builder< + ExportDataRequest, ExportDataResponse, ExportDataOperationMetadata> + exportDataOperationSettings; + private final PagedCallSettings.Builder< + ListDataItemsRequest, ListDataItemsResponse, ListDataItemsPagedResponse> + listDataItemsSettings; + private final UnaryCallSettings.Builder + getAnnotationSpecSettings; + private final PagedCallSettings.Builder< + ListAnnotationsRequest, ListAnnotationsResponse, ListAnnotationsPagedResponse> + listAnnotationsSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + createDatasetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createDatasetOperationSettings = OperationCallSettings.newBuilder(); + getDatasetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateDatasetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listDatasetsSettings = PagedCallSettings.newBuilder(LIST_DATASETS_PAGE_STR_FACT); + deleteDatasetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteDatasetOperationSettings = OperationCallSettings.newBuilder(); + importDataSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + importDataOperationSettings = OperationCallSettings.newBuilder(); + exportDataSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + exportDataOperationSettings = OperationCallSettings.newBuilder(); + listDataItemsSettings = PagedCallSettings.newBuilder(LIST_DATA_ITEMS_PAGE_STR_FACT); + getAnnotationSpecSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listAnnotationsSettings = PagedCallSettings.newBuilder(LIST_ANNOTATIONS_PAGE_STR_FACT); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createDatasetSettings, + getDatasetSettings, + updateDatasetSettings, + listDatasetsSettings, + deleteDatasetSettings, + importDataSettings, + exportDataSettings, + listDataItemsSettings, + getAnnotationSpecSettings, + listAnnotationsSettings); + initDefaults(this); + } + + 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); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .createDatasetSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getDatasetSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .updateDatasetSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listDatasetsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .deleteDatasetSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .importDataSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .exportDataSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listDataItemsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getAnnotationSpecSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listAnnotationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .createDatasetOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Dataset.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + CreateDatasetOperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .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_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(DeleteOperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .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_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(ImportDataResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + ImportDataOperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .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_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(ExportDataResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + ExportDataOperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + return builder; + } + + // NEXT_MAJOR_VER: remove 'throws Exception'. + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to createDataset. */ + public UnaryCallSettings.Builder createDatasetSettings() { + return createDatasetSettings; + } + + /** Returns the builder for the settings used for calls to createDataset. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + CreateDatasetRequest, Dataset, CreateDatasetOperationMetadata> + createDatasetOperationSettings() { + return createDatasetOperationSettings; + } + + /** Returns the builder for the settings used for calls to getDataset. */ + public UnaryCallSettings.Builder getDatasetSettings() { + return getDatasetSettings; + } + + /** Returns the builder for the settings used for calls to updateDataset. */ + public UnaryCallSettings.Builder updateDatasetSettings() { + return updateDatasetSettings; + } + + /** Returns the builder for the settings used for calls to listDatasets. */ + public PagedCallSettings.Builder< + ListDatasetsRequest, ListDatasetsResponse, ListDatasetsPagedResponse> + listDatasetsSettings() { + return listDatasetsSettings; + } + + /** Returns the builder for the settings used for calls to deleteDataset. */ + public UnaryCallSettings.Builder deleteDatasetSettings() { + return deleteDatasetSettings; + } + + /** Returns the builder for the settings used for calls to deleteDataset. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteDatasetOperationSettings() { + return deleteDatasetOperationSettings; + } + + /** Returns the builder for the settings used for calls to importData. */ + public UnaryCallSettings.Builder importDataSettings() { + return importDataSettings; + } + + /** Returns the builder for the settings used for calls to importData. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + ImportDataRequest, ImportDataResponse, ImportDataOperationMetadata> + importDataOperationSettings() { + return importDataOperationSettings; + } + + /** Returns the builder for the settings used for calls to exportData. */ + public UnaryCallSettings.Builder exportDataSettings() { + return exportDataSettings; + } + + /** Returns the builder for the settings used for calls to exportData. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + ExportDataRequest, ExportDataResponse, ExportDataOperationMetadata> + exportDataOperationSettings() { + return exportDataOperationSettings; + } + + /** Returns the builder for the settings used for calls to listDataItems. */ + public PagedCallSettings.Builder< + ListDataItemsRequest, ListDataItemsResponse, ListDataItemsPagedResponse> + listDataItemsSettings() { + return listDataItemsSettings; + } + + /** Returns the builder for the settings used for calls to getAnnotationSpec. */ + public UnaryCallSettings.Builder + getAnnotationSpecSettings() { + return getAnnotationSpecSettings; + } + + /** Returns the builder for the settings used for calls to listAnnotations. */ + public PagedCallSettings.Builder< + ListAnnotationsRequest, ListAnnotationsResponse, ListAnnotationsPagedResponse> + listAnnotationsSettings() { + return listAnnotationsSettings; + } + + @Override + public DatasetServiceStubSettings build() throws IOException { + return new DatasetServiceStubSettings(this); + } + } +} diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/EndpointServiceStub.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/EndpointServiceStub.java new file mode 100644 index 000000000..e64b38ddc --- /dev/null +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/EndpointServiceStub.java @@ -0,0 +1,113 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1.stub; + +import static com.google.cloud.aiplatform.v1.EndpointServiceClient.ListEndpointsPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1.CreateEndpointOperationMetadata; +import com.google.cloud.aiplatform.v1.CreateEndpointRequest; +import com.google.cloud.aiplatform.v1.DeleteEndpointRequest; +import com.google.cloud.aiplatform.v1.DeleteOperationMetadata; +import com.google.cloud.aiplatform.v1.DeployModelOperationMetadata; +import com.google.cloud.aiplatform.v1.DeployModelRequest; +import com.google.cloud.aiplatform.v1.DeployModelResponse; +import com.google.cloud.aiplatform.v1.Endpoint; +import com.google.cloud.aiplatform.v1.GetEndpointRequest; +import com.google.cloud.aiplatform.v1.ListEndpointsRequest; +import com.google.cloud.aiplatform.v1.ListEndpointsResponse; +import com.google.cloud.aiplatform.v1.UndeployModelOperationMetadata; +import com.google.cloud.aiplatform.v1.UndeployModelRequest; +import com.google.cloud.aiplatform.v1.UndeployModelResponse; +import com.google.cloud.aiplatform.v1.UpdateEndpointRequest; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the EndpointService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class EndpointServiceStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + throw new UnsupportedOperationException("Not implemented: getOperationsStub()"); + } + + public OperationCallable + createEndpointOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createEndpointOperationCallable()"); + } + + public UnaryCallable createEndpointCallable() { + throw new UnsupportedOperationException("Not implemented: createEndpointCallable()"); + } + + public UnaryCallable getEndpointCallable() { + throw new UnsupportedOperationException("Not implemented: getEndpointCallable()"); + } + + public UnaryCallable + listEndpointsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listEndpointsPagedCallable()"); + } + + public UnaryCallable listEndpointsCallable() { + throw new UnsupportedOperationException("Not implemented: listEndpointsCallable()"); + } + + public UnaryCallable updateEndpointCallable() { + throw new UnsupportedOperationException("Not implemented: updateEndpointCallable()"); + } + + public OperationCallable + deleteEndpointOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteEndpointOperationCallable()"); + } + + public UnaryCallable deleteEndpointCallable() { + throw new UnsupportedOperationException("Not implemented: deleteEndpointCallable()"); + } + + public OperationCallable + deployModelOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deployModelOperationCallable()"); + } + + public UnaryCallable deployModelCallable() { + throw new UnsupportedOperationException("Not implemented: deployModelCallable()"); + } + + public OperationCallable< + UndeployModelRequest, UndeployModelResponse, UndeployModelOperationMetadata> + undeployModelOperationCallable() { + throw new UnsupportedOperationException("Not implemented: undeployModelOperationCallable()"); + } + + public UnaryCallable undeployModelCallable() { + throw new UnsupportedOperationException("Not implemented: undeployModelCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/EndpointServiceStubSettings.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/EndpointServiceStubSettings.java new file mode 100644 index 000000000..285c56852 --- /dev/null +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/EndpointServiceStubSettings.java @@ -0,0 +1,673 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1.stub; + +import static com.google.cloud.aiplatform.v1.EndpointServiceClient.ListEndpointsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1.CreateEndpointOperationMetadata; +import com.google.cloud.aiplatform.v1.CreateEndpointRequest; +import com.google.cloud.aiplatform.v1.DeleteEndpointRequest; +import com.google.cloud.aiplatform.v1.DeleteOperationMetadata; +import com.google.cloud.aiplatform.v1.DeployModelOperationMetadata; +import com.google.cloud.aiplatform.v1.DeployModelRequest; +import com.google.cloud.aiplatform.v1.DeployModelResponse; +import com.google.cloud.aiplatform.v1.Endpoint; +import com.google.cloud.aiplatform.v1.GetEndpointRequest; +import com.google.cloud.aiplatform.v1.ListEndpointsRequest; +import com.google.cloud.aiplatform.v1.ListEndpointsResponse; +import com.google.cloud.aiplatform.v1.UndeployModelOperationMetadata; +import com.google.cloud.aiplatform.v1.UndeployModelRequest; +import com.google.cloud.aiplatform.v1.UndeployModelResponse; +import com.google.cloud.aiplatform.v1.UpdateEndpointRequest; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link EndpointServiceStub}. + * + *

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

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

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

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

{@code
+ * EndpointServiceStubSettings.Builder endpointServiceSettingsBuilder =
+ *     EndpointServiceStubSettings.newBuilder();
+ * endpointServiceSettingsBuilder
+ *     .getEndpointSettings()
+ *     .setRetrySettings(
+ *         endpointServiceSettingsBuilder
+ *             .getEndpointSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * EndpointServiceStubSettings endpointServiceSettings = endpointServiceSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class EndpointServiceStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final UnaryCallSettings createEndpointSettings; + private final OperationCallSettings< + CreateEndpointRequest, Endpoint, CreateEndpointOperationMetadata> + createEndpointOperationSettings; + private final UnaryCallSettings getEndpointSettings; + private final PagedCallSettings< + ListEndpointsRequest, ListEndpointsResponse, ListEndpointsPagedResponse> + listEndpointsSettings; + private final UnaryCallSettings updateEndpointSettings; + private final UnaryCallSettings deleteEndpointSettings; + private final OperationCallSettings + deleteEndpointOperationSettings; + private final UnaryCallSettings deployModelSettings; + private final OperationCallSettings< + DeployModelRequest, DeployModelResponse, DeployModelOperationMetadata> + deployModelOperationSettings; + private final UnaryCallSettings undeployModelSettings; + private final OperationCallSettings< + UndeployModelRequest, UndeployModelResponse, UndeployModelOperationMetadata> + 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. */ + public OperationCallSettings + createEndpointOperationSettings() { + return createEndpointOperationSettings; + } + + /** Returns the object with the settings used for calls to getEndpoint. */ + public UnaryCallSettings getEndpointSettings() { + return getEndpointSettings; + } + + /** Returns the object with the settings used for calls to listEndpoints. */ + public PagedCallSettings + listEndpointsSettings() { + return listEndpointsSettings; + } + + /** Returns the object with the settings used for calls to updateEndpoint. */ + public UnaryCallSettings updateEndpointSettings() { + return updateEndpointSettings; + } + + /** Returns the object with the settings used for calls to deleteEndpoint. */ + public UnaryCallSettings deleteEndpointSettings() { + return deleteEndpointSettings; + } + + /** Returns the object with the settings used for calls to deleteEndpoint. */ + public OperationCallSettings + deleteEndpointOperationSettings() { + return deleteEndpointOperationSettings; + } + + /** Returns the object with the settings used for calls to deployModel. */ + public UnaryCallSettings deployModelSettings() { + return deployModelSettings; + } + + /** Returns the object with the settings used for calls to deployModel. */ + public OperationCallSettings< + DeployModelRequest, DeployModelResponse, DeployModelOperationMetadata> + deployModelOperationSettings() { + return deployModelOperationSettings; + } + + /** Returns the object with the settings used for calls to undeployModel. */ + public UnaryCallSettings undeployModelSettings() { + return undeployModelSettings; + } + + /** Returns the object with the settings used for calls to undeployModel. */ + public OperationCallSettings< + UndeployModelRequest, UndeployModelResponse, UndeployModelOperationMetadata> + undeployModelOperationSettings() { + return undeployModelOperationSettings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public EndpointServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcEndpointServiceStub.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(EndpointServiceStubSettings.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 EndpointServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + createEndpointSettings = settingsBuilder.createEndpointSettings().build(); + createEndpointOperationSettings = settingsBuilder.createEndpointOperationSettings().build(); + getEndpointSettings = settingsBuilder.getEndpointSettings().build(); + listEndpointsSettings = settingsBuilder.listEndpointsSettings().build(); + updateEndpointSettings = settingsBuilder.updateEndpointSettings().build(); + deleteEndpointSettings = settingsBuilder.deleteEndpointSettings().build(); + deleteEndpointOperationSettings = settingsBuilder.deleteEndpointOperationSettings().build(); + deployModelSettings = settingsBuilder.deployModelSettings().build(); + deployModelOperationSettings = settingsBuilder.deployModelOperationSettings().build(); + undeployModelSettings = settingsBuilder.undeployModelSettings().build(); + undeployModelOperationSettings = settingsBuilder.undeployModelOperationSettings().build(); + } + + /** Builder for EndpointServiceStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder + createEndpointSettings; + private final OperationCallSettings.Builder< + CreateEndpointRequest, Endpoint, CreateEndpointOperationMetadata> + createEndpointOperationSettings; + private final UnaryCallSettings.Builder getEndpointSettings; + private final PagedCallSettings.Builder< + ListEndpointsRequest, ListEndpointsResponse, ListEndpointsPagedResponse> + listEndpointsSettings; + private final UnaryCallSettings.Builder updateEndpointSettings; + private final UnaryCallSettings.Builder + deleteEndpointSettings; + private final OperationCallSettings.Builder< + DeleteEndpointRequest, Empty, DeleteOperationMetadata> + deleteEndpointOperationSettings; + private final UnaryCallSettings.Builder deployModelSettings; + private final OperationCallSettings.Builder< + DeployModelRequest, DeployModelResponse, DeployModelOperationMetadata> + deployModelOperationSettings; + private final UnaryCallSettings.Builder undeployModelSettings; + private final OperationCallSettings.Builder< + UndeployModelRequest, UndeployModelResponse, UndeployModelOperationMetadata> + undeployModelOperationSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + createEndpointSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createEndpointOperationSettings = OperationCallSettings.newBuilder(); + getEndpointSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listEndpointsSettings = PagedCallSettings.newBuilder(LIST_ENDPOINTS_PAGE_STR_FACT); + updateEndpointSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteEndpointSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteEndpointOperationSettings = OperationCallSettings.newBuilder(); + deployModelSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deployModelOperationSettings = OperationCallSettings.newBuilder(); + undeployModelSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + undeployModelOperationSettings = OperationCallSettings.newBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createEndpointSettings, + getEndpointSettings, + listEndpointsSettings, + updateEndpointSettings, + deleteEndpointSettings, + deployModelSettings, + undeployModelSettings); + initDefaults(this); + } + + 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); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .createEndpointSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getEndpointSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listEndpointsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .updateEndpointSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .deleteEndpointSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .deployModelSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .undeployModelSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .createEndpointOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Endpoint.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + CreateEndpointOperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .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_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(DeleteOperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .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_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(DeployModelResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + DeployModelOperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .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_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(UndeployModelResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + UndeployModelOperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + return builder; + } + + // NEXT_MAJOR_VER: remove 'throws Exception'. + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to createEndpoint. */ + public UnaryCallSettings.Builder createEndpointSettings() { + return createEndpointSettings; + } + + /** Returns the builder for 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.Builder< + CreateEndpointRequest, Endpoint, CreateEndpointOperationMetadata> + createEndpointOperationSettings() { + return createEndpointOperationSettings; + } + + /** Returns the builder for the settings used for calls to getEndpoint. */ + public UnaryCallSettings.Builder getEndpointSettings() { + return getEndpointSettings; + } + + /** Returns the builder for the settings used for calls to listEndpoints. */ + public PagedCallSettings.Builder< + ListEndpointsRequest, ListEndpointsResponse, ListEndpointsPagedResponse> + listEndpointsSettings() { + return listEndpointsSettings; + } + + /** Returns the builder for the settings used for calls to updateEndpoint. */ + public UnaryCallSettings.Builder updateEndpointSettings() { + return updateEndpointSettings; + } + + /** Returns the builder for the settings used for calls to deleteEndpoint. */ + public UnaryCallSettings.Builder deleteEndpointSettings() { + return deleteEndpointSettings; + } + + /** Returns the builder for 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.Builder + deleteEndpointOperationSettings() { + return deleteEndpointOperationSettings; + } + + /** Returns the builder for the settings used for calls to deployModel. */ + public UnaryCallSettings.Builder deployModelSettings() { + return deployModelSettings; + } + + /** Returns the builder for 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.Builder< + DeployModelRequest, DeployModelResponse, DeployModelOperationMetadata> + deployModelOperationSettings() { + return deployModelOperationSettings; + } + + /** Returns the builder for the settings used for calls to undeployModel. */ + public UnaryCallSettings.Builder undeployModelSettings() { + return undeployModelSettings; + } + + /** Returns the builder for 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.Builder< + UndeployModelRequest, UndeployModelResponse, UndeployModelOperationMetadata> + undeployModelOperationSettings() { + return undeployModelOperationSettings; + } + + @Override + public EndpointServiceStubSettings build() throws IOException { + return new EndpointServiceStubSettings(this); + } + } +} diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcDatasetServiceCallableFactory.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcDatasetServiceCallableFactory.java new file mode 100644 index 000000000..cc347b760 --- /dev/null +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcDatasetServiceCallableFactory.java @@ -0,0 +1,113 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1.stub; + +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the DatasetService service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcDatasetServiceCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcDatasetServiceStub.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcDatasetServiceStub.java new file mode 100644 index 000000000..f24e1ce12 --- /dev/null +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcDatasetServiceStub.java @@ -0,0 +1,548 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1.stub; + +import static com.google.cloud.aiplatform.v1.DatasetServiceClient.ListAnnotationsPagedResponse; +import static com.google.cloud.aiplatform.v1.DatasetServiceClient.ListDataItemsPagedResponse; +import static com.google.cloud.aiplatform.v1.DatasetServiceClient.ListDatasetsPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsExtractor; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1.AnnotationSpec; +import com.google.cloud.aiplatform.v1.CreateDatasetOperationMetadata; +import com.google.cloud.aiplatform.v1.CreateDatasetRequest; +import com.google.cloud.aiplatform.v1.Dataset; +import com.google.cloud.aiplatform.v1.DeleteDatasetRequest; +import com.google.cloud.aiplatform.v1.DeleteOperationMetadata; +import com.google.cloud.aiplatform.v1.ExportDataOperationMetadata; +import com.google.cloud.aiplatform.v1.ExportDataRequest; +import com.google.cloud.aiplatform.v1.ExportDataResponse; +import com.google.cloud.aiplatform.v1.GetAnnotationSpecRequest; +import com.google.cloud.aiplatform.v1.GetDatasetRequest; +import com.google.cloud.aiplatform.v1.ImportDataOperationMetadata; +import com.google.cloud.aiplatform.v1.ImportDataRequest; +import com.google.cloud.aiplatform.v1.ImportDataResponse; +import com.google.cloud.aiplatform.v1.ListAnnotationsRequest; +import com.google.cloud.aiplatform.v1.ListAnnotationsResponse; +import com.google.cloud.aiplatform.v1.ListDataItemsRequest; +import com.google.cloud.aiplatform.v1.ListDataItemsResponse; +import com.google.cloud.aiplatform.v1.ListDatasetsRequest; +import com.google.cloud.aiplatform.v1.ListDatasetsResponse; +import com.google.cloud.aiplatform.v1.UpdateDatasetRequest; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the DatasetService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcDatasetServiceStub extends DatasetServiceStub { + private static final MethodDescriptor + createDatasetMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1.DatasetService/CreateDataset") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateDatasetRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getDatasetMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1.DatasetService/GetDataset") + .setRequestMarshaller(ProtoUtils.marshaller(GetDatasetRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Dataset.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateDatasetMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1.DatasetService/UpdateDataset") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateDatasetRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Dataset.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listDatasetsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1.DatasetService/ListDatasets") + .setRequestMarshaller(ProtoUtils.marshaller(ListDatasetsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListDatasetsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteDatasetMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1.DatasetService/DeleteDataset") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteDatasetRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor importDataMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1.DatasetService/ImportData") + .setRequestMarshaller(ProtoUtils.marshaller(ImportDataRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor exportDataMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1.DatasetService/ExportData") + .setRequestMarshaller(ProtoUtils.marshaller(ExportDataRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listDataItemsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1.DatasetService/ListDataItems") + .setRequestMarshaller( + ProtoUtils.marshaller(ListDataItemsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListDataItemsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getAnnotationSpecMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1.DatasetService/GetAnnotationSpec") + .setRequestMarshaller( + ProtoUtils.marshaller(GetAnnotationSpecRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(AnnotationSpec.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listAnnotationsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1.DatasetService/ListAnnotations") + .setRequestMarshaller( + ProtoUtils.marshaller(ListAnnotationsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListAnnotationsResponse.getDefaultInstance())) + .build(); + + private final UnaryCallable createDatasetCallable; + private final OperationCallable + createDatasetOperationCallable; + private final UnaryCallable getDatasetCallable; + private final UnaryCallable updateDatasetCallable; + private final UnaryCallable listDatasetsCallable; + private final UnaryCallable + listDatasetsPagedCallable; + private final UnaryCallable deleteDatasetCallable; + private final OperationCallable + deleteDatasetOperationCallable; + private final UnaryCallable importDataCallable; + private final OperationCallable< + ImportDataRequest, ImportDataResponse, ImportDataOperationMetadata> + importDataOperationCallable; + private final UnaryCallable exportDataCallable; + private final OperationCallable< + ExportDataRequest, ExportDataResponse, ExportDataOperationMetadata> + exportDataOperationCallable; + private final UnaryCallable listDataItemsCallable; + private final UnaryCallable + listDataItemsPagedCallable; + private final UnaryCallable getAnnotationSpecCallable; + private final UnaryCallable + listAnnotationsCallable; + private final UnaryCallable + listAnnotationsPagedCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcDatasetServiceStub create(DatasetServiceStubSettings settings) + throws IOException { + return new GrpcDatasetServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcDatasetServiceStub create(ClientContext clientContext) + throws IOException { + return new GrpcDatasetServiceStub( + DatasetServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcDatasetServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcDatasetServiceStub( + DatasetServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcDatasetServiceStub, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcDatasetServiceStub(DatasetServiceStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcDatasetServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcDatasetServiceStub, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcDatasetServiceStub( + DatasetServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings createDatasetTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createDatasetMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateDatasetRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings getDatasetTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getDatasetMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetDatasetRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings updateDatasetTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateDatasetMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(UpdateDatasetRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("dataset.name", String.valueOf(request.getDataset().getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings listDatasetsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listDatasetsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListDatasetsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings deleteDatasetTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteDatasetMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteDatasetRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings importDataTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(importDataMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ImportDataRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings exportDataTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(exportDataMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ExportDataRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings listDataItemsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listDataItemsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListDataItemsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings getAnnotationSpecTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getAnnotationSpecMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetAnnotationSpecRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + listAnnotationsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listAnnotationsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListAnnotationsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + + this.createDatasetCallable = + callableFactory.createUnaryCallable( + createDatasetTransportSettings, settings.createDatasetSettings(), clientContext); + this.createDatasetOperationCallable = + callableFactory.createOperationCallable( + createDatasetTransportSettings, + settings.createDatasetOperationSettings(), + clientContext, + operationsStub); + this.getDatasetCallable = + callableFactory.createUnaryCallable( + getDatasetTransportSettings, settings.getDatasetSettings(), clientContext); + this.updateDatasetCallable = + callableFactory.createUnaryCallable( + updateDatasetTransportSettings, settings.updateDatasetSettings(), clientContext); + this.listDatasetsCallable = + callableFactory.createUnaryCallable( + listDatasetsTransportSettings, settings.listDatasetsSettings(), clientContext); + this.listDatasetsPagedCallable = + callableFactory.createPagedCallable( + listDatasetsTransportSettings, settings.listDatasetsSettings(), clientContext); + this.deleteDatasetCallable = + callableFactory.createUnaryCallable( + deleteDatasetTransportSettings, settings.deleteDatasetSettings(), clientContext); + this.deleteDatasetOperationCallable = + callableFactory.createOperationCallable( + deleteDatasetTransportSettings, + settings.deleteDatasetOperationSettings(), + clientContext, + operationsStub); + this.importDataCallable = + callableFactory.createUnaryCallable( + importDataTransportSettings, settings.importDataSettings(), clientContext); + this.importDataOperationCallable = + callableFactory.createOperationCallable( + importDataTransportSettings, + settings.importDataOperationSettings(), + clientContext, + operationsStub); + this.exportDataCallable = + callableFactory.createUnaryCallable( + exportDataTransportSettings, settings.exportDataSettings(), clientContext); + this.exportDataOperationCallable = + callableFactory.createOperationCallable( + exportDataTransportSettings, + settings.exportDataOperationSettings(), + clientContext, + operationsStub); + this.listDataItemsCallable = + callableFactory.createUnaryCallable( + listDataItemsTransportSettings, settings.listDataItemsSettings(), clientContext); + this.listDataItemsPagedCallable = + callableFactory.createPagedCallable( + listDataItemsTransportSettings, settings.listDataItemsSettings(), clientContext); + this.getAnnotationSpecCallable = + callableFactory.createUnaryCallable( + getAnnotationSpecTransportSettings, + settings.getAnnotationSpecSettings(), + clientContext); + this.listAnnotationsCallable = + callableFactory.createUnaryCallable( + listAnnotationsTransportSettings, settings.listAnnotationsSettings(), clientContext); + this.listAnnotationsPagedCallable = + callableFactory.createPagedCallable( + listAnnotationsTransportSettings, settings.listAnnotationsSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + public UnaryCallable createDatasetCallable() { + return createDatasetCallable; + } + + public OperationCallable + createDatasetOperationCallable() { + return createDatasetOperationCallable; + } + + public UnaryCallable getDatasetCallable() { + return getDatasetCallable; + } + + public UnaryCallable updateDatasetCallable() { + return updateDatasetCallable; + } + + public UnaryCallable listDatasetsCallable() { + return listDatasetsCallable; + } + + public UnaryCallable listDatasetsPagedCallable() { + return listDatasetsPagedCallable; + } + + public UnaryCallable deleteDatasetCallable() { + return deleteDatasetCallable; + } + + public OperationCallable + deleteDatasetOperationCallable() { + return deleteDatasetOperationCallable; + } + + public UnaryCallable importDataCallable() { + return importDataCallable; + } + + public OperationCallable + importDataOperationCallable() { + return importDataOperationCallable; + } + + public UnaryCallable exportDataCallable() { + return exportDataCallable; + } + + public OperationCallable + exportDataOperationCallable() { + return exportDataOperationCallable; + } + + public UnaryCallable listDataItemsCallable() { + return listDataItemsCallable; + } + + public UnaryCallable + listDataItemsPagedCallable() { + return listDataItemsPagedCallable; + } + + public UnaryCallable getAnnotationSpecCallable() { + return getAnnotationSpecCallable; + } + + public UnaryCallable listAnnotationsCallable() { + return listAnnotationsCallable; + } + + public UnaryCallable + listAnnotationsPagedCallable() { + return listAnnotationsPagedCallable; + } + + @Override + public final void close() { + shutdown(); + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcEndpointServiceCallableFactory.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcEndpointServiceCallableFactory.java new file mode 100644 index 000000000..cf0e0f1a7 --- /dev/null +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcEndpointServiceCallableFactory.java @@ -0,0 +1,113 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1.stub; + +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the EndpointService service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcEndpointServiceCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcEndpointServiceStub.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcEndpointServiceStub.java new file mode 100644 index 000000000..c6c4098ec --- /dev/null +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcEndpointServiceStub.java @@ -0,0 +1,426 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1.stub; + +import static com.google.cloud.aiplatform.v1.EndpointServiceClient.ListEndpointsPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsExtractor; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1.CreateEndpointOperationMetadata; +import com.google.cloud.aiplatform.v1.CreateEndpointRequest; +import com.google.cloud.aiplatform.v1.DeleteEndpointRequest; +import com.google.cloud.aiplatform.v1.DeleteOperationMetadata; +import com.google.cloud.aiplatform.v1.DeployModelOperationMetadata; +import com.google.cloud.aiplatform.v1.DeployModelRequest; +import com.google.cloud.aiplatform.v1.DeployModelResponse; +import com.google.cloud.aiplatform.v1.Endpoint; +import com.google.cloud.aiplatform.v1.GetEndpointRequest; +import com.google.cloud.aiplatform.v1.ListEndpointsRequest; +import com.google.cloud.aiplatform.v1.ListEndpointsResponse; +import com.google.cloud.aiplatform.v1.UndeployModelOperationMetadata; +import com.google.cloud.aiplatform.v1.UndeployModelRequest; +import com.google.cloud.aiplatform.v1.UndeployModelResponse; +import com.google.cloud.aiplatform.v1.UpdateEndpointRequest; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the EndpointService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcEndpointServiceStub extends EndpointServiceStub { + private static final MethodDescriptor + createEndpointMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1.EndpointService/CreateEndpoint") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateEndpointRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getEndpointMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1.EndpointService/GetEndpoint") + .setRequestMarshaller(ProtoUtils.marshaller(GetEndpointRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Endpoint.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listEndpointsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1.EndpointService/ListEndpoints") + .setRequestMarshaller( + ProtoUtils.marshaller(ListEndpointsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListEndpointsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateEndpointMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1.EndpointService/UpdateEndpoint") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateEndpointRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Endpoint.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteEndpointMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1.EndpointService/DeleteEndpoint") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteEndpointRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor deployModelMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1.EndpointService/DeployModel") + .setRequestMarshaller(ProtoUtils.marshaller(DeployModelRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + undeployModelMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1.EndpointService/UndeployModel") + .setRequestMarshaller( + ProtoUtils.marshaller(UndeployModelRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private final UnaryCallable createEndpointCallable; + private final OperationCallable + createEndpointOperationCallable; + private final UnaryCallable getEndpointCallable; + private final UnaryCallable listEndpointsCallable; + private final UnaryCallable + listEndpointsPagedCallable; + private final UnaryCallable updateEndpointCallable; + private final UnaryCallable deleteEndpointCallable; + private final OperationCallable + deleteEndpointOperationCallable; + private final UnaryCallable deployModelCallable; + private final OperationCallable< + DeployModelRequest, DeployModelResponse, DeployModelOperationMetadata> + deployModelOperationCallable; + private final UnaryCallable undeployModelCallable; + private final OperationCallable< + UndeployModelRequest, UndeployModelResponse, UndeployModelOperationMetadata> + undeployModelOperationCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcEndpointServiceStub create(EndpointServiceStubSettings settings) + throws IOException { + return new GrpcEndpointServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcEndpointServiceStub create(ClientContext clientContext) + throws IOException { + return new GrpcEndpointServiceStub( + EndpointServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcEndpointServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcEndpointServiceStub( + EndpointServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcEndpointServiceStub, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcEndpointServiceStub( + EndpointServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new GrpcEndpointServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcEndpointServiceStub, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcEndpointServiceStub( + EndpointServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings createEndpointTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createEndpointMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateEndpointRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings getEndpointTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getEndpointMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetEndpointRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings listEndpointsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listEndpointsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListEndpointsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings updateEndpointTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateEndpointMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(UpdateEndpointRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("endpoint.name", String.valueOf(request.getEndpoint().getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings deleteEndpointTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteEndpointMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteEndpointRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings deployModelTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deployModelMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeployModelRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("endpoint", String.valueOf(request.getEndpoint())); + return params.build(); + } + }) + .build(); + GrpcCallSettings undeployModelTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(undeployModelMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(UndeployModelRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("endpoint", String.valueOf(request.getEndpoint())); + return params.build(); + } + }) + .build(); + + this.createEndpointCallable = + callableFactory.createUnaryCallable( + createEndpointTransportSettings, settings.createEndpointSettings(), clientContext); + this.createEndpointOperationCallable = + callableFactory.createOperationCallable( + createEndpointTransportSettings, + settings.createEndpointOperationSettings(), + clientContext, + operationsStub); + this.getEndpointCallable = + callableFactory.createUnaryCallable( + getEndpointTransportSettings, settings.getEndpointSettings(), clientContext); + this.listEndpointsCallable = + callableFactory.createUnaryCallable( + listEndpointsTransportSettings, settings.listEndpointsSettings(), clientContext); + this.listEndpointsPagedCallable = + callableFactory.createPagedCallable( + listEndpointsTransportSettings, settings.listEndpointsSettings(), clientContext); + this.updateEndpointCallable = + callableFactory.createUnaryCallable( + updateEndpointTransportSettings, settings.updateEndpointSettings(), clientContext); + this.deleteEndpointCallable = + callableFactory.createUnaryCallable( + deleteEndpointTransportSettings, settings.deleteEndpointSettings(), clientContext); + this.deleteEndpointOperationCallable = + callableFactory.createOperationCallable( + deleteEndpointTransportSettings, + settings.deleteEndpointOperationSettings(), + clientContext, + operationsStub); + this.deployModelCallable = + callableFactory.createUnaryCallable( + deployModelTransportSettings, settings.deployModelSettings(), clientContext); + this.deployModelOperationCallable = + callableFactory.createOperationCallable( + deployModelTransportSettings, + settings.deployModelOperationSettings(), + clientContext, + operationsStub); + this.undeployModelCallable = + callableFactory.createUnaryCallable( + undeployModelTransportSettings, settings.undeployModelSettings(), clientContext); + this.undeployModelOperationCallable = + callableFactory.createOperationCallable( + undeployModelTransportSettings, + settings.undeployModelOperationSettings(), + clientContext, + operationsStub); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + public UnaryCallable createEndpointCallable() { + return createEndpointCallable; + } + + public OperationCallable + createEndpointOperationCallable() { + return createEndpointOperationCallable; + } + + public UnaryCallable getEndpointCallable() { + return getEndpointCallable; + } + + public UnaryCallable listEndpointsCallable() { + return listEndpointsCallable; + } + + public UnaryCallable + listEndpointsPagedCallable() { + return listEndpointsPagedCallable; + } + + public UnaryCallable updateEndpointCallable() { + return updateEndpointCallable; + } + + public UnaryCallable deleteEndpointCallable() { + return deleteEndpointCallable; + } + + public OperationCallable + deleteEndpointOperationCallable() { + return deleteEndpointOperationCallable; + } + + public UnaryCallable deployModelCallable() { + return deployModelCallable; + } + + public OperationCallable + deployModelOperationCallable() { + return deployModelOperationCallable; + } + + public UnaryCallable undeployModelCallable() { + return undeployModelCallable; + } + + public OperationCallable< + UndeployModelRequest, UndeployModelResponse, UndeployModelOperationMetadata> + undeployModelOperationCallable() { + return undeployModelOperationCallable; + } + + @Override + public final void close() { + shutdown(); + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcJobServiceCallableFactory.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcJobServiceCallableFactory.java new file mode 100644 index 000000000..ec4f19008 --- /dev/null +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcJobServiceCallableFactory.java @@ -0,0 +1,113 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1.stub; + +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the JobService service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcJobServiceCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcJobServiceStub.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcJobServiceStub.java new file mode 100644 index 000000000..8f5a1b98c --- /dev/null +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcJobServiceStub.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. + */ + +package com.google.cloud.aiplatform.v1.stub; + +import static com.google.cloud.aiplatform.v1.JobServiceClient.ListBatchPredictionJobsPagedResponse; +import static com.google.cloud.aiplatform.v1.JobServiceClient.ListCustomJobsPagedResponse; +import static com.google.cloud.aiplatform.v1.JobServiceClient.ListDataLabelingJobsPagedResponse; +import static com.google.cloud.aiplatform.v1.JobServiceClient.ListHyperparameterTuningJobsPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsExtractor; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1.BatchPredictionJob; +import com.google.cloud.aiplatform.v1.CancelBatchPredictionJobRequest; +import com.google.cloud.aiplatform.v1.CancelCustomJobRequest; +import com.google.cloud.aiplatform.v1.CancelDataLabelingJobRequest; +import com.google.cloud.aiplatform.v1.CancelHyperparameterTuningJobRequest; +import com.google.cloud.aiplatform.v1.CreateBatchPredictionJobRequest; +import com.google.cloud.aiplatform.v1.CreateCustomJobRequest; +import com.google.cloud.aiplatform.v1.CreateDataLabelingJobRequest; +import com.google.cloud.aiplatform.v1.CreateHyperparameterTuningJobRequest; +import com.google.cloud.aiplatform.v1.CustomJob; +import com.google.cloud.aiplatform.v1.DataLabelingJob; +import com.google.cloud.aiplatform.v1.DeleteBatchPredictionJobRequest; +import com.google.cloud.aiplatform.v1.DeleteCustomJobRequest; +import com.google.cloud.aiplatform.v1.DeleteDataLabelingJobRequest; +import com.google.cloud.aiplatform.v1.DeleteHyperparameterTuningJobRequest; +import com.google.cloud.aiplatform.v1.DeleteOperationMetadata; +import com.google.cloud.aiplatform.v1.GetBatchPredictionJobRequest; +import com.google.cloud.aiplatform.v1.GetCustomJobRequest; +import com.google.cloud.aiplatform.v1.GetDataLabelingJobRequest; +import com.google.cloud.aiplatform.v1.GetHyperparameterTuningJobRequest; +import com.google.cloud.aiplatform.v1.HyperparameterTuningJob; +import com.google.cloud.aiplatform.v1.ListBatchPredictionJobsRequest; +import com.google.cloud.aiplatform.v1.ListBatchPredictionJobsResponse; +import com.google.cloud.aiplatform.v1.ListCustomJobsRequest; +import com.google.cloud.aiplatform.v1.ListCustomJobsResponse; +import com.google.cloud.aiplatform.v1.ListDataLabelingJobsRequest; +import com.google.cloud.aiplatform.v1.ListDataLabelingJobsResponse; +import com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsRequest; +import com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsResponse; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the JobService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcJobServiceStub extends JobServiceStub { + private static final MethodDescriptor + createCustomJobMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1.JobService/CreateCustomJob") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateCustomJobRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(CustomJob.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getCustomJobMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1.JobService/GetCustomJob") + .setRequestMarshaller(ProtoUtils.marshaller(GetCustomJobRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(CustomJob.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listCustomJobsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1.JobService/ListCustomJobs") + .setRequestMarshaller( + ProtoUtils.marshaller(ListCustomJobsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListCustomJobsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteCustomJobMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1.JobService/DeleteCustomJob") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteCustomJobRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + cancelCustomJobMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1.JobService/CancelCustomJob") + .setRequestMarshaller( + ProtoUtils.marshaller(CancelCustomJobRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createDataLabelingJobMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1.JobService/CreateDataLabelingJob") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateDataLabelingJobRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(DataLabelingJob.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getDataLabelingJobMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1.JobService/GetDataLabelingJob") + .setRequestMarshaller( + ProtoUtils.marshaller(GetDataLabelingJobRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(DataLabelingJob.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listDataLabelingJobsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1.JobService/ListDataLabelingJobs") + .setRequestMarshaller( + ProtoUtils.marshaller(ListDataLabelingJobsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListDataLabelingJobsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteDataLabelingJobMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1.JobService/DeleteDataLabelingJob") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteDataLabelingJobRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + cancelDataLabelingJobMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1.JobService/CancelDataLabelingJob") + .setRequestMarshaller( + ProtoUtils.marshaller(CancelDataLabelingJobRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + CreateHyperparameterTuningJobRequest, HyperparameterTuningJob> + createHyperparameterTuningJobMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1.JobService/CreateHyperparameterTuningJob") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateHyperparameterTuningJobRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(HyperparameterTuningJob.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getHyperparameterTuningJobMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1.JobService/GetHyperparameterTuningJob") + .setRequestMarshaller( + ProtoUtils.marshaller(GetHyperparameterTuningJobRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(HyperparameterTuningJob.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + ListHyperparameterTuningJobsRequest, ListHyperparameterTuningJobsResponse> + listHyperparameterTuningJobsMethodDescriptor = + MethodDescriptor + . + newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1.JobService/ListHyperparameterTuningJobs") + .setRequestMarshaller( + ProtoUtils.marshaller(ListHyperparameterTuningJobsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListHyperparameterTuningJobsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteHyperparameterTuningJobMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1.JobService/DeleteHyperparameterTuningJob") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteHyperparameterTuningJobRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + cancelHyperparameterTuningJobMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1.JobService/CancelHyperparameterTuningJob") + .setRequestMarshaller( + ProtoUtils.marshaller(CancelHyperparameterTuningJobRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createBatchPredictionJobMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1.JobService/CreateBatchPredictionJob") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateBatchPredictionJobRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(BatchPredictionJob.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getBatchPredictionJobMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1.JobService/GetBatchPredictionJob") + .setRequestMarshaller( + ProtoUtils.marshaller(GetBatchPredictionJobRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(BatchPredictionJob.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + ListBatchPredictionJobsRequest, ListBatchPredictionJobsResponse> + listBatchPredictionJobsMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1.JobService/ListBatchPredictionJobs") + .setRequestMarshaller( + ProtoUtils.marshaller(ListBatchPredictionJobsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListBatchPredictionJobsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteBatchPredictionJobMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1.JobService/DeleteBatchPredictionJob") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteBatchPredictionJobRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + cancelBatchPredictionJobMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1.JobService/CancelBatchPredictionJob") + .setRequestMarshaller( + ProtoUtils.marshaller(CancelBatchPredictionJobRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private final UnaryCallable createCustomJobCallable; + private final UnaryCallable getCustomJobCallable; + private final UnaryCallable listCustomJobsCallable; + private final UnaryCallable + listCustomJobsPagedCallable; + private final UnaryCallable deleteCustomJobCallable; + private final OperationCallable + deleteCustomJobOperationCallable; + private final UnaryCallable cancelCustomJobCallable; + private final UnaryCallable + createDataLabelingJobCallable; + private final UnaryCallable + getDataLabelingJobCallable; + private final UnaryCallable + listDataLabelingJobsCallable; + private final UnaryCallable + listDataLabelingJobsPagedCallable; + private final UnaryCallable + deleteDataLabelingJobCallable; + private final OperationCallable + deleteDataLabelingJobOperationCallable; + private final UnaryCallable cancelDataLabelingJobCallable; + private final UnaryCallable + createHyperparameterTuningJobCallable; + private final UnaryCallable + getHyperparameterTuningJobCallable; + private final UnaryCallable< + ListHyperparameterTuningJobsRequest, ListHyperparameterTuningJobsResponse> + listHyperparameterTuningJobsCallable; + private final UnaryCallable< + ListHyperparameterTuningJobsRequest, ListHyperparameterTuningJobsPagedResponse> + listHyperparameterTuningJobsPagedCallable; + private final UnaryCallable + deleteHyperparameterTuningJobCallable; + private final OperationCallable< + DeleteHyperparameterTuningJobRequest, Empty, DeleteOperationMetadata> + deleteHyperparameterTuningJobOperationCallable; + private final UnaryCallable + cancelHyperparameterTuningJobCallable; + private final UnaryCallable + createBatchPredictionJobCallable; + private final UnaryCallable + getBatchPredictionJobCallable; + private final UnaryCallable + listBatchPredictionJobsCallable; + private final UnaryCallable + listBatchPredictionJobsPagedCallable; + private final UnaryCallable + deleteBatchPredictionJobCallable; + private final OperationCallable + deleteBatchPredictionJobOperationCallable; + private final UnaryCallable + cancelBatchPredictionJobCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcJobServiceStub create(JobServiceStubSettings settings) + throws IOException { + return new GrpcJobServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcJobServiceStub create(ClientContext clientContext) throws IOException { + return new GrpcJobServiceStub(JobServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcJobServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcJobServiceStub( + JobServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcJobServiceStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcJobServiceStub(JobServiceStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcJobServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcJobServiceStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcJobServiceStub( + JobServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings createCustomJobTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createCustomJobMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateCustomJobRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings getCustomJobTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getCustomJobMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetCustomJobRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + listCustomJobsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listCustomJobsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListCustomJobsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings deleteCustomJobTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteCustomJobMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteCustomJobRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings cancelCustomJobTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(cancelCustomJobMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CancelCustomJobRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + createDataLabelingJobTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createDataLabelingJobMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateDataLabelingJobRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + getDataLabelingJobTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getDataLabelingJobMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetDataLabelingJobRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + listDataLabelingJobsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listDataLabelingJobsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListDataLabelingJobsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + deleteDataLabelingJobTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteDataLabelingJobMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteDataLabelingJobRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings cancelDataLabelingJobTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(cancelDataLabelingJobMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CancelDataLabelingJobRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + createHyperparameterTuningJobTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(createHyperparameterTuningJobMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract( + CreateHyperparameterTuningJobRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + getHyperparameterTuningJobTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(getHyperparameterTuningJobMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract( + GetHyperparameterTuningJobRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + listHyperparameterTuningJobsTransportSettings = + GrpcCallSettings + . + newBuilder() + .setMethodDescriptor(listHyperparameterTuningJobsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract( + ListHyperparameterTuningJobsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + deleteHyperparameterTuningJobTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteHyperparameterTuningJobMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract( + DeleteHyperparameterTuningJobRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + cancelHyperparameterTuningJobTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(cancelHyperparameterTuningJobMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract( + CancelHyperparameterTuningJobRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + createBatchPredictionJobTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createBatchPredictionJobMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateBatchPredictionJobRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + getBatchPredictionJobTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getBatchPredictionJobMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetBatchPredictionJobRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + listBatchPredictionJobsTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(listBatchPredictionJobsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListBatchPredictionJobsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + deleteBatchPredictionJobTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteBatchPredictionJobMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteBatchPredictionJobRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + cancelBatchPredictionJobTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(cancelBatchPredictionJobMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CancelBatchPredictionJobRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + + this.createCustomJobCallable = + callableFactory.createUnaryCallable( + createCustomJobTransportSettings, settings.createCustomJobSettings(), clientContext); + this.getCustomJobCallable = + callableFactory.createUnaryCallable( + getCustomJobTransportSettings, settings.getCustomJobSettings(), clientContext); + this.listCustomJobsCallable = + callableFactory.createUnaryCallable( + listCustomJobsTransportSettings, settings.listCustomJobsSettings(), clientContext); + this.listCustomJobsPagedCallable = + callableFactory.createPagedCallable( + listCustomJobsTransportSettings, settings.listCustomJobsSettings(), clientContext); + this.deleteCustomJobCallable = + callableFactory.createUnaryCallable( + deleteCustomJobTransportSettings, settings.deleteCustomJobSettings(), clientContext); + this.deleteCustomJobOperationCallable = + callableFactory.createOperationCallable( + deleteCustomJobTransportSettings, + settings.deleteCustomJobOperationSettings(), + clientContext, + operationsStub); + this.cancelCustomJobCallable = + callableFactory.createUnaryCallable( + cancelCustomJobTransportSettings, settings.cancelCustomJobSettings(), clientContext); + this.createDataLabelingJobCallable = + callableFactory.createUnaryCallable( + createDataLabelingJobTransportSettings, + settings.createDataLabelingJobSettings(), + clientContext); + this.getDataLabelingJobCallable = + callableFactory.createUnaryCallable( + getDataLabelingJobTransportSettings, + settings.getDataLabelingJobSettings(), + clientContext); + this.listDataLabelingJobsCallable = + callableFactory.createUnaryCallable( + listDataLabelingJobsTransportSettings, + settings.listDataLabelingJobsSettings(), + clientContext); + this.listDataLabelingJobsPagedCallable = + callableFactory.createPagedCallable( + listDataLabelingJobsTransportSettings, + settings.listDataLabelingJobsSettings(), + clientContext); + this.deleteDataLabelingJobCallable = + callableFactory.createUnaryCallable( + deleteDataLabelingJobTransportSettings, + settings.deleteDataLabelingJobSettings(), + clientContext); + this.deleteDataLabelingJobOperationCallable = + callableFactory.createOperationCallable( + deleteDataLabelingJobTransportSettings, + settings.deleteDataLabelingJobOperationSettings(), + clientContext, + operationsStub); + this.cancelDataLabelingJobCallable = + callableFactory.createUnaryCallable( + cancelDataLabelingJobTransportSettings, + settings.cancelDataLabelingJobSettings(), + clientContext); + this.createHyperparameterTuningJobCallable = + callableFactory.createUnaryCallable( + createHyperparameterTuningJobTransportSettings, + settings.createHyperparameterTuningJobSettings(), + clientContext); + this.getHyperparameterTuningJobCallable = + callableFactory.createUnaryCallable( + getHyperparameterTuningJobTransportSettings, + settings.getHyperparameterTuningJobSettings(), + clientContext); + this.listHyperparameterTuningJobsCallable = + callableFactory.createUnaryCallable( + listHyperparameterTuningJobsTransportSettings, + settings.listHyperparameterTuningJobsSettings(), + clientContext); + this.listHyperparameterTuningJobsPagedCallable = + callableFactory.createPagedCallable( + listHyperparameterTuningJobsTransportSettings, + settings.listHyperparameterTuningJobsSettings(), + clientContext); + this.deleteHyperparameterTuningJobCallable = + callableFactory.createUnaryCallable( + deleteHyperparameterTuningJobTransportSettings, + settings.deleteHyperparameterTuningJobSettings(), + clientContext); + this.deleteHyperparameterTuningJobOperationCallable = + callableFactory.createOperationCallable( + deleteHyperparameterTuningJobTransportSettings, + settings.deleteHyperparameterTuningJobOperationSettings(), + clientContext, + operationsStub); + this.cancelHyperparameterTuningJobCallable = + callableFactory.createUnaryCallable( + cancelHyperparameterTuningJobTransportSettings, + settings.cancelHyperparameterTuningJobSettings(), + clientContext); + this.createBatchPredictionJobCallable = + callableFactory.createUnaryCallable( + createBatchPredictionJobTransportSettings, + settings.createBatchPredictionJobSettings(), + clientContext); + this.getBatchPredictionJobCallable = + callableFactory.createUnaryCallable( + getBatchPredictionJobTransportSettings, + settings.getBatchPredictionJobSettings(), + clientContext); + this.listBatchPredictionJobsCallable = + callableFactory.createUnaryCallable( + listBatchPredictionJobsTransportSettings, + settings.listBatchPredictionJobsSettings(), + clientContext); + this.listBatchPredictionJobsPagedCallable = + callableFactory.createPagedCallable( + listBatchPredictionJobsTransportSettings, + settings.listBatchPredictionJobsSettings(), + clientContext); + this.deleteBatchPredictionJobCallable = + callableFactory.createUnaryCallable( + deleteBatchPredictionJobTransportSettings, + settings.deleteBatchPredictionJobSettings(), + clientContext); + this.deleteBatchPredictionJobOperationCallable = + callableFactory.createOperationCallable( + deleteBatchPredictionJobTransportSettings, + settings.deleteBatchPredictionJobOperationSettings(), + clientContext, + operationsStub); + this.cancelBatchPredictionJobCallable = + callableFactory.createUnaryCallable( + cancelBatchPredictionJobTransportSettings, + settings.cancelBatchPredictionJobSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + public UnaryCallable createCustomJobCallable() { + return createCustomJobCallable; + } + + public UnaryCallable getCustomJobCallable() { + return getCustomJobCallable; + } + + public UnaryCallable listCustomJobsCallable() { + return listCustomJobsCallable; + } + + public UnaryCallable + listCustomJobsPagedCallable() { + return listCustomJobsPagedCallable; + } + + public UnaryCallable deleteCustomJobCallable() { + return deleteCustomJobCallable; + } + + public OperationCallable + deleteCustomJobOperationCallable() { + return deleteCustomJobOperationCallable; + } + + public UnaryCallable cancelCustomJobCallable() { + return cancelCustomJobCallable; + } + + public UnaryCallable + createDataLabelingJobCallable() { + return createDataLabelingJobCallable; + } + + public UnaryCallable getDataLabelingJobCallable() { + return getDataLabelingJobCallable; + } + + public UnaryCallable + listDataLabelingJobsCallable() { + return listDataLabelingJobsCallable; + } + + public UnaryCallable + listDataLabelingJobsPagedCallable() { + return listDataLabelingJobsPagedCallable; + } + + public UnaryCallable deleteDataLabelingJobCallable() { + return deleteDataLabelingJobCallable; + } + + public OperationCallable + deleteDataLabelingJobOperationCallable() { + return deleteDataLabelingJobOperationCallable; + } + + public UnaryCallable cancelDataLabelingJobCallable() { + return cancelDataLabelingJobCallable; + } + + public UnaryCallable + createHyperparameterTuningJobCallable() { + return createHyperparameterTuningJobCallable; + } + + public UnaryCallable + getHyperparameterTuningJobCallable() { + return getHyperparameterTuningJobCallable; + } + + public UnaryCallable + listHyperparameterTuningJobsCallable() { + return listHyperparameterTuningJobsCallable; + } + + public UnaryCallable< + ListHyperparameterTuningJobsRequest, ListHyperparameterTuningJobsPagedResponse> + listHyperparameterTuningJobsPagedCallable() { + return listHyperparameterTuningJobsPagedCallable; + } + + public UnaryCallable + deleteHyperparameterTuningJobCallable() { + return deleteHyperparameterTuningJobCallable; + } + + public OperationCallable + deleteHyperparameterTuningJobOperationCallable() { + return deleteHyperparameterTuningJobOperationCallable; + } + + public UnaryCallable + cancelHyperparameterTuningJobCallable() { + return cancelHyperparameterTuningJobCallable; + } + + public UnaryCallable + createBatchPredictionJobCallable() { + return createBatchPredictionJobCallable; + } + + public UnaryCallable + getBatchPredictionJobCallable() { + return getBatchPredictionJobCallable; + } + + public UnaryCallable + listBatchPredictionJobsCallable() { + return listBatchPredictionJobsCallable; + } + + public UnaryCallable + listBatchPredictionJobsPagedCallable() { + return listBatchPredictionJobsPagedCallable; + } + + public UnaryCallable + deleteBatchPredictionJobCallable() { + return deleteBatchPredictionJobCallable; + } + + public OperationCallable + deleteBatchPredictionJobOperationCallable() { + return deleteBatchPredictionJobOperationCallable; + } + + public UnaryCallable cancelBatchPredictionJobCallable() { + return cancelBatchPredictionJobCallable; + } + + @Override + public final void close() { + shutdown(); + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcMigrationServiceCallableFactory.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcMigrationServiceCallableFactory.java new file mode 100644 index 000000000..3f4f18f4d --- /dev/null +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcMigrationServiceCallableFactory.java @@ -0,0 +1,113 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1.stub; + +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the MigrationService service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcMigrationServiceCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcMigrationServiceStub.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcMigrationServiceStub.java new file mode 100644 index 000000000..16ebb249e --- /dev/null +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcMigrationServiceStub.java @@ -0,0 +1,245 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1.stub; + +import static com.google.cloud.aiplatform.v1.MigrationServiceClient.SearchMigratableResourcesPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsExtractor; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata; +import com.google.cloud.aiplatform.v1.BatchMigrateResourcesRequest; +import com.google.cloud.aiplatform.v1.BatchMigrateResourcesResponse; +import com.google.cloud.aiplatform.v1.SearchMigratableResourcesRequest; +import com.google.cloud.aiplatform.v1.SearchMigratableResourcesResponse; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the MigrationService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcMigrationServiceStub extends MigrationServiceStub { + private static final MethodDescriptor< + SearchMigratableResourcesRequest, SearchMigratableResourcesResponse> + searchMigratableResourcesMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1.MigrationService/SearchMigratableResources") + .setRequestMarshaller( + ProtoUtils.marshaller(SearchMigratableResourcesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(SearchMigratableResourcesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + batchMigrateResourcesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1.MigrationService/BatchMigrateResources") + .setRequestMarshaller( + ProtoUtils.marshaller(BatchMigrateResourcesRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private final UnaryCallable + searchMigratableResourcesCallable; + private final UnaryCallable< + SearchMigratableResourcesRequest, SearchMigratableResourcesPagedResponse> + searchMigratableResourcesPagedCallable; + private final UnaryCallable + batchMigrateResourcesCallable; + private final OperationCallable< + BatchMigrateResourcesRequest, + BatchMigrateResourcesResponse, + BatchMigrateResourcesOperationMetadata> + batchMigrateResourcesOperationCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcMigrationServiceStub create(MigrationServiceStubSettings settings) + throws IOException { + return new GrpcMigrationServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcMigrationServiceStub create(ClientContext clientContext) + throws IOException { + return new GrpcMigrationServiceStub( + MigrationServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcMigrationServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcMigrationServiceStub( + MigrationServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcMigrationServiceStub, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcMigrationServiceStub( + MigrationServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new GrpcMigrationServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcMigrationServiceStub, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcMigrationServiceStub( + MigrationServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings + searchMigratableResourcesTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(searchMigratableResourcesMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(SearchMigratableResourcesRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + batchMigrateResourcesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(batchMigrateResourcesMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(BatchMigrateResourcesRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + + this.searchMigratableResourcesCallable = + callableFactory.createUnaryCallable( + searchMigratableResourcesTransportSettings, + settings.searchMigratableResourcesSettings(), + clientContext); + this.searchMigratableResourcesPagedCallable = + callableFactory.createPagedCallable( + searchMigratableResourcesTransportSettings, + settings.searchMigratableResourcesSettings(), + clientContext); + this.batchMigrateResourcesCallable = + callableFactory.createUnaryCallable( + batchMigrateResourcesTransportSettings, + settings.batchMigrateResourcesSettings(), + clientContext); + this.batchMigrateResourcesOperationCallable = + callableFactory.createOperationCallable( + batchMigrateResourcesTransportSettings, + settings.batchMigrateResourcesOperationSettings(), + clientContext, + operationsStub); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + public UnaryCallable + searchMigratableResourcesCallable() { + return searchMigratableResourcesCallable; + } + + public UnaryCallable + searchMigratableResourcesPagedCallable() { + return searchMigratableResourcesPagedCallable; + } + + public UnaryCallable batchMigrateResourcesCallable() { + return batchMigrateResourcesCallable; + } + + public OperationCallable< + BatchMigrateResourcesRequest, + BatchMigrateResourcesResponse, + BatchMigrateResourcesOperationMetadata> + batchMigrateResourcesOperationCallable() { + return batchMigrateResourcesOperationCallable; + } + + @Override + public final void close() { + shutdown(); + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcModelServiceCallableFactory.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcModelServiceCallableFactory.java new file mode 100644 index 000000000..854c51d31 --- /dev/null +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcModelServiceCallableFactory.java @@ -0,0 +1,113 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1.stub; + +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the ModelService service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcModelServiceCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcModelServiceStub.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcModelServiceStub.java new file mode 100644 index 000000000..df0595958 --- /dev/null +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcModelServiceStub.java @@ -0,0 +1,552 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1.stub; + +import static com.google.cloud.aiplatform.v1.ModelServiceClient.ListModelEvaluationSlicesPagedResponse; +import static com.google.cloud.aiplatform.v1.ModelServiceClient.ListModelEvaluationsPagedResponse; +import static com.google.cloud.aiplatform.v1.ModelServiceClient.ListModelsPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsExtractor; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1.DeleteModelRequest; +import com.google.cloud.aiplatform.v1.DeleteOperationMetadata; +import com.google.cloud.aiplatform.v1.ExportModelOperationMetadata; +import com.google.cloud.aiplatform.v1.ExportModelRequest; +import com.google.cloud.aiplatform.v1.ExportModelResponse; +import com.google.cloud.aiplatform.v1.GetModelEvaluationRequest; +import com.google.cloud.aiplatform.v1.GetModelEvaluationSliceRequest; +import com.google.cloud.aiplatform.v1.GetModelRequest; +import com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesRequest; +import com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponse; +import com.google.cloud.aiplatform.v1.ListModelEvaluationsRequest; +import com.google.cloud.aiplatform.v1.ListModelEvaluationsResponse; +import com.google.cloud.aiplatform.v1.ListModelsRequest; +import com.google.cloud.aiplatform.v1.ListModelsResponse; +import com.google.cloud.aiplatform.v1.Model; +import com.google.cloud.aiplatform.v1.ModelEvaluation; +import com.google.cloud.aiplatform.v1.ModelEvaluationSlice; +import com.google.cloud.aiplatform.v1.UpdateModelRequest; +import com.google.cloud.aiplatform.v1.UploadModelOperationMetadata; +import com.google.cloud.aiplatform.v1.UploadModelRequest; +import com.google.cloud.aiplatform.v1.UploadModelResponse; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the ModelService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcModelServiceStub extends ModelServiceStub { + private static final MethodDescriptor uploadModelMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1.ModelService/UploadModel") + .setRequestMarshaller(ProtoUtils.marshaller(UploadModelRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getModelMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1.ModelService/GetModel") + .setRequestMarshaller(ProtoUtils.marshaller(GetModelRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Model.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listModelsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1.ModelService/ListModels") + .setRequestMarshaller(ProtoUtils.marshaller(ListModelsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ListModelsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor updateModelMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1.ModelService/UpdateModel") + .setRequestMarshaller(ProtoUtils.marshaller(UpdateModelRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Model.getDefaultInstance())) + .build(); + + private static final MethodDescriptor deleteModelMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1.ModelService/DeleteModel") + .setRequestMarshaller(ProtoUtils.marshaller(DeleteModelRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor exportModelMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1.ModelService/ExportModel") + .setRequestMarshaller(ProtoUtils.marshaller(ExportModelRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getModelEvaluationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1.ModelService/GetModelEvaluation") + .setRequestMarshaller( + ProtoUtils.marshaller(GetModelEvaluationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ModelEvaluation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listModelEvaluationsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1.ModelService/ListModelEvaluations") + .setRequestMarshaller( + ProtoUtils.marshaller(ListModelEvaluationsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListModelEvaluationsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getModelEvaluationSliceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1.ModelService/GetModelEvaluationSlice") + .setRequestMarshaller( + ProtoUtils.marshaller(GetModelEvaluationSliceRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ModelEvaluationSlice.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + ListModelEvaluationSlicesRequest, ListModelEvaluationSlicesResponse> + listModelEvaluationSlicesMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1.ModelService/ListModelEvaluationSlices") + .setRequestMarshaller( + ProtoUtils.marshaller(ListModelEvaluationSlicesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListModelEvaluationSlicesResponse.getDefaultInstance())) + .build(); + + private final UnaryCallable uploadModelCallable; + private final OperationCallable< + UploadModelRequest, UploadModelResponse, UploadModelOperationMetadata> + uploadModelOperationCallable; + private final UnaryCallable getModelCallable; + private final UnaryCallable listModelsCallable; + private final UnaryCallable listModelsPagedCallable; + private final UnaryCallable updateModelCallable; + private final UnaryCallable deleteModelCallable; + private final OperationCallable + deleteModelOperationCallable; + private final UnaryCallable exportModelCallable; + private final OperationCallable< + ExportModelRequest, ExportModelResponse, ExportModelOperationMetadata> + exportModelOperationCallable; + private final UnaryCallable + getModelEvaluationCallable; + private final UnaryCallable + listModelEvaluationsCallable; + private final UnaryCallable + listModelEvaluationsPagedCallable; + private final UnaryCallable + getModelEvaluationSliceCallable; + private final UnaryCallable + listModelEvaluationSlicesCallable; + private final UnaryCallable< + ListModelEvaluationSlicesRequest, ListModelEvaluationSlicesPagedResponse> + listModelEvaluationSlicesPagedCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcModelServiceStub create(ModelServiceStubSettings settings) + throws IOException { + return new GrpcModelServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcModelServiceStub create(ClientContext clientContext) throws IOException { + return new GrpcModelServiceStub(ModelServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcModelServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcModelServiceStub( + ModelServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcModelServiceStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcModelServiceStub(ModelServiceStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcModelServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcModelServiceStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcModelServiceStub( + ModelServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings uploadModelTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(uploadModelMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(UploadModelRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings getModelTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getModelMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetModelRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings listModelsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listModelsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListModelsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings updateModelTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateModelMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(UpdateModelRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("model.name", String.valueOf(request.getModel().getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings deleteModelTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteModelMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteModelRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings exportModelTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(exportModelMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ExportModelRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + getModelEvaluationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getModelEvaluationMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetModelEvaluationRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + listModelEvaluationsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listModelEvaluationsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListModelEvaluationsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + getModelEvaluationSliceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getModelEvaluationSliceMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetModelEvaluationSliceRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + listModelEvaluationSlicesTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(listModelEvaluationSlicesMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListModelEvaluationSlicesRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + + this.uploadModelCallable = + callableFactory.createUnaryCallable( + uploadModelTransportSettings, settings.uploadModelSettings(), clientContext); + this.uploadModelOperationCallable = + callableFactory.createOperationCallable( + uploadModelTransportSettings, + settings.uploadModelOperationSettings(), + clientContext, + operationsStub); + this.getModelCallable = + callableFactory.createUnaryCallable( + getModelTransportSettings, settings.getModelSettings(), clientContext); + this.listModelsCallable = + callableFactory.createUnaryCallable( + listModelsTransportSettings, settings.listModelsSettings(), clientContext); + this.listModelsPagedCallable = + callableFactory.createPagedCallable( + listModelsTransportSettings, settings.listModelsSettings(), clientContext); + this.updateModelCallable = + callableFactory.createUnaryCallable( + updateModelTransportSettings, settings.updateModelSettings(), clientContext); + this.deleteModelCallable = + callableFactory.createUnaryCallable( + deleteModelTransportSettings, settings.deleteModelSettings(), clientContext); + this.deleteModelOperationCallable = + callableFactory.createOperationCallable( + deleteModelTransportSettings, + settings.deleteModelOperationSettings(), + clientContext, + operationsStub); + this.exportModelCallable = + callableFactory.createUnaryCallable( + exportModelTransportSettings, settings.exportModelSettings(), clientContext); + this.exportModelOperationCallable = + callableFactory.createOperationCallable( + exportModelTransportSettings, + settings.exportModelOperationSettings(), + clientContext, + operationsStub); + this.getModelEvaluationCallable = + callableFactory.createUnaryCallable( + getModelEvaluationTransportSettings, + settings.getModelEvaluationSettings(), + clientContext); + this.listModelEvaluationsCallable = + callableFactory.createUnaryCallable( + listModelEvaluationsTransportSettings, + settings.listModelEvaluationsSettings(), + clientContext); + this.listModelEvaluationsPagedCallable = + callableFactory.createPagedCallable( + listModelEvaluationsTransportSettings, + settings.listModelEvaluationsSettings(), + clientContext); + this.getModelEvaluationSliceCallable = + callableFactory.createUnaryCallable( + getModelEvaluationSliceTransportSettings, + settings.getModelEvaluationSliceSettings(), + clientContext); + this.listModelEvaluationSlicesCallable = + callableFactory.createUnaryCallable( + listModelEvaluationSlicesTransportSettings, + settings.listModelEvaluationSlicesSettings(), + clientContext); + this.listModelEvaluationSlicesPagedCallable = + callableFactory.createPagedCallable( + listModelEvaluationSlicesTransportSettings, + settings.listModelEvaluationSlicesSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + public UnaryCallable uploadModelCallable() { + return uploadModelCallable; + } + + public OperationCallable + uploadModelOperationCallable() { + return uploadModelOperationCallable; + } + + public UnaryCallable getModelCallable() { + return getModelCallable; + } + + public UnaryCallable listModelsCallable() { + return listModelsCallable; + } + + public UnaryCallable listModelsPagedCallable() { + return listModelsPagedCallable; + } + + public UnaryCallable updateModelCallable() { + return updateModelCallable; + } + + public UnaryCallable deleteModelCallable() { + return deleteModelCallable; + } + + public OperationCallable + deleteModelOperationCallable() { + return deleteModelOperationCallable; + } + + public UnaryCallable exportModelCallable() { + return exportModelCallable; + } + + public OperationCallable + exportModelOperationCallable() { + return exportModelOperationCallable; + } + + public UnaryCallable getModelEvaluationCallable() { + return getModelEvaluationCallable; + } + + public UnaryCallable + listModelEvaluationsCallable() { + return listModelEvaluationsCallable; + } + + public UnaryCallable + listModelEvaluationsPagedCallable() { + return listModelEvaluationsPagedCallable; + } + + public UnaryCallable + getModelEvaluationSliceCallable() { + return getModelEvaluationSliceCallable; + } + + public UnaryCallable + listModelEvaluationSlicesCallable() { + return listModelEvaluationSlicesCallable; + } + + public UnaryCallable + listModelEvaluationSlicesPagedCallable() { + return listModelEvaluationSlicesPagedCallable; + } + + @Override + public final void close() { + shutdown(); + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcPipelineServiceCallableFactory.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcPipelineServiceCallableFactory.java new file mode 100644 index 000000000..ba200e5ca --- /dev/null +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcPipelineServiceCallableFactory.java @@ -0,0 +1,113 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1.stub; + +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the PipelineService service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcPipelineServiceCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcPipelineServiceStub.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcPipelineServiceStub.java new file mode 100644 index 000000000..75c253dea --- /dev/null +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcPipelineServiceStub.java @@ -0,0 +1,345 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1.stub; + +import static com.google.cloud.aiplatform.v1.PipelineServiceClient.ListTrainingPipelinesPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsExtractor; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1.CancelTrainingPipelineRequest; +import com.google.cloud.aiplatform.v1.CreateTrainingPipelineRequest; +import com.google.cloud.aiplatform.v1.DeleteOperationMetadata; +import com.google.cloud.aiplatform.v1.DeleteTrainingPipelineRequest; +import com.google.cloud.aiplatform.v1.GetTrainingPipelineRequest; +import com.google.cloud.aiplatform.v1.ListTrainingPipelinesRequest; +import com.google.cloud.aiplatform.v1.ListTrainingPipelinesResponse; +import com.google.cloud.aiplatform.v1.TrainingPipeline; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the PipelineService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcPipelineServiceStub extends PipelineServiceStub { + private static final MethodDescriptor + createTrainingPipelineMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1.PipelineService/CreateTrainingPipeline") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateTrainingPipelineRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(TrainingPipeline.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getTrainingPipelineMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1.PipelineService/GetTrainingPipeline") + .setRequestMarshaller( + ProtoUtils.marshaller(GetTrainingPipelineRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(TrainingPipeline.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listTrainingPipelinesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1.PipelineService/ListTrainingPipelines") + .setRequestMarshaller( + ProtoUtils.marshaller(ListTrainingPipelinesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListTrainingPipelinesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteTrainingPipelineMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1.PipelineService/DeleteTrainingPipeline") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteTrainingPipelineRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + cancelTrainingPipelineMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1.PipelineService/CancelTrainingPipeline") + .setRequestMarshaller( + ProtoUtils.marshaller(CancelTrainingPipelineRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private final UnaryCallable + createTrainingPipelineCallable; + private final UnaryCallable + getTrainingPipelineCallable; + private final UnaryCallable + listTrainingPipelinesCallable; + private final UnaryCallable + listTrainingPipelinesPagedCallable; + private final UnaryCallable + deleteTrainingPipelineCallable; + private final OperationCallable + deleteTrainingPipelineOperationCallable; + private final UnaryCallable cancelTrainingPipelineCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcPipelineServiceStub create(PipelineServiceStubSettings settings) + throws IOException { + return new GrpcPipelineServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcPipelineServiceStub create(ClientContext clientContext) + throws IOException { + return new GrpcPipelineServiceStub( + PipelineServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcPipelineServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcPipelineServiceStub( + PipelineServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcPipelineServiceStub, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcPipelineServiceStub( + PipelineServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new GrpcPipelineServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcPipelineServiceStub, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcPipelineServiceStub( + PipelineServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings + createTrainingPipelineTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createTrainingPipelineMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateTrainingPipelineRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + getTrainingPipelineTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getTrainingPipelineMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetTrainingPipelineRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + listTrainingPipelinesTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(listTrainingPipelinesMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListTrainingPipelinesRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + deleteTrainingPipelineTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteTrainingPipelineMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteTrainingPipelineRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings cancelTrainingPipelineTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(cancelTrainingPipelineMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CancelTrainingPipelineRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + + this.createTrainingPipelineCallable = + callableFactory.createUnaryCallable( + createTrainingPipelineTransportSettings, + settings.createTrainingPipelineSettings(), + clientContext); + this.getTrainingPipelineCallable = + callableFactory.createUnaryCallable( + getTrainingPipelineTransportSettings, + settings.getTrainingPipelineSettings(), + clientContext); + this.listTrainingPipelinesCallable = + callableFactory.createUnaryCallable( + listTrainingPipelinesTransportSettings, + settings.listTrainingPipelinesSettings(), + clientContext); + this.listTrainingPipelinesPagedCallable = + callableFactory.createPagedCallable( + listTrainingPipelinesTransportSettings, + settings.listTrainingPipelinesSettings(), + clientContext); + this.deleteTrainingPipelineCallable = + callableFactory.createUnaryCallable( + deleteTrainingPipelineTransportSettings, + settings.deleteTrainingPipelineSettings(), + clientContext); + this.deleteTrainingPipelineOperationCallable = + callableFactory.createOperationCallable( + deleteTrainingPipelineTransportSettings, + settings.deleteTrainingPipelineOperationSettings(), + clientContext, + operationsStub); + this.cancelTrainingPipelineCallable = + callableFactory.createUnaryCallable( + cancelTrainingPipelineTransportSettings, + settings.cancelTrainingPipelineSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + public UnaryCallable + createTrainingPipelineCallable() { + return createTrainingPipelineCallable; + } + + public UnaryCallable getTrainingPipelineCallable() { + return getTrainingPipelineCallable; + } + + public UnaryCallable + listTrainingPipelinesCallable() { + return listTrainingPipelinesCallable; + } + + public UnaryCallable + listTrainingPipelinesPagedCallable() { + return listTrainingPipelinesPagedCallable; + } + + public UnaryCallable deleteTrainingPipelineCallable() { + return deleteTrainingPipelineCallable; + } + + public OperationCallable + deleteTrainingPipelineOperationCallable() { + return deleteTrainingPipelineOperationCallable; + } + + public UnaryCallable cancelTrainingPipelineCallable() { + return cancelTrainingPipelineCallable; + } + + @Override + public final void close() { + shutdown(); + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcPredictionServiceCallableFactory.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcPredictionServiceCallableFactory.java new file mode 100644 index 000000000..f9246d98b --- /dev/null +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcPredictionServiceCallableFactory.java @@ -0,0 +1,113 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1.stub; + +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the PredictionService service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcPredictionServiceCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcPredictionServiceStub.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcPredictionServiceStub.java new file mode 100644 index 000000000..b38c6f40a --- /dev/null +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcPredictionServiceStub.java @@ -0,0 +1,158 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1.stub; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsExtractor; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1.PredictRequest; +import com.google.cloud.aiplatform.v1.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; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the PredictionService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcPredictionServiceStub extends PredictionServiceStub { + private static final MethodDescriptor predictMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1.PredictionService/Predict") + .setRequestMarshaller(ProtoUtils.marshaller(PredictRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(PredictResponse.getDefaultInstance())) + .build(); + + private final UnaryCallable predictCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcPredictionServiceStub create(PredictionServiceStubSettings settings) + throws IOException { + return new GrpcPredictionServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcPredictionServiceStub create(ClientContext clientContext) + throws IOException { + return new GrpcPredictionServiceStub( + PredictionServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcPredictionServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcPredictionServiceStub( + PredictionServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcPredictionServiceStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected GrpcPredictionServiceStub( + PredictionServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new GrpcPredictionServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcPredictionServiceStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected GrpcPredictionServiceStub( + PredictionServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings predictTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(predictMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(PredictRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("endpoint", String.valueOf(request.getEndpoint())); + return params.build(); + } + }) + .build(); + + this.predictCallable = + callableFactory.createUnaryCallable( + predictTransportSettings, settings.predictSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + public UnaryCallable predictCallable() { + return predictCallable; + } + + @Override + public final void close() { + shutdown(); + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcSpecialistPoolServiceCallableFactory.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcSpecialistPoolServiceCallableFactory.java new file mode 100644 index 000000000..f4ecb2bc1 --- /dev/null +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcSpecialistPoolServiceCallableFactory.java @@ -0,0 +1,113 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1.stub; + +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the SpecialistPoolService service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcSpecialistPoolServiceCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcSpecialistPoolServiceStub.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcSpecialistPoolServiceStub.java new file mode 100644 index 000000000..853f40f91 --- /dev/null +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcSpecialistPoolServiceStub.java @@ -0,0 +1,373 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1.stub; + +import static com.google.cloud.aiplatform.v1.SpecialistPoolServiceClient.ListSpecialistPoolsPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsExtractor; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1.CreateSpecialistPoolOperationMetadata; +import com.google.cloud.aiplatform.v1.CreateSpecialistPoolRequest; +import com.google.cloud.aiplatform.v1.DeleteOperationMetadata; +import com.google.cloud.aiplatform.v1.DeleteSpecialistPoolRequest; +import com.google.cloud.aiplatform.v1.GetSpecialistPoolRequest; +import com.google.cloud.aiplatform.v1.ListSpecialistPoolsRequest; +import com.google.cloud.aiplatform.v1.ListSpecialistPoolsResponse; +import com.google.cloud.aiplatform.v1.SpecialistPool; +import com.google.cloud.aiplatform.v1.UpdateSpecialistPoolOperationMetadata; +import com.google.cloud.aiplatform.v1.UpdateSpecialistPoolRequest; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the SpecialistPoolService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcSpecialistPoolServiceStub extends SpecialistPoolServiceStub { + private static final MethodDescriptor + createSpecialistPoolMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1.SpecialistPoolService/CreateSpecialistPool") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateSpecialistPoolRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getSpecialistPoolMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1.SpecialistPoolService/GetSpecialistPool") + .setRequestMarshaller( + ProtoUtils.marshaller(GetSpecialistPoolRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(SpecialistPool.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listSpecialistPoolsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1.SpecialistPoolService/ListSpecialistPools") + .setRequestMarshaller( + ProtoUtils.marshaller(ListSpecialistPoolsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListSpecialistPoolsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteSpecialistPoolMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1.SpecialistPoolService/DeleteSpecialistPool") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteSpecialistPoolRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateSpecialistPoolMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1.SpecialistPoolService/UpdateSpecialistPool") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateSpecialistPoolRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private final UnaryCallable createSpecialistPoolCallable; + private final OperationCallable< + CreateSpecialistPoolRequest, SpecialistPool, CreateSpecialistPoolOperationMetadata> + createSpecialistPoolOperationCallable; + private final UnaryCallable getSpecialistPoolCallable; + private final UnaryCallable + listSpecialistPoolsCallable; + private final UnaryCallable + listSpecialistPoolsPagedCallable; + private final UnaryCallable deleteSpecialistPoolCallable; + private final OperationCallable + deleteSpecialistPoolOperationCallable; + private final UnaryCallable updateSpecialistPoolCallable; + private final OperationCallable< + UpdateSpecialistPoolRequest, SpecialistPool, UpdateSpecialistPoolOperationMetadata> + updateSpecialistPoolOperationCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcSpecialistPoolServiceStub create( + SpecialistPoolServiceStubSettings settings) throws IOException { + return new GrpcSpecialistPoolServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcSpecialistPoolServiceStub create(ClientContext clientContext) + throws IOException { + return new GrpcSpecialistPoolServiceStub( + SpecialistPoolServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcSpecialistPoolServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcSpecialistPoolServiceStub( + SpecialistPoolServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcSpecialistPoolServiceStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected GrpcSpecialistPoolServiceStub( + SpecialistPoolServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new GrpcSpecialistPoolServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcSpecialistPoolServiceStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected GrpcSpecialistPoolServiceStub( + SpecialistPoolServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings createSpecialistPoolTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createSpecialistPoolMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateSpecialistPoolRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings getSpecialistPoolTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getSpecialistPoolMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetSpecialistPoolRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + listSpecialistPoolsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listSpecialistPoolsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListSpecialistPoolsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings deleteSpecialistPoolTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteSpecialistPoolMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteSpecialistPoolRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings updateSpecialistPoolTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateSpecialistPoolMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(UpdateSpecialistPoolRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put( + "specialist_pool.name", + String.valueOf(request.getSpecialistPool().getName())); + return params.build(); + } + }) + .build(); + + this.createSpecialistPoolCallable = + callableFactory.createUnaryCallable( + createSpecialistPoolTransportSettings, + settings.createSpecialistPoolSettings(), + clientContext); + this.createSpecialistPoolOperationCallable = + callableFactory.createOperationCallable( + createSpecialistPoolTransportSettings, + settings.createSpecialistPoolOperationSettings(), + clientContext, + operationsStub); + this.getSpecialistPoolCallable = + callableFactory.createUnaryCallable( + getSpecialistPoolTransportSettings, + settings.getSpecialistPoolSettings(), + clientContext); + this.listSpecialistPoolsCallable = + callableFactory.createUnaryCallable( + listSpecialistPoolsTransportSettings, + settings.listSpecialistPoolsSettings(), + clientContext); + this.listSpecialistPoolsPagedCallable = + callableFactory.createPagedCallable( + listSpecialistPoolsTransportSettings, + settings.listSpecialistPoolsSettings(), + clientContext); + this.deleteSpecialistPoolCallable = + callableFactory.createUnaryCallable( + deleteSpecialistPoolTransportSettings, + settings.deleteSpecialistPoolSettings(), + clientContext); + this.deleteSpecialistPoolOperationCallable = + callableFactory.createOperationCallable( + deleteSpecialistPoolTransportSettings, + settings.deleteSpecialistPoolOperationSettings(), + clientContext, + operationsStub); + this.updateSpecialistPoolCallable = + callableFactory.createUnaryCallable( + updateSpecialistPoolTransportSettings, + settings.updateSpecialistPoolSettings(), + clientContext); + this.updateSpecialistPoolOperationCallable = + callableFactory.createOperationCallable( + updateSpecialistPoolTransportSettings, + settings.updateSpecialistPoolOperationSettings(), + clientContext, + operationsStub); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + public UnaryCallable createSpecialistPoolCallable() { + return createSpecialistPoolCallable; + } + + public OperationCallable< + CreateSpecialistPoolRequest, SpecialistPool, CreateSpecialistPoolOperationMetadata> + createSpecialistPoolOperationCallable() { + return createSpecialistPoolOperationCallable; + } + + public UnaryCallable getSpecialistPoolCallable() { + return getSpecialistPoolCallable; + } + + public UnaryCallable + listSpecialistPoolsCallable() { + return listSpecialistPoolsCallable; + } + + public UnaryCallable + listSpecialistPoolsPagedCallable() { + return listSpecialistPoolsPagedCallable; + } + + public UnaryCallable deleteSpecialistPoolCallable() { + return deleteSpecialistPoolCallable; + } + + public OperationCallable + deleteSpecialistPoolOperationCallable() { + return deleteSpecialistPoolOperationCallable; + } + + public UnaryCallable updateSpecialistPoolCallable() { + return updateSpecialistPoolCallable; + } + + public OperationCallable< + UpdateSpecialistPoolRequest, SpecialistPool, UpdateSpecialistPoolOperationMetadata> + updateSpecialistPoolOperationCallable() { + return updateSpecialistPoolOperationCallable; + } + + @Override + public final void close() { + shutdown(); + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/JobServiceStub.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/JobServiceStub.java new file mode 100644 index 000000000..59ed98c1c --- /dev/null +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/JobServiceStub.java @@ -0,0 +1,218 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1.stub; + +import static com.google.cloud.aiplatform.v1.JobServiceClient.ListBatchPredictionJobsPagedResponse; +import static com.google.cloud.aiplatform.v1.JobServiceClient.ListCustomJobsPagedResponse; +import static com.google.cloud.aiplatform.v1.JobServiceClient.ListDataLabelingJobsPagedResponse; +import static com.google.cloud.aiplatform.v1.JobServiceClient.ListHyperparameterTuningJobsPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1.BatchPredictionJob; +import com.google.cloud.aiplatform.v1.CancelBatchPredictionJobRequest; +import com.google.cloud.aiplatform.v1.CancelCustomJobRequest; +import com.google.cloud.aiplatform.v1.CancelDataLabelingJobRequest; +import com.google.cloud.aiplatform.v1.CancelHyperparameterTuningJobRequest; +import com.google.cloud.aiplatform.v1.CreateBatchPredictionJobRequest; +import com.google.cloud.aiplatform.v1.CreateCustomJobRequest; +import com.google.cloud.aiplatform.v1.CreateDataLabelingJobRequest; +import com.google.cloud.aiplatform.v1.CreateHyperparameterTuningJobRequest; +import com.google.cloud.aiplatform.v1.CustomJob; +import com.google.cloud.aiplatform.v1.DataLabelingJob; +import com.google.cloud.aiplatform.v1.DeleteBatchPredictionJobRequest; +import com.google.cloud.aiplatform.v1.DeleteCustomJobRequest; +import com.google.cloud.aiplatform.v1.DeleteDataLabelingJobRequest; +import com.google.cloud.aiplatform.v1.DeleteHyperparameterTuningJobRequest; +import com.google.cloud.aiplatform.v1.DeleteOperationMetadata; +import com.google.cloud.aiplatform.v1.GetBatchPredictionJobRequest; +import com.google.cloud.aiplatform.v1.GetCustomJobRequest; +import com.google.cloud.aiplatform.v1.GetDataLabelingJobRequest; +import com.google.cloud.aiplatform.v1.GetHyperparameterTuningJobRequest; +import com.google.cloud.aiplatform.v1.HyperparameterTuningJob; +import com.google.cloud.aiplatform.v1.ListBatchPredictionJobsRequest; +import com.google.cloud.aiplatform.v1.ListBatchPredictionJobsResponse; +import com.google.cloud.aiplatform.v1.ListCustomJobsRequest; +import com.google.cloud.aiplatform.v1.ListCustomJobsResponse; +import com.google.cloud.aiplatform.v1.ListDataLabelingJobsRequest; +import com.google.cloud.aiplatform.v1.ListDataLabelingJobsResponse; +import com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsRequest; +import com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsResponse; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the JobService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class JobServiceStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + throw new UnsupportedOperationException("Not implemented: getOperationsStub()"); + } + + public UnaryCallable createCustomJobCallable() { + throw new UnsupportedOperationException("Not implemented: createCustomJobCallable()"); + } + + public UnaryCallable getCustomJobCallable() { + throw new UnsupportedOperationException("Not implemented: getCustomJobCallable()"); + } + + public UnaryCallable + listCustomJobsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listCustomJobsPagedCallable()"); + } + + public UnaryCallable listCustomJobsCallable() { + throw new UnsupportedOperationException("Not implemented: listCustomJobsCallable()"); + } + + public OperationCallable + deleteCustomJobOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteCustomJobOperationCallable()"); + } + + public UnaryCallable deleteCustomJobCallable() { + throw new UnsupportedOperationException("Not implemented: deleteCustomJobCallable()"); + } + + public UnaryCallable cancelCustomJobCallable() { + throw new UnsupportedOperationException("Not implemented: cancelCustomJobCallable()"); + } + + public UnaryCallable + createDataLabelingJobCallable() { + throw new UnsupportedOperationException("Not implemented: createDataLabelingJobCallable()"); + } + + public UnaryCallable getDataLabelingJobCallable() { + throw new UnsupportedOperationException("Not implemented: getDataLabelingJobCallable()"); + } + + public UnaryCallable + listDataLabelingJobsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listDataLabelingJobsPagedCallable()"); + } + + public UnaryCallable + listDataLabelingJobsCallable() { + throw new UnsupportedOperationException("Not implemented: listDataLabelingJobsCallable()"); + } + + public OperationCallable + deleteDataLabelingJobOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteDataLabelingJobOperationCallable()"); + } + + public UnaryCallable deleteDataLabelingJobCallable() { + throw new UnsupportedOperationException("Not implemented: deleteDataLabelingJobCallable()"); + } + + public UnaryCallable cancelDataLabelingJobCallable() { + throw new UnsupportedOperationException("Not implemented: cancelDataLabelingJobCallable()"); + } + + public UnaryCallable + createHyperparameterTuningJobCallable() { + throw new UnsupportedOperationException( + "Not implemented: createHyperparameterTuningJobCallable()"); + } + + public UnaryCallable + getHyperparameterTuningJobCallable() { + throw new UnsupportedOperationException( + "Not implemented: getHyperparameterTuningJobCallable()"); + } + + public UnaryCallable< + ListHyperparameterTuningJobsRequest, ListHyperparameterTuningJobsPagedResponse> + listHyperparameterTuningJobsPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listHyperparameterTuningJobsPagedCallable()"); + } + + public UnaryCallable + listHyperparameterTuningJobsCallable() { + throw new UnsupportedOperationException( + "Not implemented: listHyperparameterTuningJobsCallable()"); + } + + public OperationCallable + deleteHyperparameterTuningJobOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteHyperparameterTuningJobOperationCallable()"); + } + + public UnaryCallable + deleteHyperparameterTuningJobCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteHyperparameterTuningJobCallable()"); + } + + public UnaryCallable + cancelHyperparameterTuningJobCallable() { + throw new UnsupportedOperationException( + "Not implemented: cancelHyperparameterTuningJobCallable()"); + } + + public UnaryCallable + createBatchPredictionJobCallable() { + throw new UnsupportedOperationException("Not implemented: createBatchPredictionJobCallable()"); + } + + public UnaryCallable + getBatchPredictionJobCallable() { + throw new UnsupportedOperationException("Not implemented: getBatchPredictionJobCallable()"); + } + + public UnaryCallable + listBatchPredictionJobsPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listBatchPredictionJobsPagedCallable()"); + } + + public UnaryCallable + listBatchPredictionJobsCallable() { + throw new UnsupportedOperationException("Not implemented: listBatchPredictionJobsCallable()"); + } + + public OperationCallable + deleteBatchPredictionJobOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteBatchPredictionJobOperationCallable()"); + } + + public UnaryCallable + deleteBatchPredictionJobCallable() { + throw new UnsupportedOperationException("Not implemented: deleteBatchPredictionJobCallable()"); + } + + public UnaryCallable cancelBatchPredictionJobCallable() { + throw new UnsupportedOperationException("Not implemented: cancelBatchPredictionJobCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/JobServiceStubSettings.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/JobServiceStubSettings.java new file mode 100644 index 000000000..63c24a135 --- /dev/null +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/JobServiceStubSettings.java @@ -0,0 +1,1306 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1.stub; + +import static com.google.cloud.aiplatform.v1.JobServiceClient.ListBatchPredictionJobsPagedResponse; +import static com.google.cloud.aiplatform.v1.JobServiceClient.ListCustomJobsPagedResponse; +import static com.google.cloud.aiplatform.v1.JobServiceClient.ListDataLabelingJobsPagedResponse; +import static com.google.cloud.aiplatform.v1.JobServiceClient.ListHyperparameterTuningJobsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1.BatchPredictionJob; +import com.google.cloud.aiplatform.v1.CancelBatchPredictionJobRequest; +import com.google.cloud.aiplatform.v1.CancelCustomJobRequest; +import com.google.cloud.aiplatform.v1.CancelDataLabelingJobRequest; +import com.google.cloud.aiplatform.v1.CancelHyperparameterTuningJobRequest; +import com.google.cloud.aiplatform.v1.CreateBatchPredictionJobRequest; +import com.google.cloud.aiplatform.v1.CreateCustomJobRequest; +import com.google.cloud.aiplatform.v1.CreateDataLabelingJobRequest; +import com.google.cloud.aiplatform.v1.CreateHyperparameterTuningJobRequest; +import com.google.cloud.aiplatform.v1.CustomJob; +import com.google.cloud.aiplatform.v1.DataLabelingJob; +import com.google.cloud.aiplatform.v1.DeleteBatchPredictionJobRequest; +import com.google.cloud.aiplatform.v1.DeleteCustomJobRequest; +import com.google.cloud.aiplatform.v1.DeleteDataLabelingJobRequest; +import com.google.cloud.aiplatform.v1.DeleteHyperparameterTuningJobRequest; +import com.google.cloud.aiplatform.v1.DeleteOperationMetadata; +import com.google.cloud.aiplatform.v1.GetBatchPredictionJobRequest; +import com.google.cloud.aiplatform.v1.GetCustomJobRequest; +import com.google.cloud.aiplatform.v1.GetDataLabelingJobRequest; +import com.google.cloud.aiplatform.v1.GetHyperparameterTuningJobRequest; +import com.google.cloud.aiplatform.v1.HyperparameterTuningJob; +import com.google.cloud.aiplatform.v1.ListBatchPredictionJobsRequest; +import com.google.cloud.aiplatform.v1.ListBatchPredictionJobsResponse; +import com.google.cloud.aiplatform.v1.ListCustomJobsRequest; +import com.google.cloud.aiplatform.v1.ListCustomJobsResponse; +import com.google.cloud.aiplatform.v1.ListDataLabelingJobsRequest; +import com.google.cloud.aiplatform.v1.ListDataLabelingJobsResponse; +import com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsRequest; +import com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsResponse; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link JobServiceStub}. + * + *

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

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

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

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

{@code
+ * JobServiceStubSettings.Builder jobServiceSettingsBuilder = JobServiceStubSettings.newBuilder();
+ * jobServiceSettingsBuilder
+ *     .createCustomJobSettings()
+ *     .setRetrySettings(
+ *         jobServiceSettingsBuilder
+ *             .createCustomJobSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * JobServiceStubSettings jobServiceSettings = jobServiceSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class JobServiceStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final UnaryCallSettings createCustomJobSettings; + private final UnaryCallSettings getCustomJobSettings; + private final PagedCallSettings< + ListCustomJobsRequest, ListCustomJobsResponse, ListCustomJobsPagedResponse> + listCustomJobsSettings; + private final UnaryCallSettings deleteCustomJobSettings; + private final OperationCallSettings + deleteCustomJobOperationSettings; + private final UnaryCallSettings cancelCustomJobSettings; + private final UnaryCallSettings + createDataLabelingJobSettings; + private final UnaryCallSettings + getDataLabelingJobSettings; + private final PagedCallSettings< + ListDataLabelingJobsRequest, + ListDataLabelingJobsResponse, + ListDataLabelingJobsPagedResponse> + listDataLabelingJobsSettings; + private final UnaryCallSettings + deleteDataLabelingJobSettings; + private final OperationCallSettings + deleteDataLabelingJobOperationSettings; + private final UnaryCallSettings + cancelDataLabelingJobSettings; + private final UnaryCallSettings + createHyperparameterTuningJobSettings; + private final UnaryCallSettings + getHyperparameterTuningJobSettings; + private final PagedCallSettings< + ListHyperparameterTuningJobsRequest, + ListHyperparameterTuningJobsResponse, + ListHyperparameterTuningJobsPagedResponse> + listHyperparameterTuningJobsSettings; + private final UnaryCallSettings + deleteHyperparameterTuningJobSettings; + private final OperationCallSettings< + DeleteHyperparameterTuningJobRequest, Empty, DeleteOperationMetadata> + deleteHyperparameterTuningJobOperationSettings; + private final UnaryCallSettings + cancelHyperparameterTuningJobSettings; + private final UnaryCallSettings + createBatchPredictionJobSettings; + private final UnaryCallSettings + getBatchPredictionJobSettings; + private final PagedCallSettings< + ListBatchPredictionJobsRequest, + ListBatchPredictionJobsResponse, + ListBatchPredictionJobsPagedResponse> + listBatchPredictionJobsSettings; + private final UnaryCallSettings + deleteBatchPredictionJobSettings; + private final OperationCallSettings< + DeleteBatchPredictionJobRequest, Empty, DeleteOperationMetadata> + deleteBatchPredictionJobOperationSettings; + private final UnaryCallSettings + cancelBatchPredictionJobSettings; + + private static final PagedListDescriptor + LIST_CUSTOM_JOBS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListCustomJobsRequest injectToken(ListCustomJobsRequest payload, String token) { + return ListCustomJobsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListCustomJobsRequest injectPageSize( + ListCustomJobsRequest payload, int pageSize) { + return ListCustomJobsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListCustomJobsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListCustomJobsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListCustomJobsResponse payload) { + return payload.getCustomJobsList() == null + ? ImmutableList.of() + : payload.getCustomJobsList(); + } + }; + + private static final PagedListDescriptor< + ListDataLabelingJobsRequest, ListDataLabelingJobsResponse, DataLabelingJob> + LIST_DATA_LABELING_JOBS_PAGE_STR_DESC = + new PagedListDescriptor< + ListDataLabelingJobsRequest, ListDataLabelingJobsResponse, DataLabelingJob>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListDataLabelingJobsRequest injectToken( + ListDataLabelingJobsRequest payload, String token) { + return ListDataLabelingJobsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListDataLabelingJobsRequest injectPageSize( + ListDataLabelingJobsRequest payload, int pageSize) { + return ListDataLabelingJobsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListDataLabelingJobsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListDataLabelingJobsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListDataLabelingJobsResponse payload) { + return payload.getDataLabelingJobsList() == null + ? ImmutableList.of() + : payload.getDataLabelingJobsList(); + } + }; + + private static final PagedListDescriptor< + ListHyperparameterTuningJobsRequest, + ListHyperparameterTuningJobsResponse, + HyperparameterTuningJob> + LIST_HYPERPARAMETER_TUNING_JOBS_PAGE_STR_DESC = + new PagedListDescriptor< + ListHyperparameterTuningJobsRequest, + ListHyperparameterTuningJobsResponse, + HyperparameterTuningJob>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListHyperparameterTuningJobsRequest injectToken( + ListHyperparameterTuningJobsRequest payload, String token) { + return ListHyperparameterTuningJobsRequest.newBuilder(payload) + .setPageToken(token) + .build(); + } + + @Override + public ListHyperparameterTuningJobsRequest injectPageSize( + ListHyperparameterTuningJobsRequest payload, int pageSize) { + return ListHyperparameterTuningJobsRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(ListHyperparameterTuningJobsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListHyperparameterTuningJobsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListHyperparameterTuningJobsResponse payload) { + return payload.getHyperparameterTuningJobsList() == null + ? ImmutableList.of() + : payload.getHyperparameterTuningJobsList(); + } + }; + + private static final PagedListDescriptor< + ListBatchPredictionJobsRequest, ListBatchPredictionJobsResponse, BatchPredictionJob> + LIST_BATCH_PREDICTION_JOBS_PAGE_STR_DESC = + new PagedListDescriptor< + ListBatchPredictionJobsRequest, + ListBatchPredictionJobsResponse, + BatchPredictionJob>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListBatchPredictionJobsRequest injectToken( + ListBatchPredictionJobsRequest payload, String token) { + return ListBatchPredictionJobsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListBatchPredictionJobsRequest injectPageSize( + ListBatchPredictionJobsRequest payload, int pageSize) { + return ListBatchPredictionJobsRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(ListBatchPredictionJobsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListBatchPredictionJobsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListBatchPredictionJobsResponse payload) { + return payload.getBatchPredictionJobsList() == null + ? ImmutableList.of() + : payload.getBatchPredictionJobsList(); + } + }; + + private static final PagedListResponseFactory< + ListCustomJobsRequest, ListCustomJobsResponse, ListCustomJobsPagedResponse> + LIST_CUSTOM_JOBS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListCustomJobsRequest, ListCustomJobsResponse, ListCustomJobsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListCustomJobsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_CUSTOM_JOBS_PAGE_STR_DESC, request, context); + return ListCustomJobsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListDataLabelingJobsRequest, + ListDataLabelingJobsResponse, + ListDataLabelingJobsPagedResponse> + LIST_DATA_LABELING_JOBS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListDataLabelingJobsRequest, + ListDataLabelingJobsResponse, + ListDataLabelingJobsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListDataLabelingJobsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListDataLabelingJobsRequest, ListDataLabelingJobsResponse, DataLabelingJob> + pageContext = + PageContext.create( + callable, LIST_DATA_LABELING_JOBS_PAGE_STR_DESC, request, context); + return ListDataLabelingJobsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListHyperparameterTuningJobsRequest, + ListHyperparameterTuningJobsResponse, + ListHyperparameterTuningJobsPagedResponse> + LIST_HYPERPARAMETER_TUNING_JOBS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListHyperparameterTuningJobsRequest, + ListHyperparameterTuningJobsResponse, + ListHyperparameterTuningJobsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable< + ListHyperparameterTuningJobsRequest, ListHyperparameterTuningJobsResponse> + callable, + ListHyperparameterTuningJobsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListHyperparameterTuningJobsRequest, + ListHyperparameterTuningJobsResponse, + HyperparameterTuningJob> + pageContext = + PageContext.create( + callable, + LIST_HYPERPARAMETER_TUNING_JOBS_PAGE_STR_DESC, + request, + context); + return ListHyperparameterTuningJobsPagedResponse.createAsync( + pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListBatchPredictionJobsRequest, + ListBatchPredictionJobsResponse, + ListBatchPredictionJobsPagedResponse> + LIST_BATCH_PREDICTION_JOBS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListBatchPredictionJobsRequest, + ListBatchPredictionJobsResponse, + ListBatchPredictionJobsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable + callable, + ListBatchPredictionJobsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListBatchPredictionJobsRequest, + ListBatchPredictionJobsResponse, + BatchPredictionJob> + pageContext = + PageContext.create( + callable, LIST_BATCH_PREDICTION_JOBS_PAGE_STR_DESC, request, context); + return ListBatchPredictionJobsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** 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> + listCustomJobsSettings; + private final UnaryCallSettings.Builder + deleteCustomJobSettings; + private final OperationCallSettings.Builder< + DeleteCustomJobRequest, Empty, DeleteOperationMetadata> + deleteCustomJobOperationSettings; + private final UnaryCallSettings.Builder cancelCustomJobSettings; + private final UnaryCallSettings.Builder + createDataLabelingJobSettings; + private final UnaryCallSettings.Builder + getDataLabelingJobSettings; + private final PagedCallSettings.Builder< + ListDataLabelingJobsRequest, + ListDataLabelingJobsResponse, + ListDataLabelingJobsPagedResponse> + listDataLabelingJobsSettings; + private final UnaryCallSettings.Builder + deleteDataLabelingJobSettings; + private final OperationCallSettings.Builder< + DeleteDataLabelingJobRequest, Empty, DeleteOperationMetadata> + deleteDataLabelingJobOperationSettings; + private final UnaryCallSettings.Builder + cancelDataLabelingJobSettings; + private final UnaryCallSettings.Builder< + CreateHyperparameterTuningJobRequest, HyperparameterTuningJob> + createHyperparameterTuningJobSettings; + private final UnaryCallSettings.Builder< + GetHyperparameterTuningJobRequest, HyperparameterTuningJob> + getHyperparameterTuningJobSettings; + private final PagedCallSettings.Builder< + ListHyperparameterTuningJobsRequest, + ListHyperparameterTuningJobsResponse, + ListHyperparameterTuningJobsPagedResponse> + listHyperparameterTuningJobsSettings; + private final UnaryCallSettings.Builder + deleteHyperparameterTuningJobSettings; + private final OperationCallSettings.Builder< + DeleteHyperparameterTuningJobRequest, Empty, DeleteOperationMetadata> + deleteHyperparameterTuningJobOperationSettings; + private final UnaryCallSettings.Builder + cancelHyperparameterTuningJobSettings; + private final UnaryCallSettings.Builder + createBatchPredictionJobSettings; + private final UnaryCallSettings.Builder + getBatchPredictionJobSettings; + private final PagedCallSettings.Builder< + ListBatchPredictionJobsRequest, + ListBatchPredictionJobsResponse, + ListBatchPredictionJobsPagedResponse> + listBatchPredictionJobsSettings; + private final UnaryCallSettings.Builder + deleteBatchPredictionJobSettings; + private final OperationCallSettings.Builder< + DeleteBatchPredictionJobRequest, Empty, DeleteOperationMetadata> + deleteBatchPredictionJobOperationSettings; + private final UnaryCallSettings.Builder + cancelBatchPredictionJobSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + createCustomJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getCustomJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listCustomJobsSettings = PagedCallSettings.newBuilder(LIST_CUSTOM_JOBS_PAGE_STR_FACT); + deleteCustomJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteCustomJobOperationSettings = OperationCallSettings.newBuilder(); + cancelCustomJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createDataLabelingJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getDataLabelingJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listDataLabelingJobsSettings = + PagedCallSettings.newBuilder(LIST_DATA_LABELING_JOBS_PAGE_STR_FACT); + deleteDataLabelingJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteDataLabelingJobOperationSettings = OperationCallSettings.newBuilder(); + cancelDataLabelingJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createHyperparameterTuningJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getHyperparameterTuningJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listHyperparameterTuningJobsSettings = + PagedCallSettings.newBuilder(LIST_HYPERPARAMETER_TUNING_JOBS_PAGE_STR_FACT); + deleteHyperparameterTuningJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteHyperparameterTuningJobOperationSettings = OperationCallSettings.newBuilder(); + cancelHyperparameterTuningJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createBatchPredictionJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getBatchPredictionJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listBatchPredictionJobsSettings = + PagedCallSettings.newBuilder(LIST_BATCH_PREDICTION_JOBS_PAGE_STR_FACT); + deleteBatchPredictionJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteBatchPredictionJobOperationSettings = OperationCallSettings.newBuilder(); + cancelBatchPredictionJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createCustomJobSettings, + getCustomJobSettings, + listCustomJobsSettings, + deleteCustomJobSettings, + cancelCustomJobSettings, + createDataLabelingJobSettings, + getDataLabelingJobSettings, + listDataLabelingJobsSettings, + deleteDataLabelingJobSettings, + cancelDataLabelingJobSettings, + createHyperparameterTuningJobSettings, + getHyperparameterTuningJobSettings, + listHyperparameterTuningJobsSettings, + deleteHyperparameterTuningJobSettings, + cancelHyperparameterTuningJobSettings, + createBatchPredictionJobSettings, + getBatchPredictionJobSettings, + listBatchPredictionJobsSettings, + deleteBatchPredictionJobSettings, + cancelBatchPredictionJobSettings); + initDefaults(this); + } + + 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); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .createCustomJobSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getCustomJobSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listCustomJobsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .deleteCustomJobSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .cancelCustomJobSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .createDataLabelingJobSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getDataLabelingJobSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listDataLabelingJobsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .deleteDataLabelingJobSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .cancelDataLabelingJobSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .createHyperparameterTuningJobSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getHyperparameterTuningJobSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listHyperparameterTuningJobsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .deleteHyperparameterTuningJobSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .cancelHyperparameterTuningJobSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .createBatchPredictionJobSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getBatchPredictionJobSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listBatchPredictionJobsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .deleteBatchPredictionJobSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .cancelBatchPredictionJobSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .deleteCustomJobOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(DeleteOperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .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_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(DeleteOperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .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_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(DeleteOperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .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_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(DeleteOperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + return builder; + } + + // NEXT_MAJOR_VER: remove 'throws Exception'. + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to createCustomJob. */ + public UnaryCallSettings.Builder createCustomJobSettings() { + return createCustomJobSettings; + } + + /** Returns the builder for the settings used for calls to getCustomJob. */ + public UnaryCallSettings.Builder getCustomJobSettings() { + return getCustomJobSettings; + } + + /** Returns the builder for the settings used for calls to listCustomJobs. */ + public PagedCallSettings.Builder< + ListCustomJobsRequest, ListCustomJobsResponse, ListCustomJobsPagedResponse> + listCustomJobsSettings() { + return listCustomJobsSettings; + } + + /** Returns the builder for the settings used for calls to deleteCustomJob. */ + public UnaryCallSettings.Builder deleteCustomJobSettings() { + return deleteCustomJobSettings; + } + + /** Returns the builder for 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.Builder + deleteCustomJobOperationSettings() { + return deleteCustomJobOperationSettings; + } + + /** Returns the builder for the settings used for calls to cancelCustomJob. */ + public UnaryCallSettings.Builder cancelCustomJobSettings() { + return cancelCustomJobSettings; + } + + /** Returns the builder for the settings used for calls to createDataLabelingJob. */ + public UnaryCallSettings.Builder + createDataLabelingJobSettings() { + return createDataLabelingJobSettings; + } + + /** Returns the builder for the settings used for calls to getDataLabelingJob. */ + public UnaryCallSettings.Builder + getDataLabelingJobSettings() { + return getDataLabelingJobSettings; + } + + /** Returns the builder for the settings used for calls to listDataLabelingJobs. */ + public PagedCallSettings.Builder< + ListDataLabelingJobsRequest, + ListDataLabelingJobsResponse, + ListDataLabelingJobsPagedResponse> + listDataLabelingJobsSettings() { + return listDataLabelingJobsSettings; + } + + /** Returns the builder for the settings used for calls to deleteDataLabelingJob. */ + public UnaryCallSettings.Builder + deleteDataLabelingJobSettings() { + return deleteDataLabelingJobSettings; + } + + /** Returns the builder for 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.Builder< + DeleteDataLabelingJobRequest, Empty, DeleteOperationMetadata> + deleteDataLabelingJobOperationSettings() { + return deleteDataLabelingJobOperationSettings; + } + + /** Returns the builder for the settings used for calls to cancelDataLabelingJob. */ + public UnaryCallSettings.Builder + cancelDataLabelingJobSettings() { + return cancelDataLabelingJobSettings; + } + + /** Returns the builder for the settings used for calls to createHyperparameterTuningJob. */ + public UnaryCallSettings.Builder + createHyperparameterTuningJobSettings() { + return createHyperparameterTuningJobSettings; + } + + /** Returns the builder for the settings used for calls to getHyperparameterTuningJob. */ + public UnaryCallSettings.Builder + getHyperparameterTuningJobSettings() { + return getHyperparameterTuningJobSettings; + } + + /** Returns the builder for the settings used for calls to listHyperparameterTuningJobs. */ + public PagedCallSettings.Builder< + ListHyperparameterTuningJobsRequest, + ListHyperparameterTuningJobsResponse, + ListHyperparameterTuningJobsPagedResponse> + listHyperparameterTuningJobsSettings() { + return listHyperparameterTuningJobsSettings; + } + + /** Returns the builder for the settings used for calls to deleteHyperparameterTuningJob. */ + public UnaryCallSettings.Builder + deleteHyperparameterTuningJobSettings() { + return deleteHyperparameterTuningJobSettings; + } + + /** Returns the builder for 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.Builder< + DeleteHyperparameterTuningJobRequest, Empty, DeleteOperationMetadata> + deleteHyperparameterTuningJobOperationSettings() { + return deleteHyperparameterTuningJobOperationSettings; + } + + /** Returns the builder for the settings used for calls to cancelHyperparameterTuningJob. */ + public UnaryCallSettings.Builder + cancelHyperparameterTuningJobSettings() { + return cancelHyperparameterTuningJobSettings; + } + + /** Returns the builder for the settings used for calls to createBatchPredictionJob. */ + public UnaryCallSettings.Builder + createBatchPredictionJobSettings() { + return createBatchPredictionJobSettings; + } + + /** Returns the builder for the settings used for calls to getBatchPredictionJob. */ + public UnaryCallSettings.Builder + getBatchPredictionJobSettings() { + return getBatchPredictionJobSettings; + } + + /** Returns the builder for the settings used for calls to listBatchPredictionJobs. */ + public PagedCallSettings.Builder< + ListBatchPredictionJobsRequest, + ListBatchPredictionJobsResponse, + ListBatchPredictionJobsPagedResponse> + listBatchPredictionJobsSettings() { + return listBatchPredictionJobsSettings; + } + + /** Returns the builder for the settings used for calls to deleteBatchPredictionJob. */ + public UnaryCallSettings.Builder + deleteBatchPredictionJobSettings() { + return deleteBatchPredictionJobSettings; + } + + /** Returns the builder for 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.Builder< + DeleteBatchPredictionJobRequest, Empty, DeleteOperationMetadata> + deleteBatchPredictionJobOperationSettings() { + return deleteBatchPredictionJobOperationSettings; + } + + /** Returns the builder for the settings used for calls to cancelBatchPredictionJob. */ + public UnaryCallSettings.Builder + cancelBatchPredictionJobSettings() { + return cancelBatchPredictionJobSettings; + } + + @Override + public JobServiceStubSettings build() throws IOException { + return new JobServiceStubSettings(this); + } + } +} diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/MigrationServiceStub.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/MigrationServiceStub.java new file mode 100644 index 000000000..5264e6ac9 --- /dev/null +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/MigrationServiceStub.java @@ -0,0 +1,72 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1.stub; + +import static com.google.cloud.aiplatform.v1.MigrationServiceClient.SearchMigratableResourcesPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata; +import com.google.cloud.aiplatform.v1.BatchMigrateResourcesRequest; +import com.google.cloud.aiplatform.v1.BatchMigrateResourcesResponse; +import com.google.cloud.aiplatform.v1.SearchMigratableResourcesRequest; +import com.google.cloud.aiplatform.v1.SearchMigratableResourcesResponse; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the MigrationService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class MigrationServiceStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + throw new UnsupportedOperationException("Not implemented: getOperationsStub()"); + } + + public UnaryCallable + searchMigratableResourcesPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: searchMigratableResourcesPagedCallable()"); + } + + public UnaryCallable + searchMigratableResourcesCallable() { + throw new UnsupportedOperationException("Not implemented: searchMigratableResourcesCallable()"); + } + + public OperationCallable< + BatchMigrateResourcesRequest, + BatchMigrateResourcesResponse, + BatchMigrateResourcesOperationMetadata> + batchMigrateResourcesOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: batchMigrateResourcesOperationCallable()"); + } + + public UnaryCallable batchMigrateResourcesCallable() { + throw new UnsupportedOperationException("Not implemented: batchMigrateResourcesCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/MigrationServiceStubSettings.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/MigrationServiceStubSettings.java new file mode 100644 index 000000000..0cbac617c --- /dev/null +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/MigrationServiceStubSettings.java @@ -0,0 +1,452 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1.stub; + +import static com.google.cloud.aiplatform.v1.MigrationServiceClient.SearchMigratableResourcesPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata; +import com.google.cloud.aiplatform.v1.BatchMigrateResourcesRequest; +import com.google.cloud.aiplatform.v1.BatchMigrateResourcesResponse; +import com.google.cloud.aiplatform.v1.MigratableResource; +import com.google.cloud.aiplatform.v1.SearchMigratableResourcesRequest; +import com.google.cloud.aiplatform.v1.SearchMigratableResourcesResponse; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link MigrationServiceStub}. + * + *

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

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

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

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

{@code
+ * MigrationServiceStubSettings.Builder migrationServiceSettingsBuilder =
+ *     MigrationServiceStubSettings.newBuilder();
+ * migrationServiceSettingsBuilder
+ *     .searchMigratableResourcesSettings()
+ *     .setRetrySettings(
+ *         migrationServiceSettingsBuilder
+ *             .searchMigratableResourcesSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * MigrationServiceStubSettings migrationServiceSettings = migrationServiceSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class MigrationServiceStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final PagedCallSettings< + SearchMigratableResourcesRequest, + SearchMigratableResourcesResponse, + SearchMigratableResourcesPagedResponse> + searchMigratableResourcesSettings; + private final UnaryCallSettings + batchMigrateResourcesSettings; + private final OperationCallSettings< + BatchMigrateResourcesRequest, + BatchMigrateResourcesResponse, + BatchMigrateResourcesOperationMetadata> + 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, + SearchMigratableResourcesResponse, + SearchMigratableResourcesPagedResponse> + searchMigratableResourcesSettings() { + return searchMigratableResourcesSettings; + } + + /** Returns the object with the settings used for calls to batchMigrateResources. */ + public UnaryCallSettings + batchMigrateResourcesSettings() { + return batchMigrateResourcesSettings; + } + + /** Returns the object with the settings used for calls to batchMigrateResources. */ + public OperationCallSettings< + BatchMigrateResourcesRequest, + BatchMigrateResourcesResponse, + BatchMigrateResourcesOperationMetadata> + batchMigrateResourcesOperationSettings() { + return batchMigrateResourcesOperationSettings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public MigrationServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcMigrationServiceStub.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(MigrationServiceStubSettings.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 MigrationServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + searchMigratableResourcesSettings = settingsBuilder.searchMigratableResourcesSettings().build(); + batchMigrateResourcesSettings = settingsBuilder.batchMigrateResourcesSettings().build(); + batchMigrateResourcesOperationSettings = + settingsBuilder.batchMigrateResourcesOperationSettings().build(); + } + + /** Builder for MigrationServiceStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final PagedCallSettings.Builder< + SearchMigratableResourcesRequest, + SearchMigratableResourcesResponse, + SearchMigratableResourcesPagedResponse> + searchMigratableResourcesSettings; + private final UnaryCallSettings.Builder + batchMigrateResourcesSettings; + private final OperationCallSettings.Builder< + BatchMigrateResourcesRequest, + BatchMigrateResourcesResponse, + BatchMigrateResourcesOperationMetadata> + batchMigrateResourcesOperationSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(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.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")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .batchMigrateResourcesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .batchMigrateResourcesOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create( + BatchMigrateResourcesResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + BatchMigrateResourcesOperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + return builder; + } + + // NEXT_MAJOR_VER: remove 'throws Exception'. + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to searchMigratableResources. */ + public PagedCallSettings.Builder< + SearchMigratableResourcesRequest, + SearchMigratableResourcesResponse, + SearchMigratableResourcesPagedResponse> + searchMigratableResourcesSettings() { + return searchMigratableResourcesSettings; + } + + /** Returns the builder for the settings used for calls to batchMigrateResources. */ + public UnaryCallSettings.Builder + batchMigrateResourcesSettings() { + return batchMigrateResourcesSettings; + } + + /** Returns the builder for the settings used for calls to batchMigrateResources. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + BatchMigrateResourcesRequest, + BatchMigrateResourcesResponse, + BatchMigrateResourcesOperationMetadata> + batchMigrateResourcesOperationSettings() { + return batchMigrateResourcesOperationSettings; + } + + @Override + public MigrationServiceStubSettings build() throws IOException { + return new MigrationServiceStubSettings(this); + } + } +} diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/ModelServiceStub.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/ModelServiceStub.java new file mode 100644 index 000000000..78a3533f5 --- /dev/null +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/ModelServiceStub.java @@ -0,0 +1,140 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1.stub; + +import static com.google.cloud.aiplatform.v1.ModelServiceClient.ListModelEvaluationSlicesPagedResponse; +import static com.google.cloud.aiplatform.v1.ModelServiceClient.ListModelEvaluationsPagedResponse; +import static com.google.cloud.aiplatform.v1.ModelServiceClient.ListModelsPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1.DeleteModelRequest; +import com.google.cloud.aiplatform.v1.DeleteOperationMetadata; +import com.google.cloud.aiplatform.v1.ExportModelOperationMetadata; +import com.google.cloud.aiplatform.v1.ExportModelRequest; +import com.google.cloud.aiplatform.v1.ExportModelResponse; +import com.google.cloud.aiplatform.v1.GetModelEvaluationRequest; +import com.google.cloud.aiplatform.v1.GetModelEvaluationSliceRequest; +import com.google.cloud.aiplatform.v1.GetModelRequest; +import com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesRequest; +import com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponse; +import com.google.cloud.aiplatform.v1.ListModelEvaluationsRequest; +import com.google.cloud.aiplatform.v1.ListModelEvaluationsResponse; +import com.google.cloud.aiplatform.v1.ListModelsRequest; +import com.google.cloud.aiplatform.v1.ListModelsResponse; +import com.google.cloud.aiplatform.v1.Model; +import com.google.cloud.aiplatform.v1.ModelEvaluation; +import com.google.cloud.aiplatform.v1.ModelEvaluationSlice; +import com.google.cloud.aiplatform.v1.UpdateModelRequest; +import com.google.cloud.aiplatform.v1.UploadModelOperationMetadata; +import com.google.cloud.aiplatform.v1.UploadModelRequest; +import com.google.cloud.aiplatform.v1.UploadModelResponse; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the ModelService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class ModelServiceStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + throw new UnsupportedOperationException("Not implemented: getOperationsStub()"); + } + + public OperationCallable + uploadModelOperationCallable() { + throw new UnsupportedOperationException("Not implemented: uploadModelOperationCallable()"); + } + + public UnaryCallable uploadModelCallable() { + throw new UnsupportedOperationException("Not implemented: uploadModelCallable()"); + } + + public UnaryCallable getModelCallable() { + throw new UnsupportedOperationException("Not implemented: getModelCallable()"); + } + + public UnaryCallable listModelsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listModelsPagedCallable()"); + } + + public UnaryCallable listModelsCallable() { + throw new UnsupportedOperationException("Not implemented: listModelsCallable()"); + } + + public UnaryCallable updateModelCallable() { + throw new UnsupportedOperationException("Not implemented: updateModelCallable()"); + } + + public OperationCallable + deleteModelOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteModelOperationCallable()"); + } + + public UnaryCallable deleteModelCallable() { + throw new UnsupportedOperationException("Not implemented: deleteModelCallable()"); + } + + public OperationCallable + exportModelOperationCallable() { + throw new UnsupportedOperationException("Not implemented: exportModelOperationCallable()"); + } + + public UnaryCallable exportModelCallable() { + throw new UnsupportedOperationException("Not implemented: exportModelCallable()"); + } + + public UnaryCallable getModelEvaluationCallable() { + throw new UnsupportedOperationException("Not implemented: getModelEvaluationCallable()"); + } + + public UnaryCallable + listModelEvaluationsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listModelEvaluationsPagedCallable()"); + } + + public UnaryCallable + listModelEvaluationsCallable() { + throw new UnsupportedOperationException("Not implemented: listModelEvaluationsCallable()"); + } + + public UnaryCallable + getModelEvaluationSliceCallable() { + throw new UnsupportedOperationException("Not implemented: getModelEvaluationSliceCallable()"); + } + + public UnaryCallable + listModelEvaluationSlicesPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listModelEvaluationSlicesPagedCallable()"); + } + + public UnaryCallable + listModelEvaluationSlicesCallable() { + throw new UnsupportedOperationException("Not implemented: listModelEvaluationSlicesCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/ModelServiceStubSettings.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/ModelServiceStubSettings.java new file mode 100644 index 000000000..acf8fbc1f --- /dev/null +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/ModelServiceStubSettings.java @@ -0,0 +1,873 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1.stub; + +import static com.google.cloud.aiplatform.v1.ModelServiceClient.ListModelEvaluationSlicesPagedResponse; +import static com.google.cloud.aiplatform.v1.ModelServiceClient.ListModelEvaluationsPagedResponse; +import static com.google.cloud.aiplatform.v1.ModelServiceClient.ListModelsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1.DeleteModelRequest; +import com.google.cloud.aiplatform.v1.DeleteOperationMetadata; +import com.google.cloud.aiplatform.v1.ExportModelOperationMetadata; +import com.google.cloud.aiplatform.v1.ExportModelRequest; +import com.google.cloud.aiplatform.v1.ExportModelResponse; +import com.google.cloud.aiplatform.v1.GetModelEvaluationRequest; +import com.google.cloud.aiplatform.v1.GetModelEvaluationSliceRequest; +import com.google.cloud.aiplatform.v1.GetModelRequest; +import com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesRequest; +import com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponse; +import com.google.cloud.aiplatform.v1.ListModelEvaluationsRequest; +import com.google.cloud.aiplatform.v1.ListModelEvaluationsResponse; +import com.google.cloud.aiplatform.v1.ListModelsRequest; +import com.google.cloud.aiplatform.v1.ListModelsResponse; +import com.google.cloud.aiplatform.v1.Model; +import com.google.cloud.aiplatform.v1.ModelEvaluation; +import com.google.cloud.aiplatform.v1.ModelEvaluationSlice; +import com.google.cloud.aiplatform.v1.UpdateModelRequest; +import com.google.cloud.aiplatform.v1.UploadModelOperationMetadata; +import com.google.cloud.aiplatform.v1.UploadModelRequest; +import com.google.cloud.aiplatform.v1.UploadModelResponse; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link ModelServiceStub}. + * + *

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

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

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

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

{@code
+ * ModelServiceStubSettings.Builder modelServiceSettingsBuilder =
+ *     ModelServiceStubSettings.newBuilder();
+ * modelServiceSettingsBuilder
+ *     .getModelSettings()
+ *     .setRetrySettings(
+ *         modelServiceSettingsBuilder
+ *             .getModelSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * ModelServiceStubSettings modelServiceSettings = modelServiceSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class ModelServiceStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final UnaryCallSettings uploadModelSettings; + private final OperationCallSettings< + UploadModelRequest, UploadModelResponse, UploadModelOperationMetadata> + uploadModelOperationSettings; + private final UnaryCallSettings getModelSettings; + private final PagedCallSettings + listModelsSettings; + private final UnaryCallSettings updateModelSettings; + private final UnaryCallSettings deleteModelSettings; + private final OperationCallSettings + deleteModelOperationSettings; + private final UnaryCallSettings exportModelSettings; + private final OperationCallSettings< + ExportModelRequest, ExportModelResponse, ExportModelOperationMetadata> + exportModelOperationSettings; + private final UnaryCallSettings + getModelEvaluationSettings; + private final PagedCallSettings< + ListModelEvaluationsRequest, + ListModelEvaluationsResponse, + ListModelEvaluationsPagedResponse> + listModelEvaluationsSettings; + private final UnaryCallSettings + getModelEvaluationSliceSettings; + private final PagedCallSettings< + ListModelEvaluationSlicesRequest, + ListModelEvaluationSlicesResponse, + ListModelEvaluationSlicesPagedResponse> + listModelEvaluationSlicesSettings; + + private static final PagedListDescriptor + LIST_MODELS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListModelsRequest injectToken(ListModelsRequest payload, String token) { + return ListModelsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListModelsRequest injectPageSize(ListModelsRequest payload, int pageSize) { + return ListModelsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListModelsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListModelsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListModelsResponse payload) { + return payload.getModelsList() == null + ? ImmutableList.of() + : payload.getModelsList(); + } + }; + + private static final PagedListDescriptor< + ListModelEvaluationsRequest, ListModelEvaluationsResponse, ModelEvaluation> + LIST_MODEL_EVALUATIONS_PAGE_STR_DESC = + new PagedListDescriptor< + ListModelEvaluationsRequest, ListModelEvaluationsResponse, ModelEvaluation>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListModelEvaluationsRequest injectToken( + ListModelEvaluationsRequest payload, String token) { + return ListModelEvaluationsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListModelEvaluationsRequest injectPageSize( + ListModelEvaluationsRequest payload, int pageSize) { + return ListModelEvaluationsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListModelEvaluationsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListModelEvaluationsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListModelEvaluationsResponse payload) { + return payload.getModelEvaluationsList() == null + ? ImmutableList.of() + : payload.getModelEvaluationsList(); + } + }; + + private static final PagedListDescriptor< + ListModelEvaluationSlicesRequest, ListModelEvaluationSlicesResponse, ModelEvaluationSlice> + LIST_MODEL_EVALUATION_SLICES_PAGE_STR_DESC = + new PagedListDescriptor< + ListModelEvaluationSlicesRequest, + ListModelEvaluationSlicesResponse, + ModelEvaluationSlice>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListModelEvaluationSlicesRequest injectToken( + ListModelEvaluationSlicesRequest payload, String token) { + return ListModelEvaluationSlicesRequest.newBuilder(payload) + .setPageToken(token) + .build(); + } + + @Override + public ListModelEvaluationSlicesRequest injectPageSize( + ListModelEvaluationSlicesRequest payload, int pageSize) { + return ListModelEvaluationSlicesRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(ListModelEvaluationSlicesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListModelEvaluationSlicesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListModelEvaluationSlicesResponse payload) { + return payload.getModelEvaluationSlicesList() == null + ? ImmutableList.of() + : payload.getModelEvaluationSlicesList(); + } + }; + + private static final PagedListResponseFactory< + ListModelsRequest, ListModelsResponse, ListModelsPagedResponse> + LIST_MODELS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListModelsRequest, ListModelsResponse, ListModelsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListModelsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_MODELS_PAGE_STR_DESC, request, context); + return ListModelsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListModelEvaluationsRequest, + ListModelEvaluationsResponse, + ListModelEvaluationsPagedResponse> + LIST_MODEL_EVALUATIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListModelEvaluationsRequest, + ListModelEvaluationsResponse, + ListModelEvaluationsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListModelEvaluationsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListModelEvaluationsRequest, ListModelEvaluationsResponse, ModelEvaluation> + pageContext = + PageContext.create( + callable, LIST_MODEL_EVALUATIONS_PAGE_STR_DESC, request, context); + return ListModelEvaluationsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListModelEvaluationSlicesRequest, + ListModelEvaluationSlicesResponse, + ListModelEvaluationSlicesPagedResponse> + LIST_MODEL_EVALUATION_SLICES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListModelEvaluationSlicesRequest, + ListModelEvaluationSlicesResponse, + ListModelEvaluationSlicesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable + callable, + ListModelEvaluationSlicesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListModelEvaluationSlicesRequest, + ListModelEvaluationSlicesResponse, + ModelEvaluationSlice> + pageContext = + PageContext.create( + callable, LIST_MODEL_EVALUATION_SLICES_PAGE_STR_DESC, request, context); + return ListModelEvaluationSlicesPagedResponse.createAsync( + pageContext, futureResponse); + } + }; + + /** 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> + uploadModelOperationSettings; + private final UnaryCallSettings.Builder getModelSettings; + private final PagedCallSettings.Builder< + ListModelsRequest, ListModelsResponse, ListModelsPagedResponse> + listModelsSettings; + private final UnaryCallSettings.Builder updateModelSettings; + private final UnaryCallSettings.Builder deleteModelSettings; + private final OperationCallSettings.Builder + deleteModelOperationSettings; + private final UnaryCallSettings.Builder exportModelSettings; + private final OperationCallSettings.Builder< + ExportModelRequest, ExportModelResponse, ExportModelOperationMetadata> + exportModelOperationSettings; + private final UnaryCallSettings.Builder + getModelEvaluationSettings; + private final PagedCallSettings.Builder< + ListModelEvaluationsRequest, + ListModelEvaluationsResponse, + ListModelEvaluationsPagedResponse> + listModelEvaluationsSettings; + private final UnaryCallSettings.Builder + getModelEvaluationSliceSettings; + private final PagedCallSettings.Builder< + ListModelEvaluationSlicesRequest, + ListModelEvaluationSlicesResponse, + ListModelEvaluationSlicesPagedResponse> + listModelEvaluationSlicesSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + uploadModelSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + uploadModelOperationSettings = OperationCallSettings.newBuilder(); + getModelSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listModelsSettings = PagedCallSettings.newBuilder(LIST_MODELS_PAGE_STR_FACT); + updateModelSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteModelSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteModelOperationSettings = OperationCallSettings.newBuilder(); + exportModelSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + exportModelOperationSettings = OperationCallSettings.newBuilder(); + getModelEvaluationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listModelEvaluationsSettings = + PagedCallSettings.newBuilder(LIST_MODEL_EVALUATIONS_PAGE_STR_FACT); + getModelEvaluationSliceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listModelEvaluationSlicesSettings = + PagedCallSettings.newBuilder(LIST_MODEL_EVALUATION_SLICES_PAGE_STR_FACT); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + uploadModelSettings, + getModelSettings, + listModelsSettings, + updateModelSettings, + deleteModelSettings, + exportModelSettings, + getModelEvaluationSettings, + listModelEvaluationsSettings, + getModelEvaluationSliceSettings, + listModelEvaluationSlicesSettings); + initDefaults(this); + } + + 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); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .uploadModelSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getModelSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listModelsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .updateModelSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .deleteModelSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .exportModelSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getModelEvaluationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listModelEvaluationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getModelEvaluationSliceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listModelEvaluationSlicesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .uploadModelOperationSettings() + .setInitialCallSettings( + UnaryCallSettings.newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(UploadModelResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + UploadModelOperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .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_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(DeleteOperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .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_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(ExportModelResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + ExportModelOperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + return builder; + } + + // NEXT_MAJOR_VER: remove 'throws Exception'. + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to uploadModel. */ + public UnaryCallSettings.Builder uploadModelSettings() { + return uploadModelSettings; + } + + /** Returns the builder for 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.Builder< + UploadModelRequest, UploadModelResponse, UploadModelOperationMetadata> + uploadModelOperationSettings() { + return uploadModelOperationSettings; + } + + /** Returns the builder for the settings used for calls to getModel. */ + public UnaryCallSettings.Builder getModelSettings() { + return getModelSettings; + } + + /** Returns the builder for the settings used for calls to listModels. */ + public PagedCallSettings.Builder + listModelsSettings() { + return listModelsSettings; + } + + /** Returns the builder for the settings used for calls to updateModel. */ + public UnaryCallSettings.Builder updateModelSettings() { + return updateModelSettings; + } + + /** Returns the builder for the settings used for calls to deleteModel. */ + public UnaryCallSettings.Builder deleteModelSettings() { + return deleteModelSettings; + } + + /** Returns the builder for the settings used for calls to deleteModel. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteModelOperationSettings() { + return deleteModelOperationSettings; + } + + /** Returns the builder for the settings used for calls to exportModel. */ + public UnaryCallSettings.Builder exportModelSettings() { + return exportModelSettings; + } + + /** Returns the builder for 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.Builder< + ExportModelRequest, ExportModelResponse, ExportModelOperationMetadata> + exportModelOperationSettings() { + return exportModelOperationSettings; + } + + /** Returns the builder for the settings used for calls to getModelEvaluation. */ + public UnaryCallSettings.Builder + getModelEvaluationSettings() { + return getModelEvaluationSettings; + } + + /** Returns the builder for the settings used for calls to listModelEvaluations. */ + public PagedCallSettings.Builder< + ListModelEvaluationsRequest, + ListModelEvaluationsResponse, + ListModelEvaluationsPagedResponse> + listModelEvaluationsSettings() { + return listModelEvaluationsSettings; + } + + /** Returns the builder for the settings used for calls to getModelEvaluationSlice. */ + public UnaryCallSettings.Builder + getModelEvaluationSliceSettings() { + return getModelEvaluationSliceSettings; + } + + /** Returns the builder for the settings used for calls to listModelEvaluationSlices. */ + public PagedCallSettings.Builder< + ListModelEvaluationSlicesRequest, + ListModelEvaluationSlicesResponse, + ListModelEvaluationSlicesPagedResponse> + listModelEvaluationSlicesSettings() { + return listModelEvaluationSlicesSettings; + } + + @Override + public ModelServiceStubSettings build() throws IOException { + return new ModelServiceStubSettings(this); + } + } +} diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/PipelineServiceStub.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/PipelineServiceStub.java new file mode 100644 index 000000000..40fcd232b --- /dev/null +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/PipelineServiceStub.java @@ -0,0 +1,86 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1.stub; + +import static com.google.cloud.aiplatform.v1.PipelineServiceClient.ListTrainingPipelinesPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1.CancelTrainingPipelineRequest; +import com.google.cloud.aiplatform.v1.CreateTrainingPipelineRequest; +import com.google.cloud.aiplatform.v1.DeleteOperationMetadata; +import com.google.cloud.aiplatform.v1.DeleteTrainingPipelineRequest; +import com.google.cloud.aiplatform.v1.GetTrainingPipelineRequest; +import com.google.cloud.aiplatform.v1.ListTrainingPipelinesRequest; +import com.google.cloud.aiplatform.v1.ListTrainingPipelinesResponse; +import com.google.cloud.aiplatform.v1.TrainingPipeline; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the PipelineService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class PipelineServiceStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + throw new UnsupportedOperationException("Not implemented: getOperationsStub()"); + } + + public UnaryCallable + createTrainingPipelineCallable() { + throw new UnsupportedOperationException("Not implemented: createTrainingPipelineCallable()"); + } + + public UnaryCallable getTrainingPipelineCallable() { + throw new UnsupportedOperationException("Not implemented: getTrainingPipelineCallable()"); + } + + public UnaryCallable + listTrainingPipelinesPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listTrainingPipelinesPagedCallable()"); + } + + public UnaryCallable + listTrainingPipelinesCallable() { + throw new UnsupportedOperationException("Not implemented: listTrainingPipelinesCallable()"); + } + + public OperationCallable + deleteTrainingPipelineOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteTrainingPipelineOperationCallable()"); + } + + public UnaryCallable deleteTrainingPipelineCallable() { + throw new UnsupportedOperationException("Not implemented: deleteTrainingPipelineCallable()"); + } + + public UnaryCallable cancelTrainingPipelineCallable() { + throw new UnsupportedOperationException("Not implemented: cancelTrainingPipelineCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/PipelineServiceStubSettings.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/PipelineServiceStubSettings.java new file mode 100644 index 000000000..90791989c --- /dev/null +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/PipelineServiceStubSettings.java @@ -0,0 +1,512 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1.stub; + +import static com.google.cloud.aiplatform.v1.PipelineServiceClient.ListTrainingPipelinesPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1.CancelTrainingPipelineRequest; +import com.google.cloud.aiplatform.v1.CreateTrainingPipelineRequest; +import com.google.cloud.aiplatform.v1.DeleteOperationMetadata; +import com.google.cloud.aiplatform.v1.DeleteTrainingPipelineRequest; +import com.google.cloud.aiplatform.v1.GetTrainingPipelineRequest; +import com.google.cloud.aiplatform.v1.ListTrainingPipelinesRequest; +import com.google.cloud.aiplatform.v1.ListTrainingPipelinesResponse; +import com.google.cloud.aiplatform.v1.TrainingPipeline; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link PipelineServiceStub}. + * + *

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

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

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

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

{@code
+ * PipelineServiceStubSettings.Builder pipelineServiceSettingsBuilder =
+ *     PipelineServiceStubSettings.newBuilder();
+ * pipelineServiceSettingsBuilder
+ *     .createTrainingPipelineSettings()
+ *     .setRetrySettings(
+ *         pipelineServiceSettingsBuilder
+ *             .createTrainingPipelineSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * PipelineServiceStubSettings pipelineServiceSettings = pipelineServiceSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class PipelineServiceStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final UnaryCallSettings + createTrainingPipelineSettings; + private final UnaryCallSettings + getTrainingPipelineSettings; + private final PagedCallSettings< + ListTrainingPipelinesRequest, + ListTrainingPipelinesResponse, + ListTrainingPipelinesPagedResponse> + listTrainingPipelinesSettings; + private final UnaryCallSettings + deleteTrainingPipelineSettings; + private final OperationCallSettings + deleteTrainingPipelineOperationSettings; + private final UnaryCallSettings + 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() { + return createTrainingPipelineSettings; + } + + /** Returns the object with the settings used for calls to getTrainingPipeline. */ + public UnaryCallSettings + getTrainingPipelineSettings() { + return getTrainingPipelineSettings; + } + + /** Returns the object with the settings used for calls to listTrainingPipelines. */ + public PagedCallSettings< + ListTrainingPipelinesRequest, + ListTrainingPipelinesResponse, + ListTrainingPipelinesPagedResponse> + listTrainingPipelinesSettings() { + return listTrainingPipelinesSettings; + } + + /** Returns the object with the settings used for calls to deleteTrainingPipeline. */ + public UnaryCallSettings + deleteTrainingPipelineSettings() { + return deleteTrainingPipelineSettings; + } + + /** Returns the object with the settings used for calls to deleteTrainingPipeline. */ + public OperationCallSettings + deleteTrainingPipelineOperationSettings() { + return deleteTrainingPipelineOperationSettings; + } + + /** Returns the object with the settings used for calls to cancelTrainingPipeline. */ + public UnaryCallSettings cancelTrainingPipelineSettings() { + return cancelTrainingPipelineSettings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public PipelineServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcPipelineServiceStub.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(PipelineServiceStubSettings.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 PipelineServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + createTrainingPipelineSettings = settingsBuilder.createTrainingPipelineSettings().build(); + getTrainingPipelineSettings = settingsBuilder.getTrainingPipelineSettings().build(); + listTrainingPipelinesSettings = settingsBuilder.listTrainingPipelinesSettings().build(); + deleteTrainingPipelineSettings = settingsBuilder.deleteTrainingPipelineSettings().build(); + deleteTrainingPipelineOperationSettings = + settingsBuilder.deleteTrainingPipelineOperationSettings().build(); + cancelTrainingPipelineSettings = settingsBuilder.cancelTrainingPipelineSettings().build(); + } + + /** Builder for PipelineServiceStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder + createTrainingPipelineSettings; + private final UnaryCallSettings.Builder + getTrainingPipelineSettings; + private final PagedCallSettings.Builder< + ListTrainingPipelinesRequest, + ListTrainingPipelinesResponse, + ListTrainingPipelinesPagedResponse> + listTrainingPipelinesSettings; + private final UnaryCallSettings.Builder + deleteTrainingPipelineSettings; + private final OperationCallSettings.Builder< + DeleteTrainingPipelineRequest, Empty, DeleteOperationMetadata> + deleteTrainingPipelineOperationSettings; + private final UnaryCallSettings.Builder + cancelTrainingPipelineSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + createTrainingPipelineSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getTrainingPipelineSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listTrainingPipelinesSettings = + PagedCallSettings.newBuilder(LIST_TRAINING_PIPELINES_PAGE_STR_FACT); + deleteTrainingPipelineSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteTrainingPipelineOperationSettings = OperationCallSettings.newBuilder(); + cancelTrainingPipelineSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createTrainingPipelineSettings, + getTrainingPipelineSettings, + listTrainingPipelinesSettings, + deleteTrainingPipelineSettings, + cancelTrainingPipelineSettings); + initDefaults(this); + } + + 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); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .createTrainingPipelineSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getTrainingPipelineSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listTrainingPipelinesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .deleteTrainingPipelineSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .cancelTrainingPipelineSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .deleteTrainingPipelineOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(DeleteOperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + return builder; + } + + // NEXT_MAJOR_VER: remove 'throws Exception'. + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to createTrainingPipeline. */ + public UnaryCallSettings.Builder + createTrainingPipelineSettings() { + return createTrainingPipelineSettings; + } + + /** Returns the builder for the settings used for calls to getTrainingPipeline. */ + public UnaryCallSettings.Builder + getTrainingPipelineSettings() { + return getTrainingPipelineSettings; + } + + /** Returns the builder for the settings used for calls to listTrainingPipelines. */ + public PagedCallSettings.Builder< + ListTrainingPipelinesRequest, + ListTrainingPipelinesResponse, + ListTrainingPipelinesPagedResponse> + listTrainingPipelinesSettings() { + return listTrainingPipelinesSettings; + } + + /** Returns the builder for the settings used for calls to deleteTrainingPipeline. */ + public UnaryCallSettings.Builder + deleteTrainingPipelineSettings() { + return deleteTrainingPipelineSettings; + } + + /** Returns the builder for the settings used for calls to deleteTrainingPipeline. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + DeleteTrainingPipelineRequest, Empty, DeleteOperationMetadata> + deleteTrainingPipelineOperationSettings() { + return deleteTrainingPipelineOperationSettings; + } + + /** Returns the builder for the settings used for calls to cancelTrainingPipeline. */ + public UnaryCallSettings.Builder + cancelTrainingPipelineSettings() { + return cancelTrainingPipelineSettings; + } + + @Override + public PipelineServiceStubSettings build() throws IOException { + return new PipelineServiceStubSettings(this); + } + } +} diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/PredictionServiceStub.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/PredictionServiceStub.java new file mode 100644 index 000000000..fe95183c8 --- /dev/null +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/PredictionServiceStub.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. + */ + +package com.google.cloud.aiplatform.v1.stub; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1.PredictRequest; +import com.google.cloud.aiplatform.v1.PredictResponse; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the PredictionService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class PredictionServiceStub implements BackgroundResource { + + public UnaryCallable predictCallable() { + throw new UnsupportedOperationException("Not implemented: predictCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/PredictionServiceStubSettings.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/PredictionServiceStubSettings.java new file mode 100644 index 000000000..9637382e1 --- /dev/null +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/PredictionServiceStubSettings.java @@ -0,0 +1,255 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1.stub; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.aiplatform.v1.PredictRequest; +import com.google.cloud.aiplatform.v1.PredictResponse; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link PredictionServiceStub}. + * + *

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

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

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

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

{@code
+ * PredictionServiceStubSettings.Builder predictionServiceSettingsBuilder =
+ *     PredictionServiceStubSettings.newBuilder();
+ * predictionServiceSettingsBuilder
+ *     .predictSettings()
+ *     .setRetrySettings(
+ *         predictionServiceSettingsBuilder
+ *             .predictSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * PredictionServiceStubSettings predictionServiceSettings =
+ *     predictionServiceSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class PredictionServiceStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final UnaryCallSettings predictSettings; + + /** Returns the object with the settings used for calls to predict. */ + public UnaryCallSettings predictSettings() { + return predictSettings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public PredictionServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcPredictionServiceStub.create(this); + } + 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(PredictionServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected PredictionServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + predictSettings = settingsBuilder.predictSettings().build(); + } + + /** Builder for PredictionServiceStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder predictSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + predictSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of(predictSettings); + initDefaults(this); + } + + protected Builder(PredictionServiceStubSettings settings) { + super(settings); + + predictSettings = settings.predictSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of(predictSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .predictSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + return builder; + } + + // NEXT_MAJOR_VER: remove 'throws Exception'. + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to predict. */ + public UnaryCallSettings.Builder predictSettings() { + return predictSettings; + } + + @Override + public PredictionServiceStubSettings build() throws IOException { + return new PredictionServiceStubSettings(this); + } + } +} diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/SpecialistPoolServiceStub.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/SpecialistPoolServiceStub.java new file mode 100644 index 000000000..bd9792df0 --- /dev/null +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/SpecialistPoolServiceStub.java @@ -0,0 +1,100 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1.stub; + +import static com.google.cloud.aiplatform.v1.SpecialistPoolServiceClient.ListSpecialistPoolsPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1.CreateSpecialistPoolOperationMetadata; +import com.google.cloud.aiplatform.v1.CreateSpecialistPoolRequest; +import com.google.cloud.aiplatform.v1.DeleteOperationMetadata; +import com.google.cloud.aiplatform.v1.DeleteSpecialistPoolRequest; +import com.google.cloud.aiplatform.v1.GetSpecialistPoolRequest; +import com.google.cloud.aiplatform.v1.ListSpecialistPoolsRequest; +import com.google.cloud.aiplatform.v1.ListSpecialistPoolsResponse; +import com.google.cloud.aiplatform.v1.SpecialistPool; +import com.google.cloud.aiplatform.v1.UpdateSpecialistPoolOperationMetadata; +import com.google.cloud.aiplatform.v1.UpdateSpecialistPoolRequest; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the SpecialistPoolService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class SpecialistPoolServiceStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + throw new UnsupportedOperationException("Not implemented: getOperationsStub()"); + } + + public OperationCallable< + CreateSpecialistPoolRequest, SpecialistPool, CreateSpecialistPoolOperationMetadata> + createSpecialistPoolOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createSpecialistPoolOperationCallable()"); + } + + public UnaryCallable createSpecialistPoolCallable() { + throw new UnsupportedOperationException("Not implemented: createSpecialistPoolCallable()"); + } + + public UnaryCallable getSpecialistPoolCallable() { + throw new UnsupportedOperationException("Not implemented: getSpecialistPoolCallable()"); + } + + public UnaryCallable + listSpecialistPoolsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listSpecialistPoolsPagedCallable()"); + } + + public UnaryCallable + listSpecialistPoolsCallable() { + throw new UnsupportedOperationException("Not implemented: listSpecialistPoolsCallable()"); + } + + public OperationCallable + deleteSpecialistPoolOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteSpecialistPoolOperationCallable()"); + } + + public UnaryCallable deleteSpecialistPoolCallable() { + throw new UnsupportedOperationException("Not implemented: deleteSpecialistPoolCallable()"); + } + + public OperationCallable< + UpdateSpecialistPoolRequest, SpecialistPool, UpdateSpecialistPoolOperationMetadata> + updateSpecialistPoolOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateSpecialistPoolOperationCallable()"); + } + + public UnaryCallable updateSpecialistPoolCallable() { + throw new UnsupportedOperationException("Not implemented: updateSpecialistPoolCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/SpecialistPoolServiceStubSettings.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/SpecialistPoolServiceStubSettings.java new file mode 100644 index 000000000..b9bf03dee --- /dev/null +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/SpecialistPoolServiceStubSettings.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. + */ + +package com.google.cloud.aiplatform.v1.stub; + +import static com.google.cloud.aiplatform.v1.SpecialistPoolServiceClient.ListSpecialistPoolsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1.CreateSpecialistPoolOperationMetadata; +import com.google.cloud.aiplatform.v1.CreateSpecialistPoolRequest; +import com.google.cloud.aiplatform.v1.DeleteOperationMetadata; +import com.google.cloud.aiplatform.v1.DeleteSpecialistPoolRequest; +import com.google.cloud.aiplatform.v1.GetSpecialistPoolRequest; +import com.google.cloud.aiplatform.v1.ListSpecialistPoolsRequest; +import com.google.cloud.aiplatform.v1.ListSpecialistPoolsResponse; +import com.google.cloud.aiplatform.v1.SpecialistPool; +import com.google.cloud.aiplatform.v1.UpdateSpecialistPoolOperationMetadata; +import com.google.cloud.aiplatform.v1.UpdateSpecialistPoolRequest; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link SpecialistPoolServiceStub}. + * + *

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

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

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

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

{@code
+ * SpecialistPoolServiceStubSettings.Builder specialistPoolServiceSettingsBuilder =
+ *     SpecialistPoolServiceStubSettings.newBuilder();
+ * specialistPoolServiceSettingsBuilder
+ *     .getSpecialistPoolSettings()
+ *     .setRetrySettings(
+ *         specialistPoolServiceSettingsBuilder
+ *             .getSpecialistPoolSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * SpecialistPoolServiceStubSettings specialistPoolServiceSettings =
+ *     specialistPoolServiceSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class SpecialistPoolServiceStubSettings + extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final UnaryCallSettings + createSpecialistPoolSettings; + private final OperationCallSettings< + CreateSpecialistPoolRequest, SpecialistPool, CreateSpecialistPoolOperationMetadata> + createSpecialistPoolOperationSettings; + private final UnaryCallSettings + getSpecialistPoolSettings; + private final PagedCallSettings< + ListSpecialistPoolsRequest, ListSpecialistPoolsResponse, ListSpecialistPoolsPagedResponse> + listSpecialistPoolsSettings; + private final UnaryCallSettings + deleteSpecialistPoolSettings; + private final OperationCallSettings + deleteSpecialistPoolOperationSettings; + private final UnaryCallSettings + updateSpecialistPoolSettings; + private final OperationCallSettings< + 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. */ + public OperationCallSettings< + CreateSpecialistPoolRequest, SpecialistPool, CreateSpecialistPoolOperationMetadata> + createSpecialistPoolOperationSettings() { + return createSpecialistPoolOperationSettings; + } + + /** Returns the object with the settings used for calls to getSpecialistPool. */ + public UnaryCallSettings getSpecialistPoolSettings() { + return getSpecialistPoolSettings; + } + + /** Returns the object with the settings used for calls to listSpecialistPools. */ + public PagedCallSettings< + ListSpecialistPoolsRequest, ListSpecialistPoolsResponse, ListSpecialistPoolsPagedResponse> + listSpecialistPoolsSettings() { + return listSpecialistPoolsSettings; + } + + /** Returns the object with the settings used for calls to deleteSpecialistPool. */ + public UnaryCallSettings deleteSpecialistPoolSettings() { + return deleteSpecialistPoolSettings; + } + + /** Returns the object with the settings used for calls to deleteSpecialistPool. */ + public OperationCallSettings + deleteSpecialistPoolOperationSettings() { + return deleteSpecialistPoolOperationSettings; + } + + /** Returns the object with the settings used for calls to updateSpecialistPool. */ + public UnaryCallSettings updateSpecialistPoolSettings() { + return updateSpecialistPoolSettings; + } + + /** Returns the object with the settings used for calls to updateSpecialistPool. */ + public OperationCallSettings< + UpdateSpecialistPoolRequest, SpecialistPool, UpdateSpecialistPoolOperationMetadata> + updateSpecialistPoolOperationSettings() { + return updateSpecialistPoolOperationSettings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public SpecialistPoolServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcSpecialistPoolServiceStub.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(SpecialistPoolServiceStubSettings.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 SpecialistPoolServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + createSpecialistPoolSettings = settingsBuilder.createSpecialistPoolSettings().build(); + createSpecialistPoolOperationSettings = + settingsBuilder.createSpecialistPoolOperationSettings().build(); + getSpecialistPoolSettings = settingsBuilder.getSpecialistPoolSettings().build(); + listSpecialistPoolsSettings = settingsBuilder.listSpecialistPoolsSettings().build(); + deleteSpecialistPoolSettings = settingsBuilder.deleteSpecialistPoolSettings().build(); + deleteSpecialistPoolOperationSettings = + settingsBuilder.deleteSpecialistPoolOperationSettings().build(); + updateSpecialistPoolSettings = settingsBuilder.updateSpecialistPoolSettings().build(); + updateSpecialistPoolOperationSettings = + settingsBuilder.updateSpecialistPoolOperationSettings().build(); + } + + /** Builder for SpecialistPoolServiceStubSettings. */ + public static class Builder + extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder + createSpecialistPoolSettings; + private final OperationCallSettings.Builder< + CreateSpecialistPoolRequest, SpecialistPool, CreateSpecialistPoolOperationMetadata> + createSpecialistPoolOperationSettings; + private final UnaryCallSettings.Builder + getSpecialistPoolSettings; + private final PagedCallSettings.Builder< + ListSpecialistPoolsRequest, + ListSpecialistPoolsResponse, + ListSpecialistPoolsPagedResponse> + listSpecialistPoolsSettings; + private final UnaryCallSettings.Builder + deleteSpecialistPoolSettings; + private final OperationCallSettings.Builder< + DeleteSpecialistPoolRequest, Empty, DeleteOperationMetadata> + deleteSpecialistPoolOperationSettings; + private final UnaryCallSettings.Builder + updateSpecialistPoolSettings; + 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_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + 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 = + ImmutableList.>of( + createSpecialistPoolSettings, + getSpecialistPoolSettings, + 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.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_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getSpecialistPoolSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listSpecialistPoolsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .deleteSpecialistPoolSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .updateSpecialistPoolSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .createSpecialistPoolOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(SpecialistPool.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + CreateSpecialistPoolOperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .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_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(DeleteOperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .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_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(SpecialistPool.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + UpdateSpecialistPoolOperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + return builder; + } + + // NEXT_MAJOR_VER: remove 'throws Exception'. + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to createSpecialistPool. */ + public UnaryCallSettings.Builder + createSpecialistPoolSettings() { + return createSpecialistPoolSettings; + } + + /** Returns the builder for 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.Builder< + CreateSpecialistPoolRequest, SpecialistPool, CreateSpecialistPoolOperationMetadata> + createSpecialistPoolOperationSettings() { + return createSpecialistPoolOperationSettings; + } + + /** Returns the builder for the settings used for calls to getSpecialistPool. */ + public UnaryCallSettings.Builder + getSpecialistPoolSettings() { + return getSpecialistPoolSettings; + } + + /** Returns the builder for the settings used for calls to listSpecialistPools. */ + public PagedCallSettings.Builder< + ListSpecialistPoolsRequest, + ListSpecialistPoolsResponse, + ListSpecialistPoolsPagedResponse> + listSpecialistPoolsSettings() { + return listSpecialistPoolsSettings; + } + + /** Returns the builder for the settings used for calls to deleteSpecialistPool. */ + public UnaryCallSettings.Builder + deleteSpecialistPoolSettings() { + return deleteSpecialistPoolSettings; + } + + /** Returns the builder for 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.Builder< + DeleteSpecialistPoolRequest, Empty, DeleteOperationMetadata> + deleteSpecialistPoolOperationSettings() { + return deleteSpecialistPoolOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateSpecialistPool. */ + public UnaryCallSettings.Builder + updateSpecialistPoolSettings() { + return updateSpecialistPoolSettings; + } + + /** Returns the builder for 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.Builder< + UpdateSpecialistPoolRequest, SpecialistPool, UpdateSpecialistPoolOperationMetadata> + updateSpecialistPoolOperationSettings() { + return updateSpecialistPoolOperationSettings; + } + + @Override + public SpecialistPoolServiceStubSettings build() throws IOException { + return new SpecialistPoolServiceStubSettings(this); + } + } +} 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 496de9e90..5b8927965 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 @@ -45,6 +45,13 @@ * 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: * + *

{@code
+ * 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 * as threads. In the example above, try-with-resources is used, which automatically calls close(). * @@ -160,6 +167,16 @@ public final OperationsClient getOperationsClient() { /** * Creates a Dataset. * + *

Sample code: + * + *

{@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. @@ -179,6 +196,16 @@ public final OperationFuture createData /** * Creates a Dataset. * + *

Sample code: + * + *

{@code
+   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   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. @@ -195,6 +222,19 @@ public final OperationFuture createData /** * Creates a Dataset. * + *

Sample code: + * + *

{@code
+   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
+   *   CreateDatasetRequest request =
+   *       CreateDatasetRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setDataset(Dataset.newBuilder().build())
+   *           .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 */ @@ -208,6 +248,20 @@ public final OperationFuture createData * Creates a Dataset. * *

Sample code: + * + *

{@code
+   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
+   *   CreateDatasetRequest request =
+   *       CreateDatasetRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setDataset(Dataset.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       datasetServiceClient.createDatasetOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Dataset response = future.get();
+   * }
+   * }
*/ public final OperationCallable createDatasetOperationCallable() { @@ -219,6 +273,20 @@ public final OperationFuture createData * Creates a Dataset. * *

Sample code: + * + *

{@code
+   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
+   *   CreateDatasetRequest request =
+   *       CreateDatasetRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setDataset(Dataset.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       datasetServiceClient.createDatasetCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
*/ public final UnaryCallable createDatasetCallable() { return stub.createDatasetCallable(); @@ -228,6 +296,15 @@ public final UnaryCallable createDatasetCallabl /** * Gets a Dataset. * + *

Sample code: + * + *

{@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 */ @@ -241,6 +318,15 @@ public final Dataset getDataset(DatasetName name) { /** * Gets a Dataset. * + *

Sample code: + * + *

{@code
+   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
+   *   String name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]").toString();
+   *   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 */ @@ -253,6 +339,19 @@ public final Dataset getDataset(String name) { /** * Gets a Dataset. * + *

Sample code: + * + *

{@code
+   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
+   *   GetDatasetRequest request =
+   *       GetDatasetRequest.newBuilder()
+   *           .setName(DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]").toString())
+   *           .setReadMask(FieldMask.newBuilder().build())
+   *           .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 */ @@ -265,6 +364,19 @@ public final Dataset getDataset(GetDatasetRequest request) { * Gets a Dataset. * *

Sample code: + * + *

{@code
+   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
+   *   GetDatasetRequest request =
+   *       GetDatasetRequest.newBuilder()
+   *           .setName(DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]").toString())
+   *           .setReadMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = datasetServiceClient.getDatasetCallable().futureCall(request);
+   *   // Do something.
+   *   Dataset response = future.get();
+   * }
+   * }
*/ public final UnaryCallable getDatasetCallable() { return stub.getDatasetCallable(); @@ -274,6 +386,16 @@ public final UnaryCallable getDatasetCallable() { /** * Updates a Dataset. * + *

Sample code: + * + *

{@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 @@ -292,6 +414,19 @@ public final Dataset updateDataset(Dataset dataset, FieldMask updateMask) { /** * Updates a Dataset. * + *

Sample code: + * + *

{@code
+   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
+   *   UpdateDatasetRequest request =
+   *       UpdateDatasetRequest.newBuilder()
+   *           .setDataset(Dataset.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .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 */ @@ -304,6 +439,19 @@ public final Dataset updateDataset(UpdateDatasetRequest request) { * Updates a Dataset. * *

Sample code: + * + *

{@code
+   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
+   *   UpdateDatasetRequest request =
+   *       UpdateDatasetRequest.newBuilder()
+   *           .setDataset(Dataset.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = datasetServiceClient.updateDatasetCallable().futureCall(request);
+   *   // Do something.
+   *   Dataset response = future.get();
+   * }
+   * }
*/ public final UnaryCallable updateDatasetCallable() { return stub.updateDatasetCallable(); @@ -313,6 +461,17 @@ public final UnaryCallable updateDatasetCallable( /** * Lists Datasets in a Location. * + *

Sample code: + * + *

{@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 @@ -329,6 +488,17 @@ public final ListDatasetsPagedResponse listDatasets(LocationName parent) { /** * Lists Datasets in a Location. * + *

Sample code: + * + *

{@code
+   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   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 @@ -342,6 +512,25 @@ public final ListDatasetsPagedResponse listDatasets(String parent) { /** * Lists Datasets in a Location. * + *

Sample code: + * + *

{@code
+   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
+   *   ListDatasetsRequest request =
+   *       ListDatasetsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setReadMask(FieldMask.newBuilder().build())
+   *           .setOrderBy("orderBy-1207110587")
+   *           .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 */ @@ -354,6 +543,26 @@ public final ListDatasetsPagedResponse listDatasets(ListDatasetsRequest request) * Lists Datasets in a Location. * *

Sample code: + * + *

{@code
+   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
+   *   ListDatasetsRequest request =
+   *       ListDatasetsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setReadMask(FieldMask.newBuilder().build())
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       datasetServiceClient.listDatasetsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Dataset element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listDatasetsPagedCallable() { @@ -365,6 +574,23 @@ public final ListDatasetsPagedResponse listDatasets(ListDatasetsRequest request) * Lists Datasets in a Location. * *

Sample code: + * + *

{@code
+   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
+   *   while (true) {
+   *     ListDatasetsResponse response = datasetServiceClient.listDatasetsCallable().call(request);
+   *     for (Dataset element : response.getResponsesList()) {
+   *       // 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(); @@ -374,6 +600,15 @@ public final UnaryCallable listDatase /** * Deletes a Dataset. * + *

Sample code: + * + *

{@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 @@ -389,6 +624,15 @@ public final OperationFuture deleteDatasetAsync( /** * Deletes a Dataset. * + *

Sample code: + * + *

{@code
+   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
+   *   String name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]").toString();
+   *   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 @@ -402,6 +646,18 @@ public final OperationFuture deleteDatasetAsync( /** * Deletes a Dataset. * + *

Sample code: + * + *

{@code
+   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
+   *   DeleteDatasetRequest request =
+   *       DeleteDatasetRequest.newBuilder()
+   *           .setName(DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]").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 */ @@ -415,6 +671,19 @@ public final OperationFuture deleteDatasetAsync( * Deletes a Dataset. * *

Sample code: + * + *

{@code
+   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
+   *   DeleteDatasetRequest request =
+   *       DeleteDatasetRequest.newBuilder()
+   *           .setName(DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]").toString())
+   *           .build();
+   *   OperationFuture future =
+   *       datasetServiceClient.deleteDatasetOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
*/ public final OperationCallable deleteDatasetOperationCallable() { @@ -426,6 +695,19 @@ public final OperationFuture deleteDatasetAsync( * Deletes a Dataset. * *

Sample code: + * + *

{@code
+   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
+   *   DeleteDatasetRequest request =
+   *       DeleteDatasetRequest.newBuilder()
+   *           .setName(DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       datasetServiceClient.deleteDatasetCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
*/ public final UnaryCallable deleteDatasetCallable() { return stub.deleteDatasetCallable(); @@ -435,6 +717,16 @@ public final UnaryCallable deleteDatasetCallabl /** * Imports data into a Dataset. * + *

Sample code: + * + *

{@code
+   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
+   *   DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
+   *   List 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 @@ -455,6 +747,16 @@ public final OperationFuture im /** * Imports data into a Dataset. * + *

Sample code: + * + *

{@code
+   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
+   *   String name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]").toString();
+   *   List 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 @@ -472,6 +774,19 @@ public final OperationFuture im /** * Imports data into a Dataset. * + *

Sample code: + * + *

{@code
+   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
+   *   ImportDataRequest request =
+   *       ImportDataRequest.newBuilder()
+   *           .setName(DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]").toString())
+   *           .addAllImportConfigs(new ArrayList())
+   *           .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 */ @@ -485,6 +800,20 @@ public final OperationFuture im * Imports data into a Dataset. * *

Sample code: + * + *

{@code
+   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
+   *   ImportDataRequest request =
+   *       ImportDataRequest.newBuilder()
+   *           .setName(DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]").toString())
+   *           .addAllImportConfigs(new ArrayList())
+   *           .build();
+   *   OperationFuture future =
+   *       datasetServiceClient.importDataOperationCallable().futureCall(request);
+   *   // Do something.
+   *   ImportDataResponse response = future.get();
+   * }
+   * }
*/ public final OperationCallable importDataOperationCallable() { @@ -496,6 +825,19 @@ public final OperationFuture im * Imports data into a Dataset. * *

Sample code: + * + *

{@code
+   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
+   *   ImportDataRequest request =
+   *       ImportDataRequest.newBuilder()
+   *           .setName(DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]").toString())
+   *           .addAllImportConfigs(new ArrayList())
+   *           .build();
+   *   ApiFuture future = datasetServiceClient.importDataCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
*/ public final UnaryCallable importDataCallable() { return stub.importDataCallable(); @@ -505,6 +847,16 @@ public final UnaryCallable importDataCallable() { /** * Exports data from a Dataset. * + *

Sample code: + * + *

{@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. @@ -524,6 +876,16 @@ public final OperationFuture ex /** * Exports data from a Dataset. * + *

Sample code: + * + *

{@code
+   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
+   *   String name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]").toString();
+   *   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. @@ -540,6 +902,19 @@ public final OperationFuture ex /** * Exports data from a Dataset. * + *

Sample code: + * + *

{@code
+   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
+   *   ExportDataRequest request =
+   *       ExportDataRequest.newBuilder()
+   *           .setName(DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]").toString())
+   *           .setExportConfig(ExportDataConfig.newBuilder().build())
+   *           .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 */ @@ -553,6 +928,20 @@ public final OperationFuture ex * Exports data from a Dataset. * *

Sample code: + * + *

{@code
+   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
+   *   ExportDataRequest request =
+   *       ExportDataRequest.newBuilder()
+   *           .setName(DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]").toString())
+   *           .setExportConfig(ExportDataConfig.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       datasetServiceClient.exportDataOperationCallable().futureCall(request);
+   *   // Do something.
+   *   ExportDataResponse response = future.get();
+   * }
+   * }
*/ public final OperationCallable exportDataOperationCallable() { @@ -564,6 +953,19 @@ public final OperationFuture ex * Exports data from a Dataset. * *

Sample code: + * + *

{@code
+   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
+   *   ExportDataRequest request =
+   *       ExportDataRequest.newBuilder()
+   *           .setName(DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]").toString())
+   *           .setExportConfig(ExportDataConfig.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = datasetServiceClient.exportDataCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
*/ public final UnaryCallable exportDataCallable() { return stub.exportDataCallable(); @@ -573,6 +975,17 @@ public final UnaryCallable exportDataCallable() { /** * Lists DataItems in a Dataset. * + *

Sample code: + * + *

{@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 @@ -589,6 +1002,17 @@ public final ListDataItemsPagedResponse listDataItems(DatasetName parent) { /** * Lists DataItems in a Dataset. * + *

Sample code: + * + *

{@code
+   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
+   *   String parent = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]").toString();
+   *   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 @@ -602,6 +1026,25 @@ public final ListDataItemsPagedResponse listDataItems(String parent) { /** * Lists DataItems in a Dataset. * + *

Sample code: + * + *

{@code
+   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
+   *   ListDataItemsRequest request =
+   *       ListDataItemsRequest.newBuilder()
+   *           .setParent(DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setReadMask(FieldMask.newBuilder().build())
+   *           .setOrderBy("orderBy-1207110587")
+   *           .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 */ @@ -614,6 +1057,26 @@ public final ListDataItemsPagedResponse listDataItems(ListDataItemsRequest reque * Lists DataItems in a Dataset. * *

Sample code: + * + *

{@code
+   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
+   *   ListDataItemsRequest request =
+   *       ListDataItemsRequest.newBuilder()
+   *           .setParent(DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setReadMask(FieldMask.newBuilder().build())
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       datasetServiceClient.listDataItemsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (DataItem element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listDataItemsPagedCallable() { @@ -625,6 +1088,23 @@ public final ListDataItemsPagedResponse listDataItems(ListDataItemsRequest reque * Lists DataItems in a Dataset. * *

Sample code: + * + *

{@code
+   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
+   *   while (true) {
+   *     ListDataItemsResponse response = datasetServiceClient.listDataItemsCallable().call(request);
+   *     for (DataItem element : response.getResponsesList()) {
+   *       // 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(); @@ -634,6 +1114,16 @@ public final UnaryCallable listData /** * Gets an AnnotationSpec. * + *

Sample code: + * + *

{@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 @@ -650,6 +1140,17 @@ public final AnnotationSpec getAnnotationSpec(AnnotationSpecName name) { /** * Gets an AnnotationSpec. * + *

Sample code: + * + *

{@code
+   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
+   *   String name =
+   *       AnnotationSpecName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[ANNOTATION_SPEC]")
+   *           .toString();
+   *   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 @@ -663,6 +1164,21 @@ public final AnnotationSpec getAnnotationSpec(String name) { /** * Gets an AnnotationSpec. * + *

Sample code: + * + *

{@code
+   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
+   *   GetAnnotationSpecRequest request =
+   *       GetAnnotationSpecRequest.newBuilder()
+   *           .setName(
+   *               AnnotationSpecName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[ANNOTATION_SPEC]")
+   *                   .toString())
+   *           .setReadMask(FieldMask.newBuilder().build())
+   *           .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 */ @@ -675,6 +1191,22 @@ public final AnnotationSpec getAnnotationSpec(GetAnnotationSpecRequest request) * Gets an AnnotationSpec. * *

Sample code: + * + *

{@code
+   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
+   *   GetAnnotationSpecRequest request =
+   *       GetAnnotationSpecRequest.newBuilder()
+   *           .setName(
+   *               AnnotationSpecName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[ANNOTATION_SPEC]")
+   *                   .toString())
+   *           .setReadMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       datasetServiceClient.getAnnotationSpecCallable().futureCall(request);
+   *   // Do something.
+   *   AnnotationSpec response = future.get();
+   * }
+   * }
*/ public final UnaryCallable getAnnotationSpecCallable() { return stub.getAnnotationSpecCallable(); @@ -684,6 +1216,17 @@ public final UnaryCallable getAnnotati /** * Lists Annotations belongs to a dataitem * + *

Sample code: + * + *

{@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 @@ -700,6 +1243,18 @@ public final ListAnnotationsPagedResponse listAnnotations(DataItemName parent) { /** * Lists Annotations belongs to a dataitem * + *

Sample code: + * + *

{@code
+   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
+   *   String parent =
+   *       DataItemName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[DATA_ITEM]").toString();
+   *   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 @@ -713,6 +1268,26 @@ public final ListAnnotationsPagedResponse listAnnotations(String parent) { /** * Lists Annotations belongs to a dataitem * + *

Sample code: + * + *

{@code
+   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
+   *   ListAnnotationsRequest request =
+   *       ListAnnotationsRequest.newBuilder()
+   *           .setParent(
+   *               DataItemName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[DATA_ITEM]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setReadMask(FieldMask.newBuilder().build())
+   *           .setOrderBy("orderBy-1207110587")
+   *           .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 */ @@ -725,6 +1300,27 @@ public final ListAnnotationsPagedResponse listAnnotations(ListAnnotationsRequest * Lists Annotations belongs to a dataitem * *

Sample code: + * + *

{@code
+   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
+   *   ListAnnotationsRequest request =
+   *       ListAnnotationsRequest.newBuilder()
+   *           .setParent(
+   *               DataItemName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[DATA_ITEM]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setReadMask(FieldMask.newBuilder().build())
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       datasetServiceClient.listAnnotationsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Annotation element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listAnnotationsPagedCallable() { @@ -736,6 +1332,24 @@ public final ListAnnotationsPagedResponse listAnnotations(ListAnnotationsRequest * Lists Annotations belongs to a dataitem * *

Sample code: + * + *

{@code
+   * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
+   *   while (true) {
+   *     ListAnnotationsResponse response =
+   *         datasetServiceClient.listAnnotationsCallable().call(request);
+   *     for (Annotation element : response.getResponsesList()) {
+   *       // 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/EndpointServiceClient.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/EndpointServiceClient.java index 83b583f35..eb1647f5e 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 @@ -46,6 +46,13 @@ * 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: * + *
{@code
+ * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
+ *   EndpointName name = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
+ *   Endpoint response = endpointServiceClient.getEndpoint(name);
+ * }
+ * }
+ * *

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(). @@ -164,6 +171,16 @@ public final OperationsClient getOperationsClient() { /** * Creates an Endpoint. * + *

Sample code: + * + *

{@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. @@ -183,6 +200,16 @@ public final OperationFuture createEn /** * Creates an Endpoint. * + *

Sample code: + * + *

{@code
+   * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   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. @@ -199,6 +226,19 @@ public final OperationFuture createEn /** * Creates an Endpoint. * + *

Sample code: + * + *

{@code
+   * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
+   *   CreateEndpointRequest request =
+   *       CreateEndpointRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setEndpoint(Endpoint.newBuilder().build())
+   *           .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 */ @@ -212,6 +252,20 @@ public final OperationFuture createEn * Creates an Endpoint. * *

Sample code: + * + *

{@code
+   * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
+   *   CreateEndpointRequest request =
+   *       CreateEndpointRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setEndpoint(Endpoint.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       endpointServiceClient.createEndpointOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Endpoint response = future.get();
+   * }
+   * }
*/ public final OperationCallable createEndpointOperationCallable() { @@ -223,6 +277,20 @@ public final OperationFuture createEn * Creates an Endpoint. * *

Sample code: + * + *

{@code
+   * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
+   *   CreateEndpointRequest request =
+   *       CreateEndpointRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setEndpoint(Endpoint.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       endpointServiceClient.createEndpointCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
*/ public final UnaryCallable createEndpointCallable() { return stub.createEndpointCallable(); @@ -232,6 +300,15 @@ public final UnaryCallable createEndpointCalla /** * Gets an Endpoint. * + *

Sample code: + * + *

{@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 @@ -246,6 +323,15 @@ public final Endpoint getEndpoint(EndpointName name) { /** * Gets an Endpoint. * + *

Sample code: + * + *

{@code
+   * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
+   *   String name = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]").toString();
+   *   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 @@ -259,6 +345,18 @@ public final Endpoint getEndpoint(String name) { /** * Gets an Endpoint. * + *

Sample code: + * + *

{@code
+   * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
+   *   GetEndpointRequest request =
+   *       GetEndpointRequest.newBuilder()
+   *           .setName(EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]").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 */ @@ -271,6 +369,18 @@ public final Endpoint getEndpoint(GetEndpointRequest request) { * Gets an Endpoint. * *

Sample code: + * + *

{@code
+   * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
+   *   GetEndpointRequest request =
+   *       GetEndpointRequest.newBuilder()
+   *           .setName(EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]").toString())
+   *           .build();
+   *   ApiFuture future = endpointServiceClient.getEndpointCallable().futureCall(request);
+   *   // Do something.
+   *   Endpoint response = future.get();
+   * }
+   * }
*/ public final UnaryCallable getEndpointCallable() { return stub.getEndpointCallable(); @@ -280,6 +390,17 @@ public final UnaryCallable getEndpointCallable() { /** * Lists Endpoints in a Location. * + *

Sample code: + * + *

{@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 @@ -296,6 +417,17 @@ public final ListEndpointsPagedResponse listEndpoints(LocationName parent) { /** * Lists Endpoints in a Location. * + *

Sample code: + * + *

{@code
+   * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   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 @@ -309,6 +441,24 @@ public final ListEndpointsPagedResponse listEndpoints(String parent) { /** * Lists Endpoints in a Location. * + *

Sample code: + * + *

{@code
+   * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
+   *   ListEndpointsRequest request =
+   *       ListEndpointsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setReadMask(FieldMask.newBuilder().build())
+   *           .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 */ @@ -321,6 +471,25 @@ public final ListEndpointsPagedResponse listEndpoints(ListEndpointsRequest reque * Lists Endpoints in a Location. * *

Sample code: + * + *

{@code
+   * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
+   *   ListEndpointsRequest request =
+   *       ListEndpointsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setReadMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       endpointServiceClient.listEndpointsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Endpoint element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listEndpointsPagedCallable() { @@ -332,6 +501,24 @@ public final ListEndpointsPagedResponse listEndpoints(ListEndpointsRequest reque * Lists Endpoints in a Location. * *

Sample code: + * + *

{@code
+   * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
+   *   while (true) {
+   *     ListEndpointsResponse response =
+   *         endpointServiceClient.listEndpointsCallable().call(request);
+   *     for (Endpoint element : response.getResponsesList()) {
+   *       // 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(); @@ -341,6 +528,16 @@ public final UnaryCallable listEndp /** * Updates an Endpoint. * + *

Sample code: + * + *

{@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 @@ -355,6 +552,19 @@ public final Endpoint updateEndpoint(Endpoint endpoint, FieldMask updateMask) { /** * Updates an Endpoint. * + *

Sample code: + * + *

{@code
+   * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
+   *   UpdateEndpointRequest request =
+   *       UpdateEndpointRequest.newBuilder()
+   *           .setEndpoint(Endpoint.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .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 */ @@ -367,6 +577,20 @@ public final Endpoint updateEndpoint(UpdateEndpointRequest request) { * Updates an Endpoint. * *

Sample code: + * + *

{@code
+   * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
+   *   UpdateEndpointRequest request =
+   *       UpdateEndpointRequest.newBuilder()
+   *           .setEndpoint(Endpoint.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       endpointServiceClient.updateEndpointCallable().futureCall(request);
+   *   // Do something.
+   *   Endpoint response = future.get();
+   * }
+   * }
*/ public final UnaryCallable updateEndpointCallable() { return stub.updateEndpointCallable(); @@ -376,6 +600,15 @@ public final UnaryCallable updateEndpointCallab /** * Deletes an Endpoint. * + *

Sample code: + * + *

{@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 @@ -391,6 +624,15 @@ public final OperationFuture deleteEndpointAsync /** * Deletes an Endpoint. * + *

Sample code: + * + *

{@code
+   * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
+   *   String name = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]").toString();
+   *   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 @@ -404,6 +646,18 @@ public final OperationFuture deleteEndpointAsync /** * Deletes an Endpoint. * + *

Sample code: + * + *

{@code
+   * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
+   *   DeleteEndpointRequest request =
+   *       DeleteEndpointRequest.newBuilder()
+   *           .setName(EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]").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 */ @@ -417,6 +671,19 @@ public final OperationFuture deleteEndpointAsync * Deletes an Endpoint. * *

Sample code: + * + *

{@code
+   * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
+   *   DeleteEndpointRequest request =
+   *       DeleteEndpointRequest.newBuilder()
+   *           .setName(EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]").toString())
+   *           .build();
+   *   OperationFuture future =
+   *       endpointServiceClient.deleteEndpointOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
*/ public final OperationCallable deleteEndpointOperationCallable() { @@ -428,6 +695,19 @@ public final OperationFuture deleteEndpointAsync * Deletes an Endpoint. * *

Sample code: + * + *

{@code
+   * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
+   *   DeleteEndpointRequest request =
+   *       DeleteEndpointRequest.newBuilder()
+   *           .setName(EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       endpointServiceClient.deleteEndpointCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
*/ public final UnaryCallable deleteEndpointCallable() { return stub.deleteEndpointCallable(); @@ -437,6 +717,18 @@ public final UnaryCallable deleteEndpointCalla /** * Deploys a Model into this Endpoint, creating a DeployedModel within it. * + *

Sample code: + * + *

{@code
+   * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
+   *   EndpointName endpoint = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
+   *   DeployedModel deployedModel = DeployedModel.newBuilder().build();
+   *   Map 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 @@ -470,6 +762,18 @@ public final OperationFuture /** * Deploys a Model into this Endpoint, creating a DeployedModel within it. * + *

Sample code: + * + *

{@code
+   * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
+   *   String endpoint = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]").toString();
+   *   DeployedModel deployedModel = DeployedModel.newBuilder().build();
+   *   Map 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 @@ -503,6 +807,20 @@ public final OperationFuture /** * Deploys a Model into this Endpoint, creating a DeployedModel within it. * + *

Sample code: + * + *

{@code
+   * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
+   *   DeployModelRequest request =
+   *       DeployModelRequest.newBuilder()
+   *           .setEndpoint(EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]").toString())
+   *           .setDeployedModel(DeployedModel.newBuilder().build())
+   *           .putAllTrafficSplit(new HashMap())
+   *           .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 */ @@ -516,6 +834,21 @@ public final OperationFuture * Deploys a Model into this Endpoint, creating a DeployedModel within it. * *

Sample code: + * + *

{@code
+   * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
+   *   DeployModelRequest request =
+   *       DeployModelRequest.newBuilder()
+   *           .setEndpoint(EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]").toString())
+   *           .setDeployedModel(DeployedModel.newBuilder().build())
+   *           .putAllTrafficSplit(new HashMap())
+   *           .build();
+   *   OperationFuture future =
+   *       endpointServiceClient.deployModelOperationCallable().futureCall(request);
+   *   // Do something.
+   *   DeployModelResponse response = future.get();
+   * }
+   * }
*/ public final OperationCallable< DeployModelRequest, DeployModelResponse, DeployModelOperationMetadata> @@ -528,6 +861,20 @@ public final OperationFuture * Deploys a Model into this Endpoint, creating a DeployedModel within it. * *

Sample code: + * + *

{@code
+   * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
+   *   DeployModelRequest request =
+   *       DeployModelRequest.newBuilder()
+   *           .setEndpoint(EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]").toString())
+   *           .setDeployedModel(DeployedModel.newBuilder().build())
+   *           .putAllTrafficSplit(new HashMap())
+   *           .build();
+   *   ApiFuture future = endpointServiceClient.deployModelCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
*/ public final UnaryCallable deployModelCallable() { return stub.deployModelCallable(); @@ -538,6 +885,18 @@ public final UnaryCallable deployModelCallable() * Undeploys a Model from an Endpoint, removing a DeployedModel from it, and freeing all resources * it's using. * + *

Sample code: + * + *

{@code
+   * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
+   *   EndpointName endpoint = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
+   *   String deployedModelId = "deployedModelId-1817547906";
+   *   Map 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 @@ -567,6 +926,18 @@ public final UnaryCallable deployModelCallable() * Undeploys a Model from an Endpoint, removing a DeployedModel from it, and freeing all resources * it's using. * + *

Sample code: + * + *

{@code
+   * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
+   *   String endpoint = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]").toString();
+   *   String deployedModelId = "deployedModelId-1817547906";
+   *   Map 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 @@ -596,6 +967,20 @@ public final UnaryCallable deployModelCallable() * Undeploys a Model from an Endpoint, removing a DeployedModel from it, and freeing all resources * it's using. * + *

Sample code: + * + *

{@code
+   * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
+   *   UndeployModelRequest request =
+   *       UndeployModelRequest.newBuilder()
+   *           .setEndpoint(EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]").toString())
+   *           .setDeployedModelId("deployedModelId-1817547906")
+   *           .putAllTrafficSplit(new HashMap())
+   *           .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 */ @@ -610,6 +995,21 @@ public final UnaryCallable deployModelCallable() * it's using. * *

Sample code: + * + *

{@code
+   * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
+   *   UndeployModelRequest request =
+   *       UndeployModelRequest.newBuilder()
+   *           .setEndpoint(EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]").toString())
+   *           .setDeployedModelId("deployedModelId-1817547906")
+   *           .putAllTrafficSplit(new HashMap())
+   *           .build();
+   *   OperationFuture future =
+   *       endpointServiceClient.undeployModelOperationCallable().futureCall(request);
+   *   // Do something.
+   *   UndeployModelResponse response = future.get();
+   * }
+   * }
*/ public final OperationCallable< UndeployModelRequest, UndeployModelResponse, UndeployModelOperationMetadata> @@ -623,6 +1023,21 @@ public final UnaryCallable deployModelCallable() * it's using. * *

Sample code: + * + *

{@code
+   * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
+   *   UndeployModelRequest request =
+   *       UndeployModelRequest.newBuilder()
+   *           .setEndpoint(EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]").toString())
+   *           .setDeployedModelId("deployedModelId-1817547906")
+   *           .putAllTrafficSplit(new HashMap())
+   *           .build();
+   *   ApiFuture 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/JobServiceClient.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/JobServiceClient.java index 7425d2019..37dc51504 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 @@ -46,6 +46,14 @@ *

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: * + *

{@code
+ * 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 * threads. In the example above, try-with-resources is used, which automatically calls close(). * @@ -159,6 +167,16 @@ public final OperationsClient getOperationsClient() { /** * Creates a CustomJob. A created CustomJob right away will be attempted to be run. * + *

Sample code: + * + *

{@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. @@ -177,6 +195,16 @@ public final CustomJob createCustomJob(LocationName parent, CustomJob customJob) /** * Creates a CustomJob. A created CustomJob right away will be attempted to be run. * + *

Sample code: + * + *

{@code
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   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. @@ -192,6 +220,19 @@ public final CustomJob createCustomJob(String parent, CustomJob customJob) { /** * Creates a CustomJob. A created CustomJob right away will be attempted to be run. * + *

Sample code: + * + *

{@code
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   CreateCustomJobRequest request =
+   *       CreateCustomJobRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setCustomJob(CustomJob.newBuilder().build())
+   *           .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 */ @@ -204,6 +245,19 @@ public final CustomJob createCustomJob(CreateCustomJobRequest request) { * Creates a CustomJob. A created CustomJob right away will be attempted to be run. * *

Sample code: + * + *

{@code
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   CreateCustomJobRequest request =
+   *       CreateCustomJobRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setCustomJob(CustomJob.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = jobServiceClient.createCustomJobCallable().futureCall(request);
+   *   // Do something.
+   *   CustomJob response = future.get();
+   * }
+   * }
*/ public final UnaryCallable createCustomJobCallable() { return stub.createCustomJobCallable(); @@ -213,6 +267,15 @@ public final UnaryCallable createCustomJobCal /** * Gets a CustomJob. * + *

Sample code: + * + *

{@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 @@ -227,6 +290,15 @@ public final CustomJob getCustomJob(CustomJobName name) { /** * Gets a CustomJob. * + *

Sample code: + * + *

{@code
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   String name = CustomJobName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]").toString();
+   *   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 @@ -240,6 +312,18 @@ public final CustomJob getCustomJob(String name) { /** * Gets a CustomJob. * + *

Sample code: + * + *

{@code
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   GetCustomJobRequest request =
+   *       GetCustomJobRequest.newBuilder()
+   *           .setName(CustomJobName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]").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 */ @@ -252,6 +336,18 @@ public final CustomJob getCustomJob(GetCustomJobRequest request) { * Gets a CustomJob. * *

Sample code: + * + *

{@code
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   GetCustomJobRequest request =
+   *       GetCustomJobRequest.newBuilder()
+   *           .setName(CustomJobName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]").toString())
+   *           .build();
+   *   ApiFuture future = jobServiceClient.getCustomJobCallable().futureCall(request);
+   *   // Do something.
+   *   CustomJob response = future.get();
+   * }
+   * }
*/ public final UnaryCallable getCustomJobCallable() { return stub.getCustomJobCallable(); @@ -261,6 +357,17 @@ public final UnaryCallable getCustomJobCallable( /** * Lists CustomJobs in a Location. * + *

Sample code: + * + *

{@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 @@ -277,6 +384,17 @@ public final ListCustomJobsPagedResponse listCustomJobs(LocationName parent) { /** * Lists CustomJobs in a Location. * + *

Sample code: + * + *

{@code
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   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 @@ -290,6 +408,24 @@ public final ListCustomJobsPagedResponse listCustomJobs(String parent) { /** * Lists CustomJobs in a Location. * + *

Sample code: + * + *

{@code
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   ListCustomJobsRequest request =
+   *       ListCustomJobsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setReadMask(FieldMask.newBuilder().build())
+   *           .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 */ @@ -302,6 +438,25 @@ public final ListCustomJobsPagedResponse listCustomJobs(ListCustomJobsRequest re * Lists CustomJobs in a Location. * *

Sample code: + * + *

{@code
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   ListCustomJobsRequest request =
+   *       ListCustomJobsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setReadMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       jobServiceClient.listCustomJobsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (CustomJob element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listCustomJobsPagedCallable() { @@ -313,6 +468,23 @@ public final ListCustomJobsPagedResponse listCustomJobs(ListCustomJobsRequest re * Lists CustomJobs in a Location. * *

Sample code: + * + *

{@code
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   while (true) {
+   *     ListCustomJobsResponse response = jobServiceClient.listCustomJobsCallable().call(request);
+   *     for (CustomJob element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listCustomJobsCallable() { @@ -323,6 +495,15 @@ public final ListCustomJobsPagedResponse listCustomJobs(ListCustomJobsRequest re /** * Deletes a CustomJob. * + *

Sample code: + * + *

{@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 @@ -338,6 +519,15 @@ public final OperationFuture deleteCustomJobAsyn /** * Deletes a CustomJob. * + *

Sample code: + * + *

{@code
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   String name = CustomJobName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]").toString();
+   *   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 @@ -351,6 +541,18 @@ public final OperationFuture deleteCustomJobAsyn /** * Deletes a CustomJob. * + *

Sample code: + * + *

{@code
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   DeleteCustomJobRequest request =
+   *       DeleteCustomJobRequest.newBuilder()
+   *           .setName(CustomJobName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]").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 */ @@ -364,6 +566,19 @@ public final OperationFuture deleteCustomJobAsyn * Deletes a CustomJob. * *

Sample code: + * + *

{@code
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   DeleteCustomJobRequest request =
+   *       DeleteCustomJobRequest.newBuilder()
+   *           .setName(CustomJobName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]").toString())
+   *           .build();
+   *   OperationFuture future =
+   *       jobServiceClient.deleteCustomJobOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
*/ public final OperationCallable deleteCustomJobOperationCallable() { @@ -375,6 +590,18 @@ public final OperationFuture deleteCustomJobAsyn * Deletes a CustomJob. * *

Sample code: + * + *

{@code
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   DeleteCustomJobRequest request =
+   *       DeleteCustomJobRequest.newBuilder()
+   *           .setName(CustomJobName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]").toString())
+   *           .build();
+   *   ApiFuture future = jobServiceClient.deleteCustomJobCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
*/ public final UnaryCallable deleteCustomJobCallable() { return stub.deleteCustomJobCallable(); @@ -391,6 +618,15 @@ 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: + * + *

{@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 @@ -412,6 +648,15 @@ 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: + * + *

{@code
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   String name = CustomJobName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]").toString();
+   *   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 @@ -432,6 +677,18 @@ 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: + * + *

{@code
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   CancelCustomJobRequest request =
+   *       CancelCustomJobRequest.newBuilder()
+   *           .setName(CustomJobName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]").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 */ @@ -451,6 +708,18 @@ public final void cancelCustomJob(CancelCustomJobRequest request) { * [CustomJob.state][google.cloud.aiplatform.v1beta1.CustomJob.state] is set to `CANCELLED`. * *

Sample code: + * + *

{@code
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   CancelCustomJobRequest request =
+   *       CancelCustomJobRequest.newBuilder()
+   *           .setName(CustomJobName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]").toString())
+   *           .build();
+   *   ApiFuture future = jobServiceClient.cancelCustomJobCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
*/ public final UnaryCallable cancelCustomJobCallable() { return stub.cancelCustomJobCallable(); @@ -460,6 +729,16 @@ public final UnaryCallable cancelCustomJobCallabl /** * Creates a DataLabelingJob. * + *

Sample code: + * + *

{@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. @@ -479,6 +758,16 @@ public final DataLabelingJob createDataLabelingJob( /** * Creates a DataLabelingJob. * + *

Sample code: + * + *

{@code
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   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. @@ -498,6 +787,19 @@ public final DataLabelingJob createDataLabelingJob( /** * Creates a DataLabelingJob. * + *

Sample code: + * + *

{@code
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   CreateDataLabelingJobRequest request =
+   *       CreateDataLabelingJobRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setDataLabelingJob(DataLabelingJob.newBuilder().build())
+   *           .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 */ @@ -510,6 +812,20 @@ public final DataLabelingJob createDataLabelingJob(CreateDataLabelingJobRequest * Creates a DataLabelingJob. * *

Sample code: + * + *

{@code
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   CreateDataLabelingJobRequest request =
+   *       CreateDataLabelingJobRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setDataLabelingJob(DataLabelingJob.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       jobServiceClient.createDataLabelingJobCallable().futureCall(request);
+   *   // Do something.
+   *   DataLabelingJob response = future.get();
+   * }
+   * }
*/ public final UnaryCallable createDataLabelingJobCallable() { @@ -520,6 +836,16 @@ public final DataLabelingJob createDataLabelingJob(CreateDataLabelingJobRequest /** * Gets a DataLabelingJob. * + *

Sample code: + * + *

{@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 @@ -536,6 +862,16 @@ public final DataLabelingJob getDataLabelingJob(DataLabelingJobName name) { /** * Gets a DataLabelingJob. * + *

Sample code: + * + *

{@code
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   String name =
+   *       DataLabelingJobName.of("[PROJECT]", "[LOCATION]", "[DATA_LABELING_JOB]").toString();
+   *   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 @@ -550,6 +886,20 @@ public final DataLabelingJob getDataLabelingJob(String name) { /** * Gets a DataLabelingJob. * + *

Sample code: + * + *

{@code
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   GetDataLabelingJobRequest request =
+   *       GetDataLabelingJobRequest.newBuilder()
+   *           .setName(
+   *               DataLabelingJobName.of("[PROJECT]", "[LOCATION]", "[DATA_LABELING_JOB]")
+   *                   .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 */ @@ -562,6 +912,21 @@ public final DataLabelingJob getDataLabelingJob(GetDataLabelingJobRequest reques * Gets a DataLabelingJob. * *

Sample code: + * + *

{@code
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   GetDataLabelingJobRequest request =
+   *       GetDataLabelingJobRequest.newBuilder()
+   *           .setName(
+   *               DataLabelingJobName.of("[PROJECT]", "[LOCATION]", "[DATA_LABELING_JOB]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       jobServiceClient.getDataLabelingJobCallable().futureCall(request);
+   *   // Do something.
+   *   DataLabelingJob response = future.get();
+   * }
+   * }
*/ public final UnaryCallable getDataLabelingJobCallable() { @@ -572,6 +937,17 @@ public final DataLabelingJob getDataLabelingJob(GetDataLabelingJobRequest reques /** * Lists DataLabelingJobs in a Location. * + *

Sample code: + * + *

{@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 @@ -588,6 +964,17 @@ public final ListDataLabelingJobsPagedResponse listDataLabelingJobs(LocationName /** * Lists DataLabelingJobs in a Location. * + *

Sample code: + * + *

{@code
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   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 @@ -602,6 +989,25 @@ public final ListDataLabelingJobsPagedResponse listDataLabelingJobs(String paren /** * Lists DataLabelingJobs in a Location. * + *

Sample code: + * + *

{@code
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   ListDataLabelingJobsRequest request =
+   *       ListDataLabelingJobsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setReadMask(FieldMask.newBuilder().build())
+   *           .setOrderBy("orderBy-1207110587")
+   *           .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 */ @@ -615,6 +1021,26 @@ public final ListDataLabelingJobsPagedResponse listDataLabelingJobs( * Lists DataLabelingJobs in a Location. * *

Sample code: + * + *

{@code
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   ListDataLabelingJobsRequest request =
+   *       ListDataLabelingJobsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setReadMask(FieldMask.newBuilder().build())
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       jobServiceClient.listDataLabelingJobsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (DataLabelingJob element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listDataLabelingJobsPagedCallable() { @@ -626,6 +1052,24 @@ public final ListDataLabelingJobsPagedResponse listDataLabelingJobs( * Lists DataLabelingJobs in a Location. * *

Sample code: + * + *

{@code
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   while (true) {
+   *     ListDataLabelingJobsResponse response =
+   *         jobServiceClient.listDataLabelingJobsCallable().call(request);
+   *     for (DataLabelingJob element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listDataLabelingJobsCallable() { @@ -636,6 +1080,16 @@ public final ListDataLabelingJobsPagedResponse listDataLabelingJobs( /** * Deletes a DataLabelingJob. * + *

Sample code: + * + *

{@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 @@ -653,6 +1107,16 @@ public final OperationFuture deleteDataLabelingJ /** * Deletes a DataLabelingJob. * + *

Sample code: + * + *

{@code
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   String name =
+   *       DataLabelingJobName.of("[PROJECT]", "[LOCATION]", "[DATA_LABELING_JOB]").toString();
+   *   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 @@ -668,6 +1132,20 @@ public final OperationFuture deleteDataLabelingJ /** * Deletes a DataLabelingJob. * + *

Sample code: + * + *

{@code
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   DeleteDataLabelingJobRequest request =
+   *       DeleteDataLabelingJobRequest.newBuilder()
+   *           .setName(
+   *               DataLabelingJobName.of("[PROJECT]", "[LOCATION]", "[DATA_LABELING_JOB]")
+   *                   .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 */ @@ -681,6 +1159,21 @@ public final OperationFuture deleteDataLabelingJ * Deletes a DataLabelingJob. * *

Sample code: + * + *

{@code
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   DeleteDataLabelingJobRequest request =
+   *       DeleteDataLabelingJobRequest.newBuilder()
+   *           .setName(
+   *               DataLabelingJobName.of("[PROJECT]", "[LOCATION]", "[DATA_LABELING_JOB]")
+   *                   .toString())
+   *           .build();
+   *   OperationFuture future =
+   *       jobServiceClient.deleteDataLabelingJobOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
*/ public final OperationCallable deleteDataLabelingJobOperationCallable() { @@ -692,6 +1185,21 @@ public final OperationFuture deleteDataLabelingJ * Deletes a DataLabelingJob. * *

Sample code: + * + *

{@code
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   DeleteDataLabelingJobRequest request =
+   *       DeleteDataLabelingJobRequest.newBuilder()
+   *           .setName(
+   *               DataLabelingJobName.of("[PROJECT]", "[LOCATION]", "[DATA_LABELING_JOB]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       jobServiceClient.deleteDataLabelingJobCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
*/ public final UnaryCallable deleteDataLabelingJobCallable() { @@ -702,6 +1210,16 @@ public final OperationFuture deleteDataLabelingJ /** * Cancels a DataLabelingJob. Success of cancellation is not guaranteed. * + *

Sample code: + * + *

{@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 @@ -718,6 +1236,16 @@ public final void cancelDataLabelingJob(DataLabelingJobName name) { /** * Cancels a DataLabelingJob. Success of cancellation is not guaranteed. * + *

Sample code: + * + *

{@code
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   String name =
+   *       DataLabelingJobName.of("[PROJECT]", "[LOCATION]", "[DATA_LABELING_JOB]").toString();
+   *   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 @@ -732,6 +1260,20 @@ public final void cancelDataLabelingJob(String name) { /** * Cancels a DataLabelingJob. Success of cancellation is not guaranteed. * + *

Sample code: + * + *

{@code
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   CancelDataLabelingJobRequest request =
+   *       CancelDataLabelingJobRequest.newBuilder()
+   *           .setName(
+   *               DataLabelingJobName.of("[PROJECT]", "[LOCATION]", "[DATA_LABELING_JOB]")
+   *                   .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 */ @@ -744,6 +1286,21 @@ public final void cancelDataLabelingJob(CancelDataLabelingJobRequest request) { * Cancels a DataLabelingJob. Success of cancellation is not guaranteed. * *

Sample code: + * + *

{@code
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   CancelDataLabelingJobRequest request =
+   *       CancelDataLabelingJobRequest.newBuilder()
+   *           .setName(
+   *               DataLabelingJobName.of("[PROJECT]", "[LOCATION]", "[DATA_LABELING_JOB]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       jobServiceClient.cancelDataLabelingJobCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
*/ public final UnaryCallable cancelDataLabelingJobCallable() { return stub.cancelDataLabelingJobCallable(); @@ -753,6 +1310,18 @@ public final UnaryCallable cancelDataLabeli /** * Creates a HyperparameterTuningJob * + *

Sample code: + * + *

{@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. @@ -772,6 +1341,18 @@ public final HyperparameterTuningJob createHyperparameterTuningJob( /** * Creates a HyperparameterTuningJob * + *

Sample code: + * + *

{@code
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   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. @@ -791,6 +1372,19 @@ public final HyperparameterTuningJob createHyperparameterTuningJob( /** * Creates a HyperparameterTuningJob * + *

Sample code: + * + *

{@code
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   CreateHyperparameterTuningJobRequest request =
+   *       CreateHyperparameterTuningJobRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setHyperparameterTuningJob(HyperparameterTuningJob.newBuilder().build())
+   *           .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 */ @@ -804,6 +1398,20 @@ public final HyperparameterTuningJob createHyperparameterTuningJob( * Creates a HyperparameterTuningJob * *

Sample code: + * + *

{@code
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   CreateHyperparameterTuningJobRequest request =
+   *       CreateHyperparameterTuningJobRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setHyperparameterTuningJob(HyperparameterTuningJob.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       jobServiceClient.createHyperparameterTuningJobCallable().futureCall(request);
+   *   // Do something.
+   *   HyperparameterTuningJob response = future.get();
+   * }
+   * }
*/ public final UnaryCallable createHyperparameterTuningJobCallable() { @@ -814,6 +1422,16 @@ public final HyperparameterTuningJob createHyperparameterTuningJob( /** * Gets a HyperparameterTuningJob * + *

Sample code: + * + *

{@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 @@ -831,6 +1449,17 @@ public final HyperparameterTuningJob getHyperparameterTuningJob( /** * Gets a HyperparameterTuningJob * + *

Sample code: + * + *

{@code
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   String name =
+   *       HyperparameterTuningJobName.of("[PROJECT]", "[LOCATION]", "[HYPERPARAMETER_TUNING_JOB]")
+   *           .toString();
+   *   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 @@ -845,6 +1474,21 @@ public final HyperparameterTuningJob getHyperparameterTuningJob(String name) { /** * Gets a HyperparameterTuningJob * + *

Sample code: + * + *

{@code
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   GetHyperparameterTuningJobRequest request =
+   *       GetHyperparameterTuningJobRequest.newBuilder()
+   *           .setName(
+   *               HyperparameterTuningJobName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[HYPERPARAMETER_TUNING_JOB]")
+   *                   .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 */ @@ -858,6 +1502,22 @@ public final HyperparameterTuningJob getHyperparameterTuningJob( * Gets a HyperparameterTuningJob * *

Sample code: + * + *

{@code
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   GetHyperparameterTuningJobRequest request =
+   *       GetHyperparameterTuningJobRequest.newBuilder()
+   *           .setName(
+   *               HyperparameterTuningJobName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[HYPERPARAMETER_TUNING_JOB]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       jobServiceClient.getHyperparameterTuningJobCallable().futureCall(request);
+   *   // Do something.
+   *   HyperparameterTuningJob response = future.get();
+   * }
+   * }
*/ public final UnaryCallable getHyperparameterTuningJobCallable() { @@ -868,6 +1528,18 @@ public final HyperparameterTuningJob getHyperparameterTuningJob( /** * Lists HyperparameterTuningJobs in a Location. * + *

Sample code: + * + *

{@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 @@ -885,6 +1557,18 @@ public final ListHyperparameterTuningJobsPagedResponse listHyperparameterTuningJ /** * Lists HyperparameterTuningJobs in a Location. * + *

Sample code: + * + *

{@code
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   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 @@ -900,6 +1584,25 @@ public final ListHyperparameterTuningJobsPagedResponse listHyperparameterTuningJ /** * Lists HyperparameterTuningJobs in a Location. * + *

Sample code: + * + *

{@code
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   ListHyperparameterTuningJobsRequest request =
+   *       ListHyperparameterTuningJobsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setReadMask(FieldMask.newBuilder().build())
+   *           .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 */ @@ -913,6 +1616,25 @@ public final ListHyperparameterTuningJobsPagedResponse listHyperparameterTuningJ * Lists HyperparameterTuningJobs in a Location. * *

Sample code: + * + *

{@code
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   ListHyperparameterTuningJobsRequest request =
+   *       ListHyperparameterTuningJobsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setReadMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       jobServiceClient.listHyperparameterTuningJobsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (HyperparameterTuningJob element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
*/ public final UnaryCallable< ListHyperparameterTuningJobsRequest, ListHyperparameterTuningJobsPagedResponse> @@ -925,6 +1647,24 @@ public final ListHyperparameterTuningJobsPagedResponse listHyperparameterTuningJ * Lists HyperparameterTuningJobs in a Location. * *

Sample code: + * + *

{@code
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   while (true) {
+   *     ListHyperparameterTuningJobsResponse response =
+   *         jobServiceClient.listHyperparameterTuningJobsCallable().call(request);
+   *     for (HyperparameterTuningJob element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
*/ public final UnaryCallable< ListHyperparameterTuningJobsRequest, ListHyperparameterTuningJobsResponse> @@ -936,6 +1676,16 @@ public final ListHyperparameterTuningJobsPagedResponse listHyperparameterTuningJ /** * Deletes a HyperparameterTuningJob. * + *

Sample code: + * + *

{@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 @@ -953,6 +1703,17 @@ public final OperationFuture deleteHyperparamete /** * Deletes a HyperparameterTuningJob. * + *

Sample code: + * + *

{@code
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   String name =
+   *       HyperparameterTuningJobName.of("[PROJECT]", "[LOCATION]", "[HYPERPARAMETER_TUNING_JOB]")
+   *           .toString();
+   *   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 @@ -968,6 +1729,21 @@ public final OperationFuture deleteHyperparamete /** * Deletes a HyperparameterTuningJob. * + *

Sample code: + * + *

{@code
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   DeleteHyperparameterTuningJobRequest request =
+   *       DeleteHyperparameterTuningJobRequest.newBuilder()
+   *           .setName(
+   *               HyperparameterTuningJobName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[HYPERPARAMETER_TUNING_JOB]")
+   *                   .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 */ @@ -981,6 +1757,22 @@ public final OperationFuture deleteHyperparamete * Deletes a HyperparameterTuningJob. * *

Sample code: + * + *

{@code
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   DeleteHyperparameterTuningJobRequest request =
+   *       DeleteHyperparameterTuningJobRequest.newBuilder()
+   *           .setName(
+   *               HyperparameterTuningJobName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[HYPERPARAMETER_TUNING_JOB]")
+   *                   .toString())
+   *           .build();
+   *   OperationFuture future =
+   *       jobServiceClient.deleteHyperparameterTuningJobOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
*/ public final OperationCallable< DeleteHyperparameterTuningJobRequest, Empty, DeleteOperationMetadata> @@ -993,6 +1785,22 @@ public final OperationFuture deleteHyperparamete * Deletes a HyperparameterTuningJob. * *

Sample code: + * + *

{@code
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   DeleteHyperparameterTuningJobRequest request =
+   *       DeleteHyperparameterTuningJobRequest.newBuilder()
+   *           .setName(
+   *               HyperparameterTuningJobName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[HYPERPARAMETER_TUNING_JOB]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       jobServiceClient.deleteHyperparameterTuningJobCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
*/ public final UnaryCallable deleteHyperparameterTuningJobCallable() { @@ -1014,6 +1822,16 @@ public final OperationFuture deleteHyperparamete * [HyperparameterTuningJob.state][google.cloud.aiplatform.v1beta1.HyperparameterTuningJob.state] * is set to `CANCELLED`. * + *

Sample code: + * + *

{@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 @@ -1041,6 +1859,17 @@ public final void cancelHyperparameterTuningJob(HyperparameterTuningJobName name * [HyperparameterTuningJob.state][google.cloud.aiplatform.v1beta1.HyperparameterTuningJob.state] * is set to `CANCELLED`. * + *

Sample code: + * + *

{@code
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   String name =
+   *       HyperparameterTuningJobName.of("[PROJECT]", "[LOCATION]", "[HYPERPARAMETER_TUNING_JOB]")
+   *           .toString();
+   *   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 @@ -1066,6 +1895,21 @@ public final void cancelHyperparameterTuningJob(String name) { * [HyperparameterTuningJob.state][google.cloud.aiplatform.v1beta1.HyperparameterTuningJob.state] * is set to `CANCELLED`. * + *

Sample code: + * + *

{@code
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   CancelHyperparameterTuningJobRequest request =
+   *       CancelHyperparameterTuningJobRequest.newBuilder()
+   *           .setName(
+   *               HyperparameterTuningJobName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[HYPERPARAMETER_TUNING_JOB]")
+   *                   .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 */ @@ -1089,6 +1933,22 @@ public final void cancelHyperparameterTuningJob(CancelHyperparameterTuningJobReq * is set to `CANCELLED`. * *

Sample code: + * + *

{@code
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   CancelHyperparameterTuningJobRequest request =
+   *       CancelHyperparameterTuningJobRequest.newBuilder()
+   *           .setName(
+   *               HyperparameterTuningJobName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[HYPERPARAMETER_TUNING_JOB]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       jobServiceClient.cancelHyperparameterTuningJobCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
*/ public final UnaryCallable cancelHyperparameterTuningJobCallable() { @@ -1100,6 +1960,17 @@ public final void cancelHyperparameterTuningJob(CancelHyperparameterTuningJobReq * Creates a BatchPredictionJob. A BatchPredictionJob once created will right away be attempted to * start. * + *

Sample code: + * + *

{@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. @@ -1120,6 +1991,17 @@ public final BatchPredictionJob createBatchPredictionJob( * Creates a BatchPredictionJob. A BatchPredictionJob once created will right away be attempted to * start. * + *

Sample code: + * + *

{@code
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   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. @@ -1140,6 +2022,19 @@ public final BatchPredictionJob createBatchPredictionJob( * Creates a BatchPredictionJob. A BatchPredictionJob once created will right away be attempted to * start. * + *

Sample code: + * + *

{@code
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   CreateBatchPredictionJobRequest request =
+   *       CreateBatchPredictionJobRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setBatchPredictionJob(BatchPredictionJob.newBuilder().build())
+   *           .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 */ @@ -1154,6 +2049,20 @@ public final BatchPredictionJob createBatchPredictionJob( * start. * *

Sample code: + * + *

{@code
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   CreateBatchPredictionJobRequest request =
+   *       CreateBatchPredictionJobRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setBatchPredictionJob(BatchPredictionJob.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       jobServiceClient.createBatchPredictionJobCallable().futureCall(request);
+   *   // Do something.
+   *   BatchPredictionJob response = future.get();
+   * }
+   * }
*/ public final UnaryCallable createBatchPredictionJobCallable() { @@ -1164,6 +2073,16 @@ public final BatchPredictionJob createBatchPredictionJob( /** * Gets a BatchPredictionJob * + *

Sample code: + * + *

{@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 @@ -1180,6 +2099,16 @@ public final BatchPredictionJob getBatchPredictionJob(BatchPredictionJobName nam /** * Gets a BatchPredictionJob * + *

Sample code: + * + *

{@code
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   String name =
+   *       BatchPredictionJobName.of("[PROJECT]", "[LOCATION]", "[BATCH_PREDICTION_JOB]").toString();
+   *   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 @@ -1194,6 +2123,20 @@ public final BatchPredictionJob getBatchPredictionJob(String name) { /** * Gets a BatchPredictionJob * + *

Sample code: + * + *

{@code
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   GetBatchPredictionJobRequest request =
+   *       GetBatchPredictionJobRequest.newBuilder()
+   *           .setName(
+   *               BatchPredictionJobName.of("[PROJECT]", "[LOCATION]", "[BATCH_PREDICTION_JOB]")
+   *                   .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 */ @@ -1206,6 +2149,21 @@ public final BatchPredictionJob getBatchPredictionJob(GetBatchPredictionJobReque * Gets a BatchPredictionJob * *

Sample code: + * + *

{@code
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   GetBatchPredictionJobRequest request =
+   *       GetBatchPredictionJobRequest.newBuilder()
+   *           .setName(
+   *               BatchPredictionJobName.of("[PROJECT]", "[LOCATION]", "[BATCH_PREDICTION_JOB]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       jobServiceClient.getBatchPredictionJobCallable().futureCall(request);
+   *   // Do something.
+   *   BatchPredictionJob response = future.get();
+   * }
+   * }
*/ public final UnaryCallable getBatchPredictionJobCallable() { @@ -1216,6 +2174,18 @@ public final BatchPredictionJob getBatchPredictionJob(GetBatchPredictionJobReque /** * Lists BatchPredictionJobs in a Location. * + *

Sample code: + * + *

{@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 @@ -1232,6 +2202,18 @@ public final ListBatchPredictionJobsPagedResponse listBatchPredictionJobs(Locati /** * Lists BatchPredictionJobs in a Location. * + *

Sample code: + * + *

{@code
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   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 @@ -1246,6 +2228,25 @@ public final ListBatchPredictionJobsPagedResponse listBatchPredictionJobs(String /** * Lists BatchPredictionJobs in a Location. * + *

Sample code: + * + *

{@code
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   ListBatchPredictionJobsRequest request =
+   *       ListBatchPredictionJobsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setReadMask(FieldMask.newBuilder().build())
+   *           .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 */ @@ -1259,6 +2260,25 @@ public final ListBatchPredictionJobsPagedResponse listBatchPredictionJobs( * Lists BatchPredictionJobs in a Location. * *

Sample code: + * + *

{@code
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   ListBatchPredictionJobsRequest request =
+   *       ListBatchPredictionJobsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setReadMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       jobServiceClient.listBatchPredictionJobsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (BatchPredictionJob element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listBatchPredictionJobsPagedCallable() { @@ -1270,6 +2290,24 @@ public final ListBatchPredictionJobsPagedResponse listBatchPredictionJobs( * Lists BatchPredictionJobs in a Location. * *

Sample code: + * + *

{@code
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   while (true) {
+   *     ListBatchPredictionJobsResponse response =
+   *         jobServiceClient.listBatchPredictionJobsCallable().call(request);
+   *     for (BatchPredictionJob element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listBatchPredictionJobsCallable() { @@ -1280,6 +2318,16 @@ public final ListBatchPredictionJobsPagedResponse listBatchPredictionJobs( /** * Deletes a BatchPredictionJob. Can only be called on jobs that already finished. * + *

Sample code: + * + *

{@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 @@ -1297,6 +2345,16 @@ public final OperationFuture deleteBatchPredicti /** * Deletes a BatchPredictionJob. Can only be called on jobs that already finished. * + *

Sample code: + * + *

{@code
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   String name =
+   *       BatchPredictionJobName.of("[PROJECT]", "[LOCATION]", "[BATCH_PREDICTION_JOB]").toString();
+   *   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 @@ -1312,6 +2370,20 @@ public final OperationFuture deleteBatchPredicti /** * Deletes a BatchPredictionJob. Can only be called on jobs that already finished. * + *

Sample code: + * + *

{@code
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   DeleteBatchPredictionJobRequest request =
+   *       DeleteBatchPredictionJobRequest.newBuilder()
+   *           .setName(
+   *               BatchPredictionJobName.of("[PROJECT]", "[LOCATION]", "[BATCH_PREDICTION_JOB]")
+   *                   .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 */ @@ -1325,6 +2397,21 @@ public final OperationFuture deleteBatchPredicti * Deletes a BatchPredictionJob. Can only be called on jobs that already finished. * *

Sample code: + * + *

{@code
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   DeleteBatchPredictionJobRequest request =
+   *       DeleteBatchPredictionJobRequest.newBuilder()
+   *           .setName(
+   *               BatchPredictionJobName.of("[PROJECT]", "[LOCATION]", "[BATCH_PREDICTION_JOB]")
+   *                   .toString())
+   *           .build();
+   *   OperationFuture future =
+   *       jobServiceClient.deleteBatchPredictionJobOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
*/ public final OperationCallable deleteBatchPredictionJobOperationCallable() { @@ -1336,6 +2423,21 @@ public final OperationFuture deleteBatchPredicti * Deletes a BatchPredictionJob. Can only be called on jobs that already finished. * *

Sample code: + * + *

{@code
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   DeleteBatchPredictionJobRequest request =
+   *       DeleteBatchPredictionJobRequest.newBuilder()
+   *           .setName(
+   *               BatchPredictionJobName.of("[PROJECT]", "[LOCATION]", "[BATCH_PREDICTION_JOB]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       jobServiceClient.deleteBatchPredictionJobCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
*/ public final UnaryCallable deleteBatchPredictionJobCallable() { @@ -1355,6 +2457,16 @@ 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: + * + *

{@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 @@ -1380,6 +2492,16 @@ 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: + * + *

{@code
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   String name =
+   *       BatchPredictionJobName.of("[PROJECT]", "[LOCATION]", "[BATCH_PREDICTION_JOB]").toString();
+   *   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 @@ -1403,6 +2525,20 @@ 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: + * + *

{@code
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   CancelBatchPredictionJobRequest request =
+   *       CancelBatchPredictionJobRequest.newBuilder()
+   *           .setName(
+   *               BatchPredictionJobName.of("[PROJECT]", "[LOCATION]", "[BATCH_PREDICTION_JOB]")
+   *                   .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 */ @@ -1424,6 +2560,21 @@ public final void cancelBatchPredictionJob(CancelBatchPredictionJobRequest reque * `CANCELLED`. Any files already outputted by the job are not deleted. * *

Sample code: + * + *

{@code
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   CancelBatchPredictionJobRequest request =
+   *       CancelBatchPredictionJobRequest.newBuilder()
+   *           .setName(
+   *               BatchPredictionJobName.of("[PROJECT]", "[LOCATION]", "[BATCH_PREDICTION_JOB]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture 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/MigrationServiceClient.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/MigrationServiceClient.java index 5631dc8d4..736f83a56 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 @@ -46,6 +46,16 @@ *

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: * + *

{@code
+ * 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 * such as threads. In the example above, try-with-resources is used, which automatically calls * close(). @@ -165,6 +175,18 @@ public final OperationsClient getOperationsClient() { * 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: + * + *

{@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}` @@ -184,6 +206,18 @@ public final SearchMigratableResourcesPagedResponse searchMigratableResources( * 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: + * + *

{@code
+   * try (MigrationServiceClient migrationServiceClient = MigrationServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   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}` @@ -200,6 +234,24 @@ public final SearchMigratableResourcesPagedResponse searchMigratableResources(St * 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: + * + *

{@code
+   * try (MigrationServiceClient migrationServiceClient = MigrationServiceClient.create()) {
+   *   SearchMigratableResourcesRequest request =
+   *       SearchMigratableResourcesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .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 */ @@ -214,6 +266,24 @@ public final SearchMigratableResourcesPagedResponse searchMigratableResources( * ml.googleapis.com that can be migrated to AI Platform's given location. * *

Sample code: + * + *

{@code
+   * try (MigrationServiceClient migrationServiceClient = MigrationServiceClient.create()) {
+   *   SearchMigratableResourcesRequest request =
+   *       SearchMigratableResourcesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   ApiFuture future =
+   *       migrationServiceClient.searchMigratableResourcesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (MigratableResource element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
*/ public final UnaryCallable< SearchMigratableResourcesRequest, SearchMigratableResourcesPagedResponse> @@ -227,6 +297,24 @@ public final SearchMigratableResourcesPagedResponse searchMigratableResources( * ml.googleapis.com that can be migrated to AI Platform's given location. * *

Sample code: + * + *

{@code
+   * try (MigrationServiceClient migrationServiceClient = MigrationServiceClient.create()) {
+   *   while (true) {
+   *     SearchMigratableResourcesResponse response =
+   *         migrationServiceClient.searchMigratableResourcesCallable().call(request);
+   *     for (MigratableResource element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
*/ public final UnaryCallable searchMigratableResourcesCallable() { @@ -238,6 +326,17 @@ public final SearchMigratableResourcesPagedResponse searchMigratableResources( * Batch migrates resources from ml.googleapis.com, automl.googleapis.com, and * datalabeling.googleapis.com to AI Platform (Unified). * + *

Sample code: + * + *

{@code
+   * try (MigrationServiceClient migrationServiceClient = MigrationServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   List 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 @@ -262,6 +361,17 @@ public final SearchMigratableResourcesPagedResponse searchMigratableResources( * Batch migrates resources from ml.googleapis.com, automl.googleapis.com, and * datalabeling.googleapis.com to AI Platform (Unified). * + *

Sample code: + * + *

{@code
+   * try (MigrationServiceClient migrationServiceClient = MigrationServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   List 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 @@ -286,6 +396,20 @@ public final SearchMigratableResourcesPagedResponse searchMigratableResources( * Batch migrates resources from ml.googleapis.com, automl.googleapis.com, and * datalabeling.googleapis.com to AI Platform (Unified). * + *

Sample code: + * + *

{@code
+   * try (MigrationServiceClient migrationServiceClient = MigrationServiceClient.create()) {
+   *   BatchMigrateResourcesRequest request =
+   *       BatchMigrateResourcesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .addAllMigrateResourceRequests(new ArrayList())
+   *           .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 */ @@ -301,6 +425,21 @@ public final SearchMigratableResourcesPagedResponse searchMigratableResources( * datalabeling.googleapis.com to AI Platform (Unified). * *

Sample code: + * + *

{@code
+   * try (MigrationServiceClient migrationServiceClient = MigrationServiceClient.create()) {
+   *   BatchMigrateResourcesRequest request =
+   *       BatchMigrateResourcesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .addAllMigrateResourceRequests(new ArrayList())
+   *           .build();
+   *   OperationFuture
+   *       future =
+   *           migrationServiceClient.batchMigrateResourcesOperationCallable().futureCall(request);
+   *   // Do something.
+   *   BatchMigrateResourcesResponse response = future.get();
+   * }
+   * }
*/ public final OperationCallable< BatchMigrateResourcesRequest, @@ -316,6 +455,20 @@ public final SearchMigratableResourcesPagedResponse searchMigratableResources( * datalabeling.googleapis.com to AI Platform (Unified). * *

Sample code: + * + *

{@code
+   * try (MigrationServiceClient migrationServiceClient = MigrationServiceClient.create()) {
+   *   BatchMigrateResourcesRequest request =
+   *       BatchMigrateResourcesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .addAllMigrateResourceRequests(new ArrayList())
+   *           .build();
+   *   ApiFuture 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/ModelServiceClient.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelServiceClient.java index 1011361a2..9cd80ed85 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 @@ -47,6 +47,13 @@ *

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: * + *

{@code
+ * 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 * as threads. In the example above, try-with-resources is used, which automatically calls close(). * @@ -161,6 +168,16 @@ public final OperationsClient getOperationsClient() { /** * Uploads a Model artifact into AI Platform. * + *

Sample code: + * + *

{@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. @@ -180,6 +197,16 @@ public final OperationFuture /** * Uploads a Model artifact into AI Platform. * + *

Sample code: + * + *

{@code
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   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. @@ -196,6 +223,19 @@ public final OperationFuture /** * Uploads a Model artifact into AI Platform. * + *

Sample code: + * + *

{@code
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   UploadModelRequest request =
+   *       UploadModelRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setModel(Model.newBuilder().build())
+   *           .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 */ @@ -209,6 +249,20 @@ public final OperationFuture * Uploads a Model artifact into AI Platform. * *

Sample code: + * + *

{@code
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   UploadModelRequest request =
+   *       UploadModelRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setModel(Model.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       modelServiceClient.uploadModelOperationCallable().futureCall(request);
+   *   // Do something.
+   *   UploadModelResponse response = future.get();
+   * }
+   * }
*/ public final OperationCallable< UploadModelRequest, UploadModelResponse, UploadModelOperationMetadata> @@ -221,6 +275,19 @@ public final OperationFuture * Uploads a Model artifact into AI Platform. * *

Sample code: + * + *

{@code
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   UploadModelRequest request =
+   *       UploadModelRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setModel(Model.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = modelServiceClient.uploadModelCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
*/ public final UnaryCallable uploadModelCallable() { return stub.uploadModelCallable(); @@ -230,6 +297,15 @@ public final UnaryCallable uploadModelCallable() /** * Gets a Model. * + *

Sample code: + * + *

{@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 @@ -244,6 +320,15 @@ public final Model getModel(ModelName name) { /** * Gets a Model. * + *

Sample code: + * + *

{@code
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   String name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]").toString();
+   *   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 @@ -257,6 +342,18 @@ public final Model getModel(String name) { /** * Gets a Model. * + *

Sample code: + * + *

{@code
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   GetModelRequest request =
+   *       GetModelRequest.newBuilder()
+   *           .setName(ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]").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 */ @@ -269,6 +366,18 @@ public final Model getModel(GetModelRequest request) { * Gets a Model. * *

Sample code: + * + *

{@code
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   GetModelRequest request =
+   *       GetModelRequest.newBuilder()
+   *           .setName(ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]").toString())
+   *           .build();
+   *   ApiFuture future = modelServiceClient.getModelCallable().futureCall(request);
+   *   // Do something.
+   *   Model response = future.get();
+   * }
+   * }
*/ public final UnaryCallable getModelCallable() { return stub.getModelCallable(); @@ -278,6 +387,17 @@ public final UnaryCallable getModelCallable() { /** * Lists Models in a Location. * + *

Sample code: + * + *

{@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 @@ -292,6 +412,17 @@ public final ListModelsPagedResponse listModels(LocationName parent) { /** * Lists Models in a Location. * + *

Sample code: + * + *

{@code
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   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 @@ -305,6 +436,24 @@ public final ListModelsPagedResponse listModels(String parent) { /** * Lists Models in a Location. * + *

Sample code: + * + *

{@code
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   ListModelsRequest request =
+   *       ListModelsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setReadMask(FieldMask.newBuilder().build())
+   *           .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 */ @@ -317,6 +466,24 @@ public final ListModelsPagedResponse listModels(ListModelsRequest request) { * Lists Models in a Location. * *

Sample code: + * + *

{@code
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   ListModelsRequest request =
+   *       ListModelsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setReadMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = modelServiceClient.listModelsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Model element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listModelsPagedCallable() { return stub.listModelsPagedCallable(); @@ -327,6 +494,23 @@ public final UnaryCallable listModel * Lists Models in a Location. * *

Sample code: + * + *

{@code
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   while (true) {
+   *     ListModelsResponse response = modelServiceClient.listModelsCallable().call(request);
+   *     for (Model element : response.getResponsesList()) {
+   *       // 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(); @@ -336,6 +520,16 @@ public final UnaryCallable listModelsCall /** * Updates a Model. * + *

Sample code: + * + *

{@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 @@ -353,6 +547,19 @@ public final Model updateModel(Model model, FieldMask updateMask) { /** * Updates a Model. * + *

Sample code: + * + *

{@code
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   UpdateModelRequest request =
+   *       UpdateModelRequest.newBuilder()
+   *           .setModel(Model.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .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 */ @@ -365,6 +572,19 @@ public final Model updateModel(UpdateModelRequest request) { * Updates a Model. * *

Sample code: + * + *

{@code
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   UpdateModelRequest request =
+   *       UpdateModelRequest.newBuilder()
+   *           .setModel(Model.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = modelServiceClient.updateModelCallable().futureCall(request);
+   *   // Do something.
+   *   Model response = future.get();
+   * }
+   * }
*/ public final UnaryCallable updateModelCallable() { return stub.updateModelCallable(); @@ -375,6 +595,15 @@ public final UnaryCallable updateModelCallable() { * Deletes a Model. Note: Model can only be deleted if there are no DeployedModels created from * it. * + *

Sample code: + * + *

{@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 @@ -390,6 +619,15 @@ public final OperationFuture deleteModelAsync(Mo * Deletes a Model. Note: Model can only be deleted if there are no DeployedModels created from * it. * + *

Sample code: + * + *

{@code
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   String name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]").toString();
+   *   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 @@ -404,6 +642,18 @@ public final OperationFuture deleteModelAsync(St * Deletes a Model. Note: Model can only be deleted if there are no DeployedModels created from * it. * + *

Sample code: + * + *

{@code
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   DeleteModelRequest request =
+   *       DeleteModelRequest.newBuilder()
+   *           .setName(ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]").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 */ @@ -418,6 +668,19 @@ public final OperationFuture deleteModelAsync( * it. * *

Sample code: + * + *

{@code
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   DeleteModelRequest request =
+   *       DeleteModelRequest.newBuilder()
+   *           .setName(ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]").toString())
+   *           .build();
+   *   OperationFuture future =
+   *       modelServiceClient.deleteModelOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
*/ public final OperationCallable deleteModelOperationCallable() { @@ -430,6 +693,18 @@ public final OperationFuture deleteModelAsync( * it. * *

Sample code: + * + *

{@code
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   DeleteModelRequest request =
+   *       DeleteModelRequest.newBuilder()
+   *           .setName(ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]").toString())
+   *           .build();
+   *   ApiFuture future = modelServiceClient.deleteModelCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
*/ public final UnaryCallable deleteModelCallable() { return stub.deleteModelCallable(); @@ -441,6 +716,17 @@ public final UnaryCallable deleteModelCallable() * to be exportable if it has at least one [supported export * format][google.cloud.aiplatform.v1beta1.Model.supported_export_formats]. * + *

Sample code: + * + *

{@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. @@ -462,6 +748,17 @@ public final OperationFuture * to be exportable if it has at least one [supported export * format][google.cloud.aiplatform.v1beta1.Model.supported_export_formats]. * + *

Sample code: + * + *

{@code
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   String name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]").toString();
+   *   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. @@ -480,6 +777,19 @@ public final OperationFuture * to be exportable if it has at least one [supported export * format][google.cloud.aiplatform.v1beta1.Model.supported_export_formats]. * + *

Sample code: + * + *

{@code
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   ExportModelRequest request =
+   *       ExportModelRequest.newBuilder()
+   *           .setName(ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]").toString())
+   *           .setOutputConfig(ExportModelRequest.OutputConfig.newBuilder().build())
+   *           .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 */ @@ -495,6 +805,20 @@ public final OperationFuture * format][google.cloud.aiplatform.v1beta1.Model.supported_export_formats]. * *

Sample code: + * + *

{@code
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   ExportModelRequest request =
+   *       ExportModelRequest.newBuilder()
+   *           .setName(ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]").toString())
+   *           .setOutputConfig(ExportModelRequest.OutputConfig.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       modelServiceClient.exportModelOperationCallable().futureCall(request);
+   *   // Do something.
+   *   ExportModelResponse response = future.get();
+   * }
+   * }
*/ public final OperationCallable< ExportModelRequest, ExportModelResponse, ExportModelOperationMetadata> @@ -509,6 +833,19 @@ public final OperationFuture * format][google.cloud.aiplatform.v1beta1.Model.supported_export_formats]. * *

Sample code: + * + *

{@code
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   ExportModelRequest request =
+   *       ExportModelRequest.newBuilder()
+   *           .setName(ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]").toString())
+   *           .setOutputConfig(ExportModelRequest.OutputConfig.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = modelServiceClient.exportModelCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
*/ public final UnaryCallable exportModelCallable() { return stub.exportModelCallable(); @@ -518,6 +855,16 @@ public final UnaryCallable exportModelCallable() /** * Gets a ModelEvaluation. * + *

Sample code: + * + *

{@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 @@ -534,6 +881,16 @@ public final ModelEvaluation getModelEvaluation(ModelEvaluationName name) { /** * Gets a ModelEvaluation. * + *

Sample code: + * + *

{@code
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   String name =
+   *       ModelEvaluationName.of("[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]").toString();
+   *   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 @@ -548,6 +905,20 @@ public final ModelEvaluation getModelEvaluation(String name) { /** * Gets a ModelEvaluation. * + *

Sample code: + * + *

{@code
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   GetModelEvaluationRequest request =
+   *       GetModelEvaluationRequest.newBuilder()
+   *           .setName(
+   *               ModelEvaluationName.of("[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]")
+   *                   .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 */ @@ -560,6 +931,21 @@ public final ModelEvaluation getModelEvaluation(GetModelEvaluationRequest reques * Gets a ModelEvaluation. * *

Sample code: + * + *

{@code
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   GetModelEvaluationRequest request =
+   *       GetModelEvaluationRequest.newBuilder()
+   *           .setName(
+   *               ModelEvaluationName.of("[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       modelServiceClient.getModelEvaluationCallable().futureCall(request);
+   *   // Do something.
+   *   ModelEvaluation response = future.get();
+   * }
+   * }
*/ public final UnaryCallable getModelEvaluationCallable() { @@ -570,6 +956,17 @@ public final ModelEvaluation getModelEvaluation(GetModelEvaluationRequest reques /** * Lists ModelEvaluations in a Model. * + *

Sample code: + * + *

{@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 @@ -586,6 +983,17 @@ public final ListModelEvaluationsPagedResponse listModelEvaluations(ModelName pa /** * Lists ModelEvaluations in a Model. * + *

Sample code: + * + *

{@code
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   String parent = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]").toString();
+   *   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 @@ -600,6 +1008,25 @@ public final ListModelEvaluationsPagedResponse listModelEvaluations(String paren /** * Lists ModelEvaluations in a Model. * + *

Sample code: + * + *

{@code
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   ListModelEvaluationsRequest request =
+   *       ListModelEvaluationsRequest.newBuilder()
+   *           .setParent(ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setReadMask(FieldMask.newBuilder().build())
+   *           .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 */ @@ -613,6 +1040,25 @@ public final ListModelEvaluationsPagedResponse listModelEvaluations( * Lists ModelEvaluations in a Model. * *

Sample code: + * + *

{@code
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   ListModelEvaluationsRequest request =
+   *       ListModelEvaluationsRequest.newBuilder()
+   *           .setParent(ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setReadMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       modelServiceClient.listModelEvaluationsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (ModelEvaluation element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listModelEvaluationsPagedCallable() { @@ -624,6 +1070,24 @@ public final ListModelEvaluationsPagedResponse listModelEvaluations( * Lists ModelEvaluations in a Model. * *

Sample code: + * + *

{@code
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   while (true) {
+   *     ListModelEvaluationsResponse response =
+   *         modelServiceClient.listModelEvaluationsCallable().call(request);
+   *     for (ModelEvaluation element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listModelEvaluationsCallable() { @@ -634,6 +1098,17 @@ public final ListModelEvaluationsPagedResponse listModelEvaluations( /** * Gets a ModelEvaluationSlice. * + *

Sample code: + * + *

{@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 @@ -650,6 +1125,18 @@ public final ModelEvaluationSlice getModelEvaluationSlice(ModelEvaluationSliceNa /** * Gets a ModelEvaluationSlice. * + *

Sample code: + * + *

{@code
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   String name =
+   *       ModelEvaluationSliceName.of(
+   *               "[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]", "[SLICE]")
+   *           .toString();
+   *   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 @@ -664,6 +1151,21 @@ public final ModelEvaluationSlice getModelEvaluationSlice(String name) { /** * Gets a ModelEvaluationSlice. * + *

Sample code: + * + *

{@code
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   GetModelEvaluationSliceRequest request =
+   *       GetModelEvaluationSliceRequest.newBuilder()
+   *           .setName(
+   *               ModelEvaluationSliceName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]", "[SLICE]")
+   *                   .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 */ @@ -677,6 +1179,22 @@ public final ModelEvaluationSlice getModelEvaluationSlice( * Gets a ModelEvaluationSlice. * *

Sample code: + * + *

{@code
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   GetModelEvaluationSliceRequest request =
+   *       GetModelEvaluationSliceRequest.newBuilder()
+   *           .setName(
+   *               ModelEvaluationSliceName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]", "[SLICE]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       modelServiceClient.getModelEvaluationSliceCallable().futureCall(request);
+   *   // Do something.
+   *   ModelEvaluationSlice response = future.get();
+   * }
+   * }
*/ public final UnaryCallable getModelEvaluationSliceCallable() { @@ -687,6 +1205,19 @@ public final ModelEvaluationSlice getModelEvaluationSlice( /** * Lists ModelEvaluationSlices in a ModelEvaluation. * + *

Sample code: + * + *

{@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}` @@ -705,6 +1236,19 @@ public final ListModelEvaluationSlicesPagedResponse listModelEvaluationSlices( /** * Lists ModelEvaluationSlices in a ModelEvaluation. * + *

Sample code: + * + *

{@code
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   String parent =
+   *       ModelEvaluationName.of("[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]").toString();
+   *   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}` @@ -720,6 +1264,27 @@ public final ListModelEvaluationSlicesPagedResponse listModelEvaluationSlices(St /** * Lists ModelEvaluationSlices in a ModelEvaluation. * + *

Sample code: + * + *

{@code
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   ListModelEvaluationSlicesRequest request =
+   *       ListModelEvaluationSlicesRequest.newBuilder()
+   *           .setParent(
+   *               ModelEvaluationName.of("[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]")
+   *                   .toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setReadMask(FieldMask.newBuilder().build())
+   *           .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 */ @@ -733,6 +1298,27 @@ public final ListModelEvaluationSlicesPagedResponse listModelEvaluationSlices( * Lists ModelEvaluationSlices in a ModelEvaluation. * *

Sample code: + * + *

{@code
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   ListModelEvaluationSlicesRequest request =
+   *       ListModelEvaluationSlicesRequest.newBuilder()
+   *           .setParent(
+   *               ModelEvaluationName.of("[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]")
+   *                   .toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setReadMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       modelServiceClient.listModelEvaluationSlicesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (ModelEvaluationSlice element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
*/ public final UnaryCallable< ListModelEvaluationSlicesRequest, ListModelEvaluationSlicesPagedResponse> @@ -745,6 +1331,24 @@ public final ListModelEvaluationSlicesPagedResponse listModelEvaluationSlices( * Lists ModelEvaluationSlices in a ModelEvaluation. * *

Sample code: + * + *

{@code
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   while (true) {
+   *     ListModelEvaluationSlicesResponse response =
+   *         modelServiceClient.listModelEvaluationSlicesCallable().call(request);
+   *     for (ModelEvaluationSlice element : response.getResponsesList()) {
+   *       // 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/PipelineServiceClient.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/PipelineServiceClient.java index a803a8a6a..6e5afd9d9 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 @@ -46,6 +46,15 @@ *

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: * + *

{@code
+ * 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 * such as threads. In the example above, try-with-resources is used, which automatically calls * close(). @@ -164,6 +173,17 @@ public final OperationsClient getOperationsClient() { /** * Creates a TrainingPipeline. A created TrainingPipeline right away will be attempted to be run. * + *

Sample code: + * + *

{@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. @@ -183,6 +203,17 @@ public final TrainingPipeline createTrainingPipeline( /** * Creates a TrainingPipeline. A created TrainingPipeline right away will be attempted to be run. * + *

Sample code: + * + *

{@code
+   * try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   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,6 +233,19 @@ public final TrainingPipeline createTrainingPipeline( /** * Creates a TrainingPipeline. A created TrainingPipeline right away will be attempted to be run. * + *

Sample code: + * + *

{@code
+   * try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) {
+   *   CreateTrainingPipelineRequest request =
+   *       CreateTrainingPipelineRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setTrainingPipeline(TrainingPipeline.newBuilder().build())
+   *           .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 */ @@ -214,6 +258,20 @@ public final TrainingPipeline createTrainingPipeline(CreateTrainingPipelineReque * Creates a TrainingPipeline. A created TrainingPipeline right away will be attempted to be run. * *

Sample code: + * + *

{@code
+   * try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) {
+   *   CreateTrainingPipelineRequest request =
+   *       CreateTrainingPipelineRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setTrainingPipeline(TrainingPipeline.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       pipelineServiceClient.createTrainingPipelineCallable().futureCall(request);
+   *   // Do something.
+   *   TrainingPipeline response = future.get();
+   * }
+   * }
*/ public final UnaryCallable createTrainingPipelineCallable() { @@ -224,6 +282,16 @@ public final TrainingPipeline createTrainingPipeline(CreateTrainingPipelineReque /** * Gets a TrainingPipeline. * + *

Sample code: + * + *

{@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 @@ -240,6 +308,16 @@ public final TrainingPipeline getTrainingPipeline(TrainingPipelineName name) { /** * Gets a TrainingPipeline. * + *

Sample code: + * + *

{@code
+   * try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) {
+   *   String name =
+   *       TrainingPipelineName.of("[PROJECT]", "[LOCATION]", "[TRAINING_PIPELINE]").toString();
+   *   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 @@ -254,6 +332,20 @@ public final TrainingPipeline getTrainingPipeline(String name) { /** * Gets a TrainingPipeline. * + *

Sample code: + * + *

{@code
+   * try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) {
+   *   GetTrainingPipelineRequest request =
+   *       GetTrainingPipelineRequest.newBuilder()
+   *           .setName(
+   *               TrainingPipelineName.of("[PROJECT]", "[LOCATION]", "[TRAINING_PIPELINE]")
+   *                   .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 */ @@ -266,6 +358,21 @@ public final TrainingPipeline getTrainingPipeline(GetTrainingPipelineRequest req * Gets a TrainingPipeline. * *

Sample code: + * + *

{@code
+   * try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) {
+   *   GetTrainingPipelineRequest request =
+   *       GetTrainingPipelineRequest.newBuilder()
+   *           .setName(
+   *               TrainingPipelineName.of("[PROJECT]", "[LOCATION]", "[TRAINING_PIPELINE]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       pipelineServiceClient.getTrainingPipelineCallable().futureCall(request);
+   *   // Do something.
+   *   TrainingPipeline response = future.get();
+   * }
+   * }
*/ public final UnaryCallable getTrainingPipelineCallable() { @@ -276,6 +383,18 @@ public final TrainingPipeline getTrainingPipeline(GetTrainingPipelineRequest req /** * Lists TrainingPipelines in a Location. * + *

Sample code: + * + *

{@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 @@ -292,6 +411,18 @@ public final ListTrainingPipelinesPagedResponse listTrainingPipelines(LocationNa /** * Lists TrainingPipelines in a Location. * + *

Sample code: + * + *

{@code
+   * try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   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 @@ -306,6 +437,25 @@ public final ListTrainingPipelinesPagedResponse listTrainingPipelines(String par /** * Lists TrainingPipelines in a Location. * + *

Sample code: + * + *

{@code
+   * try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) {
+   *   ListTrainingPipelinesRequest request =
+   *       ListTrainingPipelinesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setReadMask(FieldMask.newBuilder().build())
+   *           .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 */ @@ -319,6 +469,25 @@ public final ListTrainingPipelinesPagedResponse listTrainingPipelines( * Lists TrainingPipelines in a Location. * *

Sample code: + * + *

{@code
+   * try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) {
+   *   ListTrainingPipelinesRequest request =
+   *       ListTrainingPipelinesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setReadMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       pipelineServiceClient.listTrainingPipelinesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (TrainingPipeline element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listTrainingPipelinesPagedCallable() { @@ -330,6 +499,24 @@ public final ListTrainingPipelinesPagedResponse listTrainingPipelines( * Lists TrainingPipelines in a Location. * *

Sample code: + * + *

{@code
+   * try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) {
+   *   while (true) {
+   *     ListTrainingPipelinesResponse response =
+   *         pipelineServiceClient.listTrainingPipelinesCallable().call(request);
+   *     for (TrainingPipeline element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listTrainingPipelinesCallable() { @@ -340,6 +527,16 @@ public final ListTrainingPipelinesPagedResponse listTrainingPipelines( /** * Deletes a TrainingPipeline. * + *

Sample code: + * + *

{@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 @@ -357,6 +554,16 @@ public final OperationFuture deleteTrainingPipel /** * Deletes a TrainingPipeline. * + *

Sample code: + * + *

{@code
+   * try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) {
+   *   String name =
+   *       TrainingPipelineName.of("[PROJECT]", "[LOCATION]", "[TRAINING_PIPELINE]").toString();
+   *   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 @@ -372,6 +579,20 @@ public final OperationFuture deleteTrainingPipel /** * Deletes a TrainingPipeline. * + *

Sample code: + * + *

{@code
+   * try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) {
+   *   DeleteTrainingPipelineRequest request =
+   *       DeleteTrainingPipelineRequest.newBuilder()
+   *           .setName(
+   *               TrainingPipelineName.of("[PROJECT]", "[LOCATION]", "[TRAINING_PIPELINE]")
+   *                   .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 */ @@ -385,6 +606,21 @@ public final OperationFuture deleteTrainingPipel * Deletes a TrainingPipeline. * *

Sample code: + * + *

{@code
+   * try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) {
+   *   DeleteTrainingPipelineRequest request =
+   *       DeleteTrainingPipelineRequest.newBuilder()
+   *           .setName(
+   *               TrainingPipelineName.of("[PROJECT]", "[LOCATION]", "[TRAINING_PIPELINE]")
+   *                   .toString())
+   *           .build();
+   *   OperationFuture future =
+   *       pipelineServiceClient.deleteTrainingPipelineOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
*/ public final OperationCallable deleteTrainingPipelineOperationCallable() { @@ -396,6 +632,21 @@ public final OperationFuture deleteTrainingPipel * Deletes a TrainingPipeline. * *

Sample code: + * + *

{@code
+   * try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) {
+   *   DeleteTrainingPipelineRequest request =
+   *       DeleteTrainingPipelineRequest.newBuilder()
+   *           .setName(
+   *               TrainingPipelineName.of("[PROJECT]", "[LOCATION]", "[TRAINING_PIPELINE]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       pipelineServiceClient.deleteTrainingPipelineCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
*/ public final UnaryCallable deleteTrainingPipelineCallable() { @@ -416,6 +667,16 @@ public final OperationFuture deleteTrainingPipel * [TrainingPipeline.state][google.cloud.aiplatform.v1beta1.TrainingPipeline.state] is set to * `CANCELLED`. * + *

Sample code: + * + *

{@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 @@ -442,6 +703,16 @@ public final void cancelTrainingPipeline(TrainingPipelineName name) { * [TrainingPipeline.state][google.cloud.aiplatform.v1beta1.TrainingPipeline.state] is set to * `CANCELLED`. * + *

Sample code: + * + *

{@code
+   * try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) {
+   *   String name =
+   *       TrainingPipelineName.of("[PROJECT]", "[LOCATION]", "[TRAINING_PIPELINE]").toString();
+   *   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 @@ -466,6 +737,20 @@ public final void cancelTrainingPipeline(String name) { * [TrainingPipeline.state][google.cloud.aiplatform.v1beta1.TrainingPipeline.state] is set to * `CANCELLED`. * + *

Sample code: + * + *

{@code
+   * try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) {
+   *   CancelTrainingPipelineRequest request =
+   *       CancelTrainingPipelineRequest.newBuilder()
+   *           .setName(
+   *               TrainingPipelineName.of("[PROJECT]", "[LOCATION]", "[TRAINING_PIPELINE]")
+   *                   .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 */ @@ -488,6 +773,21 @@ public final void cancelTrainingPipeline(CancelTrainingPipelineRequest request) * `CANCELLED`. * *

Sample code: + * + *

{@code
+   * try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) {
+   *   CancelTrainingPipelineRequest request =
+   *       CancelTrainingPipelineRequest.newBuilder()
+   *           .setName(
+   *               TrainingPipelineName.of("[PROJECT]", "[LOCATION]", "[TRAINING_PIPELINE]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture 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/PredictionServiceClient.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/PredictionServiceClient.java index 88ead5820..2ed582342 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 @@ -34,6 +34,15 @@ *

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: * + *

{@code
+ * try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
+ *   EndpointName endpoint = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
+ *   List 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 * such as threads. In the example above, try-with-resources is used, which automatically calls * close(). @@ -141,6 +150,17 @@ public PredictionServiceStub getStub() { /** * Perform an online prediction. * + *

Sample code: + * + *

{@code
+   * try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
+   *   EndpointName endpoint = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
+   *   List 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 @@ -173,6 +193,17 @@ public final PredictResponse predict( /** * Perform an online prediction. * + *

Sample code: + * + *

{@code
+   * try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
+   *   String endpoint = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]").toString();
+   *   List 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 @@ -204,6 +235,20 @@ public final PredictResponse predict(String endpoint, List instances, Val /** * Perform an online prediction. * + *

Sample code: + * + *

{@code
+   * try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
+   *   PredictRequest request =
+   *       PredictRequest.newBuilder()
+   *           .setEndpoint(EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]").toString())
+   *           .addAllInstances(new ArrayList())
+   *           .setParameters(Value.newBuilder().build())
+   *           .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 */ @@ -216,6 +261,21 @@ public final PredictResponse predict(PredictRequest request) { * Perform an online prediction. * *

Sample code: + * + *

{@code
+   * try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
+   *   PredictRequest request =
+   *       PredictRequest.newBuilder()
+   *           .setEndpoint(EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]").toString())
+   *           .addAllInstances(new ArrayList())
+   *           .setParameters(Value.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       predictionServiceClient.predictCallable().futureCall(request);
+   *   // Do something.
+   *   PredictResponse response = future.get();
+   * }
+   * }
*/ public final UnaryCallable predictCallable() { return stub.predictCallable(); @@ -233,6 +293,19 @@ public final UnaryCallable predictCallable() { * [explanation_spec][google.cloud.aiplatform.v1beta1.DeployedModel.explanation_spec] populated. * Only deployed AutoML tabular Models have explanation_spec. * + *

Sample code: + * + *

{@code
+   * try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
+   *   EndpointName endpoint = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
+   *   List instances = new ArrayList<>();
+   *   Value parameters = Value.newBuilder().build();
+   *   String deployedModelId = "deployedModelId-1817547906";
+   *   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 @@ -277,6 +350,19 @@ public final ExplainResponse explain( * [explanation_spec][google.cloud.aiplatform.v1beta1.DeployedModel.explanation_spec] populated. * Only deployed AutoML tabular Models have explanation_spec. * + *

Sample code: + * + *

{@code
+   * try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
+   *   String endpoint = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]").toString();
+   *   List instances = new ArrayList<>();
+   *   Value parameters = Value.newBuilder().build();
+   *   String deployedModelId = "deployedModelId-1817547906";
+   *   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 @@ -321,6 +407,22 @@ public final ExplainResponse explain( * [explanation_spec][google.cloud.aiplatform.v1beta1.DeployedModel.explanation_spec] populated. * Only deployed AutoML tabular Models have explanation_spec. * + *

Sample code: + * + *

{@code
+   * try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
+   *   ExplainRequest request =
+   *       ExplainRequest.newBuilder()
+   *           .setEndpoint(EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]").toString())
+   *           .addAllInstances(new ArrayList())
+   *           .setParameters(Value.newBuilder().build())
+   *           .setExplanationSpecOverride(ExplanationSpecOverride.newBuilder().build())
+   *           .setDeployedModelId("deployedModelId-1817547906")
+   *           .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 */ @@ -341,6 +443,23 @@ public final ExplainResponse explain(ExplainRequest request) { * Only deployed AutoML tabular Models have explanation_spec. * *

Sample code: + * + *

{@code
+   * try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
+   *   ExplainRequest request =
+   *       ExplainRequest.newBuilder()
+   *           .setEndpoint(EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]").toString())
+   *           .addAllInstances(new ArrayList())
+   *           .setParameters(Value.newBuilder().build())
+   *           .setExplanationSpecOverride(ExplanationSpecOverride.newBuilder().build())
+   *           .setDeployedModelId("deployedModelId-1817547906")
+   *           .build();
+   *   ApiFuture 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/SpecialistPoolServiceClient.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/SpecialistPoolServiceClient.java index 8723b96b1..5e04a15ba 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 @@ -51,6 +51,15 @@ *

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: * + *

{@code
+ * 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 * resources such as threads. In the example above, try-with-resources is used, which automatically * calls close(). @@ -169,6 +178,18 @@ public final OperationsClient getOperationsClient() { /** * Creates a SpecialistPool. * + *

Sample code: + * + *

{@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. @@ -188,6 +209,18 @@ public final OperationsClient getOperationsClient() { /** * Creates a SpecialistPool. * + *

Sample code: + * + *

{@code
+   * try (SpecialistPoolServiceClient specialistPoolServiceClient =
+   *     SpecialistPoolServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   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. @@ -207,6 +240,21 @@ public final OperationsClient getOperationsClient() { /** * Creates a SpecialistPool. * + *

Sample code: + * + *

{@code
+   * try (SpecialistPoolServiceClient specialistPoolServiceClient =
+   *     SpecialistPoolServiceClient.create()) {
+   *   CreateSpecialistPoolRequest request =
+   *       CreateSpecialistPoolRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setSpecialistPool(SpecialistPool.newBuilder().build())
+   *           .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 */ @@ -220,6 +268,21 @@ public final OperationsClient getOperationsClient() { * Creates a SpecialistPool. * *

Sample code: + * + *

{@code
+   * try (SpecialistPoolServiceClient specialistPoolServiceClient =
+   *     SpecialistPoolServiceClient.create()) {
+   *   CreateSpecialistPoolRequest request =
+   *       CreateSpecialistPoolRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setSpecialistPool(SpecialistPool.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       specialistPoolServiceClient.createSpecialistPoolOperationCallable().futureCall(request);
+   *   // Do something.
+   *   SpecialistPool response = future.get();
+   * }
+   * }
*/ public final OperationCallable< CreateSpecialistPoolRequest, SpecialistPool, CreateSpecialistPoolOperationMetadata> @@ -232,6 +295,21 @@ public final OperationsClient getOperationsClient() { * Creates a SpecialistPool. * *

Sample code: + * + *

{@code
+   * try (SpecialistPoolServiceClient specialistPoolServiceClient =
+   *     SpecialistPoolServiceClient.create()) {
+   *   CreateSpecialistPoolRequest request =
+   *       CreateSpecialistPoolRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setSpecialistPool(SpecialistPool.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       specialistPoolServiceClient.createSpecialistPoolCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
*/ public final UnaryCallable createSpecialistPoolCallable() { @@ -242,6 +320,17 @@ public final OperationsClient getOperationsClient() { /** * Gets a SpecialistPool. * + *

Sample code: + * + *

{@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 @@ -258,6 +347,17 @@ public final SpecialistPool getSpecialistPool(SpecialistPoolName name) { /** * Gets a SpecialistPool. * + *

Sample code: + * + *

{@code
+   * try (SpecialistPoolServiceClient specialistPoolServiceClient =
+   *     SpecialistPoolServiceClient.create()) {
+   *   String name =
+   *       SpecialistPoolName.of("[PROJECT]", "[LOCATION]", "[SPECIALIST_POOL]").toString();
+   *   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 @@ -271,6 +371,20 @@ public final SpecialistPool getSpecialistPool(String name) { /** * Gets a SpecialistPool. * + *

Sample code: + * + *

{@code
+   * try (SpecialistPoolServiceClient specialistPoolServiceClient =
+   *     SpecialistPoolServiceClient.create()) {
+   *   GetSpecialistPoolRequest request =
+   *       GetSpecialistPoolRequest.newBuilder()
+   *           .setName(
+   *               SpecialistPoolName.of("[PROJECT]", "[LOCATION]", "[SPECIALIST_POOL]").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 */ @@ -283,6 +397,21 @@ public final SpecialistPool getSpecialistPool(GetSpecialistPoolRequest request) * Gets a SpecialistPool. * *

Sample code: + * + *

{@code
+   * try (SpecialistPoolServiceClient specialistPoolServiceClient =
+   *     SpecialistPoolServiceClient.create()) {
+   *   GetSpecialistPoolRequest request =
+   *       GetSpecialistPoolRequest.newBuilder()
+   *           .setName(
+   *               SpecialistPoolName.of("[PROJECT]", "[LOCATION]", "[SPECIALIST_POOL]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       specialistPoolServiceClient.getSpecialistPoolCallable().futureCall(request);
+   *   // Do something.
+   *   SpecialistPool response = future.get();
+   * }
+   * }
*/ public final UnaryCallable getSpecialistPoolCallable() { return stub.getSpecialistPoolCallable(); @@ -292,6 +421,19 @@ public final UnaryCallable getSpeciali /** * Lists SpecialistPools in a Location. * + *

Sample code: + * + *

{@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 @@ -308,6 +450,19 @@ public final ListSpecialistPoolsPagedResponse listSpecialistPools(LocationName p /** * Lists SpecialistPools in a Location. * + *

Sample code: + * + *

{@code
+   * try (SpecialistPoolServiceClient specialistPoolServiceClient =
+   *     SpecialistPoolServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   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 @@ -322,6 +477,25 @@ public final ListSpecialistPoolsPagedResponse listSpecialistPools(String parent) /** * Lists SpecialistPools in a Location. * + *

Sample code: + * + *

{@code
+   * try (SpecialistPoolServiceClient specialistPoolServiceClient =
+   *     SpecialistPoolServiceClient.create()) {
+   *   ListSpecialistPoolsRequest request =
+   *       ListSpecialistPoolsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setReadMask(FieldMask.newBuilder().build())
+   *           .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 */ @@ -335,6 +509,25 @@ public final ListSpecialistPoolsPagedResponse listSpecialistPools( * Lists SpecialistPools in a Location. * *

Sample code: + * + *

{@code
+   * try (SpecialistPoolServiceClient specialistPoolServiceClient =
+   *     SpecialistPoolServiceClient.create()) {
+   *   ListSpecialistPoolsRequest request =
+   *       ListSpecialistPoolsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setReadMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       specialistPoolServiceClient.listSpecialistPoolsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (SpecialistPool element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listSpecialistPoolsPagedCallable() { @@ -346,6 +539,25 @@ public final ListSpecialistPoolsPagedResponse listSpecialistPools( * Lists SpecialistPools in a Location. * *

Sample code: + * + *

{@code
+   * try (SpecialistPoolServiceClient specialistPoolServiceClient =
+   *     SpecialistPoolServiceClient.create()) {
+   *   while (true) {
+   *     ListSpecialistPoolsResponse response =
+   *         specialistPoolServiceClient.listSpecialistPoolsCallable().call(request);
+   *     for (SpecialistPool element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listSpecialistPoolsCallable() { @@ -356,6 +568,17 @@ public final ListSpecialistPoolsPagedResponse listSpecialistPools( /** * Deletes a SpecialistPool as well as all Specialists in the pool. * + *

Sample code: + * + *

{@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 @@ -373,6 +596,17 @@ public final OperationFuture deleteSpecialistPoo /** * Deletes a SpecialistPool as well as all Specialists in the pool. * + *

Sample code: + * + *

{@code
+   * try (SpecialistPoolServiceClient specialistPoolServiceClient =
+   *     SpecialistPoolServiceClient.create()) {
+   *   String name =
+   *       SpecialistPoolName.of("[PROJECT]", "[LOCATION]", "[SPECIALIST_POOL]").toString();
+   *   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 @@ -388,6 +622,21 @@ public final OperationFuture deleteSpecialistPoo /** * Deletes a SpecialistPool as well as all Specialists in the pool. * + *

Sample code: + * + *

{@code
+   * try (SpecialistPoolServiceClient specialistPoolServiceClient =
+   *     SpecialistPoolServiceClient.create()) {
+   *   DeleteSpecialistPoolRequest request =
+   *       DeleteSpecialistPoolRequest.newBuilder()
+   *           .setName(
+   *               SpecialistPoolName.of("[PROJECT]", "[LOCATION]", "[SPECIALIST_POOL]").toString())
+   *           .setForce(true)
+   *           .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 */ @@ -401,6 +650,22 @@ public final OperationFuture deleteSpecialistPoo * Deletes a SpecialistPool as well as all Specialists in the pool. * *

Sample code: + * + *

{@code
+   * try (SpecialistPoolServiceClient specialistPoolServiceClient =
+   *     SpecialistPoolServiceClient.create()) {
+   *   DeleteSpecialistPoolRequest request =
+   *       DeleteSpecialistPoolRequest.newBuilder()
+   *           .setName(
+   *               SpecialistPoolName.of("[PROJECT]", "[LOCATION]", "[SPECIALIST_POOL]").toString())
+   *           .setForce(true)
+   *           .build();
+   *   OperationFuture future =
+   *       specialistPoolServiceClient.deleteSpecialistPoolOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
*/ public final OperationCallable deleteSpecialistPoolOperationCallable() { @@ -412,6 +677,22 @@ public final OperationFuture deleteSpecialistPoo * Deletes a SpecialistPool as well as all Specialists in the pool. * *

Sample code: + * + *

{@code
+   * try (SpecialistPoolServiceClient specialistPoolServiceClient =
+   *     SpecialistPoolServiceClient.create()) {
+   *   DeleteSpecialistPoolRequest request =
+   *       DeleteSpecialistPoolRequest.newBuilder()
+   *           .setName(
+   *               SpecialistPoolName.of("[PROJECT]", "[LOCATION]", "[SPECIALIST_POOL]").toString())
+   *           .setForce(true)
+   *           .build();
+   *   ApiFuture future =
+   *       specialistPoolServiceClient.deleteSpecialistPoolCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
*/ public final UnaryCallable deleteSpecialistPoolCallable() { @@ -422,6 +703,18 @@ public final OperationFuture deleteSpecialistPoo /** * Updates a SpecialistPool. * + *

Sample code: + * + *

{@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 @@ -440,6 +733,21 @@ public final OperationFuture deleteSpecialistPoo /** * Updates a SpecialistPool. * + *

Sample code: + * + *

{@code
+   * try (SpecialistPoolServiceClient specialistPoolServiceClient =
+   *     SpecialistPoolServiceClient.create()) {
+   *   UpdateSpecialistPoolRequest request =
+   *       UpdateSpecialistPoolRequest.newBuilder()
+   *           .setSpecialistPool(SpecialistPool.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .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 */ @@ -453,6 +761,21 @@ public final OperationFuture deleteSpecialistPoo * Updates a SpecialistPool. * *

Sample code: + * + *

{@code
+   * try (SpecialistPoolServiceClient specialistPoolServiceClient =
+   *     SpecialistPoolServiceClient.create()) {
+   *   UpdateSpecialistPoolRequest request =
+   *       UpdateSpecialistPoolRequest.newBuilder()
+   *           .setSpecialistPool(SpecialistPool.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       specialistPoolServiceClient.updateSpecialistPoolOperationCallable().futureCall(request);
+   *   // Do something.
+   *   SpecialistPool response = future.get();
+   * }
+   * }
*/ public final OperationCallable< UpdateSpecialistPoolRequest, SpecialistPool, UpdateSpecialistPoolOperationMetadata> @@ -465,6 +788,21 @@ public final OperationFuture deleteSpecialistPoo * Updates a SpecialistPool. * *

Sample code: + * + *

{@code
+   * try (SpecialistPoolServiceClient specialistPoolServiceClient =
+   *     SpecialistPoolServiceClient.create()) {
+   *   UpdateSpecialistPoolRequest request =
+   *       UpdateSpecialistPoolRequest.newBuilder()
+   *           .setSpecialistPool(SpecialistPool.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture 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/package-info.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/package-info.java index ffe5559e2..03c35f17b 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 @@ -21,16 +21,38 @@ * *

Sample for DatasetServiceClient: * + *

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

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

Sample for EndpointServiceClient: * + *

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

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

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

Sample for JobServiceClient: * + *

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

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

Service Description: A service that migrates resources from automl.googleapis.com, @@ -38,24 +60,59 @@ * *

Sample for MigrationServiceClient: * + *

{@code
+ * try (MigrationServiceClient migrationServiceClient = MigrationServiceClient.create()) {
+ *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ *   for (MigratableResource element :
+ *       migrationServiceClient.searchMigratableResources(parent).iterateAll()) {
+ *     // doThingsWith(element);
+ *   }
+ * }
+ * }
+ * *

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

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

Sample for ModelServiceClient: * + *

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

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

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

Sample for PipelineServiceClient: * + *

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

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

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

Sample for PredictionServiceClient: * + *

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

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

Service Description: A service for creating and managing Customer SpecialistPools. When @@ -65,6 +122,15 @@ * CrowdCompute console. * *

Sample for SpecialistPoolServiceClient: + * + *

{@code
+ * try (SpecialistPoolServiceClient specialistPoolServiceClient =
+ *     SpecialistPoolServiceClient.create()) {
+ *   SpecialistPoolName name =
+ *       SpecialistPoolName.of("[PROJECT]", "[LOCATION]", "[SPECIALIST_POOL]");
+ *   SpecialistPool response = specialistPoolServiceClient.getSpecialistPool(name);
+ * }
+ * }
*/ @Generated("by gapic-generator-java") package com.google.cloud.aiplatform.v1beta1; 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 df5240454..4ad34026c 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 @@ -442,75 +442,92 @@ public GrpcOperationsStub getOperationsStub() { return operationsStub; } + @Override public UnaryCallable createDatasetCallable() { return createDatasetCallable; } + @Override public OperationCallable createDatasetOperationCallable() { return createDatasetOperationCallable; } + @Override public UnaryCallable getDatasetCallable() { return getDatasetCallable; } + @Override public UnaryCallable updateDatasetCallable() { return updateDatasetCallable; } + @Override public UnaryCallable listDatasetsCallable() { return listDatasetsCallable; } + @Override public UnaryCallable listDatasetsPagedCallable() { return listDatasetsPagedCallable; } + @Override public UnaryCallable deleteDatasetCallable() { return deleteDatasetCallable; } + @Override public OperationCallable deleteDatasetOperationCallable() { return deleteDatasetOperationCallable; } + @Override public UnaryCallable importDataCallable() { return importDataCallable; } + @Override public OperationCallable importDataOperationCallable() { return importDataOperationCallable; } + @Override public UnaryCallable exportDataCallable() { return exportDataCallable; } + @Override public OperationCallable exportDataOperationCallable() { return exportDataOperationCallable; } + @Override public UnaryCallable listDataItemsCallable() { return listDataItemsCallable; } + @Override public UnaryCallable listDataItemsPagedCallable() { return listDataItemsPagedCallable; } + @Override public UnaryCallable getAnnotationSpecCallable() { return getAnnotationSpecCallable; } + @Override public UnaryCallable listAnnotationsCallable() { return listAnnotationsCallable; } + @Override public UnaryCallable listAnnotationsPagedCallable() { return listAnnotationsPagedCallable; 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 ba20e502a..b47c67867 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 @@ -340,54 +340,66 @@ public GrpcOperationsStub getOperationsStub() { return operationsStub; } + @Override public UnaryCallable createEndpointCallable() { return createEndpointCallable; } + @Override public OperationCallable createEndpointOperationCallable() { return createEndpointOperationCallable; } + @Override public UnaryCallable getEndpointCallable() { return getEndpointCallable; } + @Override public UnaryCallable listEndpointsCallable() { return listEndpointsCallable; } + @Override public UnaryCallable listEndpointsPagedCallable() { return listEndpointsPagedCallable; } + @Override public UnaryCallable updateEndpointCallable() { return updateEndpointCallable; } + @Override public UnaryCallable deleteEndpointCallable() { return deleteEndpointCallable; } + @Override public OperationCallable deleteEndpointOperationCallable() { return deleteEndpointOperationCallable; } + @Override public UnaryCallable deployModelCallable() { return deployModelCallable; } + @Override public OperationCallable deployModelOperationCallable() { return deployModelOperationCallable; } + @Override public UnaryCallable undeployModelCallable() { return undeployModelCallable; } + @Override public OperationCallable< UndeployModelRequest, UndeployModelResponse, UndeployModelOperationMetadata> undeployModelOperationCallable() { 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 472f4ccd2..867fd331a 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 @@ -821,134 +821,162 @@ public GrpcOperationsStub getOperationsStub() { return operationsStub; } + @Override public UnaryCallable createCustomJobCallable() { return createCustomJobCallable; } + @Override public UnaryCallable getCustomJobCallable() { return getCustomJobCallable; } + @Override public UnaryCallable listCustomJobsCallable() { return listCustomJobsCallable; } + @Override public UnaryCallable listCustomJobsPagedCallable() { return listCustomJobsPagedCallable; } + @Override public UnaryCallable deleteCustomJobCallable() { return deleteCustomJobCallable; } + @Override public OperationCallable deleteCustomJobOperationCallable() { return deleteCustomJobOperationCallable; } + @Override public UnaryCallable cancelCustomJobCallable() { return cancelCustomJobCallable; } + @Override public UnaryCallable createDataLabelingJobCallable() { return createDataLabelingJobCallable; } + @Override public UnaryCallable getDataLabelingJobCallable() { return getDataLabelingJobCallable; } + @Override public UnaryCallable listDataLabelingJobsCallable() { return listDataLabelingJobsCallable; } + @Override public UnaryCallable listDataLabelingJobsPagedCallable() { return listDataLabelingJobsPagedCallable; } + @Override public UnaryCallable deleteDataLabelingJobCallable() { return deleteDataLabelingJobCallable; } + @Override public OperationCallable deleteDataLabelingJobOperationCallable() { return deleteDataLabelingJobOperationCallable; } + @Override public UnaryCallable cancelDataLabelingJobCallable() { return cancelDataLabelingJobCallable; } + @Override public UnaryCallable createHyperparameterTuningJobCallable() { return createHyperparameterTuningJobCallable; } + @Override public UnaryCallable getHyperparameterTuningJobCallable() { return getHyperparameterTuningJobCallable; } + @Override public UnaryCallable listHyperparameterTuningJobsCallable() { return listHyperparameterTuningJobsCallable; } + @Override public UnaryCallable< ListHyperparameterTuningJobsRequest, ListHyperparameterTuningJobsPagedResponse> listHyperparameterTuningJobsPagedCallable() { return listHyperparameterTuningJobsPagedCallable; } + @Override public UnaryCallable deleteHyperparameterTuningJobCallable() { return deleteHyperparameterTuningJobCallable; } + @Override public OperationCallable deleteHyperparameterTuningJobOperationCallable() { return deleteHyperparameterTuningJobOperationCallable; } + @Override public UnaryCallable cancelHyperparameterTuningJobCallable() { return cancelHyperparameterTuningJobCallable; } + @Override public UnaryCallable createBatchPredictionJobCallable() { return createBatchPredictionJobCallable; } + @Override public UnaryCallable getBatchPredictionJobCallable() { return getBatchPredictionJobCallable; } + @Override public UnaryCallable listBatchPredictionJobsCallable() { return listBatchPredictionJobsCallable; } + @Override public UnaryCallable listBatchPredictionJobsPagedCallable() { return listBatchPredictionJobsPagedCallable; } + @Override public UnaryCallable deleteBatchPredictionJobCallable() { return deleteBatchPredictionJobCallable; } + @Override public OperationCallable deleteBatchPredictionJobOperationCallable() { return deleteBatchPredictionJobOperationCallable; } + @Override public UnaryCallable cancelBatchPredictionJobCallable() { return cancelBatchPredictionJobCallable; } 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 4fcb60e3f..f70ed800b 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 @@ -191,20 +191,24 @@ public GrpcOperationsStub getOperationsStub() { return operationsStub; } + @Override public UnaryCallable searchMigratableResourcesCallable() { return searchMigratableResourcesCallable; } + @Override public UnaryCallable searchMigratableResourcesPagedCallable() { return searchMigratableResourcesPagedCallable; } + @Override public UnaryCallable batchMigrateResourcesCallable() { return batchMigrateResourcesCallable; } + @Override public OperationCallable< BatchMigrateResourcesRequest, BatchMigrateResourcesResponse, 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 5684f69a2..69d8b1d13 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 @@ -450,73 +450,89 @@ public GrpcOperationsStub getOperationsStub() { return operationsStub; } + @Override public UnaryCallable uploadModelCallable() { return uploadModelCallable; } + @Override public OperationCallable uploadModelOperationCallable() { return uploadModelOperationCallable; } + @Override public UnaryCallable getModelCallable() { return getModelCallable; } + @Override public UnaryCallable listModelsCallable() { return listModelsCallable; } + @Override public UnaryCallable listModelsPagedCallable() { return listModelsPagedCallable; } + @Override public UnaryCallable updateModelCallable() { return updateModelCallable; } + @Override public UnaryCallable deleteModelCallable() { return deleteModelCallable; } + @Override public OperationCallable deleteModelOperationCallable() { return deleteModelOperationCallable; } + @Override public UnaryCallable exportModelCallable() { return exportModelCallable; } + @Override public OperationCallable exportModelOperationCallable() { return exportModelOperationCallable; } + @Override public UnaryCallable getModelEvaluationCallable() { return getModelEvaluationCallable; } + @Override public UnaryCallable listModelEvaluationsCallable() { return listModelEvaluationsCallable; } + @Override public UnaryCallable listModelEvaluationsPagedCallable() { return listModelEvaluationsPagedCallable; } + @Override public UnaryCallable getModelEvaluationSliceCallable() { return getModelEvaluationSliceCallable; } + @Override public UnaryCallable listModelEvaluationSlicesCallable() { return listModelEvaluationSlicesCallable; } + @Override public UnaryCallable listModelEvaluationSlicesPagedCallable() { return listModelEvaluationSlicesPagedCallable; 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 84aaf3c5c..742b70296 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 @@ -283,34 +283,41 @@ public GrpcOperationsStub getOperationsStub() { return operationsStub; } + @Override public UnaryCallable createTrainingPipelineCallable() { return createTrainingPipelineCallable; } + @Override public UnaryCallable getTrainingPipelineCallable() { return getTrainingPipelineCallable; } + @Override public UnaryCallable listTrainingPipelinesCallable() { return listTrainingPipelinesCallable; } + @Override public UnaryCallable listTrainingPipelinesPagedCallable() { return listTrainingPipelinesPagedCallable; } + @Override public UnaryCallable deleteTrainingPipelineCallable() { return deleteTrainingPipelineCallable; } + @Override public OperationCallable deleteTrainingPipelineOperationCallable() { return deleteTrainingPipelineOperationCallable; } + @Override public UnaryCallable cancelTrainingPipelineCallable() { return cancelTrainingPipelineCallable; } 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 9835ec3e8..49d493512 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 @@ -149,10 +149,12 @@ public GrpcOperationsStub getOperationsStub() { return operationsStub; } + @Override public UnaryCallable predictCallable() { return predictCallable; } + @Override public UnaryCallable explainCallable() { return explainCallable; } 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 3983992be..08011b735 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 @@ -298,43 +298,52 @@ public GrpcOperationsStub getOperationsStub() { return operationsStub; } + @Override public UnaryCallable createSpecialistPoolCallable() { return createSpecialistPoolCallable; } + @Override public OperationCallable< CreateSpecialistPoolRequest, SpecialistPool, CreateSpecialistPoolOperationMetadata> createSpecialistPoolOperationCallable() { return createSpecialistPoolOperationCallable; } + @Override public UnaryCallable getSpecialistPoolCallable() { return getSpecialistPoolCallable; } + @Override public UnaryCallable listSpecialistPoolsCallable() { return listSpecialistPoolsCallable; } + @Override public UnaryCallable listSpecialistPoolsPagedCallable() { return listSpecialistPoolsPagedCallable; } + @Override public UnaryCallable deleteSpecialistPoolCallable() { return deleteSpecialistPoolCallable; } + @Override public OperationCallable deleteSpecialistPoolOperationCallable() { return deleteSpecialistPoolOperationCallable; } + @Override public UnaryCallable updateSpecialistPoolCallable() { return updateSpecialistPoolCallable; } + @Override public OperationCallable< UpdateSpecialistPoolRequest, SpecialistPool, UpdateSpecialistPoolOperationMetadata> updateSpecialistPoolOperationCallable() { diff --git a/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/DatasetServiceClientTest.java b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/DatasetServiceClientTest.java new file mode 100644 index 000000000..4f0d8af7c --- /dev/null +++ b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/DatasetServiceClientTest.java @@ -0,0 +1,971 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1; + +import static com.google.cloud.aiplatform.v1.DatasetServiceClient.ListAnnotationsPagedResponse; +import static com.google.cloud.aiplatform.v1.DatasetServiceClient.ListDataItemsPagedResponse; +import static com.google.cloud.aiplatform.v1.DatasetServiceClient.ListDatasetsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import 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; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class DatasetServiceClientTest { + private static MockServiceHelper mockServiceHelper; + private DatasetServiceClient client; + private static MockDatasetService mockDatasetService; + private LocalChannelProvider channelProvider; + + @BeforeClass + public static void startStaticServer() { + mockDatasetService = new MockDatasetService(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockDatasetService)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + DatasetServiceSettings settings = + DatasetServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = DatasetServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void createDatasetTest() 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()) + .setEncryptionSpec(EncryptionSpec.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createDatasetTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDatasetService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + 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.toString(), actualRequest.getParent()); + Assert.assertEquals(dataset, actualRequest.getDataset()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createDatasetExceptionTest() throws Exception { + 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()) + .setEncryptionSpec(EncryptionSpec.newBuilder().build()) + .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()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void getDatasetTest() 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()) + .setEncryptionSpec(EncryptionSpec.newBuilder().build()) + .build(); + mockDatasetService.addResponse(expectedResponse); + + DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]"); + + 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.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getDatasetExceptionTest() throws Exception { + 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()) + .setEncryptionSpec(EncryptionSpec.newBuilder().build()) + .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. + } + } + + @Test + public void updateDatasetTest() 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()) + .setEncryptionSpec(EncryptionSpec.newBuilder().build()) + .build(); + mockDatasetService.addResponse(expectedResponse); + + Dataset dataset = Dataset.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Dataset actualResponse = client.updateDataset(dataset, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDatasetService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateDatasetRequest actualRequest = ((UpdateDatasetRequest) actualRequests.get(0)); + + Assert.assertEquals(dataset, actualRequest.getDataset()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateDatasetExceptionTest() throws Exception { + 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. + } + } + + @Test + public void listDatasetsTest() throws Exception { + Dataset responsesElement = Dataset.newBuilder().build(); + ListDatasetsResponse expectedResponse = + ListDatasetsResponse.newBuilder() + .setNextPageToken("") + .addAllDatasets(Arrays.asList(responsesElement)) + .build(); + mockDatasetService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListDatasetsPagedResponse pagedListResponse = client.listDatasets(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDatasetsList().get(0), resources.get(0)); + + List actualRequests = mockDatasetService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListDatasetsRequest actualRequest = ((ListDatasetsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listDatasetsExceptionTest() throws Exception { + 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. + } + } + + @Test + public void deleteDatasetTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteDatasetTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDatasetService.addResponse(resultOperation); + + DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]"); + + client.deleteDatasetAsync(name).get(); + + List actualRequests = mockDatasetService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteDatasetRequest actualRequest = ((DeleteDatasetRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteDatasetExceptionTest() throws Exception { + 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()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void importDataTest() throws Exception { + ImportDataResponse expectedResponse = ImportDataResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("importDataTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDatasetService.addResponse(resultOperation); + + DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]"); + 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.toString(), actualRequest.getName()); + Assert.assertEquals(importConfigs, actualRequest.getImportConfigsList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void importDataExceptionTest() throws Exception { + 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()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void exportDataTest() 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); + + DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]"); + 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.toString(), actualRequest.getName()); + Assert.assertEquals(exportConfig, actualRequest.getExportConfig()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void exportDataExceptionTest() throws Exception { + 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()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void listDataItemsTest() throws Exception { + DataItem responsesElement = DataItem.newBuilder().build(); + ListDataItemsResponse expectedResponse = + ListDataItemsResponse.newBuilder() + .setNextPageToken("") + .addAllDataItems(Arrays.asList(responsesElement)) + .build(); + mockDatasetService.addResponse(expectedResponse); + + DatasetName parent = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]"); + + 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.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listDataItemsExceptionTest() throws Exception { + 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. + } + } + + @Test + public void getAnnotationSpecTest() 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); + + AnnotationSpecName name = + AnnotationSpecName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[ANNOTATION_SPEC]"); + + 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.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getAnnotationSpecExceptionTest() throws Exception { + 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. + } + } + + @Test + public void listAnnotationsTest() throws Exception { + Annotation responsesElement = Annotation.newBuilder().build(); + ListAnnotationsResponse expectedResponse = + ListAnnotationsResponse.newBuilder() + .setNextPageToken("") + .addAllAnnotations(Arrays.asList(responsesElement)) + .build(); + mockDatasetService.addResponse(expectedResponse); + + DataItemName parent = DataItemName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[DATA_ITEM]"); + + 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.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listAnnotationsExceptionTest() throws Exception { + 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. + } + } +} diff --git a/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/EndpointServiceClientTest.java b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/EndpointServiceClientTest.java new file mode 100644 index 000000000..28c41a84b --- /dev/null +++ b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/EndpointServiceClientTest.java @@ -0,0 +1,728 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1; + +import static com.google.cloud.aiplatform.v1.EndpointServiceClient.ListEndpointsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import 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; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class EndpointServiceClientTest { + private static MockServiceHelper mockServiceHelper; + private static MockEndpointService mockEndpointService; + private EndpointServiceClient client; + private LocalChannelProvider channelProvider; + + @BeforeClass + public static void startStaticServer() { + mockEndpointService = new MockEndpointService(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockEndpointService)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + EndpointServiceSettings settings = + EndpointServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = EndpointServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void createEndpointTest() 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()) + .setEncryptionSpec(EncryptionSpec.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createEndpointTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockEndpointService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + 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.toString(), actualRequest.getParent()); + Assert.assertEquals(endpoint, actualRequest.getEndpoint()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createEndpointExceptionTest() throws Exception { + 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()) + .setEncryptionSpec(EncryptionSpec.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()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void getEndpointTest() 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()) + .setEncryptionSpec(EncryptionSpec.newBuilder().build()) + .build(); + mockEndpointService.addResponse(expectedResponse); + + EndpointName name = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); + + 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.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getEndpointExceptionTest() throws Exception { + 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()) + .setEncryptionSpec(EncryptionSpec.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. + } + } + + @Test + public void listEndpointsTest() throws Exception { + Endpoint responsesElement = Endpoint.newBuilder().build(); + ListEndpointsResponse expectedResponse = + ListEndpointsResponse.newBuilder() + .setNextPageToken("") + .addAllEndpoints(Arrays.asList(responsesElement)) + .build(); + mockEndpointService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + 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.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listEndpointsExceptionTest() throws Exception { + 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. + } + } + + @Test + public void updateEndpointTest() 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()) + .setEncryptionSpec(EncryptionSpec.newBuilder().build()) + .build(); + mockEndpointService.addResponse(expectedResponse); + + Endpoint endpoint = Endpoint.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Endpoint actualResponse = client.updateEndpoint(endpoint, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockEndpointService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateEndpointRequest actualRequest = ((UpdateEndpointRequest) actualRequests.get(0)); + + Assert.assertEquals(endpoint, actualRequest.getEndpoint()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateEndpointExceptionTest() throws Exception { + 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. + } + } + + @Test + public void deleteEndpointTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteEndpointTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockEndpointService.addResponse(resultOperation); + + EndpointName name = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); + + client.deleteEndpointAsync(name).get(); + + List actualRequests = mockEndpointService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteEndpointRequest actualRequest = ((DeleteEndpointRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteEndpointExceptionTest() throws Exception { + 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()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deployModelTest() 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); + + EndpointName endpoint = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); + 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.toString(), actualRequest.getEndpoint()); + Assert.assertEquals(deployedModel, actualRequest.getDeployedModel()); + Assert.assertEquals(trafficSplit, actualRequest.getTrafficSplitMap()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deployModelExceptionTest() throws Exception { + 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()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void undeployModelTest() throws Exception { + UndeployModelResponse expectedResponse = UndeployModelResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("undeployModelTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockEndpointService.addResponse(resultOperation); + + EndpointName endpoint = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); + 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.toString(), actualRequest.getEndpoint()); + Assert.assertEquals(deployedModelId, actualRequest.getDeployedModelId()); + Assert.assertEquals(trafficSplit, actualRequest.getTrafficSplitMap()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void undeployModelExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEndpointService.addException(exception); + + try { + EndpointName endpoint = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); + 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()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } +} diff --git a/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/JobServiceClientTest.java b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/JobServiceClientTest.java new file mode 100644 index 000000000..698734265 --- /dev/null +++ b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/JobServiceClientTest.java @@ -0,0 +1,1992 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1; + +import static com.google.cloud.aiplatform.v1.JobServiceClient.ListBatchPredictionJobsPagedResponse; +import static com.google.cloud.aiplatform.v1.JobServiceClient.ListCustomJobsPagedResponse; +import static com.google.cloud.aiplatform.v1.JobServiceClient.ListDataLabelingJobsPagedResponse; +import static com.google.cloud.aiplatform.v1.JobServiceClient.ListHyperparameterTuningJobsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.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; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class JobServiceClientTest { + private static MockServiceHelper mockServiceHelper; + private JobServiceClient client; + private static MockJobService mockJobService; + private LocalChannelProvider channelProvider; + + @BeforeClass + public static void startStaticServer() { + mockJobService = new MockJobService(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockJobService)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + JobServiceSettings settings = + JobServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = JobServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void createCustomJobTest() 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()) + .setEncryptionSpec(EncryptionSpec.newBuilder().build()) + .build(); + mockJobService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + 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.toString(), actualRequest.getParent()); + Assert.assertEquals(customJob, actualRequest.getCustomJob()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createCustomJobExceptionTest() throws Exception { + 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()) + .setEncryptionSpec(EncryptionSpec.newBuilder().build()) + .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. + } + } + + @Test + public void getCustomJobTest() 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()) + .setEncryptionSpec(EncryptionSpec.newBuilder().build()) + .build(); + mockJobService.addResponse(expectedResponse); + + CustomJobName name = CustomJobName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]"); + + 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.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getCustomJobExceptionTest() throws Exception { + 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()) + .setEncryptionSpec(EncryptionSpec.newBuilder().build()) + .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. + } + } + + @Test + public void listCustomJobsTest() throws Exception { + CustomJob responsesElement = CustomJob.newBuilder().build(); + ListCustomJobsResponse expectedResponse = + ListCustomJobsResponse.newBuilder() + .setNextPageToken("") + .addAllCustomJobs(Arrays.asList(responsesElement)) + .build(); + mockJobService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + 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.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listCustomJobsExceptionTest() throws Exception { + 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. + } + } + + @Test + public void deleteCustomJobTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteCustomJobTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockJobService.addResponse(resultOperation); + + CustomJobName name = CustomJobName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]"); + + client.deleteCustomJobAsync(name).get(); + + List actualRequests = mockJobService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteCustomJobRequest actualRequest = ((DeleteCustomJobRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteCustomJobExceptionTest() throws Exception { + 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()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteCustomJobTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteCustomJobTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockJobService.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteCustomJobAsync(name).get(); + + List actualRequests = mockJobService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteCustomJobRequest actualRequest = ((DeleteCustomJobRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteCustomJobExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockJobService.addException(exception); + + try { + String name = "name3373707"; + client.deleteCustomJobAsync(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 cancelCustomJobTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockJobService.addResponse(expectedResponse); + + CustomJobName name = CustomJobName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]"); + + client.cancelCustomJob(name); + + List actualRequests = mockJobService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CancelCustomJobRequest actualRequest = ((CancelCustomJobRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void cancelCustomJobExceptionTest() 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); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void cancelCustomJobTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockJobService.addResponse(expectedResponse); + + String name = "name3373707"; + + client.cancelCustomJob(name); + + List actualRequests = mockJobService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CancelCustomJobRequest actualRequest = ((CancelCustomJobRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void cancelCustomJobExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockJobService.addException(exception); + + try { + String name = "name3373707"; + client.cancelCustomJob(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + 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()) + .setEncryptionSpec(EncryptionSpec.newBuilder().build()) + .setActiveLearningConfig(ActiveLearningConfig.newBuilder().build()) + .build(); + mockJobService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + DataLabelingJob dataLabelingJob = DataLabelingJob.newBuilder().build(); + + DataLabelingJob actualResponse = client.createDataLabelingJob(parent, dataLabelingJob); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockJobService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateDataLabelingJobRequest actualRequest = + ((CreateDataLabelingJobRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(dataLabelingJob, actualRequest.getDataLabelingJob()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createDataLabelingJobExceptionTest() 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); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + 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()) + .setEncryptionSpec(EncryptionSpec.newBuilder().build()) + .setActiveLearningConfig(ActiveLearningConfig.newBuilder().build()) + .build(); + mockJobService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + DataLabelingJob dataLabelingJob = DataLabelingJob.newBuilder().build(); + + DataLabelingJob actualResponse = client.createDataLabelingJob(parent, dataLabelingJob); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockJobService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateDataLabelingJobRequest actualRequest = + ((CreateDataLabelingJobRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(dataLabelingJob, actualRequest.getDataLabelingJob()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createDataLabelingJobExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockJobService.addException(exception); + + try { + String parent = "parent-995424086"; + DataLabelingJob dataLabelingJob = DataLabelingJob.newBuilder().build(); + client.createDataLabelingJob(parent, dataLabelingJob); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + 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()) + .setEncryptionSpec(EncryptionSpec.newBuilder().build()) + .setActiveLearningConfig(ActiveLearningConfig.newBuilder().build()) + .build(); + mockJobService.addResponse(expectedResponse); + + DataLabelingJobName name = + DataLabelingJobName.of("[PROJECT]", "[LOCATION]", "[DATA_LABELING_JOB]"); + + DataLabelingJob actualResponse = client.getDataLabelingJob(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockJobService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetDataLabelingJobRequest actualRequest = ((GetDataLabelingJobRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + 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.getDataLabelingJob(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + 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()) + .setEncryptionSpec(EncryptionSpec.newBuilder().build()) + .setActiveLearningConfig(ActiveLearningConfig.newBuilder().build()) + .build(); + mockJobService.addResponse(expectedResponse); + + String name = "name3373707"; + + DataLabelingJob actualResponse = client.getDataLabelingJob(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockJobService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetDataLabelingJobRequest actualRequest = ((GetDataLabelingJobRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getDataLabelingJobExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockJobService.addException(exception); + + try { + String name = "name3373707"; + client.getDataLabelingJob(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDataLabelingJobsTest() throws Exception { + DataLabelingJob responsesElement = DataLabelingJob.newBuilder().build(); + ListDataLabelingJobsResponse expectedResponse = + ListDataLabelingJobsResponse.newBuilder() + .setNextPageToken("") + .addAllDataLabelingJobs(Arrays.asList(responsesElement)) + .build(); + mockJobService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + 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.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + 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()) + .setEncryptionSpec(EncryptionSpec.newBuilder().build()) + .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()) + .setEncryptionSpec(EncryptionSpec.newBuilder().build()) + .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()) + .setEncryptionSpec(EncryptionSpec.newBuilder().build()) + .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()) + .setEncryptionSpec(EncryptionSpec.newBuilder().build()) + .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. + } + } + + @Test + public void listHyperparameterTuningJobsTest() throws Exception { + HyperparameterTuningJob responsesElement = HyperparameterTuningJob.newBuilder().build(); + ListHyperparameterTuningJobsResponse expectedResponse = + ListHyperparameterTuningJobsResponse.newBuilder() + .setNextPageToken("") + .addAllHyperparameterTuningJobs(Arrays.asList(responsesElement)) + .build(); + mockJobService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + 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.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listHyperparameterTuningJobsExceptionTest() throws Exception { + 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. + } + } + + @Test + public void deleteHyperparameterTuningJobTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteHyperparameterTuningJobTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockJobService.addResponse(resultOperation); + + HyperparameterTuningJobName name = + HyperparameterTuningJobName.of("[PROJECT]", "[LOCATION]", "[HYPERPARAMETER_TUNING_JOB]"); + + client.deleteHyperparameterTuningJobAsync(name).get(); + + List actualRequests = mockJobService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteHyperparameterTuningJobRequest actualRequest = + ((DeleteHyperparameterTuningJobRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteHyperparameterTuningJobExceptionTest() 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.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()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void cancelHyperparameterTuningJobTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockJobService.addResponse(expectedResponse); + + HyperparameterTuningJobName name = + HyperparameterTuningJobName.of("[PROJECT]", "[LOCATION]", "[HYPERPARAMETER_TUNING_JOB]"); + + client.cancelHyperparameterTuningJob(name); + + List actualRequests = mockJobService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CancelHyperparameterTuningJobRequest actualRequest = + ((CancelHyperparameterTuningJobRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void cancelHyperparameterTuningJobExceptionTest() 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.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. + } + } + + @Test + public void createBatchPredictionJobTest() throws Exception { + BatchPredictionJob expectedResponse = + BatchPredictionJob.newBuilder() + .setName( + BatchPredictionJobName.of("[PROJECT]", "[LOCATION]", "[BATCH_PREDICTION_JOB]") + .toString()) + .setDisplayName("displayName1714148973") + .setModel(ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]").toString()) + .setInputConfig(BatchPredictionJob.InputConfig.newBuilder().build()) + .setModelParameters(Value.newBuilder().build()) + .setOutputConfig(BatchPredictionJob.OutputConfig.newBuilder().build()) + .setDedicatedResources(BatchDedicatedResources.newBuilder().build()) + .setManualBatchTuningParameters(ManualBatchTuningParameters.newBuilder().build()) + .setOutputInfo(BatchPredictionJob.OutputInfo.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()) + .setEncryptionSpec(EncryptionSpec.newBuilder().build()) + .build(); + mockJobService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + 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.toString(), actualRequest.getParent()); + Assert.assertEquals(batchPredictionJob, actualRequest.getBatchPredictionJob()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createBatchPredictionJobExceptionTest() throws Exception { + 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()) + .setInputConfig(BatchPredictionJob.InputConfig.newBuilder().build()) + .setModelParameters(Value.newBuilder().build()) + .setOutputConfig(BatchPredictionJob.OutputConfig.newBuilder().build()) + .setDedicatedResources(BatchDedicatedResources.newBuilder().build()) + .setManualBatchTuningParameters(ManualBatchTuningParameters.newBuilder().build()) + .setOutputInfo(BatchPredictionJob.OutputInfo.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()) + .setEncryptionSpec(EncryptionSpec.newBuilder().build()) + .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. + } + } + + @Test + public void getBatchPredictionJobTest() throws Exception { + BatchPredictionJob expectedResponse = + BatchPredictionJob.newBuilder() + .setName( + BatchPredictionJobName.of("[PROJECT]", "[LOCATION]", "[BATCH_PREDICTION_JOB]") + .toString()) + .setDisplayName("displayName1714148973") + .setModel(ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]").toString()) + .setInputConfig(BatchPredictionJob.InputConfig.newBuilder().build()) + .setModelParameters(Value.newBuilder().build()) + .setOutputConfig(BatchPredictionJob.OutputConfig.newBuilder().build()) + .setDedicatedResources(BatchDedicatedResources.newBuilder().build()) + .setManualBatchTuningParameters(ManualBatchTuningParameters.newBuilder().build()) + .setOutputInfo(BatchPredictionJob.OutputInfo.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()) + .setEncryptionSpec(EncryptionSpec.newBuilder().build()) + .build(); + mockJobService.addResponse(expectedResponse); + + BatchPredictionJobName name = + BatchPredictionJobName.of("[PROJECT]", "[LOCATION]", "[BATCH_PREDICTION_JOB]"); + + 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.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getBatchPredictionJobExceptionTest() throws Exception { + 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()) + .setInputConfig(BatchPredictionJob.InputConfig.newBuilder().build()) + .setModelParameters(Value.newBuilder().build()) + .setOutputConfig(BatchPredictionJob.OutputConfig.newBuilder().build()) + .setDedicatedResources(BatchDedicatedResources.newBuilder().build()) + .setManualBatchTuningParameters(ManualBatchTuningParameters.newBuilder().build()) + .setOutputInfo(BatchPredictionJob.OutputInfo.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()) + .setEncryptionSpec(EncryptionSpec.newBuilder().build()) + .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. + } + } + + @Test + public void listBatchPredictionJobsTest() throws Exception { + BatchPredictionJob responsesElement = BatchPredictionJob.newBuilder().build(); + ListBatchPredictionJobsResponse expectedResponse = + ListBatchPredictionJobsResponse.newBuilder() + .setNextPageToken("") + .addAllBatchPredictionJobs(Arrays.asList(responsesElement)) + .build(); + mockJobService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + 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.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listBatchPredictionJobsExceptionTest() throws Exception { + 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. + } + } + + @Test + public void deleteBatchPredictionJobTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteBatchPredictionJobTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockJobService.addResponse(resultOperation); + + BatchPredictionJobName name = + BatchPredictionJobName.of("[PROJECT]", "[LOCATION]", "[BATCH_PREDICTION_JOB]"); + + client.deleteBatchPredictionJobAsync(name).get(); + + List actualRequests = mockJobService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteBatchPredictionJobRequest actualRequest = + ((DeleteBatchPredictionJobRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteBatchPredictionJobExceptionTest() throws Exception { + 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()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void cancelBatchPredictionJobTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockJobService.addResponse(expectedResponse); + + BatchPredictionJobName name = + BatchPredictionJobName.of("[PROJECT]", "[LOCATION]", "[BATCH_PREDICTION_JOB]"); + + client.cancelBatchPredictionJob(name); + + List actualRequests = mockJobService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CancelBatchPredictionJobRequest actualRequest = + ((CancelBatchPredictionJobRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void cancelBatchPredictionJobExceptionTest() throws Exception { + 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. + } + } +} diff --git a/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MigrationServiceClientTest.java b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MigrationServiceClientTest.java new file mode 100644 index 000000000..321c78f31 --- /dev/null +++ b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MigrationServiceClientTest.java @@ -0,0 +1,279 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1; + +import static com.google.cloud.aiplatform.v1.MigrationServiceClient.SearchMigratableResourcesPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import 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; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class MigrationServiceClientTest { + private static MockMigrationService mockMigrationService; + private static MockServiceHelper mockServiceHelper; + private MigrationServiceClient client; + private LocalChannelProvider channelProvider; + + @BeforeClass + public static void startStaticServer() { + mockMigrationService = new MockMigrationService(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockMigrationService)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + MigrationServiceSettings settings = + MigrationServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = MigrationServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void searchMigratableResourcesTest() throws Exception { + MigratableResource responsesElement = MigratableResource.newBuilder().build(); + SearchMigratableResourcesResponse expectedResponse = + SearchMigratableResourcesResponse.newBuilder() + .setNextPageToken("") + .addAllMigratableResources(Arrays.asList(responsesElement)) + .build(); + mockMigrationService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + 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.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void searchMigratableResourcesExceptionTest() throws Exception { + 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. + } + } + + @Test + public void batchMigrateResourcesTest() 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); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + 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.toString(), actualRequest.getParent()); + Assert.assertEquals(migrateResourceRequests, actualRequest.getMigrateResourceRequestsList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void batchMigrateResourcesExceptionTest() throws Exception { + 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()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } +} diff --git a/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockDatasetService.java b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockDatasetService.java new file mode 100644 index 000000000..2538933ff --- /dev/null +++ b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockDatasetService.java @@ -0,0 +1,59 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockDatasetService implements MockGrpcService { + private final MockDatasetServiceImpl serviceImpl; + + public MockDatasetService() { + serviceImpl = new MockDatasetServiceImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockDatasetServiceImpl.java b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockDatasetServiceImpl.java new file mode 100644 index 000000000..44effe1fc --- /dev/null +++ b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockDatasetServiceImpl.java @@ -0,0 +1,208 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1; + +import com.google.api.core.BetaApi; +import com.google.cloud.aiplatform.v1.DatasetServiceGrpc.DatasetServiceImplBase; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockDatasetServiceImpl extends DatasetServiceImplBase { + private List requests; + private Queue responses; + + public MockDatasetServiceImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void createDataset( + CreateDatasetRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void getDataset(GetDatasetRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Dataset) { + requests.add(request); + responseObserver.onNext(((Dataset) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void updateDataset( + UpdateDatasetRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Dataset) { + requests.add(request); + responseObserver.onNext(((Dataset) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void listDatasets( + ListDatasetsRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ListDatasetsResponse) { + requests.add(request); + responseObserver.onNext(((ListDatasetsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void deleteDataset( + DeleteDatasetRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void importData(ImportDataRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void exportData(ExportDataRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void listDataItems( + ListDataItemsRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ListDataItemsResponse) { + requests.add(request); + responseObserver.onNext(((ListDataItemsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void getAnnotationSpec( + GetAnnotationSpecRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof AnnotationSpec) { + requests.add(request); + responseObserver.onNext(((AnnotationSpec) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void listAnnotations( + ListAnnotationsRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ListAnnotationsResponse) { + requests.add(request); + responseObserver.onNext(((ListAnnotationsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } +} diff --git a/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockEndpointService.java b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockEndpointService.java new file mode 100644 index 000000000..24408ea62 --- /dev/null +++ b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockEndpointService.java @@ -0,0 +1,59 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockEndpointService implements MockGrpcService { + private final MockEndpointServiceImpl serviceImpl; + + public MockEndpointService() { + serviceImpl = new MockEndpointServiceImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockEndpointServiceImpl.java b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockEndpointServiceImpl.java new file mode 100644 index 000000000..ccc761e64 --- /dev/null +++ b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockEndpointServiceImpl.java @@ -0,0 +1,164 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1; + +import com.google.api.core.BetaApi; +import com.google.cloud.aiplatform.v1.EndpointServiceGrpc.EndpointServiceImplBase; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockEndpointServiceImpl extends EndpointServiceImplBase { + private List requests; + private Queue responses; + + public MockEndpointServiceImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void createEndpoint( + CreateEndpointRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void getEndpoint(GetEndpointRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Endpoint) { + requests.add(request); + responseObserver.onNext(((Endpoint) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void listEndpoints( + ListEndpointsRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ListEndpointsResponse) { + requests.add(request); + responseObserver.onNext(((ListEndpointsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void updateEndpoint( + UpdateEndpointRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Endpoint) { + requests.add(request); + responseObserver.onNext(((Endpoint) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void deleteEndpoint( + DeleteEndpointRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void deployModel(DeployModelRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void undeployModel( + UndeployModelRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } +} diff --git a/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockJobService.java b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockJobService.java new file mode 100644 index 000000000..715b6c4db --- /dev/null +++ b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockJobService.java @@ -0,0 +1,59 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockJobService implements MockGrpcService { + private final MockJobServiceImpl serviceImpl; + + public MockJobService() { + serviceImpl = new MockJobServiceImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockJobServiceImpl.java b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockJobServiceImpl.java new file mode 100644 index 000000000..81e8c05b9 --- /dev/null +++ b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockJobServiceImpl.java @@ -0,0 +1,368 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1; + +import com.google.api.core.BetaApi; +import com.google.cloud.aiplatform.v1.JobServiceGrpc.JobServiceImplBase; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Empty; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockJobServiceImpl extends JobServiceImplBase { + private List requests; + private Queue responses; + + public MockJobServiceImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void createCustomJob( + CreateCustomJobRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof CustomJob) { + requests.add(request); + responseObserver.onNext(((CustomJob) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void getCustomJob( + GetCustomJobRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof CustomJob) { + requests.add(request); + responseObserver.onNext(((CustomJob) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void listCustomJobs( + ListCustomJobsRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ListCustomJobsResponse) { + requests.add(request); + responseObserver.onNext(((ListCustomJobsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void deleteCustomJob( + DeleteCustomJobRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void cancelCustomJob( + CancelCustomJobRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void createDataLabelingJob( + CreateDataLabelingJobRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof DataLabelingJob) { + requests.add(request); + responseObserver.onNext(((DataLabelingJob) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void getDataLabelingJob( + GetDataLabelingJobRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof DataLabelingJob) { + requests.add(request); + responseObserver.onNext(((DataLabelingJob) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void listDataLabelingJobs( + ListDataLabelingJobsRequest request, + StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ListDataLabelingJobsResponse) { + requests.add(request); + responseObserver.onNext(((ListDataLabelingJobsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void deleteDataLabelingJob( + DeleteDataLabelingJobRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void cancelDataLabelingJob( + CancelDataLabelingJobRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void createHyperparameterTuningJob( + CreateHyperparameterTuningJobRequest request, + StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof HyperparameterTuningJob) { + requests.add(request); + responseObserver.onNext(((HyperparameterTuningJob) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void getHyperparameterTuningJob( + GetHyperparameterTuningJobRequest request, + StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof HyperparameterTuningJob) { + requests.add(request); + responseObserver.onNext(((HyperparameterTuningJob) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void listHyperparameterTuningJobs( + ListHyperparameterTuningJobsRequest request, + StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ListHyperparameterTuningJobsResponse) { + requests.add(request); + responseObserver.onNext(((ListHyperparameterTuningJobsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void deleteHyperparameterTuningJob( + DeleteHyperparameterTuningJobRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void cancelHyperparameterTuningJob( + CancelHyperparameterTuningJobRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void createBatchPredictionJob( + CreateBatchPredictionJobRequest request, + StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof BatchPredictionJob) { + requests.add(request); + responseObserver.onNext(((BatchPredictionJob) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void getBatchPredictionJob( + GetBatchPredictionJobRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof BatchPredictionJob) { + requests.add(request); + responseObserver.onNext(((BatchPredictionJob) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void listBatchPredictionJobs( + ListBatchPredictionJobsRequest request, + StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ListBatchPredictionJobsResponse) { + requests.add(request); + responseObserver.onNext(((ListBatchPredictionJobsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void deleteBatchPredictionJob( + DeleteBatchPredictionJobRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void cancelBatchPredictionJob( + CancelBatchPredictionJobRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } +} diff --git a/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockMigrationService.java b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockMigrationService.java new file mode 100644 index 000000000..7b7bfc831 --- /dev/null +++ b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockMigrationService.java @@ -0,0 +1,59 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockMigrationService implements MockGrpcService { + private final MockMigrationServiceImpl serviceImpl; + + public MockMigrationService() { + serviceImpl = new MockMigrationServiceImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockMigrationServiceImpl.java b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockMigrationServiceImpl.java new file mode 100644 index 000000000..e2935c8ad --- /dev/null +++ b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockMigrationServiceImpl.java @@ -0,0 +1,92 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.aiplatform.v1; + +import com.google.api.core.BetaApi; +import com.google.cloud.aiplatform.v1.MigrationServiceGrpc.MigrationServiceImplBase; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockMigrationServiceImpl extends MigrationServiceImplBase { + private List requests; + private Queue responses; + + public MockMigrationServiceImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void searchMigratableResources( + SearchMigratableResourcesRequest request, + StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof SearchMigratableResourcesResponse) { + requests.add(request); + responseObserver.onNext(((SearchMigratableResourcesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void batchMigrateResources( + BatchMigrateResourcesRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } +} diff --git a/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockModelService.java b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockModelService.java new file mode 100644 index 000000000..c12ec682a --- /dev/null +++ b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockModelService.java @@ -0,0 +1,59 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockModelService implements MockGrpcService { + private final MockModelServiceImpl serviceImpl; + + public MockModelService() { + serviceImpl = new MockModelServiceImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockModelServiceImpl.java b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockModelServiceImpl.java new file mode 100644 index 000000000..250f9ac78 --- /dev/null +++ b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockModelServiceImpl.java @@ -0,0 +1,209 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1; + +import com.google.api.core.BetaApi; +import com.google.cloud.aiplatform.v1.ModelServiceGrpc.ModelServiceImplBase; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockModelServiceImpl extends ModelServiceImplBase { + private List requests; + private Queue responses; + + public MockModelServiceImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void uploadModel(UploadModelRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void getModel(GetModelRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Model) { + requests.add(request); + responseObserver.onNext(((Model) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void listModels( + ListModelsRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ListModelsResponse) { + requests.add(request); + responseObserver.onNext(((ListModelsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void updateModel(UpdateModelRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Model) { + requests.add(request); + responseObserver.onNext(((Model) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void deleteModel(DeleteModelRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void exportModel(ExportModelRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void getModelEvaluation( + GetModelEvaluationRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ModelEvaluation) { + requests.add(request); + responseObserver.onNext(((ModelEvaluation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void listModelEvaluations( + ListModelEvaluationsRequest request, + StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ListModelEvaluationsResponse) { + requests.add(request); + responseObserver.onNext(((ListModelEvaluationsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void getModelEvaluationSlice( + GetModelEvaluationSliceRequest request, + StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ModelEvaluationSlice) { + requests.add(request); + responseObserver.onNext(((ModelEvaluationSlice) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void listModelEvaluationSlices( + ListModelEvaluationSlicesRequest request, + StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ListModelEvaluationSlicesResponse) { + requests.add(request); + responseObserver.onNext(((ListModelEvaluationSlicesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } +} diff --git a/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockPipelineService.java b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockPipelineService.java new file mode 100644 index 000000000..a6dd82467 --- /dev/null +++ b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockPipelineService.java @@ -0,0 +1,59 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockPipelineService implements MockGrpcService { + private final MockPipelineServiceImpl serviceImpl; + + public MockPipelineService() { + serviceImpl = new MockPipelineServiceImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockPipelineServiceImpl.java b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockPipelineServiceImpl.java new file mode 100644 index 000000000..ab1f6eef3 --- /dev/null +++ b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockPipelineServiceImpl.java @@ -0,0 +1,138 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1; + +import com.google.api.core.BetaApi; +import com.google.cloud.aiplatform.v1.PipelineServiceGrpc.PipelineServiceImplBase; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Empty; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockPipelineServiceImpl extends PipelineServiceImplBase { + private List requests; + private Queue responses; + + public MockPipelineServiceImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void createTrainingPipeline( + CreateTrainingPipelineRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof TrainingPipeline) { + requests.add(request); + responseObserver.onNext(((TrainingPipeline) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void getTrainingPipeline( + GetTrainingPipelineRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof TrainingPipeline) { + requests.add(request); + responseObserver.onNext(((TrainingPipeline) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void listTrainingPipelines( + ListTrainingPipelinesRequest request, + StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ListTrainingPipelinesResponse) { + requests.add(request); + responseObserver.onNext(((ListTrainingPipelinesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void deleteTrainingPipeline( + DeleteTrainingPipelineRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void cancelTrainingPipeline( + CancelTrainingPipelineRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } +} diff --git a/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockPredictionService.java b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockPredictionService.java new file mode 100644 index 000000000..1aa873524 --- /dev/null +++ b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockPredictionService.java @@ -0,0 +1,59 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockPredictionService implements MockGrpcService { + private final MockPredictionServiceImpl serviceImpl; + + public MockPredictionService() { + serviceImpl = new MockPredictionServiceImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockPredictionServiceImpl.java b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockPredictionServiceImpl.java new file mode 100644 index 000000000..d12a7188b --- /dev/null +++ b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockPredictionServiceImpl.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. + */ + +package com.google.cloud.aiplatform.v1; + +import com.google.api.core.BetaApi; +import com.google.cloud.aiplatform.v1.PredictionServiceGrpc.PredictionServiceImplBase; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockPredictionServiceImpl extends PredictionServiceImplBase { + private List requests; + private Queue responses; + + public MockPredictionServiceImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void predict(PredictRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof PredictResponse) { + requests.add(request); + responseObserver.onNext(((PredictResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } +} diff --git a/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockSpecialistPoolService.java b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockSpecialistPoolService.java new file mode 100644 index 000000000..444b523e2 --- /dev/null +++ b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockSpecialistPoolService.java @@ -0,0 +1,59 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockSpecialistPoolService implements MockGrpcService { + private final MockSpecialistPoolServiceImpl serviceImpl; + + public MockSpecialistPoolService() { + serviceImpl = new MockSpecialistPoolServiceImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockSpecialistPoolServiceImpl.java b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockSpecialistPoolServiceImpl.java new file mode 100644 index 000000000..44e33f3f7 --- /dev/null +++ b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockSpecialistPoolServiceImpl.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. + */ + +package com.google.cloud.aiplatform.v1; + +import com.google.api.core.BetaApi; +import com.google.cloud.aiplatform.v1.SpecialistPoolServiceGrpc.SpecialistPoolServiceImplBase; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockSpecialistPoolServiceImpl extends SpecialistPoolServiceImplBase { + private List requests; + private Queue responses; + + public MockSpecialistPoolServiceImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void createSpecialistPool( + CreateSpecialistPoolRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void getSpecialistPool( + GetSpecialistPoolRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof SpecialistPool) { + requests.add(request); + responseObserver.onNext(((SpecialistPool) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void listSpecialistPools( + ListSpecialistPoolsRequest request, + StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ListSpecialistPoolsResponse) { + requests.add(request); + responseObserver.onNext(((ListSpecialistPoolsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void deleteSpecialistPool( + DeleteSpecialistPoolRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void updateSpecialistPool( + UpdateSpecialistPoolRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } +} diff --git a/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/ModelServiceClientTest.java b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/ModelServiceClientTest.java new file mode 100644 index 000000000..8a2f4e13d --- /dev/null +++ b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/ModelServiceClientTest.java @@ -0,0 +1,1005 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1; + +import static com.google.cloud.aiplatform.v1.ModelServiceClient.ListModelEvaluationSlicesPagedResponse; +import static com.google.cloud.aiplatform.v1.ModelServiceClient.ListModelEvaluationsPagedResponse; +import static com.google.cloud.aiplatform.v1.ModelServiceClient.ListModelsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import 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; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class ModelServiceClientTest { + private static MockServiceHelper mockServiceHelper; + private ModelServiceClient client; + private static MockModelService mockModelService; + private LocalChannelProvider channelProvider; + + @BeforeClass + public static void startStaticServer() { + mockModelService = new MockModelService(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockModelService)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + ModelServiceSettings settings = + ModelServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = ModelServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void uploadModelTest() 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); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + 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.toString(), actualRequest.getParent()); + Assert.assertEquals(model, actualRequest.getModel()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void uploadModelExceptionTest() throws Exception { + 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()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void getModelTest() 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()) + .setEtag("etag3123477") + .putAllLabels(new HashMap()) + .setEncryptionSpec(EncryptionSpec.newBuilder().build()) + .build(); + mockModelService.addResponse(expectedResponse); + + ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]"); + + 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.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getModelExceptionTest() throws Exception { + 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()) + .setEtag("etag3123477") + .putAllLabels(new HashMap()) + .setEncryptionSpec(EncryptionSpec.newBuilder().build()) + .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. + } + } + + @Test + public void listModelsTest() throws Exception { + Model responsesElement = Model.newBuilder().build(); + ListModelsResponse expectedResponse = + ListModelsResponse.newBuilder() + .setNextPageToken("") + .addAllModels(Arrays.asList(responsesElement)) + .build(); + mockModelService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListModelsPagedResponse pagedListResponse = client.listModels(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getModelsList().get(0), resources.get(0)); + + List actualRequests = mockModelService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListModelsRequest actualRequest = ((ListModelsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listModelsExceptionTest() throws Exception { + 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. + } + } + + @Test + public void updateModelTest() 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()) + .setEtag("etag3123477") + .putAllLabels(new HashMap()) + .setEncryptionSpec(EncryptionSpec.newBuilder().build()) + .build(); + mockModelService.addResponse(expectedResponse); + + Model model = Model.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Model actualResponse = client.updateModel(model, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockModelService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateModelRequest actualRequest = ((UpdateModelRequest) actualRequests.get(0)); + + Assert.assertEquals(model, actualRequest.getModel()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateModelExceptionTest() throws Exception { + 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. + } + } + + @Test + public void deleteModelTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteModelTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockModelService.addResponse(resultOperation); + + ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]"); + + client.deleteModelAsync(name).get(); + + List actualRequests = mockModelService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteModelRequest actualRequest = ((DeleteModelRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteModelExceptionTest() throws Exception { + 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()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void exportModelTest() throws Exception { + ExportModelResponse expectedResponse = ExportModelResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("exportModelTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockModelService.addResponse(resultOperation); + + ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]"); + 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.toString(), actualRequest.getName()); + Assert.assertEquals(outputConfig, actualRequest.getOutputConfig()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void exportModelExceptionTest() throws Exception { + 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()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void getModelEvaluationTest() 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()) + .build(); + mockModelService.addResponse(expectedResponse); + + ModelEvaluationName name = + ModelEvaluationName.of("[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]"); + + 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.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getModelEvaluationExceptionTest() throws Exception { + 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()) + .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. + } + } + + @Test + public void listModelEvaluationsTest() throws Exception { + ModelEvaluation responsesElement = ModelEvaluation.newBuilder().build(); + ListModelEvaluationsResponse expectedResponse = + ListModelEvaluationsResponse.newBuilder() + .setNextPageToken("") + .addAllModelEvaluations(Arrays.asList(responsesElement)) + .build(); + mockModelService.addResponse(expectedResponse); + + ModelName parent = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]"); + + 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.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listModelEvaluationsExceptionTest() throws Exception { + 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. + } + } + + @Test + public void getModelEvaluationSliceTest() throws Exception { + ModelEvaluationSlice expectedResponse = + ModelEvaluationSlice.newBuilder() + .setName( + ModelEvaluationSliceName.of( + "[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]", "[SLICE]") + .toString()) + .setSlice(ModelEvaluationSlice.Slice.newBuilder().build()) + .setMetricsSchemaUri("metricsSchemaUri-182209912") + .setMetrics(Value.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .build(); + mockModelService.addResponse(expectedResponse); + + ModelEvaluationSliceName name = + ModelEvaluationSliceName.of( + "[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]", "[SLICE]"); + + 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.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getModelEvaluationSliceExceptionTest() throws Exception { + 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()) + .setSlice(ModelEvaluationSlice.Slice.newBuilder().build()) + .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. + } + } + + @Test + public void listModelEvaluationSlicesTest() throws Exception { + ModelEvaluationSlice responsesElement = ModelEvaluationSlice.newBuilder().build(); + ListModelEvaluationSlicesResponse expectedResponse = + ListModelEvaluationSlicesResponse.newBuilder() + .setNextPageToken("") + .addAllModelEvaluationSlices(Arrays.asList(responsesElement)) + .build(); + mockModelService.addResponse(expectedResponse); + + ModelEvaluationName parent = + ModelEvaluationName.of("[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]"); + + 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.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listModelEvaluationSlicesExceptionTest() throws Exception { + 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. + } + } +} diff --git a/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/PipelineServiceClientTest.java b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/PipelineServiceClientTest.java new file mode 100644 index 000000000..63f06af3a --- /dev/null +++ b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/PipelineServiceClientTest.java @@ -0,0 +1,561 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1; + +import static com.google.cloud.aiplatform.v1.PipelineServiceClient.ListTrainingPipelinesPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.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; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class PipelineServiceClientTest { + private static MockServiceHelper mockServiceHelper; + private static MockPipelineService mockPipelineService; + private PipelineServiceClient client; + private LocalChannelProvider channelProvider; + + @BeforeClass + public static void startStaticServer() { + mockPipelineService = new MockPipelineService(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockPipelineService)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + PipelineServiceSettings settings = + PipelineServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = PipelineServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void createTrainingPipelineTest() 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()) + .setEncryptionSpec(EncryptionSpec.newBuilder().build()) + .build(); + mockPipelineService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + 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.toString(), actualRequest.getParent()); + Assert.assertEquals(trainingPipeline, actualRequest.getTrainingPipeline()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createTrainingPipelineExceptionTest() throws Exception { + 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()) + .setEncryptionSpec(EncryptionSpec.newBuilder().build()) + .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. + } + } + + @Test + public void getTrainingPipelineTest() 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()) + .setEncryptionSpec(EncryptionSpec.newBuilder().build()) + .build(); + mockPipelineService.addResponse(expectedResponse); + + TrainingPipelineName name = + TrainingPipelineName.of("[PROJECT]", "[LOCATION]", "[TRAINING_PIPELINE]"); + + 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.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getTrainingPipelineExceptionTest() throws Exception { + 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()) + .setEncryptionSpec(EncryptionSpec.newBuilder().build()) + .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. + } + } + + @Test + public void listTrainingPipelinesTest() throws Exception { + TrainingPipeline responsesElement = TrainingPipeline.newBuilder().build(); + ListTrainingPipelinesResponse expectedResponse = + ListTrainingPipelinesResponse.newBuilder() + .setNextPageToken("") + .addAllTrainingPipelines(Arrays.asList(responsesElement)) + .build(); + mockPipelineService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + 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.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listTrainingPipelinesExceptionTest() throws Exception { + 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. + } + } + + @Test + public void deleteTrainingPipelineTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteTrainingPipelineTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockPipelineService.addResponse(resultOperation); + + TrainingPipelineName name = + TrainingPipelineName.of("[PROJECT]", "[LOCATION]", "[TRAINING_PIPELINE]"); + + client.deleteTrainingPipelineAsync(name).get(); + + List actualRequests = mockPipelineService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteTrainingPipelineRequest actualRequest = + ((DeleteTrainingPipelineRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteTrainingPipelineExceptionTest() throws Exception { + 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()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void cancelTrainingPipelineTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockPipelineService.addResponse(expectedResponse); + + TrainingPipelineName name = + TrainingPipelineName.of("[PROJECT]", "[LOCATION]", "[TRAINING_PIPELINE]"); + + client.cancelTrainingPipeline(name); + + List actualRequests = mockPipelineService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CancelTrainingPipelineRequest actualRequest = + ((CancelTrainingPipelineRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void cancelTrainingPipelineExceptionTest() throws Exception { + 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. + } + } +} diff --git a/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/PredictionServiceClientTest.java b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/PredictionServiceClientTest.java new file mode 100644 index 000000000..b56c46acc --- /dev/null +++ b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/PredictionServiceClientTest.java @@ -0,0 +1,169 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Value; +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; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class PredictionServiceClientTest { + private static MockServiceHelper mockServiceHelper; + private PredictionServiceClient client; + private static MockPredictionService mockPredictionService; + private LocalChannelProvider channelProvider; + + @BeforeClass + public static void startStaticServer() { + mockPredictionService = new MockPredictionService(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockPredictionService)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + PredictionServiceSettings settings = + PredictionServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = PredictionServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void predictTest() throws Exception { + PredictResponse expectedResponse = + PredictResponse.newBuilder() + .addAllPredictions(new ArrayList()) + .setDeployedModelId("deployedModelId-1817547906") + .build(); + mockPredictionService.addResponse(expectedResponse); + + EndpointName endpoint = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); + 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.toString(), actualRequest.getEndpoint()); + Assert.assertEquals(instances, actualRequest.getInstancesList()); + Assert.assertEquals(parameters, actualRequest.getParameters()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void predictExceptionTest() throws Exception { + 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. + } + } +} diff --git a/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/SpecialistPoolServiceClientTest.java b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/SpecialistPoolServiceClientTest.java new file mode 100644 index 000000000..cc0873466 --- /dev/null +++ b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/SpecialistPoolServiceClientTest.java @@ -0,0 +1,516 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1; + +import static com.google.cloud.aiplatform.v1.SpecialistPoolServiceClient.ListSpecialistPoolsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import io.grpc.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; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class SpecialistPoolServiceClientTest { + private static MockServiceHelper mockServiceHelper; + private SpecialistPoolServiceClient client; + private static MockSpecialistPoolService mockSpecialistPoolService; + private LocalChannelProvider channelProvider; + + @BeforeClass + public static void startStaticServer() { + mockSpecialistPoolService = new MockSpecialistPoolService(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockSpecialistPoolService)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + SpecialistPoolServiceSettings settings = + SpecialistPoolServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = SpecialistPoolServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void createSpecialistPoolTest() 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); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + 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.toString(), actualRequest.getParent()); + Assert.assertEquals(specialistPool, actualRequest.getSpecialistPool()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createSpecialistPoolExceptionTest() throws Exception { + 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()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void getSpecialistPoolTest() 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); + + SpecialistPoolName name = SpecialistPoolName.of("[PROJECT]", "[LOCATION]", "[SPECIALIST_POOL]"); + + 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.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getSpecialistPoolExceptionTest() throws Exception { + 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. + } + } + + @Test + public void listSpecialistPoolsTest() throws Exception { + SpecialistPool responsesElement = SpecialistPool.newBuilder().build(); + ListSpecialistPoolsResponse expectedResponse = + ListSpecialistPoolsResponse.newBuilder() + .setNextPageToken("") + .addAllSpecialistPools(Arrays.asList(responsesElement)) + .build(); + mockSpecialistPoolService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + 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.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listSpecialistPoolsExceptionTest() throws Exception { + 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. + } + } + + @Test + public void deleteSpecialistPoolTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteSpecialistPoolTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockSpecialistPoolService.addResponse(resultOperation); + + SpecialistPoolName name = SpecialistPoolName.of("[PROJECT]", "[LOCATION]", "[SPECIALIST_POOL]"); + + client.deleteSpecialistPoolAsync(name).get(); + + List actualRequests = mockSpecialistPoolService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteSpecialistPoolRequest actualRequest = + ((DeleteSpecialistPoolRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteSpecialistPoolExceptionTest() throws Exception { + 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()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void updateSpecialistPoolTest() 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("updateSpecialistPoolTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockSpecialistPoolService.addResponse(resultOperation); + + SpecialistPool specialistPool = SpecialistPool.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + SpecialistPool actualResponse = + client.updateSpecialistPoolAsync(specialistPool, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockSpecialistPoolService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateSpecialistPoolRequest actualRequest = + ((UpdateSpecialistPoolRequest) actualRequests.get(0)); + + Assert.assertEquals(specialistPool, actualRequest.getSpecialistPool()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateSpecialistPoolExceptionTest() throws Exception { + 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()); + 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 20514e017..f591a0058 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 @@ -99,6 +99,7 @@ public void createCustomJobTest() throws Exception { .setName(CustomJobName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]").toString()) .setDisplayName("displayName1714148973") .setJobSpec(CustomJobSpec.newBuilder().build()) + .setState(JobState.forNumber(0)) .setCreateTime(Timestamp.newBuilder().build()) .setStartTime(Timestamp.newBuilder().build()) .setEndTime(Timestamp.newBuilder().build()) @@ -148,6 +149,7 @@ public void createCustomJobTest2() throws Exception { .setName(CustomJobName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]").toString()) .setDisplayName("displayName1714148973") .setJobSpec(CustomJobSpec.newBuilder().build()) + .setState(JobState.forNumber(0)) .setCreateTime(Timestamp.newBuilder().build()) .setStartTime(Timestamp.newBuilder().build()) .setEndTime(Timestamp.newBuilder().build()) @@ -197,6 +199,7 @@ public void getCustomJobTest() throws Exception { .setName(CustomJobName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]").toString()) .setDisplayName("displayName1714148973") .setJobSpec(CustomJobSpec.newBuilder().build()) + .setState(JobState.forNumber(0)) .setCreateTime(Timestamp.newBuilder().build()) .setStartTime(Timestamp.newBuilder().build()) .setEndTime(Timestamp.newBuilder().build()) @@ -243,6 +246,7 @@ public void getCustomJobTest2() throws Exception { .setName(CustomJobName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]").toString()) .setDisplayName("displayName1714148973") .setJobSpec(CustomJobSpec.newBuilder().build()) + .setState(JobState.forNumber(0)) .setCreateTime(Timestamp.newBuilder().build()) .setStartTime(Timestamp.newBuilder().build()) .setEndTime(Timestamp.newBuilder().build()) @@ -535,6 +539,7 @@ public void createDataLabelingJobTest() throws Exception { .setInstructionUri("instructionUri1989242366") .setInputsSchemaUri("inputsSchemaUri1757461538") .setInputs(Value.newBuilder().build()) + .setState(JobState.forNumber(0)) .setLabelingProgress(-685978914) .setCurrentSpend(Money.newBuilder().build()) .setCreateTime(Timestamp.newBuilder().build()) @@ -593,6 +598,7 @@ public void createDataLabelingJobTest2() throws Exception { .setInstructionUri("instructionUri1989242366") .setInputsSchemaUri("inputsSchemaUri1757461538") .setInputs(Value.newBuilder().build()) + .setState(JobState.forNumber(0)) .setLabelingProgress(-685978914) .setCurrentSpend(Money.newBuilder().build()) .setCreateTime(Timestamp.newBuilder().build()) @@ -651,6 +657,7 @@ public void getDataLabelingJobTest() throws Exception { .setInstructionUri("instructionUri1989242366") .setInputsSchemaUri("inputsSchemaUri1757461538") .setInputs(Value.newBuilder().build()) + .setState(JobState.forNumber(0)) .setLabelingProgress(-685978914) .setCurrentSpend(Money.newBuilder().build()) .setCreateTime(Timestamp.newBuilder().build()) @@ -707,6 +714,7 @@ public void getDataLabelingJobTest2() throws Exception { .setInstructionUri("instructionUri1989242366") .setInputsSchemaUri("inputsSchemaUri1757461538") .setInputs(Value.newBuilder().build()) + .setState(JobState.forNumber(0)) .setLabelingProgress(-685978914) .setCurrentSpend(Money.newBuilder().build()) .setCreateTime(Timestamp.newBuilder().build()) @@ -1013,6 +1021,7 @@ public void createHyperparameterTuningJobTest() throws Exception { .setMaxFailedTrialCount(-887662497) .setTrialJobSpec(CustomJobSpec.newBuilder().build()) .addAllTrials(new ArrayList()) + .setState(JobState.forNumber(0)) .setCreateTime(Timestamp.newBuilder().build()) .setStartTime(Timestamp.newBuilder().build()) .setEndTime(Timestamp.newBuilder().build()) @@ -1073,6 +1082,7 @@ public void createHyperparameterTuningJobTest2() throws Exception { .setMaxFailedTrialCount(-887662497) .setTrialJobSpec(CustomJobSpec.newBuilder().build()) .addAllTrials(new ArrayList()) + .setState(JobState.forNumber(0)) .setCreateTime(Timestamp.newBuilder().build()) .setStartTime(Timestamp.newBuilder().build()) .setEndTime(Timestamp.newBuilder().build()) @@ -1133,6 +1143,7 @@ public void getHyperparameterTuningJobTest() throws Exception { .setMaxFailedTrialCount(-887662497) .setTrialJobSpec(CustomJobSpec.newBuilder().build()) .addAllTrials(new ArrayList()) + .setState(JobState.forNumber(0)) .setCreateTime(Timestamp.newBuilder().build()) .setStartTime(Timestamp.newBuilder().build()) .setEndTime(Timestamp.newBuilder().build()) @@ -1190,6 +1201,7 @@ public void getHyperparameterTuningJobTest2() throws Exception { .setMaxFailedTrialCount(-887662497) .setTrialJobSpec(CustomJobSpec.newBuilder().build()) .addAllTrials(new ArrayList()) + .setState(JobState.forNumber(0)) .setCreateTime(Timestamp.newBuilder().build()) .setStartTime(Timestamp.newBuilder().build()) .setEndTime(Timestamp.newBuilder().build()) @@ -1493,11 +1505,15 @@ public void createBatchPredictionJobTest() throws Exception { .toString()) .setDisplayName("displayName1714148973") .setModel(ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]").toString()) + .setInputConfig(BatchPredictionJob.InputConfig.newBuilder().build()) .setModelParameters(Value.newBuilder().build()) + .setOutputConfig(BatchPredictionJob.OutputConfig.newBuilder().build()) .setDedicatedResources(BatchDedicatedResources.newBuilder().build()) .setManualBatchTuningParameters(ManualBatchTuningParameters.newBuilder().build()) .setGenerateExplanation(true) .setExplanationSpec(ExplanationSpec.newBuilder().build()) + .setOutputInfo(BatchPredictionJob.OutputInfo.newBuilder().build()) + .setState(JobState.forNumber(0)) .setError(Status.newBuilder().build()) .addAllPartialFailures(new ArrayList()) .setResourcesConsumed(ResourcesConsumed.newBuilder().build()) @@ -1553,11 +1569,15 @@ public void createBatchPredictionJobTest2() throws Exception { .toString()) .setDisplayName("displayName1714148973") .setModel(ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]").toString()) + .setInputConfig(BatchPredictionJob.InputConfig.newBuilder().build()) .setModelParameters(Value.newBuilder().build()) + .setOutputConfig(BatchPredictionJob.OutputConfig.newBuilder().build()) .setDedicatedResources(BatchDedicatedResources.newBuilder().build()) .setManualBatchTuningParameters(ManualBatchTuningParameters.newBuilder().build()) .setGenerateExplanation(true) .setExplanationSpec(ExplanationSpec.newBuilder().build()) + .setOutputInfo(BatchPredictionJob.OutputInfo.newBuilder().build()) + .setState(JobState.forNumber(0)) .setError(Status.newBuilder().build()) .addAllPartialFailures(new ArrayList()) .setResourcesConsumed(ResourcesConsumed.newBuilder().build()) @@ -1613,11 +1633,15 @@ public void getBatchPredictionJobTest() throws Exception { .toString()) .setDisplayName("displayName1714148973") .setModel(ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]").toString()) + .setInputConfig(BatchPredictionJob.InputConfig.newBuilder().build()) .setModelParameters(Value.newBuilder().build()) + .setOutputConfig(BatchPredictionJob.OutputConfig.newBuilder().build()) .setDedicatedResources(BatchDedicatedResources.newBuilder().build()) .setManualBatchTuningParameters(ManualBatchTuningParameters.newBuilder().build()) .setGenerateExplanation(true) .setExplanationSpec(ExplanationSpec.newBuilder().build()) + .setOutputInfo(BatchPredictionJob.OutputInfo.newBuilder().build()) + .setState(JobState.forNumber(0)) .setError(Status.newBuilder().build()) .addAllPartialFailures(new ArrayList()) .setResourcesConsumed(ResourcesConsumed.newBuilder().build()) @@ -1672,11 +1696,15 @@ public void getBatchPredictionJobTest2() throws Exception { .toString()) .setDisplayName("displayName1714148973") .setModel(ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]").toString()) + .setInputConfig(BatchPredictionJob.InputConfig.newBuilder().build()) .setModelParameters(Value.newBuilder().build()) + .setOutputConfig(BatchPredictionJob.OutputConfig.newBuilder().build()) .setDedicatedResources(BatchDedicatedResources.newBuilder().build()) .setManualBatchTuningParameters(ManualBatchTuningParameters.newBuilder().build()) .setGenerateExplanation(true) .setExplanationSpec(ExplanationSpec.newBuilder().build()) + .setOutputInfo(BatchPredictionJob.OutputInfo.newBuilder().build()) + .setState(JobState.forNumber(0)) .setError(Status.newBuilder().build()) .addAllPartialFailures(new ArrayList()) .setResourcesConsumed(ResourcesConsumed.newBuilder().build()) 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 9aca8171f..547644d71 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 @@ -70,7 +70,13 @@ public void createDataset( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateDataset, expected %s or %s", + response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); } } @@ -84,7 +90,13 @@ public void getDataset(GetDatasetRequest request, StreamObserver respon } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetDataset, expected %s or %s", + response.getClass().getName(), + Dataset.class.getName(), + Exception.class.getName()))); } } @@ -99,7 +111,13 @@ public void updateDataset( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateDataset, expected %s or %s", + response.getClass().getName(), + Dataset.class.getName(), + Exception.class.getName()))); } } @@ -114,7 +132,13 @@ public void listDatasets( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListDatasets, expected %s or %s", + response.getClass().getName(), + ListDatasetsResponse.class.getName(), + Exception.class.getName()))); } } @@ -129,7 +153,13 @@ public void deleteDataset( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteDataset, expected %s or %s", + response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); } } @@ -143,7 +173,13 @@ public void importData(ImportDataRequest request, StreamObserver resp } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ImportData, expected %s or %s", + response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); } } @@ -157,7 +193,13 @@ public void exportData(ExportDataRequest request, StreamObserver resp } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ExportData, expected %s or %s", + response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); } } @@ -172,7 +214,13 @@ public void listDataItems( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListDataItems, expected %s or %s", + response.getClass().getName(), + ListDataItemsResponse.class.getName(), + Exception.class.getName()))); } } @@ -187,7 +235,13 @@ public void getAnnotationSpec( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetAnnotationSpec, expected %s or %s", + response.getClass().getName(), + AnnotationSpec.class.getName(), + Exception.class.getName()))); } } @@ -202,7 +256,13 @@ public void listAnnotations( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListAnnotations, expected %s or %s", + response.getClass().getName(), + ListAnnotationsResponse.class.getName(), + Exception.class.getName()))); } } } 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 bf0919778..782b5a961 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 @@ -70,7 +70,13 @@ public void createEndpoint( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateEndpoint, expected %s or %s", + response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); } } @@ -84,7 +90,13 @@ public void getEndpoint(GetEndpointRequest request, StreamObserver res } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetEndpoint, expected %s or %s", + response.getClass().getName(), + Endpoint.class.getName(), + Exception.class.getName()))); } } @@ -99,7 +111,13 @@ public void listEndpoints( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListEndpoints, expected %s or %s", + response.getClass().getName(), + ListEndpointsResponse.class.getName(), + Exception.class.getName()))); } } @@ -114,7 +132,13 @@ public void updateEndpoint( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateEndpoint, expected %s or %s", + response.getClass().getName(), + Endpoint.class.getName(), + Exception.class.getName()))); } } @@ -129,7 +153,13 @@ public void deleteEndpoint( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteEndpoint, expected %s or %s", + response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); } } @@ -143,7 +173,13 @@ public void deployModel(DeployModelRequest request, StreamObserver re } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeployModel, expected %s or %s", + response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); } } @@ -158,7 +194,13 @@ public void undeployModel( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UndeployModel, expected %s or %s", + response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); } } } 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 6a69236aa..891ab43e1 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 @@ -71,7 +71,13 @@ public void createCustomJob( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateCustomJob, expected %s or %s", + response.getClass().getName(), + CustomJob.class.getName(), + Exception.class.getName()))); } } @@ -86,7 +92,13 @@ public void getCustomJob( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetCustomJob, expected %s or %s", + response.getClass().getName(), + CustomJob.class.getName(), + Exception.class.getName()))); } } @@ -101,7 +113,13 @@ public void listCustomJobs( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListCustomJobs, expected %s or %s", + response.getClass().getName(), + ListCustomJobsResponse.class.getName(), + Exception.class.getName()))); } } @@ -116,7 +134,13 @@ public void deleteCustomJob( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteCustomJob, expected %s or %s", + response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); } } @@ -131,7 +155,13 @@ public void cancelCustomJob( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CancelCustomJob, expected %s or %s", + response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); } } @@ -146,7 +176,13 @@ public void createDataLabelingJob( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateDataLabelingJob, expected %s or %s", + response.getClass().getName(), + DataLabelingJob.class.getName(), + Exception.class.getName()))); } } @@ -161,7 +197,13 @@ public void getDataLabelingJob( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetDataLabelingJob, expected %s or %s", + response.getClass().getName(), + DataLabelingJob.class.getName(), + Exception.class.getName()))); } } @@ -177,7 +219,13 @@ public void listDataLabelingJobs( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListDataLabelingJobs, expected %s or %s", + response.getClass().getName(), + ListDataLabelingJobsResponse.class.getName(), + Exception.class.getName()))); } } @@ -192,7 +240,13 @@ public void deleteDataLabelingJob( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteDataLabelingJob, expected %s or %s", + response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); } } @@ -207,7 +261,13 @@ public void cancelDataLabelingJob( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CancelDataLabelingJob, expected %s or %s", + response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); } } @@ -223,7 +283,13 @@ public void createHyperparameterTuningJob( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateHyperparameterTuningJob, expected %s or %s", + response.getClass().getName(), + HyperparameterTuningJob.class.getName(), + Exception.class.getName()))); } } @@ -239,7 +305,13 @@ public void getHyperparameterTuningJob( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetHyperparameterTuningJob, expected %s or %s", + response.getClass().getName(), + HyperparameterTuningJob.class.getName(), + Exception.class.getName()))); } } @@ -255,7 +327,13 @@ public void listHyperparameterTuningJobs( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListHyperparameterTuningJobs, expected %s or %s", + response.getClass().getName(), + ListHyperparameterTuningJobsResponse.class.getName(), + Exception.class.getName()))); } } @@ -270,7 +348,13 @@ public void deleteHyperparameterTuningJob( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteHyperparameterTuningJob, expected %s or %s", + response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); } } @@ -285,7 +369,13 @@ public void cancelHyperparameterTuningJob( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CancelHyperparameterTuningJob, expected %s or %s", + response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); } } @@ -301,7 +391,13 @@ public void createBatchPredictionJob( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateBatchPredictionJob, expected %s or %s", + response.getClass().getName(), + BatchPredictionJob.class.getName(), + Exception.class.getName()))); } } @@ -316,7 +412,13 @@ public void getBatchPredictionJob( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetBatchPredictionJob, expected %s or %s", + response.getClass().getName(), + BatchPredictionJob.class.getName(), + Exception.class.getName()))); } } @@ -332,7 +434,13 @@ public void listBatchPredictionJobs( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListBatchPredictionJobs, expected %s or %s", + response.getClass().getName(), + ListBatchPredictionJobsResponse.class.getName(), + Exception.class.getName()))); } } @@ -347,7 +455,13 @@ public void deleteBatchPredictionJob( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteBatchPredictionJob, expected %s or %s", + response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); } } @@ -362,7 +476,13 @@ public void cancelBatchPredictionJob( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CancelBatchPredictionJob, expected %s or %s", + response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); } } } 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 025a3b30d..be730ec73 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 @@ -71,7 +71,13 @@ public void searchMigratableResources( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method SearchMigratableResources, expected %s or %s", + response.getClass().getName(), + SearchMigratableResourcesResponse.class.getName(), + Exception.class.getName()))); } } @@ -86,7 +92,13 @@ public void batchMigrateResources( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method BatchMigrateResources, expected %s or %s", + response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); } } } 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 1a178e4bb..0691bbbc4 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 @@ -69,7 +69,13 @@ public void uploadModel(UploadModelRequest request, StreamObserver re } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UploadModel, expected %s or %s", + response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); } } @@ -83,7 +89,13 @@ public void getModel(GetModelRequest request, StreamObserver responseObse } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetModel, expected %s or %s", + response.getClass().getName(), + Model.class.getName(), + Exception.class.getName()))); } } @@ -98,7 +110,13 @@ public void listModels( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListModels, expected %s or %s", + response.getClass().getName(), + ListModelsResponse.class.getName(), + Exception.class.getName()))); } } @@ -112,7 +130,13 @@ public void updateModel(UpdateModelRequest request, StreamObserver respon } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateModel, expected %s or %s", + response.getClass().getName(), + Model.class.getName(), + Exception.class.getName()))); } } @@ -126,7 +150,13 @@ public void deleteModel(DeleteModelRequest request, StreamObserver re } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteModel, expected %s or %s", + response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); } } @@ -140,7 +170,13 @@ public void exportModel(ExportModelRequest request, StreamObserver re } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ExportModel, expected %s or %s", + response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); } } @@ -155,7 +191,13 @@ public void getModelEvaluation( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetModelEvaluation, expected %s or %s", + response.getClass().getName(), + ModelEvaluation.class.getName(), + Exception.class.getName()))); } } @@ -171,7 +213,13 @@ public void listModelEvaluations( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListModelEvaluations, expected %s or %s", + response.getClass().getName(), + ListModelEvaluationsResponse.class.getName(), + Exception.class.getName()))); } } @@ -187,7 +235,13 @@ public void getModelEvaluationSlice( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetModelEvaluationSlice, expected %s or %s", + response.getClass().getName(), + ModelEvaluationSlice.class.getName(), + Exception.class.getName()))); } } @@ -203,7 +257,13 @@ public void listModelEvaluationSlices( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListModelEvaluationSlices, expected %s or %s", + response.getClass().getName(), + ListModelEvaluationSlicesResponse.class.getName(), + Exception.class.getName()))); } } } 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 8d124695f..6b9a46565 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 @@ -71,7 +71,13 @@ public void createTrainingPipeline( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateTrainingPipeline, expected %s or %s", + response.getClass().getName(), + TrainingPipeline.class.getName(), + Exception.class.getName()))); } } @@ -86,7 +92,13 @@ public void getTrainingPipeline( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetTrainingPipeline, expected %s or %s", + response.getClass().getName(), + TrainingPipeline.class.getName(), + Exception.class.getName()))); } } @@ -102,7 +114,13 @@ public void listTrainingPipelines( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListTrainingPipelines, expected %s or %s", + response.getClass().getName(), + ListTrainingPipelinesResponse.class.getName(), + Exception.class.getName()))); } } @@ -117,7 +135,13 @@ public void deleteTrainingPipeline( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteTrainingPipeline, expected %s or %s", + response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); } } @@ -132,7 +156,13 @@ public void cancelTrainingPipeline( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CancelTrainingPipeline, expected %s or %s", + response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); } } } 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 41520593e..4a543329c 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 @@ -68,7 +68,13 @@ public void predict(PredictRequest request, StreamObserver resp } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method Predict, expected %s or %s", + response.getClass().getName(), + PredictResponse.class.getName(), + Exception.class.getName()))); } } @@ -82,7 +88,13 @@ public void explain(ExplainRequest request, StreamObserver resp } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method Explain, expected %s or %s", + response.getClass().getName(), + ExplainResponse.class.getName(), + Exception.class.getName()))); } } } 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 f65ef9c29..f65908b2a 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 @@ -70,7 +70,13 @@ public void createSpecialistPool( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateSpecialistPool, expected %s or %s", + response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); } } @@ -85,7 +91,13 @@ public void getSpecialistPool( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetSpecialistPool, expected %s or %s", + response.getClass().getName(), + SpecialistPool.class.getName(), + Exception.class.getName()))); } } @@ -101,7 +113,13 @@ public void listSpecialistPools( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListSpecialistPools, expected %s or %s", + response.getClass().getName(), + ListSpecialistPoolsResponse.class.getName(), + Exception.class.getName()))); } } @@ -116,7 +134,13 @@ public void deleteSpecialistPool( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteSpecialistPool, expected %s or %s", + response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); } } @@ -131,7 +155,13 @@ public void updateSpecialistPool( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateSpecialistPool, expected %s or %s", + response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); } } } 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 ddd33ec23..51d21228c 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 @@ -823,6 +823,7 @@ public void getModelEvaluationSliceTest() throws Exception { ModelEvaluationSliceName.of( "[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]", "[SLICE]") .toString()) + .setSlice(ModelEvaluationSlice.Slice.newBuilder().build()) .setMetricsSchemaUri("metricsSchemaUri-182209912") .setMetrics(Value.newBuilder().build()) .setCreateTime(Timestamp.newBuilder().build()) @@ -872,6 +873,7 @@ public void getModelEvaluationSliceTest2() throws Exception { ModelEvaluationSliceName.of( "[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]", "[SLICE]") .toString()) + .setSlice(ModelEvaluationSlice.Slice.newBuilder().build()) .setMetricsSchemaUri("metricsSchemaUri-182209912") .setMetrics(Value.newBuilder().build()) .setCreateTime(Timestamp.newBuilder().build()) 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 82c77c18a..17a9d66f6 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 @@ -100,6 +100,7 @@ public void createTrainingPipelineTest() throws Exception { .setTrainingTaskInputs(Value.newBuilder().build()) .setTrainingTaskMetadata(Value.newBuilder().build()) .setModelToUpload(Model.newBuilder().build()) + .setState(PipelineState.forNumber(0)) .setError(Status.newBuilder().build()) .setCreateTime(Timestamp.newBuilder().build()) .setStartTime(Timestamp.newBuilder().build()) @@ -156,6 +157,7 @@ public void createTrainingPipelineTest2() throws Exception { .setTrainingTaskInputs(Value.newBuilder().build()) .setTrainingTaskMetadata(Value.newBuilder().build()) .setModelToUpload(Model.newBuilder().build()) + .setState(PipelineState.forNumber(0)) .setError(Status.newBuilder().build()) .setCreateTime(Timestamp.newBuilder().build()) .setStartTime(Timestamp.newBuilder().build()) @@ -212,6 +214,7 @@ public void getTrainingPipelineTest() throws Exception { .setTrainingTaskInputs(Value.newBuilder().build()) .setTrainingTaskMetadata(Value.newBuilder().build()) .setModelToUpload(Model.newBuilder().build()) + .setState(PipelineState.forNumber(0)) .setError(Status.newBuilder().build()) .setCreateTime(Timestamp.newBuilder().build()) .setStartTime(Timestamp.newBuilder().build()) @@ -266,6 +269,7 @@ public void getTrainingPipelineTest2() throws Exception { .setTrainingTaskInputs(Value.newBuilder().build()) .setTrainingTaskMetadata(Value.newBuilder().build()) .setModelToUpload(Model.newBuilder().build()) + .setState(PipelineState.forNumber(0)) .setError(Status.newBuilder().build()) .setCreateTime(Timestamp.newBuilder().build()) .setStartTime(Timestamp.newBuilder().build()) diff --git a/grpc-google-cloud-aiplatform-v1/pom.xml b/grpc-google-cloud-aiplatform-v1/pom.xml new file mode 100644 index 000000000..b8bca425c --- /dev/null +++ b/grpc-google-cloud-aiplatform-v1/pom.xml @@ -0,0 +1,69 @@ + + 4.0.0 + com.google.api.grpc + grpc-google-cloud-aiplatform-v1 + 0.3.0 + grpc-google-cloud-aiplatform-v1 + GRPC library for google-cloud-aiplatform + + com.google.cloud + google-cloud-aiplatform-parent + 0.3.0 + + + + io.grpc + grpc-api + + + io.grpc + grpc-stub + + + io.grpc + grpc-protobuf + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-cloud-aiplatform-v1 + + + com.google.guava + guava + + + com.google.api.grpc + proto-google-common-protos + + + + + + java9 + + [9,) + + + + javax.annotation + javax.annotation-api + + + + + + + + + org.codehaus.mojo + flatten-maven-plugin + + + + \ No newline at end of file diff --git a/grpc-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DatasetServiceGrpc.java b/grpc-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DatasetServiceGrpc.java new file mode 100644 index 000000000..2addde84a --- /dev/null +++ b/grpc-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DatasetServiceGrpc.java @@ -0,0 +1,1351 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; +import static io.grpc.stub.ClientCalls.asyncUnaryCall; +import static io.grpc.stub.ClientCalls.blockingUnaryCall; +import static io.grpc.stub.ClientCalls.futureUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; + +/** */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/aiplatform/v1/dataset_service.proto") +public final class DatasetServiceGrpc { + + private DatasetServiceGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.aiplatform.v1.DatasetService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CreateDatasetRequest, com.google.longrunning.Operation> + getCreateDatasetMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateDataset", + requestType = com.google.cloud.aiplatform.v1.CreateDatasetRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CreateDatasetRequest, com.google.longrunning.Operation> + getCreateDatasetMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CreateDatasetRequest, com.google.longrunning.Operation> + getCreateDatasetMethod; + if ((getCreateDatasetMethod = DatasetServiceGrpc.getCreateDatasetMethod) == null) { + synchronized (DatasetServiceGrpc.class) { + if ((getCreateDatasetMethod = DatasetServiceGrpc.getCreateDatasetMethod) == null) { + DatasetServiceGrpc.getCreateDatasetMethod = + getCreateDatasetMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateDataset")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.CreateDatasetRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new DatasetServiceMethodDescriptorSupplier("CreateDataset")) + .build(); + } + } + } + return getCreateDatasetMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.GetDatasetRequest, com.google.cloud.aiplatform.v1.Dataset> + getGetDatasetMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetDataset", + requestType = com.google.cloud.aiplatform.v1.GetDatasetRequest.class, + responseType = com.google.cloud.aiplatform.v1.Dataset.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.GetDatasetRequest, com.google.cloud.aiplatform.v1.Dataset> + getGetDatasetMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.GetDatasetRequest, + com.google.cloud.aiplatform.v1.Dataset> + getGetDatasetMethod; + if ((getGetDatasetMethod = DatasetServiceGrpc.getGetDatasetMethod) == null) { + synchronized (DatasetServiceGrpc.class) { + if ((getGetDatasetMethod = DatasetServiceGrpc.getGetDatasetMethod) == null) { + DatasetServiceGrpc.getGetDatasetMethod = + getGetDatasetMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetDataset")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.GetDatasetRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.Dataset.getDefaultInstance())) + .setSchemaDescriptor(new DatasetServiceMethodDescriptorSupplier("GetDataset")) + .build(); + } + } + } + return getGetDatasetMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.UpdateDatasetRequest, + com.google.cloud.aiplatform.v1.Dataset> + getUpdateDatasetMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateDataset", + requestType = com.google.cloud.aiplatform.v1.UpdateDatasetRequest.class, + responseType = com.google.cloud.aiplatform.v1.Dataset.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.UpdateDatasetRequest, + com.google.cloud.aiplatform.v1.Dataset> + getUpdateDatasetMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.UpdateDatasetRequest, + com.google.cloud.aiplatform.v1.Dataset> + getUpdateDatasetMethod; + if ((getUpdateDatasetMethod = DatasetServiceGrpc.getUpdateDatasetMethod) == null) { + synchronized (DatasetServiceGrpc.class) { + if ((getUpdateDatasetMethod = DatasetServiceGrpc.getUpdateDatasetMethod) == null) { + DatasetServiceGrpc.getUpdateDatasetMethod = + getUpdateDatasetMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateDataset")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.UpdateDatasetRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.Dataset.getDefaultInstance())) + .setSchemaDescriptor( + new DatasetServiceMethodDescriptorSupplier("UpdateDataset")) + .build(); + } + } + } + return getUpdateDatasetMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ListDatasetsRequest, + com.google.cloud.aiplatform.v1.ListDatasetsResponse> + getListDatasetsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListDatasets", + requestType = com.google.cloud.aiplatform.v1.ListDatasetsRequest.class, + responseType = com.google.cloud.aiplatform.v1.ListDatasetsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ListDatasetsRequest, + com.google.cloud.aiplatform.v1.ListDatasetsResponse> + getListDatasetsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ListDatasetsRequest, + com.google.cloud.aiplatform.v1.ListDatasetsResponse> + getListDatasetsMethod; + if ((getListDatasetsMethod = DatasetServiceGrpc.getListDatasetsMethod) == null) { + synchronized (DatasetServiceGrpc.class) { + if ((getListDatasetsMethod = DatasetServiceGrpc.getListDatasetsMethod) == null) { + DatasetServiceGrpc.getListDatasetsMethod = + getListDatasetsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListDatasets")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.ListDatasetsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.ListDatasetsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new DatasetServiceMethodDescriptorSupplier("ListDatasets")) + .build(); + } + } + } + return getListDatasetsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.DeleteDatasetRequest, com.google.longrunning.Operation> + getDeleteDatasetMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteDataset", + requestType = com.google.cloud.aiplatform.v1.DeleteDatasetRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.DeleteDatasetRequest, com.google.longrunning.Operation> + getDeleteDatasetMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.DeleteDatasetRequest, com.google.longrunning.Operation> + getDeleteDatasetMethod; + if ((getDeleteDatasetMethod = DatasetServiceGrpc.getDeleteDatasetMethod) == null) { + synchronized (DatasetServiceGrpc.class) { + if ((getDeleteDatasetMethod = DatasetServiceGrpc.getDeleteDatasetMethod) == null) { + DatasetServiceGrpc.getDeleteDatasetMethod = + getDeleteDatasetMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteDataset")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.DeleteDatasetRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new DatasetServiceMethodDescriptorSupplier("DeleteDataset")) + .build(); + } + } + } + return getDeleteDatasetMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ImportDataRequest, com.google.longrunning.Operation> + getImportDataMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ImportData", + requestType = com.google.cloud.aiplatform.v1.ImportDataRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ImportDataRequest, com.google.longrunning.Operation> + getImportDataMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ImportDataRequest, com.google.longrunning.Operation> + getImportDataMethod; + if ((getImportDataMethod = DatasetServiceGrpc.getImportDataMethod) == null) { + synchronized (DatasetServiceGrpc.class) { + if ((getImportDataMethod = DatasetServiceGrpc.getImportDataMethod) == null) { + DatasetServiceGrpc.getImportDataMethod = + getImportDataMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ImportData")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.ImportDataRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new DatasetServiceMethodDescriptorSupplier("ImportData")) + .build(); + } + } + } + return getImportDataMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ExportDataRequest, com.google.longrunning.Operation> + getExportDataMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ExportData", + requestType = com.google.cloud.aiplatform.v1.ExportDataRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ExportDataRequest, com.google.longrunning.Operation> + getExportDataMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ExportDataRequest, com.google.longrunning.Operation> + getExportDataMethod; + if ((getExportDataMethod = DatasetServiceGrpc.getExportDataMethod) == null) { + synchronized (DatasetServiceGrpc.class) { + if ((getExportDataMethod = DatasetServiceGrpc.getExportDataMethod) == null) { + DatasetServiceGrpc.getExportDataMethod = + getExportDataMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ExportData")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.ExportDataRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new DatasetServiceMethodDescriptorSupplier("ExportData")) + .build(); + } + } + } + return getExportDataMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ListDataItemsRequest, + com.google.cloud.aiplatform.v1.ListDataItemsResponse> + getListDataItemsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListDataItems", + requestType = com.google.cloud.aiplatform.v1.ListDataItemsRequest.class, + responseType = com.google.cloud.aiplatform.v1.ListDataItemsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ListDataItemsRequest, + com.google.cloud.aiplatform.v1.ListDataItemsResponse> + getListDataItemsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ListDataItemsRequest, + com.google.cloud.aiplatform.v1.ListDataItemsResponse> + getListDataItemsMethod; + if ((getListDataItemsMethod = DatasetServiceGrpc.getListDataItemsMethod) == null) { + synchronized (DatasetServiceGrpc.class) { + if ((getListDataItemsMethod = DatasetServiceGrpc.getListDataItemsMethod) == null) { + DatasetServiceGrpc.getListDataItemsMethod = + getListDataItemsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListDataItems")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.ListDataItemsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.ListDataItemsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new DatasetServiceMethodDescriptorSupplier("ListDataItems")) + .build(); + } + } + } + return getListDataItemsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.GetAnnotationSpecRequest, + com.google.cloud.aiplatform.v1.AnnotationSpec> + getGetAnnotationSpecMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetAnnotationSpec", + requestType = com.google.cloud.aiplatform.v1.GetAnnotationSpecRequest.class, + responseType = com.google.cloud.aiplatform.v1.AnnotationSpec.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.GetAnnotationSpecRequest, + com.google.cloud.aiplatform.v1.AnnotationSpec> + getGetAnnotationSpecMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.GetAnnotationSpecRequest, + com.google.cloud.aiplatform.v1.AnnotationSpec> + getGetAnnotationSpecMethod; + if ((getGetAnnotationSpecMethod = DatasetServiceGrpc.getGetAnnotationSpecMethod) == null) { + synchronized (DatasetServiceGrpc.class) { + if ((getGetAnnotationSpecMethod = DatasetServiceGrpc.getGetAnnotationSpecMethod) == null) { + DatasetServiceGrpc.getGetAnnotationSpecMethod = + getGetAnnotationSpecMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetAnnotationSpec")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.GetAnnotationSpecRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.AnnotationSpec.getDefaultInstance())) + .setSchemaDescriptor( + new DatasetServiceMethodDescriptorSupplier("GetAnnotationSpec")) + .build(); + } + } + } + return getGetAnnotationSpecMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ListAnnotationsRequest, + com.google.cloud.aiplatform.v1.ListAnnotationsResponse> + getListAnnotationsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListAnnotations", + requestType = com.google.cloud.aiplatform.v1.ListAnnotationsRequest.class, + responseType = com.google.cloud.aiplatform.v1.ListAnnotationsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ListAnnotationsRequest, + com.google.cloud.aiplatform.v1.ListAnnotationsResponse> + getListAnnotationsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ListAnnotationsRequest, + com.google.cloud.aiplatform.v1.ListAnnotationsResponse> + getListAnnotationsMethod; + if ((getListAnnotationsMethod = DatasetServiceGrpc.getListAnnotationsMethod) == null) { + synchronized (DatasetServiceGrpc.class) { + if ((getListAnnotationsMethod = DatasetServiceGrpc.getListAnnotationsMethod) == null) { + DatasetServiceGrpc.getListAnnotationsMethod = + getListAnnotationsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListAnnotations")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.ListAnnotationsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.ListAnnotationsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new DatasetServiceMethodDescriptorSupplier("ListAnnotations")) + .build(); + } + } + } + return getListAnnotationsMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static DatasetServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DatasetServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DatasetServiceStub(channel, callOptions); + } + }; + return DatasetServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static DatasetServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DatasetServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DatasetServiceBlockingStub(channel, callOptions); + } + }; + return DatasetServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static DatasetServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DatasetServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DatasetServiceFutureStub(channel, callOptions); + } + }; + return DatasetServiceFutureStub.newStub(factory, channel); + } + + /** */ + public abstract static class DatasetServiceImplBase implements io.grpc.BindableService { + + /** + * + * + *
+     * Creates a Dataset.
+     * 
+ */ + public void createDataset( + com.google.cloud.aiplatform.v1.CreateDatasetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getCreateDatasetMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets a Dataset.
+     * 
+ */ + public void getDataset( + com.google.cloud.aiplatform.v1.GetDatasetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getGetDatasetMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates a Dataset.
+     * 
+ */ + public void updateDataset( + com.google.cloud.aiplatform.v1.UpdateDatasetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getUpdateDatasetMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists Datasets in a Location.
+     * 
+ */ + public void listDatasets( + com.google.cloud.aiplatform.v1.ListDatasetsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getListDatasetsMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a Dataset.
+     * 
+ */ + public void deleteDataset( + com.google.cloud.aiplatform.v1.DeleteDatasetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getDeleteDatasetMethod(), responseObserver); + } + + /** + * + * + *
+     * Imports data into a Dataset.
+     * 
+ */ + public void importData( + com.google.cloud.aiplatform.v1.ImportDataRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getImportDataMethod(), responseObserver); + } + + /** + * + * + *
+     * Exports data from a Dataset.
+     * 
+ */ + public void exportData( + com.google.cloud.aiplatform.v1.ExportDataRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getExportDataMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists DataItems in a Dataset.
+     * 
+ */ + public void listDataItems( + com.google.cloud.aiplatform.v1.ListDataItemsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getListDataItemsMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets an AnnotationSpec.
+     * 
+ */ + public void getAnnotationSpec( + com.google.cloud.aiplatform.v1.GetAnnotationSpecRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getGetAnnotationSpecMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists Annotations belongs to a dataitem
+     * 
+ */ + public void listAnnotations( + com.google.cloud.aiplatform.v1.ListAnnotationsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getListAnnotationsMethod(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getCreateDatasetMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.CreateDatasetRequest, + com.google.longrunning.Operation>(this, METHODID_CREATE_DATASET))) + .addMethod( + getGetDatasetMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.GetDatasetRequest, + com.google.cloud.aiplatform.v1.Dataset>(this, METHODID_GET_DATASET))) + .addMethod( + getUpdateDatasetMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.UpdateDatasetRequest, + com.google.cloud.aiplatform.v1.Dataset>(this, METHODID_UPDATE_DATASET))) + .addMethod( + getListDatasetsMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.ListDatasetsRequest, + com.google.cloud.aiplatform.v1.ListDatasetsResponse>( + this, METHODID_LIST_DATASETS))) + .addMethod( + getDeleteDatasetMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.DeleteDatasetRequest, + com.google.longrunning.Operation>(this, METHODID_DELETE_DATASET))) + .addMethod( + getImportDataMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.ImportDataRequest, + com.google.longrunning.Operation>(this, METHODID_IMPORT_DATA))) + .addMethod( + getExportDataMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.ExportDataRequest, + com.google.longrunning.Operation>(this, METHODID_EXPORT_DATA))) + .addMethod( + getListDataItemsMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.ListDataItemsRequest, + com.google.cloud.aiplatform.v1.ListDataItemsResponse>( + this, METHODID_LIST_DATA_ITEMS))) + .addMethod( + getGetAnnotationSpecMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.GetAnnotationSpecRequest, + com.google.cloud.aiplatform.v1.AnnotationSpec>( + this, METHODID_GET_ANNOTATION_SPEC))) + .addMethod( + getListAnnotationsMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.ListAnnotationsRequest, + com.google.cloud.aiplatform.v1.ListAnnotationsResponse>( + this, METHODID_LIST_ANNOTATIONS))) + .build(); + } + } + + /** */ + public static final class DatasetServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private DatasetServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DatasetServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DatasetServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a Dataset.
+     * 
+ */ + public void createDataset( + com.google.cloud.aiplatform.v1.CreateDatasetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getCreateDatasetMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets a Dataset.
+     * 
+ */ + public void getDataset( + com.google.cloud.aiplatform.v1.GetDatasetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getGetDatasetMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Updates a Dataset.
+     * 
+ */ + public void updateDataset( + com.google.cloud.aiplatform.v1.UpdateDatasetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getUpdateDatasetMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists Datasets in a Location.
+     * 
+ */ + public void listDatasets( + com.google.cloud.aiplatform.v1.ListDatasetsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getListDatasetsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a Dataset.
+     * 
+ */ + public void deleteDataset( + com.google.cloud.aiplatform.v1.DeleteDatasetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getDeleteDatasetMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Imports data into a Dataset.
+     * 
+ */ + public void importData( + com.google.cloud.aiplatform.v1.ImportDataRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getImportDataMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Exports data from a Dataset.
+     * 
+ */ + public void exportData( + com.google.cloud.aiplatform.v1.ExportDataRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getExportDataMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Lists DataItems in a Dataset.
+     * 
+ */ + public void listDataItems( + com.google.cloud.aiplatform.v1.ListDataItemsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getListDataItemsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets an AnnotationSpec.
+     * 
+ */ + public void getAnnotationSpec( + com.google.cloud.aiplatform.v1.GetAnnotationSpecRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getGetAnnotationSpecMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists Annotations belongs to a dataitem
+     * 
+ */ + public void listAnnotations( + com.google.cloud.aiplatform.v1.ListAnnotationsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getListAnnotationsMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** */ + public static final class DatasetServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private DatasetServiceBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DatasetServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DatasetServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a Dataset.
+     * 
+ */ + public com.google.longrunning.Operation createDataset( + com.google.cloud.aiplatform.v1.CreateDatasetRequest request) { + return blockingUnaryCall(getChannel(), getCreateDatasetMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a Dataset.
+     * 
+ */ + public com.google.cloud.aiplatform.v1.Dataset getDataset( + com.google.cloud.aiplatform.v1.GetDatasetRequest request) { + return blockingUnaryCall(getChannel(), getGetDatasetMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates a Dataset.
+     * 
+ */ + public com.google.cloud.aiplatform.v1.Dataset updateDataset( + com.google.cloud.aiplatform.v1.UpdateDatasetRequest request) { + return blockingUnaryCall(getChannel(), getUpdateDatasetMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists Datasets in a Location.
+     * 
+ */ + public com.google.cloud.aiplatform.v1.ListDatasetsResponse listDatasets( + com.google.cloud.aiplatform.v1.ListDatasetsRequest request) { + return blockingUnaryCall(getChannel(), getListDatasetsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a Dataset.
+     * 
+ */ + public com.google.longrunning.Operation deleteDataset( + com.google.cloud.aiplatform.v1.DeleteDatasetRequest request) { + return blockingUnaryCall(getChannel(), getDeleteDatasetMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Imports data into a Dataset.
+     * 
+ */ + public com.google.longrunning.Operation importData( + com.google.cloud.aiplatform.v1.ImportDataRequest request) { + return blockingUnaryCall(getChannel(), getImportDataMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Exports data from a Dataset.
+     * 
+ */ + public com.google.longrunning.Operation exportData( + com.google.cloud.aiplatform.v1.ExportDataRequest request) { + return blockingUnaryCall(getChannel(), getExportDataMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists DataItems in a Dataset.
+     * 
+ */ + public com.google.cloud.aiplatform.v1.ListDataItemsResponse listDataItems( + com.google.cloud.aiplatform.v1.ListDataItemsRequest request) { + return blockingUnaryCall(getChannel(), getListDataItemsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets an AnnotationSpec.
+     * 
+ */ + public com.google.cloud.aiplatform.v1.AnnotationSpec getAnnotationSpec( + com.google.cloud.aiplatform.v1.GetAnnotationSpecRequest request) { + return blockingUnaryCall( + getChannel(), getGetAnnotationSpecMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists Annotations belongs to a dataitem
+     * 
+ */ + public com.google.cloud.aiplatform.v1.ListAnnotationsResponse listAnnotations( + com.google.cloud.aiplatform.v1.ListAnnotationsRequest request) { + return blockingUnaryCall(getChannel(), getListAnnotationsMethod(), getCallOptions(), request); + } + } + + /** */ + public static final class DatasetServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private DatasetServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DatasetServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DatasetServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a Dataset.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createDataset(com.google.cloud.aiplatform.v1.CreateDatasetRequest request) { + return futureUnaryCall( + getChannel().newCall(getCreateDatasetMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets a Dataset.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1.Dataset> + getDataset(com.google.cloud.aiplatform.v1.GetDatasetRequest request) { + return futureUnaryCall( + getChannel().newCall(getGetDatasetMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates a Dataset.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1.Dataset> + updateDataset(com.google.cloud.aiplatform.v1.UpdateDatasetRequest request) { + return futureUnaryCall( + getChannel().newCall(getUpdateDatasetMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists Datasets in a Location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1.ListDatasetsResponse> + listDatasets(com.google.cloud.aiplatform.v1.ListDatasetsRequest request) { + return futureUnaryCall( + getChannel().newCall(getListDatasetsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a Dataset.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteDataset(com.google.cloud.aiplatform.v1.DeleteDatasetRequest request) { + return futureUnaryCall( + getChannel().newCall(getDeleteDatasetMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Imports data into a Dataset.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + importData(com.google.cloud.aiplatform.v1.ImportDataRequest request) { + return futureUnaryCall( + getChannel().newCall(getImportDataMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Exports data from a Dataset.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + exportData(com.google.cloud.aiplatform.v1.ExportDataRequest request) { + return futureUnaryCall( + getChannel().newCall(getExportDataMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists DataItems in a Dataset.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1.ListDataItemsResponse> + listDataItems(com.google.cloud.aiplatform.v1.ListDataItemsRequest request) { + return futureUnaryCall( + getChannel().newCall(getListDataItemsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets an AnnotationSpec.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1.AnnotationSpec> + getAnnotationSpec(com.google.cloud.aiplatform.v1.GetAnnotationSpecRequest request) { + return futureUnaryCall( + getChannel().newCall(getGetAnnotationSpecMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists Annotations belongs to a dataitem
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1.ListAnnotationsResponse> + listAnnotations(com.google.cloud.aiplatform.v1.ListAnnotationsRequest request) { + return futureUnaryCall( + getChannel().newCall(getListAnnotationsMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_CREATE_DATASET = 0; + private static final int METHODID_GET_DATASET = 1; + private static final int METHODID_UPDATE_DATASET = 2; + private static final int METHODID_LIST_DATASETS = 3; + private static final int METHODID_DELETE_DATASET = 4; + private static final int METHODID_IMPORT_DATA = 5; + private static final int METHODID_EXPORT_DATA = 6; + private static final int METHODID_LIST_DATA_ITEMS = 7; + private static final int METHODID_GET_ANNOTATION_SPEC = 8; + private static final int METHODID_LIST_ANNOTATIONS = 9; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final DatasetServiceImplBase serviceImpl; + private final int methodId; + + MethodHandlers(DatasetServiceImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_CREATE_DATASET: + serviceImpl.createDataset( + (com.google.cloud.aiplatform.v1.CreateDatasetRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_DATASET: + serviceImpl.getDataset( + (com.google.cloud.aiplatform.v1.GetDatasetRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_DATASET: + serviceImpl.updateDataset( + (com.google.cloud.aiplatform.v1.UpdateDatasetRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_DATASETS: + serviceImpl.listDatasets( + (com.google.cloud.aiplatform.v1.ListDatasetsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_DELETE_DATASET: + serviceImpl.deleteDataset( + (com.google.cloud.aiplatform.v1.DeleteDatasetRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_IMPORT_DATA: + serviceImpl.importData( + (com.google.cloud.aiplatform.v1.ImportDataRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_EXPORT_DATA: + serviceImpl.exportData( + (com.google.cloud.aiplatform.v1.ExportDataRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_DATA_ITEMS: + serviceImpl.listDataItems( + (com.google.cloud.aiplatform.v1.ListDataItemsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_ANNOTATION_SPEC: + serviceImpl.getAnnotationSpec( + (com.google.cloud.aiplatform.v1.GetAnnotationSpecRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_ANNOTATIONS: + serviceImpl.listAnnotations( + (com.google.cloud.aiplatform.v1.ListAnnotationsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + private abstract static class DatasetServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + DatasetServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("DatasetService"); + } + } + + private static final class DatasetServiceFileDescriptorSupplier + extends DatasetServiceBaseDescriptorSupplier { + DatasetServiceFileDescriptorSupplier() {} + } + + private static final class DatasetServiceMethodDescriptorSupplier + extends DatasetServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + DatasetServiceMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (DatasetServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new DatasetServiceFileDescriptorSupplier()) + .addMethod(getCreateDatasetMethod()) + .addMethod(getGetDatasetMethod()) + .addMethod(getUpdateDatasetMethod()) + .addMethod(getListDatasetsMethod()) + .addMethod(getDeleteDatasetMethod()) + .addMethod(getImportDataMethod()) + .addMethod(getExportDataMethod()) + .addMethod(getListDataItemsMethod()) + .addMethod(getGetAnnotationSpecMethod()) + .addMethod(getListAnnotationsMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/grpc-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EndpointServiceGrpc.java b/grpc-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EndpointServiceGrpc.java new file mode 100644 index 000000000..5d1f03e87 --- /dev/null +++ b/grpc-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EndpointServiceGrpc.java @@ -0,0 +1,1009 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; +import static io.grpc.stub.ClientCalls.asyncUnaryCall; +import static io.grpc.stub.ClientCalls.blockingUnaryCall; +import static io.grpc.stub.ClientCalls.futureUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; + +/** */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/aiplatform/v1/endpoint_service.proto") +public final class EndpointServiceGrpc { + + private EndpointServiceGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.aiplatform.v1.EndpointService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CreateEndpointRequest, com.google.longrunning.Operation> + getCreateEndpointMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateEndpoint", + requestType = com.google.cloud.aiplatform.v1.CreateEndpointRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CreateEndpointRequest, com.google.longrunning.Operation> + getCreateEndpointMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CreateEndpointRequest, com.google.longrunning.Operation> + getCreateEndpointMethod; + if ((getCreateEndpointMethod = EndpointServiceGrpc.getCreateEndpointMethod) == null) { + synchronized (EndpointServiceGrpc.class) { + if ((getCreateEndpointMethod = EndpointServiceGrpc.getCreateEndpointMethod) == null) { + EndpointServiceGrpc.getCreateEndpointMethod = + getCreateEndpointMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateEndpoint")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.CreateEndpointRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new EndpointServiceMethodDescriptorSupplier("CreateEndpoint")) + .build(); + } + } + } + return getCreateEndpointMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.GetEndpointRequest, + com.google.cloud.aiplatform.v1.Endpoint> + getGetEndpointMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetEndpoint", + requestType = com.google.cloud.aiplatform.v1.GetEndpointRequest.class, + responseType = com.google.cloud.aiplatform.v1.Endpoint.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.GetEndpointRequest, + com.google.cloud.aiplatform.v1.Endpoint> + getGetEndpointMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.GetEndpointRequest, + com.google.cloud.aiplatform.v1.Endpoint> + getGetEndpointMethod; + if ((getGetEndpointMethod = EndpointServiceGrpc.getGetEndpointMethod) == null) { + synchronized (EndpointServiceGrpc.class) { + if ((getGetEndpointMethod = EndpointServiceGrpc.getGetEndpointMethod) == null) { + EndpointServiceGrpc.getGetEndpointMethod = + getGetEndpointMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetEndpoint")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.GetEndpointRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.Endpoint.getDefaultInstance())) + .setSchemaDescriptor( + new EndpointServiceMethodDescriptorSupplier("GetEndpoint")) + .build(); + } + } + } + return getGetEndpointMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ListEndpointsRequest, + com.google.cloud.aiplatform.v1.ListEndpointsResponse> + getListEndpointsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListEndpoints", + requestType = com.google.cloud.aiplatform.v1.ListEndpointsRequest.class, + responseType = com.google.cloud.aiplatform.v1.ListEndpointsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ListEndpointsRequest, + com.google.cloud.aiplatform.v1.ListEndpointsResponse> + getListEndpointsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ListEndpointsRequest, + com.google.cloud.aiplatform.v1.ListEndpointsResponse> + getListEndpointsMethod; + if ((getListEndpointsMethod = EndpointServiceGrpc.getListEndpointsMethod) == null) { + synchronized (EndpointServiceGrpc.class) { + if ((getListEndpointsMethod = EndpointServiceGrpc.getListEndpointsMethod) == null) { + EndpointServiceGrpc.getListEndpointsMethod = + getListEndpointsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListEndpoints")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.ListEndpointsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.ListEndpointsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new EndpointServiceMethodDescriptorSupplier("ListEndpoints")) + .build(); + } + } + } + return getListEndpointsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.UpdateEndpointRequest, + com.google.cloud.aiplatform.v1.Endpoint> + getUpdateEndpointMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateEndpoint", + requestType = com.google.cloud.aiplatform.v1.UpdateEndpointRequest.class, + responseType = com.google.cloud.aiplatform.v1.Endpoint.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.UpdateEndpointRequest, + com.google.cloud.aiplatform.v1.Endpoint> + getUpdateEndpointMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.UpdateEndpointRequest, + com.google.cloud.aiplatform.v1.Endpoint> + getUpdateEndpointMethod; + if ((getUpdateEndpointMethod = EndpointServiceGrpc.getUpdateEndpointMethod) == null) { + synchronized (EndpointServiceGrpc.class) { + if ((getUpdateEndpointMethod = EndpointServiceGrpc.getUpdateEndpointMethod) == null) { + EndpointServiceGrpc.getUpdateEndpointMethod = + getUpdateEndpointMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateEndpoint")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.UpdateEndpointRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.Endpoint.getDefaultInstance())) + .setSchemaDescriptor( + new EndpointServiceMethodDescriptorSupplier("UpdateEndpoint")) + .build(); + } + } + } + return getUpdateEndpointMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.DeleteEndpointRequest, com.google.longrunning.Operation> + getDeleteEndpointMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteEndpoint", + requestType = com.google.cloud.aiplatform.v1.DeleteEndpointRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.DeleteEndpointRequest, com.google.longrunning.Operation> + getDeleteEndpointMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.DeleteEndpointRequest, com.google.longrunning.Operation> + getDeleteEndpointMethod; + if ((getDeleteEndpointMethod = EndpointServiceGrpc.getDeleteEndpointMethod) == null) { + synchronized (EndpointServiceGrpc.class) { + if ((getDeleteEndpointMethod = EndpointServiceGrpc.getDeleteEndpointMethod) == null) { + EndpointServiceGrpc.getDeleteEndpointMethod = + getDeleteEndpointMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteEndpoint")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.DeleteEndpointRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new EndpointServiceMethodDescriptorSupplier("DeleteEndpoint")) + .build(); + } + } + } + return getDeleteEndpointMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.DeployModelRequest, com.google.longrunning.Operation> + getDeployModelMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeployModel", + requestType = com.google.cloud.aiplatform.v1.DeployModelRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.DeployModelRequest, com.google.longrunning.Operation> + getDeployModelMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.DeployModelRequest, com.google.longrunning.Operation> + getDeployModelMethod; + if ((getDeployModelMethod = EndpointServiceGrpc.getDeployModelMethod) == null) { + synchronized (EndpointServiceGrpc.class) { + if ((getDeployModelMethod = EndpointServiceGrpc.getDeployModelMethod) == null) { + EndpointServiceGrpc.getDeployModelMethod = + getDeployModelMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeployModel")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.DeployModelRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new EndpointServiceMethodDescriptorSupplier("DeployModel")) + .build(); + } + } + } + return getDeployModelMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.UndeployModelRequest, com.google.longrunning.Operation> + getUndeployModelMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UndeployModel", + requestType = com.google.cloud.aiplatform.v1.UndeployModelRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.UndeployModelRequest, com.google.longrunning.Operation> + getUndeployModelMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.UndeployModelRequest, com.google.longrunning.Operation> + getUndeployModelMethod; + if ((getUndeployModelMethod = EndpointServiceGrpc.getUndeployModelMethod) == null) { + synchronized (EndpointServiceGrpc.class) { + if ((getUndeployModelMethod = EndpointServiceGrpc.getUndeployModelMethod) == null) { + EndpointServiceGrpc.getUndeployModelMethod = + getUndeployModelMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UndeployModel")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.UndeployModelRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new EndpointServiceMethodDescriptorSupplier("UndeployModel")) + .build(); + } + } + } + return getUndeployModelMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static EndpointServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public EndpointServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new EndpointServiceStub(channel, callOptions); + } + }; + return EndpointServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static EndpointServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public EndpointServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new EndpointServiceBlockingStub(channel, callOptions); + } + }; + return EndpointServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static EndpointServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public EndpointServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new EndpointServiceFutureStub(channel, callOptions); + } + }; + return EndpointServiceFutureStub.newStub(factory, channel); + } + + /** */ + public abstract static class EndpointServiceImplBase implements io.grpc.BindableService { + + /** + * + * + *
+     * Creates an Endpoint.
+     * 
+ */ + public void createEndpoint( + com.google.cloud.aiplatform.v1.CreateEndpointRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getCreateEndpointMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets an Endpoint.
+     * 
+ */ + public void getEndpoint( + com.google.cloud.aiplatform.v1.GetEndpointRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getGetEndpointMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists Endpoints in a Location.
+     * 
+ */ + public void listEndpoints( + com.google.cloud.aiplatform.v1.ListEndpointsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getListEndpointsMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates an Endpoint.
+     * 
+ */ + public void updateEndpoint( + com.google.cloud.aiplatform.v1.UpdateEndpointRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getUpdateEndpointMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes an Endpoint.
+     * 
+ */ + public void deleteEndpoint( + com.google.cloud.aiplatform.v1.DeleteEndpointRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getDeleteEndpointMethod(), responseObserver); + } + + /** + * + * + *
+     * Deploys a Model into this Endpoint, creating a DeployedModel within it.
+     * 
+ */ + public void deployModel( + com.google.cloud.aiplatform.v1.DeployModelRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getDeployModelMethod(), responseObserver); + } + + /** + * + * + *
+     * Undeploys a Model from an Endpoint, removing a DeployedModel from it, and
+     * freeing all resources it's using.
+     * 
+ */ + public void undeployModel( + com.google.cloud.aiplatform.v1.UndeployModelRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getUndeployModelMethod(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getCreateEndpointMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.CreateEndpointRequest, + com.google.longrunning.Operation>(this, METHODID_CREATE_ENDPOINT))) + .addMethod( + getGetEndpointMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.GetEndpointRequest, + com.google.cloud.aiplatform.v1.Endpoint>(this, METHODID_GET_ENDPOINT))) + .addMethod( + getListEndpointsMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.ListEndpointsRequest, + com.google.cloud.aiplatform.v1.ListEndpointsResponse>( + this, METHODID_LIST_ENDPOINTS))) + .addMethod( + getUpdateEndpointMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.UpdateEndpointRequest, + com.google.cloud.aiplatform.v1.Endpoint>(this, METHODID_UPDATE_ENDPOINT))) + .addMethod( + getDeleteEndpointMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.DeleteEndpointRequest, + com.google.longrunning.Operation>(this, METHODID_DELETE_ENDPOINT))) + .addMethod( + getDeployModelMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.DeployModelRequest, + com.google.longrunning.Operation>(this, METHODID_DEPLOY_MODEL))) + .addMethod( + getUndeployModelMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.UndeployModelRequest, + com.google.longrunning.Operation>(this, METHODID_UNDEPLOY_MODEL))) + .build(); + } + } + + /** */ + public static final class EndpointServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private EndpointServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected EndpointServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new EndpointServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates an Endpoint.
+     * 
+ */ + public void createEndpoint( + com.google.cloud.aiplatform.v1.CreateEndpointRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getCreateEndpointMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets an Endpoint.
+     * 
+ */ + public void getEndpoint( + com.google.cloud.aiplatform.v1.GetEndpointRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getGetEndpointMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists Endpoints in a Location.
+     * 
+ */ + public void listEndpoints( + com.google.cloud.aiplatform.v1.ListEndpointsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getListEndpointsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates an Endpoint.
+     * 
+ */ + public void updateEndpoint( + com.google.cloud.aiplatform.v1.UpdateEndpointRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getUpdateEndpointMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes an Endpoint.
+     * 
+ */ + public void deleteEndpoint( + com.google.cloud.aiplatform.v1.DeleteEndpointRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getDeleteEndpointMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deploys a Model into this Endpoint, creating a DeployedModel within it.
+     * 
+ */ + public void deployModel( + com.google.cloud.aiplatform.v1.DeployModelRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getDeployModelMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Undeploys a Model from an Endpoint, removing a DeployedModel from it, and
+     * freeing all resources it's using.
+     * 
+ */ + public void undeployModel( + com.google.cloud.aiplatform.v1.UndeployModelRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getUndeployModelMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** */ + public static final class EndpointServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private EndpointServiceBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected EndpointServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new EndpointServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates an Endpoint.
+     * 
+ */ + public com.google.longrunning.Operation createEndpoint( + com.google.cloud.aiplatform.v1.CreateEndpointRequest request) { + return blockingUnaryCall(getChannel(), getCreateEndpointMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets an Endpoint.
+     * 
+ */ + public com.google.cloud.aiplatform.v1.Endpoint getEndpoint( + com.google.cloud.aiplatform.v1.GetEndpointRequest request) { + return blockingUnaryCall(getChannel(), getGetEndpointMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists Endpoints in a Location.
+     * 
+ */ + public com.google.cloud.aiplatform.v1.ListEndpointsResponse listEndpoints( + com.google.cloud.aiplatform.v1.ListEndpointsRequest request) { + return blockingUnaryCall(getChannel(), getListEndpointsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates an Endpoint.
+     * 
+ */ + public com.google.cloud.aiplatform.v1.Endpoint updateEndpoint( + com.google.cloud.aiplatform.v1.UpdateEndpointRequest request) { + return blockingUnaryCall(getChannel(), getUpdateEndpointMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes an Endpoint.
+     * 
+ */ + public com.google.longrunning.Operation deleteEndpoint( + com.google.cloud.aiplatform.v1.DeleteEndpointRequest request) { + return blockingUnaryCall(getChannel(), getDeleteEndpointMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deploys a Model into this Endpoint, creating a DeployedModel within it.
+     * 
+ */ + public com.google.longrunning.Operation deployModel( + com.google.cloud.aiplatform.v1.DeployModelRequest request) { + return blockingUnaryCall(getChannel(), getDeployModelMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Undeploys a Model from an Endpoint, removing a DeployedModel from it, and
+     * freeing all resources it's using.
+     * 
+ */ + public com.google.longrunning.Operation undeployModel( + com.google.cloud.aiplatform.v1.UndeployModelRequest request) { + return blockingUnaryCall(getChannel(), getUndeployModelMethod(), getCallOptions(), request); + } + } + + /** */ + public static final class EndpointServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private EndpointServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected EndpointServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new EndpointServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates an Endpoint.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createEndpoint(com.google.cloud.aiplatform.v1.CreateEndpointRequest request) { + return futureUnaryCall( + getChannel().newCall(getCreateEndpointMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets an Endpoint.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1.Endpoint> + getEndpoint(com.google.cloud.aiplatform.v1.GetEndpointRequest request) { + return futureUnaryCall( + getChannel().newCall(getGetEndpointMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists Endpoints in a Location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1.ListEndpointsResponse> + listEndpoints(com.google.cloud.aiplatform.v1.ListEndpointsRequest request) { + return futureUnaryCall( + getChannel().newCall(getListEndpointsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates an Endpoint.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1.Endpoint> + updateEndpoint(com.google.cloud.aiplatform.v1.UpdateEndpointRequest request) { + return futureUnaryCall( + getChannel().newCall(getUpdateEndpointMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes an Endpoint.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteEndpoint(com.google.cloud.aiplatform.v1.DeleteEndpointRequest request) { + return futureUnaryCall( + getChannel().newCall(getDeleteEndpointMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deploys a Model into this Endpoint, creating a DeployedModel within it.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deployModel(com.google.cloud.aiplatform.v1.DeployModelRequest request) { + return futureUnaryCall( + getChannel().newCall(getDeployModelMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Undeploys a Model from an Endpoint, removing a DeployedModel from it, and
+     * freeing all resources it's using.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + undeployModel(com.google.cloud.aiplatform.v1.UndeployModelRequest request) { + return futureUnaryCall( + getChannel().newCall(getUndeployModelMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_CREATE_ENDPOINT = 0; + private static final int METHODID_GET_ENDPOINT = 1; + private static final int METHODID_LIST_ENDPOINTS = 2; + private static final int METHODID_UPDATE_ENDPOINT = 3; + private static final int METHODID_DELETE_ENDPOINT = 4; + private static final int METHODID_DEPLOY_MODEL = 5; + private static final int METHODID_UNDEPLOY_MODEL = 6; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final EndpointServiceImplBase serviceImpl; + private final int methodId; + + MethodHandlers(EndpointServiceImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_CREATE_ENDPOINT: + serviceImpl.createEndpoint( + (com.google.cloud.aiplatform.v1.CreateEndpointRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_ENDPOINT: + serviceImpl.getEndpoint( + (com.google.cloud.aiplatform.v1.GetEndpointRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_ENDPOINTS: + serviceImpl.listEndpoints( + (com.google.cloud.aiplatform.v1.ListEndpointsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_ENDPOINT: + serviceImpl.updateEndpoint( + (com.google.cloud.aiplatform.v1.UpdateEndpointRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_DELETE_ENDPOINT: + serviceImpl.deleteEndpoint( + (com.google.cloud.aiplatform.v1.DeleteEndpointRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DEPLOY_MODEL: + serviceImpl.deployModel( + (com.google.cloud.aiplatform.v1.DeployModelRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UNDEPLOY_MODEL: + serviceImpl.undeployModel( + (com.google.cloud.aiplatform.v1.UndeployModelRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + private abstract static class EndpointServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + EndpointServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.aiplatform.v1.EndpointServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("EndpointService"); + } + } + + private static final class EndpointServiceFileDescriptorSupplier + extends EndpointServiceBaseDescriptorSupplier { + EndpointServiceFileDescriptorSupplier() {} + } + + private static final class EndpointServiceMethodDescriptorSupplier + extends EndpointServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + EndpointServiceMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (EndpointServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new EndpointServiceFileDescriptorSupplier()) + .addMethod(getCreateEndpointMethod()) + .addMethod(getGetEndpointMethod()) + .addMethod(getListEndpointsMethod()) + .addMethod(getUpdateEndpointMethod()) + .addMethod(getDeleteEndpointMethod()) + .addMethod(getDeployModelMethod()) + .addMethod(getUndeployModelMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/grpc-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/JobServiceGrpc.java b/grpc-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/JobServiceGrpc.java new file mode 100644 index 000000000..db737bf99 --- /dev/null +++ b/grpc-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/JobServiceGrpc.java @@ -0,0 +1,2749 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; +import static io.grpc.stub.ClientCalls.asyncUnaryCall; +import static io.grpc.stub.ClientCalls.blockingUnaryCall; +import static io.grpc.stub.ClientCalls.futureUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; + +/** + * + * + *
+ * A service for creating and managing AI Platform's jobs.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/aiplatform/v1/job_service.proto") +public final class JobServiceGrpc { + + private JobServiceGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.aiplatform.v1.JobService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CreateCustomJobRequest, + com.google.cloud.aiplatform.v1.CustomJob> + getCreateCustomJobMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateCustomJob", + requestType = com.google.cloud.aiplatform.v1.CreateCustomJobRequest.class, + responseType = com.google.cloud.aiplatform.v1.CustomJob.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CreateCustomJobRequest, + com.google.cloud.aiplatform.v1.CustomJob> + getCreateCustomJobMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CreateCustomJobRequest, + com.google.cloud.aiplatform.v1.CustomJob> + getCreateCustomJobMethod; + if ((getCreateCustomJobMethod = JobServiceGrpc.getCreateCustomJobMethod) == null) { + synchronized (JobServiceGrpc.class) { + if ((getCreateCustomJobMethod = JobServiceGrpc.getCreateCustomJobMethod) == null) { + JobServiceGrpc.getCreateCustomJobMethod = + getCreateCustomJobMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateCustomJob")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.CreateCustomJobRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.CustomJob.getDefaultInstance())) + .setSchemaDescriptor( + new JobServiceMethodDescriptorSupplier("CreateCustomJob")) + .build(); + } + } + } + return getCreateCustomJobMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.GetCustomJobRequest, + com.google.cloud.aiplatform.v1.CustomJob> + getGetCustomJobMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetCustomJob", + requestType = com.google.cloud.aiplatform.v1.GetCustomJobRequest.class, + responseType = com.google.cloud.aiplatform.v1.CustomJob.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.GetCustomJobRequest, + com.google.cloud.aiplatform.v1.CustomJob> + getGetCustomJobMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.GetCustomJobRequest, + com.google.cloud.aiplatform.v1.CustomJob> + getGetCustomJobMethod; + if ((getGetCustomJobMethod = JobServiceGrpc.getGetCustomJobMethod) == null) { + synchronized (JobServiceGrpc.class) { + if ((getGetCustomJobMethod = JobServiceGrpc.getGetCustomJobMethod) == null) { + JobServiceGrpc.getGetCustomJobMethod = + getGetCustomJobMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetCustomJob")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.GetCustomJobRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.CustomJob.getDefaultInstance())) + .setSchemaDescriptor(new JobServiceMethodDescriptorSupplier("GetCustomJob")) + .build(); + } + } + } + return getGetCustomJobMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ListCustomJobsRequest, + com.google.cloud.aiplatform.v1.ListCustomJobsResponse> + getListCustomJobsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListCustomJobs", + requestType = com.google.cloud.aiplatform.v1.ListCustomJobsRequest.class, + responseType = com.google.cloud.aiplatform.v1.ListCustomJobsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ListCustomJobsRequest, + com.google.cloud.aiplatform.v1.ListCustomJobsResponse> + getListCustomJobsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ListCustomJobsRequest, + com.google.cloud.aiplatform.v1.ListCustomJobsResponse> + getListCustomJobsMethod; + if ((getListCustomJobsMethod = JobServiceGrpc.getListCustomJobsMethod) == null) { + synchronized (JobServiceGrpc.class) { + if ((getListCustomJobsMethod = JobServiceGrpc.getListCustomJobsMethod) == null) { + JobServiceGrpc.getListCustomJobsMethod = + getListCustomJobsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListCustomJobs")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.ListCustomJobsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.ListCustomJobsResponse + .getDefaultInstance())) + .setSchemaDescriptor(new JobServiceMethodDescriptorSupplier("ListCustomJobs")) + .build(); + } + } + } + return getListCustomJobsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.DeleteCustomJobRequest, com.google.longrunning.Operation> + getDeleteCustomJobMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteCustomJob", + requestType = com.google.cloud.aiplatform.v1.DeleteCustomJobRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.DeleteCustomJobRequest, com.google.longrunning.Operation> + getDeleteCustomJobMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.DeleteCustomJobRequest, com.google.longrunning.Operation> + getDeleteCustomJobMethod; + if ((getDeleteCustomJobMethod = JobServiceGrpc.getDeleteCustomJobMethod) == null) { + synchronized (JobServiceGrpc.class) { + if ((getDeleteCustomJobMethod = JobServiceGrpc.getDeleteCustomJobMethod) == null) { + JobServiceGrpc.getDeleteCustomJobMethod = + getDeleteCustomJobMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteCustomJob")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.DeleteCustomJobRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new JobServiceMethodDescriptorSupplier("DeleteCustomJob")) + .build(); + } + } + } + return getDeleteCustomJobMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CancelCustomJobRequest, com.google.protobuf.Empty> + getCancelCustomJobMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CancelCustomJob", + requestType = com.google.cloud.aiplatform.v1.CancelCustomJobRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CancelCustomJobRequest, com.google.protobuf.Empty> + getCancelCustomJobMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CancelCustomJobRequest, com.google.protobuf.Empty> + getCancelCustomJobMethod; + if ((getCancelCustomJobMethod = JobServiceGrpc.getCancelCustomJobMethod) == null) { + synchronized (JobServiceGrpc.class) { + if ((getCancelCustomJobMethod = JobServiceGrpc.getCancelCustomJobMethod) == null) { + JobServiceGrpc.getCancelCustomJobMethod = + getCancelCustomJobMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CancelCustomJob")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.CancelCustomJobRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new JobServiceMethodDescriptorSupplier("CancelCustomJob")) + .build(); + } + } + } + return getCancelCustomJobMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CreateDataLabelingJobRequest, + com.google.cloud.aiplatform.v1.DataLabelingJob> + getCreateDataLabelingJobMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateDataLabelingJob", + requestType = com.google.cloud.aiplatform.v1.CreateDataLabelingJobRequest.class, + responseType = com.google.cloud.aiplatform.v1.DataLabelingJob.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CreateDataLabelingJobRequest, + com.google.cloud.aiplatform.v1.DataLabelingJob> + getCreateDataLabelingJobMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CreateDataLabelingJobRequest, + com.google.cloud.aiplatform.v1.DataLabelingJob> + getCreateDataLabelingJobMethod; + if ((getCreateDataLabelingJobMethod = JobServiceGrpc.getCreateDataLabelingJobMethod) == null) { + synchronized (JobServiceGrpc.class) { + if ((getCreateDataLabelingJobMethod = JobServiceGrpc.getCreateDataLabelingJobMethod) + == null) { + JobServiceGrpc.getCreateDataLabelingJobMethod = + getCreateDataLabelingJobMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreateDataLabelingJob")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.CreateDataLabelingJobRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.DataLabelingJob.getDefaultInstance())) + .setSchemaDescriptor( + new JobServiceMethodDescriptorSupplier("CreateDataLabelingJob")) + .build(); + } + } + } + return getCreateDataLabelingJobMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.GetDataLabelingJobRequest, + com.google.cloud.aiplatform.v1.DataLabelingJob> + getGetDataLabelingJobMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetDataLabelingJob", + requestType = com.google.cloud.aiplatform.v1.GetDataLabelingJobRequest.class, + responseType = com.google.cloud.aiplatform.v1.DataLabelingJob.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.GetDataLabelingJobRequest, + com.google.cloud.aiplatform.v1.DataLabelingJob> + getGetDataLabelingJobMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.GetDataLabelingJobRequest, + com.google.cloud.aiplatform.v1.DataLabelingJob> + getGetDataLabelingJobMethod; + if ((getGetDataLabelingJobMethod = JobServiceGrpc.getGetDataLabelingJobMethod) == null) { + synchronized (JobServiceGrpc.class) { + if ((getGetDataLabelingJobMethod = JobServiceGrpc.getGetDataLabelingJobMethod) == null) { + JobServiceGrpc.getGetDataLabelingJobMethod = + getGetDataLabelingJobMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetDataLabelingJob")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.GetDataLabelingJobRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.DataLabelingJob.getDefaultInstance())) + .setSchemaDescriptor( + new JobServiceMethodDescriptorSupplier("GetDataLabelingJob")) + .build(); + } + } + } + return getGetDataLabelingJobMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ListDataLabelingJobsRequest, + com.google.cloud.aiplatform.v1.ListDataLabelingJobsResponse> + getListDataLabelingJobsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListDataLabelingJobs", + requestType = com.google.cloud.aiplatform.v1.ListDataLabelingJobsRequest.class, + responseType = com.google.cloud.aiplatform.v1.ListDataLabelingJobsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ListDataLabelingJobsRequest, + com.google.cloud.aiplatform.v1.ListDataLabelingJobsResponse> + getListDataLabelingJobsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ListDataLabelingJobsRequest, + com.google.cloud.aiplatform.v1.ListDataLabelingJobsResponse> + getListDataLabelingJobsMethod; + if ((getListDataLabelingJobsMethod = JobServiceGrpc.getListDataLabelingJobsMethod) == null) { + synchronized (JobServiceGrpc.class) { + if ((getListDataLabelingJobsMethod = JobServiceGrpc.getListDataLabelingJobsMethod) + == null) { + JobServiceGrpc.getListDataLabelingJobsMethod = + getListDataLabelingJobsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListDataLabelingJobs")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.ListDataLabelingJobsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.ListDataLabelingJobsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new JobServiceMethodDescriptorSupplier("ListDataLabelingJobs")) + .build(); + } + } + } + return getListDataLabelingJobsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.DeleteDataLabelingJobRequest, + com.google.longrunning.Operation> + getDeleteDataLabelingJobMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteDataLabelingJob", + requestType = com.google.cloud.aiplatform.v1.DeleteDataLabelingJobRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.DeleteDataLabelingJobRequest, + com.google.longrunning.Operation> + getDeleteDataLabelingJobMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.DeleteDataLabelingJobRequest, + com.google.longrunning.Operation> + getDeleteDataLabelingJobMethod; + if ((getDeleteDataLabelingJobMethod = JobServiceGrpc.getDeleteDataLabelingJobMethod) == null) { + synchronized (JobServiceGrpc.class) { + if ((getDeleteDataLabelingJobMethod = JobServiceGrpc.getDeleteDataLabelingJobMethod) + == null) { + JobServiceGrpc.getDeleteDataLabelingJobMethod = + getDeleteDataLabelingJobMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DeleteDataLabelingJob")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.DeleteDataLabelingJobRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new JobServiceMethodDescriptorSupplier("DeleteDataLabelingJob")) + .build(); + } + } + } + return getDeleteDataLabelingJobMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CancelDataLabelingJobRequest, com.google.protobuf.Empty> + getCancelDataLabelingJobMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CancelDataLabelingJob", + requestType = com.google.cloud.aiplatform.v1.CancelDataLabelingJobRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CancelDataLabelingJobRequest, com.google.protobuf.Empty> + getCancelDataLabelingJobMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CancelDataLabelingJobRequest, com.google.protobuf.Empty> + getCancelDataLabelingJobMethod; + if ((getCancelDataLabelingJobMethod = JobServiceGrpc.getCancelDataLabelingJobMethod) == null) { + synchronized (JobServiceGrpc.class) { + if ((getCancelDataLabelingJobMethod = JobServiceGrpc.getCancelDataLabelingJobMethod) + == null) { + JobServiceGrpc.getCancelDataLabelingJobMethod = + getCancelDataLabelingJobMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CancelDataLabelingJob")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.CancelDataLabelingJobRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new JobServiceMethodDescriptorSupplier("CancelDataLabelingJob")) + .build(); + } + } + } + return getCancelDataLabelingJobMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CreateHyperparameterTuningJobRequest, + com.google.cloud.aiplatform.v1.HyperparameterTuningJob> + getCreateHyperparameterTuningJobMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateHyperparameterTuningJob", + requestType = com.google.cloud.aiplatform.v1.CreateHyperparameterTuningJobRequest.class, + responseType = com.google.cloud.aiplatform.v1.HyperparameterTuningJob.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CreateHyperparameterTuningJobRequest, + com.google.cloud.aiplatform.v1.HyperparameterTuningJob> + getCreateHyperparameterTuningJobMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CreateHyperparameterTuningJobRequest, + com.google.cloud.aiplatform.v1.HyperparameterTuningJob> + getCreateHyperparameterTuningJobMethod; + if ((getCreateHyperparameterTuningJobMethod = + JobServiceGrpc.getCreateHyperparameterTuningJobMethod) + == null) { + synchronized (JobServiceGrpc.class) { + if ((getCreateHyperparameterTuningJobMethod = + JobServiceGrpc.getCreateHyperparameterTuningJobMethod) + == null) { + JobServiceGrpc.getCreateHyperparameterTuningJobMethod = + getCreateHyperparameterTuningJobMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreateHyperparameterTuningJob")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.CreateHyperparameterTuningJobRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.HyperparameterTuningJob + .getDefaultInstance())) + .setSchemaDescriptor( + new JobServiceMethodDescriptorSupplier("CreateHyperparameterTuningJob")) + .build(); + } + } + } + return getCreateHyperparameterTuningJobMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.GetHyperparameterTuningJobRequest, + com.google.cloud.aiplatform.v1.HyperparameterTuningJob> + getGetHyperparameterTuningJobMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetHyperparameterTuningJob", + requestType = com.google.cloud.aiplatform.v1.GetHyperparameterTuningJobRequest.class, + responseType = com.google.cloud.aiplatform.v1.HyperparameterTuningJob.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.GetHyperparameterTuningJobRequest, + com.google.cloud.aiplatform.v1.HyperparameterTuningJob> + getGetHyperparameterTuningJobMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.GetHyperparameterTuningJobRequest, + com.google.cloud.aiplatform.v1.HyperparameterTuningJob> + getGetHyperparameterTuningJobMethod; + if ((getGetHyperparameterTuningJobMethod = JobServiceGrpc.getGetHyperparameterTuningJobMethod) + == null) { + synchronized (JobServiceGrpc.class) { + if ((getGetHyperparameterTuningJobMethod = + JobServiceGrpc.getGetHyperparameterTuningJobMethod) + == null) { + JobServiceGrpc.getGetHyperparameterTuningJobMethod = + getGetHyperparameterTuningJobMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetHyperparameterTuningJob")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.GetHyperparameterTuningJobRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.HyperparameterTuningJob + .getDefaultInstance())) + .setSchemaDescriptor( + new JobServiceMethodDescriptorSupplier("GetHyperparameterTuningJob")) + .build(); + } + } + } + return getGetHyperparameterTuningJobMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsRequest, + com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsResponse> + getListHyperparameterTuningJobsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListHyperparameterTuningJobs", + requestType = com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsRequest.class, + responseType = com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsRequest, + com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsResponse> + getListHyperparameterTuningJobsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsRequest, + com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsResponse> + getListHyperparameterTuningJobsMethod; + if ((getListHyperparameterTuningJobsMethod = + JobServiceGrpc.getListHyperparameterTuningJobsMethod) + == null) { + synchronized (JobServiceGrpc.class) { + if ((getListHyperparameterTuningJobsMethod = + JobServiceGrpc.getListHyperparameterTuningJobsMethod) + == null) { + JobServiceGrpc.getListHyperparameterTuningJobsMethod = + getListHyperparameterTuningJobsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListHyperparameterTuningJobs")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new JobServiceMethodDescriptorSupplier("ListHyperparameterTuningJobs")) + .build(); + } + } + } + return getListHyperparameterTuningJobsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.DeleteHyperparameterTuningJobRequest, + com.google.longrunning.Operation> + getDeleteHyperparameterTuningJobMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteHyperparameterTuningJob", + requestType = com.google.cloud.aiplatform.v1.DeleteHyperparameterTuningJobRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.DeleteHyperparameterTuningJobRequest, + com.google.longrunning.Operation> + getDeleteHyperparameterTuningJobMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.DeleteHyperparameterTuningJobRequest, + com.google.longrunning.Operation> + getDeleteHyperparameterTuningJobMethod; + if ((getDeleteHyperparameterTuningJobMethod = + JobServiceGrpc.getDeleteHyperparameterTuningJobMethod) + == null) { + synchronized (JobServiceGrpc.class) { + if ((getDeleteHyperparameterTuningJobMethod = + JobServiceGrpc.getDeleteHyperparameterTuningJobMethod) + == null) { + JobServiceGrpc.getDeleteHyperparameterTuningJobMethod = + getDeleteHyperparameterTuningJobMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DeleteHyperparameterTuningJob")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.DeleteHyperparameterTuningJobRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new JobServiceMethodDescriptorSupplier("DeleteHyperparameterTuningJob")) + .build(); + } + } + } + return getDeleteHyperparameterTuningJobMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CancelHyperparameterTuningJobRequest, + com.google.protobuf.Empty> + getCancelHyperparameterTuningJobMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CancelHyperparameterTuningJob", + requestType = com.google.cloud.aiplatform.v1.CancelHyperparameterTuningJobRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CancelHyperparameterTuningJobRequest, + com.google.protobuf.Empty> + getCancelHyperparameterTuningJobMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CancelHyperparameterTuningJobRequest, + com.google.protobuf.Empty> + getCancelHyperparameterTuningJobMethod; + if ((getCancelHyperparameterTuningJobMethod = + JobServiceGrpc.getCancelHyperparameterTuningJobMethod) + == null) { + synchronized (JobServiceGrpc.class) { + if ((getCancelHyperparameterTuningJobMethod = + JobServiceGrpc.getCancelHyperparameterTuningJobMethod) + == null) { + JobServiceGrpc.getCancelHyperparameterTuningJobMethod = + getCancelHyperparameterTuningJobMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CancelHyperparameterTuningJob")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.CancelHyperparameterTuningJobRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new JobServiceMethodDescriptorSupplier("CancelHyperparameterTuningJob")) + .build(); + } + } + } + return getCancelHyperparameterTuningJobMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CreateBatchPredictionJobRequest, + com.google.cloud.aiplatform.v1.BatchPredictionJob> + getCreateBatchPredictionJobMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateBatchPredictionJob", + requestType = com.google.cloud.aiplatform.v1.CreateBatchPredictionJobRequest.class, + responseType = com.google.cloud.aiplatform.v1.BatchPredictionJob.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CreateBatchPredictionJobRequest, + com.google.cloud.aiplatform.v1.BatchPredictionJob> + getCreateBatchPredictionJobMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CreateBatchPredictionJobRequest, + com.google.cloud.aiplatform.v1.BatchPredictionJob> + getCreateBatchPredictionJobMethod; + if ((getCreateBatchPredictionJobMethod = JobServiceGrpc.getCreateBatchPredictionJobMethod) + == null) { + synchronized (JobServiceGrpc.class) { + if ((getCreateBatchPredictionJobMethod = JobServiceGrpc.getCreateBatchPredictionJobMethod) + == null) { + JobServiceGrpc.getCreateBatchPredictionJobMethod = + getCreateBatchPredictionJobMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreateBatchPredictionJob")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.CreateBatchPredictionJobRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.BatchPredictionJob + .getDefaultInstance())) + .setSchemaDescriptor( + new JobServiceMethodDescriptorSupplier("CreateBatchPredictionJob")) + .build(); + } + } + } + return getCreateBatchPredictionJobMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.GetBatchPredictionJobRequest, + com.google.cloud.aiplatform.v1.BatchPredictionJob> + getGetBatchPredictionJobMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetBatchPredictionJob", + requestType = com.google.cloud.aiplatform.v1.GetBatchPredictionJobRequest.class, + responseType = com.google.cloud.aiplatform.v1.BatchPredictionJob.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.GetBatchPredictionJobRequest, + com.google.cloud.aiplatform.v1.BatchPredictionJob> + getGetBatchPredictionJobMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.GetBatchPredictionJobRequest, + com.google.cloud.aiplatform.v1.BatchPredictionJob> + getGetBatchPredictionJobMethod; + if ((getGetBatchPredictionJobMethod = JobServiceGrpc.getGetBatchPredictionJobMethod) == null) { + synchronized (JobServiceGrpc.class) { + if ((getGetBatchPredictionJobMethod = JobServiceGrpc.getGetBatchPredictionJobMethod) + == null) { + JobServiceGrpc.getGetBatchPredictionJobMethod = + getGetBatchPredictionJobMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetBatchPredictionJob")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.GetBatchPredictionJobRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.BatchPredictionJob + .getDefaultInstance())) + .setSchemaDescriptor( + new JobServiceMethodDescriptorSupplier("GetBatchPredictionJob")) + .build(); + } + } + } + return getGetBatchPredictionJobMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ListBatchPredictionJobsRequest, + com.google.cloud.aiplatform.v1.ListBatchPredictionJobsResponse> + getListBatchPredictionJobsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListBatchPredictionJobs", + requestType = com.google.cloud.aiplatform.v1.ListBatchPredictionJobsRequest.class, + responseType = com.google.cloud.aiplatform.v1.ListBatchPredictionJobsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ListBatchPredictionJobsRequest, + com.google.cloud.aiplatform.v1.ListBatchPredictionJobsResponse> + getListBatchPredictionJobsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ListBatchPredictionJobsRequest, + com.google.cloud.aiplatform.v1.ListBatchPredictionJobsResponse> + getListBatchPredictionJobsMethod; + if ((getListBatchPredictionJobsMethod = JobServiceGrpc.getListBatchPredictionJobsMethod) + == null) { + synchronized (JobServiceGrpc.class) { + if ((getListBatchPredictionJobsMethod = JobServiceGrpc.getListBatchPredictionJobsMethod) + == null) { + JobServiceGrpc.getListBatchPredictionJobsMethod = + getListBatchPredictionJobsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListBatchPredictionJobs")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.ListBatchPredictionJobsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.ListBatchPredictionJobsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new JobServiceMethodDescriptorSupplier("ListBatchPredictionJobs")) + .build(); + } + } + } + return getListBatchPredictionJobsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.DeleteBatchPredictionJobRequest, + com.google.longrunning.Operation> + getDeleteBatchPredictionJobMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteBatchPredictionJob", + requestType = com.google.cloud.aiplatform.v1.DeleteBatchPredictionJobRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.DeleteBatchPredictionJobRequest, + com.google.longrunning.Operation> + getDeleteBatchPredictionJobMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.DeleteBatchPredictionJobRequest, + com.google.longrunning.Operation> + getDeleteBatchPredictionJobMethod; + if ((getDeleteBatchPredictionJobMethod = JobServiceGrpc.getDeleteBatchPredictionJobMethod) + == null) { + synchronized (JobServiceGrpc.class) { + if ((getDeleteBatchPredictionJobMethod = JobServiceGrpc.getDeleteBatchPredictionJobMethod) + == null) { + JobServiceGrpc.getDeleteBatchPredictionJobMethod = + getDeleteBatchPredictionJobMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DeleteBatchPredictionJob")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.DeleteBatchPredictionJobRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new JobServiceMethodDescriptorSupplier("DeleteBatchPredictionJob")) + .build(); + } + } + } + return getDeleteBatchPredictionJobMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CancelBatchPredictionJobRequest, com.google.protobuf.Empty> + getCancelBatchPredictionJobMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CancelBatchPredictionJob", + requestType = com.google.cloud.aiplatform.v1.CancelBatchPredictionJobRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CancelBatchPredictionJobRequest, com.google.protobuf.Empty> + getCancelBatchPredictionJobMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CancelBatchPredictionJobRequest, + com.google.protobuf.Empty> + getCancelBatchPredictionJobMethod; + if ((getCancelBatchPredictionJobMethod = JobServiceGrpc.getCancelBatchPredictionJobMethod) + == null) { + synchronized (JobServiceGrpc.class) { + if ((getCancelBatchPredictionJobMethod = JobServiceGrpc.getCancelBatchPredictionJobMethod) + == null) { + JobServiceGrpc.getCancelBatchPredictionJobMethod = + getCancelBatchPredictionJobMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CancelBatchPredictionJob")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.CancelBatchPredictionJobRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new JobServiceMethodDescriptorSupplier("CancelBatchPredictionJob")) + .build(); + } + } + } + return getCancelBatchPredictionJobMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static JobServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public JobServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new JobServiceStub(channel, callOptions); + } + }; + return JobServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static JobServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public JobServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new JobServiceBlockingStub(channel, callOptions); + } + }; + return JobServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static JobServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public JobServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new JobServiceFutureStub(channel, callOptions); + } + }; + return JobServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * A service for creating and managing AI Platform's jobs.
+   * 
+ */ + public abstract static class JobServiceImplBase implements io.grpc.BindableService { + + /** + * + * + *
+     * Creates a CustomJob. A created CustomJob right away
+     * will be attempted to be run.
+     * 
+ */ + public void createCustomJob( + com.google.cloud.aiplatform.v1.CreateCustomJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getCreateCustomJobMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets a CustomJob.
+     * 
+ */ + public void getCustomJob( + com.google.cloud.aiplatform.v1.GetCustomJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getGetCustomJobMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists CustomJobs in a Location.
+     * 
+ */ + public void listCustomJobs( + com.google.cloud.aiplatform.v1.ListCustomJobsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getListCustomJobsMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a CustomJob.
+     * 
+ */ + public void deleteCustomJob( + com.google.cloud.aiplatform.v1.DeleteCustomJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getDeleteCustomJobMethod(), responseObserver); + } + + /** + * + * + *
+     * 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 [JobService.GetCustomJob][google.cloud.aiplatform.v1.JobService.GetCustomJob] or
+     * other methods to check whether the cancellation succeeded or whether the
+     * job completed despite cancellation. On successful cancellation,
+     * the CustomJob is not deleted; instead it becomes a job with
+     * a [CustomJob.error][google.cloud.aiplatform.v1.CustomJob.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
+     * corresponding to `Code.CANCELLED`, and [CustomJob.state][google.cloud.aiplatform.v1.CustomJob.state] is set to
+     * `CANCELLED`.
+     * 
+ */ + public void cancelCustomJob( + com.google.cloud.aiplatform.v1.CancelCustomJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getCancelCustomJobMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a DataLabelingJob.
+     * 
+ */ + public void createDataLabelingJob( + com.google.cloud.aiplatform.v1.CreateDataLabelingJobRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getCreateDataLabelingJobMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets a DataLabelingJob.
+     * 
+ */ + public void getDataLabelingJob( + com.google.cloud.aiplatform.v1.GetDataLabelingJobRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getGetDataLabelingJobMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists DataLabelingJobs in a Location.
+     * 
+ */ + public void listDataLabelingJobs( + com.google.cloud.aiplatform.v1.ListDataLabelingJobsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getListDataLabelingJobsMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a DataLabelingJob.
+     * 
+ */ + public void deleteDataLabelingJob( + com.google.cloud.aiplatform.v1.DeleteDataLabelingJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getDeleteDataLabelingJobMethod(), responseObserver); + } + + /** + * + * + *
+     * Cancels a DataLabelingJob. Success of cancellation is not guaranteed.
+     * 
+ */ + public void cancelDataLabelingJob( + com.google.cloud.aiplatform.v1.CancelDataLabelingJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getCancelDataLabelingJobMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a HyperparameterTuningJob
+     * 
+ */ + public void createHyperparameterTuningJob( + com.google.cloud.aiplatform.v1.CreateHyperparameterTuningJobRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getCreateHyperparameterTuningJobMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets a HyperparameterTuningJob
+     * 
+ */ + public void getHyperparameterTuningJob( + com.google.cloud.aiplatform.v1.GetHyperparameterTuningJobRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getGetHyperparameterTuningJobMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists HyperparameterTuningJobs in a Location.
+     * 
+ */ + public void listHyperparameterTuningJobs( + com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsResponse> + responseObserver) { + asyncUnimplementedUnaryCall(getListHyperparameterTuningJobsMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a HyperparameterTuningJob.
+     * 
+ */ + public void deleteHyperparameterTuningJob( + com.google.cloud.aiplatform.v1.DeleteHyperparameterTuningJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getDeleteHyperparameterTuningJobMethod(), responseObserver); + } + + /** + * + * + *
+     * Cancels a HyperparameterTuningJob.
+     * Starts asynchronous cancellation on the HyperparameterTuningJob. The server
+     * makes a best effort to cancel the job, but success is not
+     * guaranteed. Clients can use [JobService.GetHyperparameterTuningJob][google.cloud.aiplatform.v1.JobService.GetHyperparameterTuningJob] or
+     * other methods to check whether the cancellation succeeded or whether the
+     * job completed despite cancellation. On successful cancellation,
+     * the HyperparameterTuningJob is not deleted; instead it becomes a job with
+     * a [HyperparameterTuningJob.error][google.cloud.aiplatform.v1.HyperparameterTuningJob.error] value with a [google.rpc.Status.code][google.rpc.Status.code]
+     * of 1, corresponding to `Code.CANCELLED`, and
+     * [HyperparameterTuningJob.state][google.cloud.aiplatform.v1.HyperparameterTuningJob.state] is set to `CANCELLED`.
+     * 
+ */ + public void cancelHyperparameterTuningJob( + com.google.cloud.aiplatform.v1.CancelHyperparameterTuningJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getCancelHyperparameterTuningJobMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a BatchPredictionJob. A BatchPredictionJob once created will
+     * right away be attempted to start.
+     * 
+ */ + public void createBatchPredictionJob( + com.google.cloud.aiplatform.v1.CreateBatchPredictionJobRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getCreateBatchPredictionJobMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets a BatchPredictionJob
+     * 
+ */ + public void getBatchPredictionJob( + com.google.cloud.aiplatform.v1.GetBatchPredictionJobRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getGetBatchPredictionJobMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists BatchPredictionJobs in a Location.
+     * 
+ */ + public void listBatchPredictionJobs( + com.google.cloud.aiplatform.v1.ListBatchPredictionJobsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getListBatchPredictionJobsMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a BatchPredictionJob. Can only be called on jobs that already
+     * finished.
+     * 
+ */ + public void deleteBatchPredictionJob( + com.google.cloud.aiplatform.v1.DeleteBatchPredictionJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getDeleteBatchPredictionJobMethod(), responseObserver); + } + + /** + * + * + *
+     * Cancels a BatchPredictionJob.
+     * Starts asynchronous cancellation on the BatchPredictionJob. The server
+     * makes the best effort to cancel the job, but success is not
+     * guaranteed. Clients can use [JobService.GetBatchPredictionJob][google.cloud.aiplatform.v1.JobService.GetBatchPredictionJob] or
+     * other methods to check whether the cancellation succeeded or whether the
+     * job completed despite cancellation. On a successful cancellation,
+     * the BatchPredictionJob is not deleted;instead its
+     * [BatchPredictionJob.state][google.cloud.aiplatform.v1.BatchPredictionJob.state] is set to `CANCELLED`. Any files already
+     * outputted by the job are not deleted.
+     * 
+ */ + public void cancelBatchPredictionJob( + com.google.cloud.aiplatform.v1.CancelBatchPredictionJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getCancelBatchPredictionJobMethod(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getCreateCustomJobMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.CreateCustomJobRequest, + com.google.cloud.aiplatform.v1.CustomJob>(this, METHODID_CREATE_CUSTOM_JOB))) + .addMethod( + getGetCustomJobMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.GetCustomJobRequest, + com.google.cloud.aiplatform.v1.CustomJob>(this, METHODID_GET_CUSTOM_JOB))) + .addMethod( + getListCustomJobsMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.ListCustomJobsRequest, + com.google.cloud.aiplatform.v1.ListCustomJobsResponse>( + this, METHODID_LIST_CUSTOM_JOBS))) + .addMethod( + getDeleteCustomJobMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.DeleteCustomJobRequest, + com.google.longrunning.Operation>(this, METHODID_DELETE_CUSTOM_JOB))) + .addMethod( + getCancelCustomJobMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.CancelCustomJobRequest, + com.google.protobuf.Empty>(this, METHODID_CANCEL_CUSTOM_JOB))) + .addMethod( + getCreateDataLabelingJobMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.CreateDataLabelingJobRequest, + com.google.cloud.aiplatform.v1.DataLabelingJob>( + this, METHODID_CREATE_DATA_LABELING_JOB))) + .addMethod( + getGetDataLabelingJobMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.GetDataLabelingJobRequest, + com.google.cloud.aiplatform.v1.DataLabelingJob>( + this, METHODID_GET_DATA_LABELING_JOB))) + .addMethod( + getListDataLabelingJobsMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.ListDataLabelingJobsRequest, + com.google.cloud.aiplatform.v1.ListDataLabelingJobsResponse>( + this, METHODID_LIST_DATA_LABELING_JOBS))) + .addMethod( + getDeleteDataLabelingJobMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.DeleteDataLabelingJobRequest, + com.google.longrunning.Operation>(this, METHODID_DELETE_DATA_LABELING_JOB))) + .addMethod( + getCancelDataLabelingJobMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.CancelDataLabelingJobRequest, + com.google.protobuf.Empty>(this, METHODID_CANCEL_DATA_LABELING_JOB))) + .addMethod( + getCreateHyperparameterTuningJobMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.CreateHyperparameterTuningJobRequest, + com.google.cloud.aiplatform.v1.HyperparameterTuningJob>( + this, METHODID_CREATE_HYPERPARAMETER_TUNING_JOB))) + .addMethod( + getGetHyperparameterTuningJobMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.GetHyperparameterTuningJobRequest, + com.google.cloud.aiplatform.v1.HyperparameterTuningJob>( + this, METHODID_GET_HYPERPARAMETER_TUNING_JOB))) + .addMethod( + getListHyperparameterTuningJobsMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsRequest, + com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsResponse>( + this, METHODID_LIST_HYPERPARAMETER_TUNING_JOBS))) + .addMethod( + getDeleteHyperparameterTuningJobMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.DeleteHyperparameterTuningJobRequest, + com.google.longrunning.Operation>( + this, METHODID_DELETE_HYPERPARAMETER_TUNING_JOB))) + .addMethod( + getCancelHyperparameterTuningJobMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.CancelHyperparameterTuningJobRequest, + com.google.protobuf.Empty>(this, METHODID_CANCEL_HYPERPARAMETER_TUNING_JOB))) + .addMethod( + getCreateBatchPredictionJobMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.CreateBatchPredictionJobRequest, + com.google.cloud.aiplatform.v1.BatchPredictionJob>( + this, METHODID_CREATE_BATCH_PREDICTION_JOB))) + .addMethod( + getGetBatchPredictionJobMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.GetBatchPredictionJobRequest, + com.google.cloud.aiplatform.v1.BatchPredictionJob>( + this, METHODID_GET_BATCH_PREDICTION_JOB))) + .addMethod( + getListBatchPredictionJobsMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.ListBatchPredictionJobsRequest, + com.google.cloud.aiplatform.v1.ListBatchPredictionJobsResponse>( + this, METHODID_LIST_BATCH_PREDICTION_JOBS))) + .addMethod( + getDeleteBatchPredictionJobMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.DeleteBatchPredictionJobRequest, + com.google.longrunning.Operation>( + this, METHODID_DELETE_BATCH_PREDICTION_JOB))) + .addMethod( + getCancelBatchPredictionJobMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.CancelBatchPredictionJobRequest, + com.google.protobuf.Empty>(this, METHODID_CANCEL_BATCH_PREDICTION_JOB))) + .build(); + } + } + + /** + * + * + *
+   * A service for creating and managing AI Platform's jobs.
+   * 
+ */ + public static final class JobServiceStub extends io.grpc.stub.AbstractAsyncStub { + private JobServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected JobServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new JobServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a CustomJob. A created CustomJob right away
+     * will be attempted to be run.
+     * 
+ */ + public void createCustomJob( + com.google.cloud.aiplatform.v1.CreateCustomJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getCreateCustomJobMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets a CustomJob.
+     * 
+ */ + public void getCustomJob( + com.google.cloud.aiplatform.v1.GetCustomJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getGetCustomJobMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists CustomJobs in a Location.
+     * 
+ */ + public void listCustomJobs( + com.google.cloud.aiplatform.v1.ListCustomJobsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getListCustomJobsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a CustomJob.
+     * 
+ */ + public void deleteCustomJob( + com.google.cloud.aiplatform.v1.DeleteCustomJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getDeleteCustomJobMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * 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 [JobService.GetCustomJob][google.cloud.aiplatform.v1.JobService.GetCustomJob] or
+     * other methods to check whether the cancellation succeeded or whether the
+     * job completed despite cancellation. On successful cancellation,
+     * the CustomJob is not deleted; instead it becomes a job with
+     * a [CustomJob.error][google.cloud.aiplatform.v1.CustomJob.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
+     * corresponding to `Code.CANCELLED`, and [CustomJob.state][google.cloud.aiplatform.v1.CustomJob.state] is set to
+     * `CANCELLED`.
+     * 
+ */ + public void cancelCustomJob( + com.google.cloud.aiplatform.v1.CancelCustomJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getCancelCustomJobMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a DataLabelingJob.
+     * 
+ */ + public void createDataLabelingJob( + com.google.cloud.aiplatform.v1.CreateDataLabelingJobRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getCreateDataLabelingJobMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets a DataLabelingJob.
+     * 
+ */ + public void getDataLabelingJob( + com.google.cloud.aiplatform.v1.GetDataLabelingJobRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getGetDataLabelingJobMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists DataLabelingJobs in a Location.
+     * 
+ */ + public void listDataLabelingJobs( + com.google.cloud.aiplatform.v1.ListDataLabelingJobsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getListDataLabelingJobsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a DataLabelingJob.
+     * 
+ */ + public void deleteDataLabelingJob( + com.google.cloud.aiplatform.v1.DeleteDataLabelingJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getDeleteDataLabelingJobMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Cancels a DataLabelingJob. Success of cancellation is not guaranteed.
+     * 
+ */ + public void cancelDataLabelingJob( + com.google.cloud.aiplatform.v1.CancelDataLabelingJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getCancelDataLabelingJobMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a HyperparameterTuningJob
+     * 
+ */ + public void createHyperparameterTuningJob( + com.google.cloud.aiplatform.v1.CreateHyperparameterTuningJobRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getCreateHyperparameterTuningJobMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets a HyperparameterTuningJob
+     * 
+ */ + public void getHyperparameterTuningJob( + com.google.cloud.aiplatform.v1.GetHyperparameterTuningJobRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getGetHyperparameterTuningJobMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists HyperparameterTuningJobs in a Location.
+     * 
+ */ + public void listHyperparameterTuningJobs( + com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsResponse> + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getListHyperparameterTuningJobsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a HyperparameterTuningJob.
+     * 
+ */ + public void deleteHyperparameterTuningJob( + com.google.cloud.aiplatform.v1.DeleteHyperparameterTuningJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getDeleteHyperparameterTuningJobMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Cancels a HyperparameterTuningJob.
+     * Starts asynchronous cancellation on the HyperparameterTuningJob. The server
+     * makes a best effort to cancel the job, but success is not
+     * guaranteed. Clients can use [JobService.GetHyperparameterTuningJob][google.cloud.aiplatform.v1.JobService.GetHyperparameterTuningJob] or
+     * other methods to check whether the cancellation succeeded or whether the
+     * job completed despite cancellation. On successful cancellation,
+     * the HyperparameterTuningJob is not deleted; instead it becomes a job with
+     * a [HyperparameterTuningJob.error][google.cloud.aiplatform.v1.HyperparameterTuningJob.error] value with a [google.rpc.Status.code][google.rpc.Status.code]
+     * of 1, corresponding to `Code.CANCELLED`, and
+     * [HyperparameterTuningJob.state][google.cloud.aiplatform.v1.HyperparameterTuningJob.state] is set to `CANCELLED`.
+     * 
+ */ + public void cancelHyperparameterTuningJob( + com.google.cloud.aiplatform.v1.CancelHyperparameterTuningJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getCancelHyperparameterTuningJobMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a BatchPredictionJob. A BatchPredictionJob once created will
+     * right away be attempted to start.
+     * 
+ */ + public void createBatchPredictionJob( + com.google.cloud.aiplatform.v1.CreateBatchPredictionJobRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getCreateBatchPredictionJobMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets a BatchPredictionJob
+     * 
+ */ + public void getBatchPredictionJob( + com.google.cloud.aiplatform.v1.GetBatchPredictionJobRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getGetBatchPredictionJobMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists BatchPredictionJobs in a Location.
+     * 
+ */ + public void listBatchPredictionJobs( + com.google.cloud.aiplatform.v1.ListBatchPredictionJobsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getListBatchPredictionJobsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a BatchPredictionJob. Can only be called on jobs that already
+     * finished.
+     * 
+ */ + public void deleteBatchPredictionJob( + com.google.cloud.aiplatform.v1.DeleteBatchPredictionJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getDeleteBatchPredictionJobMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Cancels a BatchPredictionJob.
+     * Starts asynchronous cancellation on the BatchPredictionJob. The server
+     * makes the best effort to cancel the job, but success is not
+     * guaranteed. Clients can use [JobService.GetBatchPredictionJob][google.cloud.aiplatform.v1.JobService.GetBatchPredictionJob] or
+     * other methods to check whether the cancellation succeeded or whether the
+     * job completed despite cancellation. On a successful cancellation,
+     * the BatchPredictionJob is not deleted;instead its
+     * [BatchPredictionJob.state][google.cloud.aiplatform.v1.BatchPredictionJob.state] is set to `CANCELLED`. Any files already
+     * outputted by the job are not deleted.
+     * 
+ */ + public void cancelBatchPredictionJob( + com.google.cloud.aiplatform.v1.CancelBatchPredictionJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getCancelBatchPredictionJobMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * + * + *
+   * A service for creating and managing AI Platform's jobs.
+   * 
+ */ + public static final class JobServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private JobServiceBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected JobServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new JobServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a CustomJob. A created CustomJob right away
+     * will be attempted to be run.
+     * 
+ */ + public com.google.cloud.aiplatform.v1.CustomJob createCustomJob( + com.google.cloud.aiplatform.v1.CreateCustomJobRequest request) { + return blockingUnaryCall(getChannel(), getCreateCustomJobMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a CustomJob.
+     * 
+ */ + public com.google.cloud.aiplatform.v1.CustomJob getCustomJob( + com.google.cloud.aiplatform.v1.GetCustomJobRequest request) { + return blockingUnaryCall(getChannel(), getGetCustomJobMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists CustomJobs in a Location.
+     * 
+ */ + public com.google.cloud.aiplatform.v1.ListCustomJobsResponse listCustomJobs( + com.google.cloud.aiplatform.v1.ListCustomJobsRequest request) { + return blockingUnaryCall(getChannel(), getListCustomJobsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a CustomJob.
+     * 
+ */ + public com.google.longrunning.Operation deleteCustomJob( + com.google.cloud.aiplatform.v1.DeleteCustomJobRequest request) { + return blockingUnaryCall(getChannel(), getDeleteCustomJobMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * 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 [JobService.GetCustomJob][google.cloud.aiplatform.v1.JobService.GetCustomJob] or
+     * other methods to check whether the cancellation succeeded or whether the
+     * job completed despite cancellation. On successful cancellation,
+     * the CustomJob is not deleted; instead it becomes a job with
+     * a [CustomJob.error][google.cloud.aiplatform.v1.CustomJob.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
+     * corresponding to `Code.CANCELLED`, and [CustomJob.state][google.cloud.aiplatform.v1.CustomJob.state] is set to
+     * `CANCELLED`.
+     * 
+ */ + public com.google.protobuf.Empty cancelCustomJob( + com.google.cloud.aiplatform.v1.CancelCustomJobRequest request) { + return blockingUnaryCall(getChannel(), getCancelCustomJobMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a DataLabelingJob.
+     * 
+ */ + public com.google.cloud.aiplatform.v1.DataLabelingJob createDataLabelingJob( + com.google.cloud.aiplatform.v1.CreateDataLabelingJobRequest request) { + return blockingUnaryCall( + getChannel(), getCreateDataLabelingJobMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a DataLabelingJob.
+     * 
+ */ + public com.google.cloud.aiplatform.v1.DataLabelingJob getDataLabelingJob( + com.google.cloud.aiplatform.v1.GetDataLabelingJobRequest request) { + return blockingUnaryCall( + getChannel(), getGetDataLabelingJobMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists DataLabelingJobs in a Location.
+     * 
+ */ + public com.google.cloud.aiplatform.v1.ListDataLabelingJobsResponse listDataLabelingJobs( + com.google.cloud.aiplatform.v1.ListDataLabelingJobsRequest request) { + return blockingUnaryCall( + getChannel(), getListDataLabelingJobsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a DataLabelingJob.
+     * 
+ */ + public com.google.longrunning.Operation deleteDataLabelingJob( + com.google.cloud.aiplatform.v1.DeleteDataLabelingJobRequest request) { + return blockingUnaryCall( + getChannel(), getDeleteDataLabelingJobMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Cancels a DataLabelingJob. Success of cancellation is not guaranteed.
+     * 
+ */ + public com.google.protobuf.Empty cancelDataLabelingJob( + com.google.cloud.aiplatform.v1.CancelDataLabelingJobRequest request) { + return blockingUnaryCall( + getChannel(), getCancelDataLabelingJobMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a HyperparameterTuningJob
+     * 
+ */ + public com.google.cloud.aiplatform.v1.HyperparameterTuningJob createHyperparameterTuningJob( + com.google.cloud.aiplatform.v1.CreateHyperparameterTuningJobRequest request) { + return blockingUnaryCall( + getChannel(), getCreateHyperparameterTuningJobMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a HyperparameterTuningJob
+     * 
+ */ + public com.google.cloud.aiplatform.v1.HyperparameterTuningJob getHyperparameterTuningJob( + com.google.cloud.aiplatform.v1.GetHyperparameterTuningJobRequest request) { + return blockingUnaryCall( + getChannel(), getGetHyperparameterTuningJobMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists HyperparameterTuningJobs in a Location.
+     * 
+ */ + public com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsResponse + listHyperparameterTuningJobs( + com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsRequest request) { + return blockingUnaryCall( + getChannel(), getListHyperparameterTuningJobsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a HyperparameterTuningJob.
+     * 
+ */ + public com.google.longrunning.Operation deleteHyperparameterTuningJob( + com.google.cloud.aiplatform.v1.DeleteHyperparameterTuningJobRequest request) { + return blockingUnaryCall( + getChannel(), getDeleteHyperparameterTuningJobMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Cancels a HyperparameterTuningJob.
+     * Starts asynchronous cancellation on the HyperparameterTuningJob. The server
+     * makes a best effort to cancel the job, but success is not
+     * guaranteed. Clients can use [JobService.GetHyperparameterTuningJob][google.cloud.aiplatform.v1.JobService.GetHyperparameterTuningJob] or
+     * other methods to check whether the cancellation succeeded or whether the
+     * job completed despite cancellation. On successful cancellation,
+     * the HyperparameterTuningJob is not deleted; instead it becomes a job with
+     * a [HyperparameterTuningJob.error][google.cloud.aiplatform.v1.HyperparameterTuningJob.error] value with a [google.rpc.Status.code][google.rpc.Status.code]
+     * of 1, corresponding to `Code.CANCELLED`, and
+     * [HyperparameterTuningJob.state][google.cloud.aiplatform.v1.HyperparameterTuningJob.state] is set to `CANCELLED`.
+     * 
+ */ + public com.google.protobuf.Empty cancelHyperparameterTuningJob( + com.google.cloud.aiplatform.v1.CancelHyperparameterTuningJobRequest request) { + return blockingUnaryCall( + getChannel(), getCancelHyperparameterTuningJobMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a BatchPredictionJob. A BatchPredictionJob once created will
+     * right away be attempted to start.
+     * 
+ */ + public com.google.cloud.aiplatform.v1.BatchPredictionJob createBatchPredictionJob( + com.google.cloud.aiplatform.v1.CreateBatchPredictionJobRequest request) { + return blockingUnaryCall( + getChannel(), getCreateBatchPredictionJobMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a BatchPredictionJob
+     * 
+ */ + public com.google.cloud.aiplatform.v1.BatchPredictionJob getBatchPredictionJob( + com.google.cloud.aiplatform.v1.GetBatchPredictionJobRequest request) { + return blockingUnaryCall( + getChannel(), getGetBatchPredictionJobMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists BatchPredictionJobs in a Location.
+     * 
+ */ + public com.google.cloud.aiplatform.v1.ListBatchPredictionJobsResponse listBatchPredictionJobs( + com.google.cloud.aiplatform.v1.ListBatchPredictionJobsRequest request) { + return blockingUnaryCall( + getChannel(), getListBatchPredictionJobsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a BatchPredictionJob. Can only be called on jobs that already
+     * finished.
+     * 
+ */ + public com.google.longrunning.Operation deleteBatchPredictionJob( + com.google.cloud.aiplatform.v1.DeleteBatchPredictionJobRequest request) { + return blockingUnaryCall( + getChannel(), getDeleteBatchPredictionJobMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Cancels a BatchPredictionJob.
+     * Starts asynchronous cancellation on the BatchPredictionJob. The server
+     * makes the best effort to cancel the job, but success is not
+     * guaranteed. Clients can use [JobService.GetBatchPredictionJob][google.cloud.aiplatform.v1.JobService.GetBatchPredictionJob] or
+     * other methods to check whether the cancellation succeeded or whether the
+     * job completed despite cancellation. On a successful cancellation,
+     * the BatchPredictionJob is not deleted;instead its
+     * [BatchPredictionJob.state][google.cloud.aiplatform.v1.BatchPredictionJob.state] is set to `CANCELLED`. Any files already
+     * outputted by the job are not deleted.
+     * 
+ */ + public com.google.protobuf.Empty cancelBatchPredictionJob( + com.google.cloud.aiplatform.v1.CancelBatchPredictionJobRequest request) { + return blockingUnaryCall( + getChannel(), getCancelBatchPredictionJobMethod(), getCallOptions(), request); + } + } + + /** + * + * + *
+   * A service for creating and managing AI Platform's jobs.
+   * 
+ */ + public static final class JobServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private JobServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected JobServiceFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new JobServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a CustomJob. A created CustomJob right away
+     * will be attempted to be run.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1.CustomJob> + createCustomJob(com.google.cloud.aiplatform.v1.CreateCustomJobRequest request) { + return futureUnaryCall( + getChannel().newCall(getCreateCustomJobMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets a CustomJob.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1.CustomJob> + getCustomJob(com.google.cloud.aiplatform.v1.GetCustomJobRequest request) { + return futureUnaryCall( + getChannel().newCall(getGetCustomJobMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists CustomJobs in a Location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1.ListCustomJobsResponse> + listCustomJobs(com.google.cloud.aiplatform.v1.ListCustomJobsRequest request) { + return futureUnaryCall( + getChannel().newCall(getListCustomJobsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a CustomJob.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteCustomJob(com.google.cloud.aiplatform.v1.DeleteCustomJobRequest request) { + return futureUnaryCall( + getChannel().newCall(getDeleteCustomJobMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * 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 [JobService.GetCustomJob][google.cloud.aiplatform.v1.JobService.GetCustomJob] or
+     * other methods to check whether the cancellation succeeded or whether the
+     * job completed despite cancellation. On successful cancellation,
+     * the CustomJob is not deleted; instead it becomes a job with
+     * a [CustomJob.error][google.cloud.aiplatform.v1.CustomJob.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
+     * corresponding to `Code.CANCELLED`, and [CustomJob.state][google.cloud.aiplatform.v1.CustomJob.state] is set to
+     * `CANCELLED`.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + cancelCustomJob(com.google.cloud.aiplatform.v1.CancelCustomJobRequest request) { + return futureUnaryCall( + getChannel().newCall(getCancelCustomJobMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a DataLabelingJob.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1.DataLabelingJob> + createDataLabelingJob(com.google.cloud.aiplatform.v1.CreateDataLabelingJobRequest request) { + return futureUnaryCall( + getChannel().newCall(getCreateDataLabelingJobMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets a DataLabelingJob.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1.DataLabelingJob> + getDataLabelingJob(com.google.cloud.aiplatform.v1.GetDataLabelingJobRequest request) { + return futureUnaryCall( + getChannel().newCall(getGetDataLabelingJobMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists DataLabelingJobs in a Location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1.ListDataLabelingJobsResponse> + listDataLabelingJobs(com.google.cloud.aiplatform.v1.ListDataLabelingJobsRequest request) { + return futureUnaryCall( + getChannel().newCall(getListDataLabelingJobsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a DataLabelingJob.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteDataLabelingJob(com.google.cloud.aiplatform.v1.DeleteDataLabelingJobRequest request) { + return futureUnaryCall( + getChannel().newCall(getDeleteDataLabelingJobMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Cancels a DataLabelingJob. Success of cancellation is not guaranteed.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + cancelDataLabelingJob(com.google.cloud.aiplatform.v1.CancelDataLabelingJobRequest request) { + return futureUnaryCall( + getChannel().newCall(getCancelDataLabelingJobMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a HyperparameterTuningJob
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1.HyperparameterTuningJob> + createHyperparameterTuningJob( + com.google.cloud.aiplatform.v1.CreateHyperparameterTuningJobRequest request) { + return futureUnaryCall( + getChannel().newCall(getCreateHyperparameterTuningJobMethod(), getCallOptions()), + request); + } + + /** + * + * + *
+     * Gets a HyperparameterTuningJob
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1.HyperparameterTuningJob> + getHyperparameterTuningJob( + com.google.cloud.aiplatform.v1.GetHyperparameterTuningJobRequest request) { + return futureUnaryCall( + getChannel().newCall(getGetHyperparameterTuningJobMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists HyperparameterTuningJobs in a Location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsResponse> + listHyperparameterTuningJobs( + com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsRequest request) { + return futureUnaryCall( + getChannel().newCall(getListHyperparameterTuningJobsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a HyperparameterTuningJob.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteHyperparameterTuningJob( + com.google.cloud.aiplatform.v1.DeleteHyperparameterTuningJobRequest request) { + return futureUnaryCall( + getChannel().newCall(getDeleteHyperparameterTuningJobMethod(), getCallOptions()), + request); + } + + /** + * + * + *
+     * Cancels a HyperparameterTuningJob.
+     * Starts asynchronous cancellation on the HyperparameterTuningJob. The server
+     * makes a best effort to cancel the job, but success is not
+     * guaranteed. Clients can use [JobService.GetHyperparameterTuningJob][google.cloud.aiplatform.v1.JobService.GetHyperparameterTuningJob] or
+     * other methods to check whether the cancellation succeeded or whether the
+     * job completed despite cancellation. On successful cancellation,
+     * the HyperparameterTuningJob is not deleted; instead it becomes a job with
+     * a [HyperparameterTuningJob.error][google.cloud.aiplatform.v1.HyperparameterTuningJob.error] value with a [google.rpc.Status.code][google.rpc.Status.code]
+     * of 1, corresponding to `Code.CANCELLED`, and
+     * [HyperparameterTuningJob.state][google.cloud.aiplatform.v1.HyperparameterTuningJob.state] is set to `CANCELLED`.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + cancelHyperparameterTuningJob( + com.google.cloud.aiplatform.v1.CancelHyperparameterTuningJobRequest request) { + return futureUnaryCall( + getChannel().newCall(getCancelHyperparameterTuningJobMethod(), getCallOptions()), + request); + } + + /** + * + * + *
+     * Creates a BatchPredictionJob. A BatchPredictionJob once created will
+     * right away be attempted to start.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1.BatchPredictionJob> + createBatchPredictionJob( + com.google.cloud.aiplatform.v1.CreateBatchPredictionJobRequest request) { + return futureUnaryCall( + getChannel().newCall(getCreateBatchPredictionJobMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets a BatchPredictionJob
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1.BatchPredictionJob> + getBatchPredictionJob(com.google.cloud.aiplatform.v1.GetBatchPredictionJobRequest request) { + return futureUnaryCall( + getChannel().newCall(getGetBatchPredictionJobMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists BatchPredictionJobs in a Location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1.ListBatchPredictionJobsResponse> + listBatchPredictionJobs( + com.google.cloud.aiplatform.v1.ListBatchPredictionJobsRequest request) { + return futureUnaryCall( + getChannel().newCall(getListBatchPredictionJobsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a BatchPredictionJob. Can only be called on jobs that already
+     * finished.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteBatchPredictionJob( + com.google.cloud.aiplatform.v1.DeleteBatchPredictionJobRequest request) { + return futureUnaryCall( + getChannel().newCall(getDeleteBatchPredictionJobMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Cancels a BatchPredictionJob.
+     * Starts asynchronous cancellation on the BatchPredictionJob. The server
+     * makes the best effort to cancel the job, but success is not
+     * guaranteed. Clients can use [JobService.GetBatchPredictionJob][google.cloud.aiplatform.v1.JobService.GetBatchPredictionJob] or
+     * other methods to check whether the cancellation succeeded or whether the
+     * job completed despite cancellation. On a successful cancellation,
+     * the BatchPredictionJob is not deleted;instead its
+     * [BatchPredictionJob.state][google.cloud.aiplatform.v1.BatchPredictionJob.state] is set to `CANCELLED`. Any files already
+     * outputted by the job are not deleted.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + cancelBatchPredictionJob( + com.google.cloud.aiplatform.v1.CancelBatchPredictionJobRequest request) { + return futureUnaryCall( + getChannel().newCall(getCancelBatchPredictionJobMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_CREATE_CUSTOM_JOB = 0; + private static final int METHODID_GET_CUSTOM_JOB = 1; + private static final int METHODID_LIST_CUSTOM_JOBS = 2; + private static final int METHODID_DELETE_CUSTOM_JOB = 3; + private static final int METHODID_CANCEL_CUSTOM_JOB = 4; + private static final int METHODID_CREATE_DATA_LABELING_JOB = 5; + private static final int METHODID_GET_DATA_LABELING_JOB = 6; + private static final int METHODID_LIST_DATA_LABELING_JOBS = 7; + private static final int METHODID_DELETE_DATA_LABELING_JOB = 8; + private static final int METHODID_CANCEL_DATA_LABELING_JOB = 9; + private static final int METHODID_CREATE_HYPERPARAMETER_TUNING_JOB = 10; + private static final int METHODID_GET_HYPERPARAMETER_TUNING_JOB = 11; + private static final int METHODID_LIST_HYPERPARAMETER_TUNING_JOBS = 12; + private static final int METHODID_DELETE_HYPERPARAMETER_TUNING_JOB = 13; + private static final int METHODID_CANCEL_HYPERPARAMETER_TUNING_JOB = 14; + private static final int METHODID_CREATE_BATCH_PREDICTION_JOB = 15; + private static final int METHODID_GET_BATCH_PREDICTION_JOB = 16; + private static final int METHODID_LIST_BATCH_PREDICTION_JOBS = 17; + private static final int METHODID_DELETE_BATCH_PREDICTION_JOB = 18; + private static final int METHODID_CANCEL_BATCH_PREDICTION_JOB = 19; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final JobServiceImplBase serviceImpl; + private final int methodId; + + MethodHandlers(JobServiceImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_CREATE_CUSTOM_JOB: + serviceImpl.createCustomJob( + (com.google.cloud.aiplatform.v1.CreateCustomJobRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_CUSTOM_JOB: + serviceImpl.getCustomJob( + (com.google.cloud.aiplatform.v1.GetCustomJobRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_CUSTOM_JOBS: + serviceImpl.listCustomJobs( + (com.google.cloud.aiplatform.v1.ListCustomJobsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_DELETE_CUSTOM_JOB: + serviceImpl.deleteCustomJob( + (com.google.cloud.aiplatform.v1.DeleteCustomJobRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CANCEL_CUSTOM_JOB: + serviceImpl.cancelCustomJob( + (com.google.cloud.aiplatform.v1.CancelCustomJobRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_DATA_LABELING_JOB: + serviceImpl.createDataLabelingJob( + (com.google.cloud.aiplatform.v1.CreateDataLabelingJobRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_DATA_LABELING_JOB: + serviceImpl.getDataLabelingJob( + (com.google.cloud.aiplatform.v1.GetDataLabelingJobRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_DATA_LABELING_JOBS: + serviceImpl.listDataLabelingJobs( + (com.google.cloud.aiplatform.v1.ListDataLabelingJobsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.aiplatform.v1.ListDataLabelingJobsResponse>) + responseObserver); + break; + case METHODID_DELETE_DATA_LABELING_JOB: + serviceImpl.deleteDataLabelingJob( + (com.google.cloud.aiplatform.v1.DeleteDataLabelingJobRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CANCEL_DATA_LABELING_JOB: + serviceImpl.cancelDataLabelingJob( + (com.google.cloud.aiplatform.v1.CancelDataLabelingJobRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_HYPERPARAMETER_TUNING_JOB: + serviceImpl.createHyperparameterTuningJob( + (com.google.cloud.aiplatform.v1.CreateHyperparameterTuningJobRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_HYPERPARAMETER_TUNING_JOB: + serviceImpl.getHyperparameterTuningJob( + (com.google.cloud.aiplatform.v1.GetHyperparameterTuningJobRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_HYPERPARAMETER_TUNING_JOBS: + serviceImpl.listHyperparameterTuningJobs( + (com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsResponse>) + responseObserver); + break; + case METHODID_DELETE_HYPERPARAMETER_TUNING_JOB: + serviceImpl.deleteHyperparameterTuningJob( + (com.google.cloud.aiplatform.v1.DeleteHyperparameterTuningJobRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CANCEL_HYPERPARAMETER_TUNING_JOB: + serviceImpl.cancelHyperparameterTuningJob( + (com.google.cloud.aiplatform.v1.CancelHyperparameterTuningJobRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_BATCH_PREDICTION_JOB: + serviceImpl.createBatchPredictionJob( + (com.google.cloud.aiplatform.v1.CreateBatchPredictionJobRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_BATCH_PREDICTION_JOB: + serviceImpl.getBatchPredictionJob( + (com.google.cloud.aiplatform.v1.GetBatchPredictionJobRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_BATCH_PREDICTION_JOBS: + serviceImpl.listBatchPredictionJobs( + (com.google.cloud.aiplatform.v1.ListBatchPredictionJobsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.aiplatform.v1.ListBatchPredictionJobsResponse>) + responseObserver); + break; + case METHODID_DELETE_BATCH_PREDICTION_JOB: + serviceImpl.deleteBatchPredictionJob( + (com.google.cloud.aiplatform.v1.DeleteBatchPredictionJobRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CANCEL_BATCH_PREDICTION_JOB: + serviceImpl.cancelBatchPredictionJob( + (com.google.cloud.aiplatform.v1.CancelBatchPredictionJobRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + private abstract static class JobServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + JobServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.aiplatform.v1.JobServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("JobService"); + } + } + + private static final class JobServiceFileDescriptorSupplier + extends JobServiceBaseDescriptorSupplier { + JobServiceFileDescriptorSupplier() {} + } + + private static final class JobServiceMethodDescriptorSupplier + extends JobServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + JobServiceMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (JobServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new JobServiceFileDescriptorSupplier()) + .addMethod(getCreateCustomJobMethod()) + .addMethod(getGetCustomJobMethod()) + .addMethod(getListCustomJobsMethod()) + .addMethod(getDeleteCustomJobMethod()) + .addMethod(getCancelCustomJobMethod()) + .addMethod(getCreateDataLabelingJobMethod()) + .addMethod(getGetDataLabelingJobMethod()) + .addMethod(getListDataLabelingJobsMethod()) + .addMethod(getDeleteDataLabelingJobMethod()) + .addMethod(getCancelDataLabelingJobMethod()) + .addMethod(getCreateHyperparameterTuningJobMethod()) + .addMethod(getGetHyperparameterTuningJobMethod()) + .addMethod(getListHyperparameterTuningJobsMethod()) + .addMethod(getDeleteHyperparameterTuningJobMethod()) + .addMethod(getCancelHyperparameterTuningJobMethod()) + .addMethod(getCreateBatchPredictionJobMethod()) + .addMethod(getGetBatchPredictionJobMethod()) + .addMethod(getListBatchPredictionJobsMethod()) + .addMethod(getDeleteBatchPredictionJobMethod()) + .addMethod(getCancelBatchPredictionJobMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/grpc-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/MigrationServiceGrpc.java b/grpc-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/MigrationServiceGrpc.java new file mode 100644 index 000000000..84a8b6a8e --- /dev/null +++ b/grpc-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/MigrationServiceGrpc.java @@ -0,0 +1,510 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; +import static io.grpc.stub.ClientCalls.asyncUnaryCall; +import static io.grpc.stub.ClientCalls.blockingUnaryCall; +import static io.grpc.stub.ClientCalls.futureUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; + +/** + * + * + *
+ * A service that migrates resources from automl.googleapis.com,
+ * datalabeling.googleapis.com and ml.googleapis.com to AI Platform.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/aiplatform/v1/migration_service.proto") +public final class MigrationServiceGrpc { + + private MigrationServiceGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.aiplatform.v1.MigrationService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.SearchMigratableResourcesRequest, + com.google.cloud.aiplatform.v1.SearchMigratableResourcesResponse> + getSearchMigratableResourcesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "SearchMigratableResources", + requestType = com.google.cloud.aiplatform.v1.SearchMigratableResourcesRequest.class, + responseType = com.google.cloud.aiplatform.v1.SearchMigratableResourcesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.SearchMigratableResourcesRequest, + com.google.cloud.aiplatform.v1.SearchMigratableResourcesResponse> + getSearchMigratableResourcesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.SearchMigratableResourcesRequest, + com.google.cloud.aiplatform.v1.SearchMigratableResourcesResponse> + getSearchMigratableResourcesMethod; + if ((getSearchMigratableResourcesMethod = + MigrationServiceGrpc.getSearchMigratableResourcesMethod) + == null) { + synchronized (MigrationServiceGrpc.class) { + if ((getSearchMigratableResourcesMethod = + MigrationServiceGrpc.getSearchMigratableResourcesMethod) + == null) { + MigrationServiceGrpc.getSearchMigratableResourcesMethod = + getSearchMigratableResourcesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "SearchMigratableResources")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.SearchMigratableResourcesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.SearchMigratableResourcesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new MigrationServiceMethodDescriptorSupplier("SearchMigratableResources")) + .build(); + } + } + } + return getSearchMigratableResourcesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.BatchMigrateResourcesRequest, + com.google.longrunning.Operation> + getBatchMigrateResourcesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "BatchMigrateResources", + requestType = com.google.cloud.aiplatform.v1.BatchMigrateResourcesRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.BatchMigrateResourcesRequest, + com.google.longrunning.Operation> + getBatchMigrateResourcesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.BatchMigrateResourcesRequest, + com.google.longrunning.Operation> + getBatchMigrateResourcesMethod; + if ((getBatchMigrateResourcesMethod = MigrationServiceGrpc.getBatchMigrateResourcesMethod) + == null) { + synchronized (MigrationServiceGrpc.class) { + if ((getBatchMigrateResourcesMethod = MigrationServiceGrpc.getBatchMigrateResourcesMethod) + == null) { + MigrationServiceGrpc.getBatchMigrateResourcesMethod = + getBatchMigrateResourcesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "BatchMigrateResources")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.BatchMigrateResourcesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new MigrationServiceMethodDescriptorSupplier("BatchMigrateResources")) + .build(); + } + } + } + return getBatchMigrateResourcesMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static MigrationServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public MigrationServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new MigrationServiceStub(channel, callOptions); + } + }; + return MigrationServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static MigrationServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public MigrationServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new MigrationServiceBlockingStub(channel, callOptions); + } + }; + return MigrationServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static MigrationServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public MigrationServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new MigrationServiceFutureStub(channel, callOptions); + } + }; + return MigrationServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * A service that migrates resources from automl.googleapis.com,
+   * datalabeling.googleapis.com and ml.googleapis.com to AI Platform.
+   * 
+ */ + public abstract static class MigrationServiceImplBase implements io.grpc.BindableService { + + /** + * + * + *
+     * 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.
+     * 
+ */ + public void searchMigratableResources( + com.google.cloud.aiplatform.v1.SearchMigratableResourcesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.aiplatform.v1.SearchMigratableResourcesResponse> + responseObserver) { + asyncUnimplementedUnaryCall(getSearchMigratableResourcesMethod(), responseObserver); + } + + /** + * + * + *
+     * Batch migrates resources from ml.googleapis.com, automl.googleapis.com,
+     * and datalabeling.googleapis.com to AI Platform (Unified).
+     * 
+ */ + public void batchMigrateResources( + com.google.cloud.aiplatform.v1.BatchMigrateResourcesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getBatchMigrateResourcesMethod(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getSearchMigratableResourcesMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.SearchMigratableResourcesRequest, + com.google.cloud.aiplatform.v1.SearchMigratableResourcesResponse>( + this, METHODID_SEARCH_MIGRATABLE_RESOURCES))) + .addMethod( + getBatchMigrateResourcesMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.BatchMigrateResourcesRequest, + com.google.longrunning.Operation>(this, METHODID_BATCH_MIGRATE_RESOURCES))) + .build(); + } + } + + /** + * + * + *
+   * A service that migrates resources from automl.googleapis.com,
+   * datalabeling.googleapis.com and ml.googleapis.com to AI Platform.
+   * 
+ */ + public static final class MigrationServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private MigrationServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected MigrationServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new MigrationServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * 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.
+     * 
+ */ + public void searchMigratableResources( + com.google.cloud.aiplatform.v1.SearchMigratableResourcesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.aiplatform.v1.SearchMigratableResourcesResponse> + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getSearchMigratableResourcesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Batch migrates resources from ml.googleapis.com, automl.googleapis.com,
+     * and datalabeling.googleapis.com to AI Platform (Unified).
+     * 
+ */ + public void batchMigrateResources( + com.google.cloud.aiplatform.v1.BatchMigrateResourcesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getBatchMigrateResourcesMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * + * + *
+   * A service that migrates resources from automl.googleapis.com,
+   * datalabeling.googleapis.com and ml.googleapis.com to AI Platform.
+   * 
+ */ + public static final class MigrationServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private MigrationServiceBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected MigrationServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new MigrationServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * 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.
+     * 
+ */ + public com.google.cloud.aiplatform.v1.SearchMigratableResourcesResponse + searchMigratableResources( + com.google.cloud.aiplatform.v1.SearchMigratableResourcesRequest request) { + return blockingUnaryCall( + getChannel(), getSearchMigratableResourcesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Batch migrates resources from ml.googleapis.com, automl.googleapis.com,
+     * and datalabeling.googleapis.com to AI Platform (Unified).
+     * 
+ */ + public com.google.longrunning.Operation batchMigrateResources( + com.google.cloud.aiplatform.v1.BatchMigrateResourcesRequest request) { + return blockingUnaryCall( + getChannel(), getBatchMigrateResourcesMethod(), getCallOptions(), request); + } + } + + /** + * + * + *
+   * A service that migrates resources from automl.googleapis.com,
+   * datalabeling.googleapis.com and ml.googleapis.com to AI Platform.
+   * 
+ */ + public static final class MigrationServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private MigrationServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected MigrationServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new MigrationServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * 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.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1.SearchMigratableResourcesResponse> + searchMigratableResources( + com.google.cloud.aiplatform.v1.SearchMigratableResourcesRequest request) { + return futureUnaryCall( + getChannel().newCall(getSearchMigratableResourcesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Batch migrates resources from ml.googleapis.com, automl.googleapis.com,
+     * and datalabeling.googleapis.com to AI Platform (Unified).
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + batchMigrateResources(com.google.cloud.aiplatform.v1.BatchMigrateResourcesRequest request) { + return futureUnaryCall( + getChannel().newCall(getBatchMigrateResourcesMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_SEARCH_MIGRATABLE_RESOURCES = 0; + private static final int METHODID_BATCH_MIGRATE_RESOURCES = 1; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final MigrationServiceImplBase serviceImpl; + private final int methodId; + + MethodHandlers(MigrationServiceImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_SEARCH_MIGRATABLE_RESOURCES: + serviceImpl.searchMigratableResources( + (com.google.cloud.aiplatform.v1.SearchMigratableResourcesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.aiplatform.v1.SearchMigratableResourcesResponse>) + responseObserver); + break; + case METHODID_BATCH_MIGRATE_RESOURCES: + serviceImpl.batchMigrateResources( + (com.google.cloud.aiplatform.v1.BatchMigrateResourcesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + private abstract static class MigrationServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + MigrationServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.aiplatform.v1.MigrationServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("MigrationService"); + } + } + + private static final class MigrationServiceFileDescriptorSupplier + extends MigrationServiceBaseDescriptorSupplier { + MigrationServiceFileDescriptorSupplier() {} + } + + private static final class MigrationServiceMethodDescriptorSupplier + extends MigrationServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + MigrationServiceMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (MigrationServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new MigrationServiceFileDescriptorSupplier()) + .addMethod(getSearchMigratableResourcesMethod()) + .addMethod(getBatchMigrateResourcesMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/grpc-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelServiceGrpc.java b/grpc-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelServiceGrpc.java new file mode 100644 index 000000000..acf40fbbf --- /dev/null +++ b/grpc-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelServiceGrpc.java @@ -0,0 +1,1414 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; +import static io.grpc.stub.ClientCalls.asyncUnaryCall; +import static io.grpc.stub.ClientCalls.blockingUnaryCall; +import static io.grpc.stub.ClientCalls.futureUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; + +/** + * + * + *
+ * A service for managing AI Platform's machine learning Models.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/aiplatform/v1/model_service.proto") +public final class ModelServiceGrpc { + + private ModelServiceGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.aiplatform.v1.ModelService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.UploadModelRequest, com.google.longrunning.Operation> + getUploadModelMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UploadModel", + requestType = com.google.cloud.aiplatform.v1.UploadModelRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.UploadModelRequest, com.google.longrunning.Operation> + getUploadModelMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.UploadModelRequest, com.google.longrunning.Operation> + getUploadModelMethod; + if ((getUploadModelMethod = ModelServiceGrpc.getUploadModelMethod) == null) { + synchronized (ModelServiceGrpc.class) { + if ((getUploadModelMethod = ModelServiceGrpc.getUploadModelMethod) == null) { + ModelServiceGrpc.getUploadModelMethod = + getUploadModelMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UploadModel")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.UploadModelRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new ModelServiceMethodDescriptorSupplier("UploadModel")) + .build(); + } + } + } + return getUploadModelMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.GetModelRequest, com.google.cloud.aiplatform.v1.Model> + getGetModelMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetModel", + requestType = com.google.cloud.aiplatform.v1.GetModelRequest.class, + responseType = com.google.cloud.aiplatform.v1.Model.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.GetModelRequest, com.google.cloud.aiplatform.v1.Model> + getGetModelMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.GetModelRequest, com.google.cloud.aiplatform.v1.Model> + getGetModelMethod; + if ((getGetModelMethod = ModelServiceGrpc.getGetModelMethod) == null) { + synchronized (ModelServiceGrpc.class) { + if ((getGetModelMethod = ModelServiceGrpc.getGetModelMethod) == null) { + ModelServiceGrpc.getGetModelMethod = + getGetModelMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetModel")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.GetModelRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.Model.getDefaultInstance())) + .setSchemaDescriptor(new ModelServiceMethodDescriptorSupplier("GetModel")) + .build(); + } + } + } + return getGetModelMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ListModelsRequest, + com.google.cloud.aiplatform.v1.ListModelsResponse> + getListModelsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListModels", + requestType = com.google.cloud.aiplatform.v1.ListModelsRequest.class, + responseType = com.google.cloud.aiplatform.v1.ListModelsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ListModelsRequest, + com.google.cloud.aiplatform.v1.ListModelsResponse> + getListModelsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ListModelsRequest, + com.google.cloud.aiplatform.v1.ListModelsResponse> + getListModelsMethod; + if ((getListModelsMethod = ModelServiceGrpc.getListModelsMethod) == null) { + synchronized (ModelServiceGrpc.class) { + if ((getListModelsMethod = ModelServiceGrpc.getListModelsMethod) == null) { + ModelServiceGrpc.getListModelsMethod = + getListModelsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListModels")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.ListModelsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.ListModelsResponse + .getDefaultInstance())) + .setSchemaDescriptor(new ModelServiceMethodDescriptorSupplier("ListModels")) + .build(); + } + } + } + return getListModelsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.UpdateModelRequest, com.google.cloud.aiplatform.v1.Model> + getUpdateModelMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateModel", + requestType = com.google.cloud.aiplatform.v1.UpdateModelRequest.class, + responseType = com.google.cloud.aiplatform.v1.Model.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.UpdateModelRequest, com.google.cloud.aiplatform.v1.Model> + getUpdateModelMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.UpdateModelRequest, com.google.cloud.aiplatform.v1.Model> + getUpdateModelMethod; + if ((getUpdateModelMethod = ModelServiceGrpc.getUpdateModelMethod) == null) { + synchronized (ModelServiceGrpc.class) { + if ((getUpdateModelMethod = ModelServiceGrpc.getUpdateModelMethod) == null) { + ModelServiceGrpc.getUpdateModelMethod = + getUpdateModelMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateModel")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.UpdateModelRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.Model.getDefaultInstance())) + .setSchemaDescriptor(new ModelServiceMethodDescriptorSupplier("UpdateModel")) + .build(); + } + } + } + return getUpdateModelMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.DeleteModelRequest, com.google.longrunning.Operation> + getDeleteModelMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteModel", + requestType = com.google.cloud.aiplatform.v1.DeleteModelRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.DeleteModelRequest, com.google.longrunning.Operation> + getDeleteModelMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.DeleteModelRequest, com.google.longrunning.Operation> + getDeleteModelMethod; + if ((getDeleteModelMethod = ModelServiceGrpc.getDeleteModelMethod) == null) { + synchronized (ModelServiceGrpc.class) { + if ((getDeleteModelMethod = ModelServiceGrpc.getDeleteModelMethod) == null) { + ModelServiceGrpc.getDeleteModelMethod = + getDeleteModelMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteModel")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.DeleteModelRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new ModelServiceMethodDescriptorSupplier("DeleteModel")) + .build(); + } + } + } + return getDeleteModelMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ExportModelRequest, com.google.longrunning.Operation> + getExportModelMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ExportModel", + requestType = com.google.cloud.aiplatform.v1.ExportModelRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ExportModelRequest, com.google.longrunning.Operation> + getExportModelMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ExportModelRequest, com.google.longrunning.Operation> + getExportModelMethod; + if ((getExportModelMethod = ModelServiceGrpc.getExportModelMethod) == null) { + synchronized (ModelServiceGrpc.class) { + if ((getExportModelMethod = ModelServiceGrpc.getExportModelMethod) == null) { + ModelServiceGrpc.getExportModelMethod = + getExportModelMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ExportModel")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.ExportModelRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new ModelServiceMethodDescriptorSupplier("ExportModel")) + .build(); + } + } + } + return getExportModelMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.GetModelEvaluationRequest, + com.google.cloud.aiplatform.v1.ModelEvaluation> + getGetModelEvaluationMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetModelEvaluation", + requestType = com.google.cloud.aiplatform.v1.GetModelEvaluationRequest.class, + responseType = com.google.cloud.aiplatform.v1.ModelEvaluation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.GetModelEvaluationRequest, + com.google.cloud.aiplatform.v1.ModelEvaluation> + getGetModelEvaluationMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.GetModelEvaluationRequest, + com.google.cloud.aiplatform.v1.ModelEvaluation> + getGetModelEvaluationMethod; + if ((getGetModelEvaluationMethod = ModelServiceGrpc.getGetModelEvaluationMethod) == null) { + synchronized (ModelServiceGrpc.class) { + if ((getGetModelEvaluationMethod = ModelServiceGrpc.getGetModelEvaluationMethod) == null) { + ModelServiceGrpc.getGetModelEvaluationMethod = + getGetModelEvaluationMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetModelEvaluation")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.GetModelEvaluationRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.ModelEvaluation.getDefaultInstance())) + .setSchemaDescriptor( + new ModelServiceMethodDescriptorSupplier("GetModelEvaluation")) + .build(); + } + } + } + return getGetModelEvaluationMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ListModelEvaluationsRequest, + com.google.cloud.aiplatform.v1.ListModelEvaluationsResponse> + getListModelEvaluationsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListModelEvaluations", + requestType = com.google.cloud.aiplatform.v1.ListModelEvaluationsRequest.class, + responseType = com.google.cloud.aiplatform.v1.ListModelEvaluationsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ListModelEvaluationsRequest, + com.google.cloud.aiplatform.v1.ListModelEvaluationsResponse> + getListModelEvaluationsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ListModelEvaluationsRequest, + com.google.cloud.aiplatform.v1.ListModelEvaluationsResponse> + getListModelEvaluationsMethod; + if ((getListModelEvaluationsMethod = ModelServiceGrpc.getListModelEvaluationsMethod) == null) { + synchronized (ModelServiceGrpc.class) { + if ((getListModelEvaluationsMethod = ModelServiceGrpc.getListModelEvaluationsMethod) + == null) { + ModelServiceGrpc.getListModelEvaluationsMethod = + getListModelEvaluationsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListModelEvaluations")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.ListModelEvaluationsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.ListModelEvaluationsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new ModelServiceMethodDescriptorSupplier("ListModelEvaluations")) + .build(); + } + } + } + return getListModelEvaluationsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.GetModelEvaluationSliceRequest, + com.google.cloud.aiplatform.v1.ModelEvaluationSlice> + getGetModelEvaluationSliceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetModelEvaluationSlice", + requestType = com.google.cloud.aiplatform.v1.GetModelEvaluationSliceRequest.class, + responseType = com.google.cloud.aiplatform.v1.ModelEvaluationSlice.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.GetModelEvaluationSliceRequest, + com.google.cloud.aiplatform.v1.ModelEvaluationSlice> + getGetModelEvaluationSliceMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.GetModelEvaluationSliceRequest, + com.google.cloud.aiplatform.v1.ModelEvaluationSlice> + getGetModelEvaluationSliceMethod; + if ((getGetModelEvaluationSliceMethod = ModelServiceGrpc.getGetModelEvaluationSliceMethod) + == null) { + synchronized (ModelServiceGrpc.class) { + if ((getGetModelEvaluationSliceMethod = ModelServiceGrpc.getGetModelEvaluationSliceMethod) + == null) { + ModelServiceGrpc.getGetModelEvaluationSliceMethod = + getGetModelEvaluationSliceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetModelEvaluationSlice")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.GetModelEvaluationSliceRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.ModelEvaluationSlice + .getDefaultInstance())) + .setSchemaDescriptor( + new ModelServiceMethodDescriptorSupplier("GetModelEvaluationSlice")) + .build(); + } + } + } + return getGetModelEvaluationSliceMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesRequest, + com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponse> + getListModelEvaluationSlicesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListModelEvaluationSlices", + requestType = com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesRequest.class, + responseType = com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesRequest, + com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponse> + getListModelEvaluationSlicesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesRequest, + com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponse> + getListModelEvaluationSlicesMethod; + if ((getListModelEvaluationSlicesMethod = ModelServiceGrpc.getListModelEvaluationSlicesMethod) + == null) { + synchronized (ModelServiceGrpc.class) { + if ((getListModelEvaluationSlicesMethod = + ModelServiceGrpc.getListModelEvaluationSlicesMethod) + == null) { + ModelServiceGrpc.getListModelEvaluationSlicesMethod = + getListModelEvaluationSlicesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListModelEvaluationSlices")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new ModelServiceMethodDescriptorSupplier("ListModelEvaluationSlices")) + .build(); + } + } + } + return getListModelEvaluationSlicesMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static ModelServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ModelServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ModelServiceStub(channel, callOptions); + } + }; + return ModelServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static ModelServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ModelServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ModelServiceBlockingStub(channel, callOptions); + } + }; + return ModelServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static ModelServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ModelServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ModelServiceFutureStub(channel, callOptions); + } + }; + return ModelServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * A service for managing AI Platform's machine learning Models.
+   * 
+ */ + public abstract static class ModelServiceImplBase implements io.grpc.BindableService { + + /** + * + * + *
+     * Uploads a Model artifact into AI Platform.
+     * 
+ */ + public void uploadModel( + com.google.cloud.aiplatform.v1.UploadModelRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getUploadModelMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets a Model.
+     * 
+ */ + public void getModel( + com.google.cloud.aiplatform.v1.GetModelRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getGetModelMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists Models in a Location.
+     * 
+ */ + public void listModels( + com.google.cloud.aiplatform.v1.ListModelsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getListModelsMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates a Model.
+     * 
+ */ + public void updateModel( + com.google.cloud.aiplatform.v1.UpdateModelRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getUpdateModelMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a Model.
+     * Note: Model can only be deleted if there are no DeployedModels created
+     * from it.
+     * 
+ */ + public void deleteModel( + com.google.cloud.aiplatform.v1.DeleteModelRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getDeleteModelMethod(), responseObserver); + } + + /** + * + * + *
+     * 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.v1.Model.supported_export_formats].
+     * 
+ */ + public void exportModel( + com.google.cloud.aiplatform.v1.ExportModelRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getExportModelMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets a ModelEvaluation.
+     * 
+ */ + public void getModelEvaluation( + com.google.cloud.aiplatform.v1.GetModelEvaluationRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getGetModelEvaluationMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists ModelEvaluations in a Model.
+     * 
+ */ + public void listModelEvaluations( + com.google.cloud.aiplatform.v1.ListModelEvaluationsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getListModelEvaluationsMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets a ModelEvaluationSlice.
+     * 
+ */ + public void getModelEvaluationSlice( + com.google.cloud.aiplatform.v1.GetModelEvaluationSliceRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getGetModelEvaluationSliceMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists ModelEvaluationSlices in a ModelEvaluation.
+     * 
+ */ + public void listModelEvaluationSlices( + com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponse> + responseObserver) { + asyncUnimplementedUnaryCall(getListModelEvaluationSlicesMethod(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getUploadModelMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.UploadModelRequest, + com.google.longrunning.Operation>(this, METHODID_UPLOAD_MODEL))) + .addMethod( + getGetModelMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.GetModelRequest, + com.google.cloud.aiplatform.v1.Model>(this, METHODID_GET_MODEL))) + .addMethod( + getListModelsMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.ListModelsRequest, + com.google.cloud.aiplatform.v1.ListModelsResponse>( + this, METHODID_LIST_MODELS))) + .addMethod( + getUpdateModelMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.UpdateModelRequest, + com.google.cloud.aiplatform.v1.Model>(this, METHODID_UPDATE_MODEL))) + .addMethod( + getDeleteModelMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.DeleteModelRequest, + com.google.longrunning.Operation>(this, METHODID_DELETE_MODEL))) + .addMethod( + getExportModelMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.ExportModelRequest, + com.google.longrunning.Operation>(this, METHODID_EXPORT_MODEL))) + .addMethod( + getGetModelEvaluationMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.GetModelEvaluationRequest, + com.google.cloud.aiplatform.v1.ModelEvaluation>( + this, METHODID_GET_MODEL_EVALUATION))) + .addMethod( + getListModelEvaluationsMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.ListModelEvaluationsRequest, + com.google.cloud.aiplatform.v1.ListModelEvaluationsResponse>( + this, METHODID_LIST_MODEL_EVALUATIONS))) + .addMethod( + getGetModelEvaluationSliceMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.GetModelEvaluationSliceRequest, + com.google.cloud.aiplatform.v1.ModelEvaluationSlice>( + this, METHODID_GET_MODEL_EVALUATION_SLICE))) + .addMethod( + getListModelEvaluationSlicesMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesRequest, + com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponse>( + this, METHODID_LIST_MODEL_EVALUATION_SLICES))) + .build(); + } + } + + /** + * + * + *
+   * A service for managing AI Platform's machine learning Models.
+   * 
+ */ + public static final class ModelServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private ModelServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ModelServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ModelServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * Uploads a Model artifact into AI Platform.
+     * 
+ */ + public void uploadModel( + com.google.cloud.aiplatform.v1.UploadModelRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getUploadModelMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets a Model.
+     * 
+ */ + public void getModel( + com.google.cloud.aiplatform.v1.GetModelRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getGetModelMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Lists Models in a Location.
+     * 
+ */ + public void listModels( + com.google.cloud.aiplatform.v1.ListModelsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getListModelsMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Updates a Model.
+     * 
+ */ + public void updateModel( + com.google.cloud.aiplatform.v1.UpdateModelRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getUpdateModelMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a Model.
+     * Note: Model can only be deleted if there are no DeployedModels created
+     * from it.
+     * 
+ */ + public void deleteModel( + com.google.cloud.aiplatform.v1.DeleteModelRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getDeleteModelMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * 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.v1.Model.supported_export_formats].
+     * 
+ */ + public void exportModel( + com.google.cloud.aiplatform.v1.ExportModelRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getExportModelMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets a ModelEvaluation.
+     * 
+ */ + public void getModelEvaluation( + com.google.cloud.aiplatform.v1.GetModelEvaluationRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getGetModelEvaluationMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists ModelEvaluations in a Model.
+     * 
+ */ + public void listModelEvaluations( + com.google.cloud.aiplatform.v1.ListModelEvaluationsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getListModelEvaluationsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets a ModelEvaluationSlice.
+     * 
+ */ + public void getModelEvaluationSlice( + com.google.cloud.aiplatform.v1.GetModelEvaluationSliceRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getGetModelEvaluationSliceMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists ModelEvaluationSlices in a ModelEvaluation.
+     * 
+ */ + public void listModelEvaluationSlices( + com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponse> + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getListModelEvaluationSlicesMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * + * + *
+   * A service for managing AI Platform's machine learning Models.
+   * 
+ */ + public static final class ModelServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private ModelServiceBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ModelServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ModelServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Uploads a Model artifact into AI Platform.
+     * 
+ */ + public com.google.longrunning.Operation uploadModel( + com.google.cloud.aiplatform.v1.UploadModelRequest request) { + return blockingUnaryCall(getChannel(), getUploadModelMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a Model.
+     * 
+ */ + public com.google.cloud.aiplatform.v1.Model getModel( + com.google.cloud.aiplatform.v1.GetModelRequest request) { + return blockingUnaryCall(getChannel(), getGetModelMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists Models in a Location.
+     * 
+ */ + public com.google.cloud.aiplatform.v1.ListModelsResponse listModels( + com.google.cloud.aiplatform.v1.ListModelsRequest request) { + return blockingUnaryCall(getChannel(), getListModelsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates a Model.
+     * 
+ */ + public com.google.cloud.aiplatform.v1.Model updateModel( + com.google.cloud.aiplatform.v1.UpdateModelRequest request) { + return blockingUnaryCall(getChannel(), getUpdateModelMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a Model.
+     * Note: Model can only be deleted if there are no DeployedModels created
+     * from it.
+     * 
+ */ + public com.google.longrunning.Operation deleteModel( + com.google.cloud.aiplatform.v1.DeleteModelRequest request) { + return blockingUnaryCall(getChannel(), getDeleteModelMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * 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.v1.Model.supported_export_formats].
+     * 
+ */ + public com.google.longrunning.Operation exportModel( + com.google.cloud.aiplatform.v1.ExportModelRequest request) { + return blockingUnaryCall(getChannel(), getExportModelMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a ModelEvaluation.
+     * 
+ */ + public com.google.cloud.aiplatform.v1.ModelEvaluation getModelEvaluation( + com.google.cloud.aiplatform.v1.GetModelEvaluationRequest request) { + return blockingUnaryCall( + getChannel(), getGetModelEvaluationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists ModelEvaluations in a Model.
+     * 
+ */ + public com.google.cloud.aiplatform.v1.ListModelEvaluationsResponse listModelEvaluations( + com.google.cloud.aiplatform.v1.ListModelEvaluationsRequest request) { + return blockingUnaryCall( + getChannel(), getListModelEvaluationsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a ModelEvaluationSlice.
+     * 
+ */ + public com.google.cloud.aiplatform.v1.ModelEvaluationSlice getModelEvaluationSlice( + com.google.cloud.aiplatform.v1.GetModelEvaluationSliceRequest request) { + return blockingUnaryCall( + getChannel(), getGetModelEvaluationSliceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists ModelEvaluationSlices in a ModelEvaluation.
+     * 
+ */ + public com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponse + listModelEvaluationSlices( + com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesRequest request) { + return blockingUnaryCall( + getChannel(), getListModelEvaluationSlicesMethod(), getCallOptions(), request); + } + } + + /** + * + * + *
+   * A service for managing AI Platform's machine learning Models.
+   * 
+ */ + public static final class ModelServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private ModelServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ModelServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ModelServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Uploads a Model artifact into AI Platform.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + uploadModel(com.google.cloud.aiplatform.v1.UploadModelRequest request) { + return futureUnaryCall( + getChannel().newCall(getUploadModelMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets a Model.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + getModel(com.google.cloud.aiplatform.v1.GetModelRequest request) { + return futureUnaryCall(getChannel().newCall(getGetModelMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists Models in a Location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1.ListModelsResponse> + listModels(com.google.cloud.aiplatform.v1.ListModelsRequest request) { + return futureUnaryCall( + getChannel().newCall(getListModelsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates a Model.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateModel(com.google.cloud.aiplatform.v1.UpdateModelRequest request) { + return futureUnaryCall( + getChannel().newCall(getUpdateModelMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a Model.
+     * Note: Model can only be deleted if there are no DeployedModels created
+     * from it.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteModel(com.google.cloud.aiplatform.v1.DeleteModelRequest request) { + return futureUnaryCall( + getChannel().newCall(getDeleteModelMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * 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.v1.Model.supported_export_formats].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + exportModel(com.google.cloud.aiplatform.v1.ExportModelRequest request) { + return futureUnaryCall( + getChannel().newCall(getExportModelMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets a ModelEvaluation.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1.ModelEvaluation> + getModelEvaluation(com.google.cloud.aiplatform.v1.GetModelEvaluationRequest request) { + return futureUnaryCall( + getChannel().newCall(getGetModelEvaluationMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists ModelEvaluations in a Model.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1.ListModelEvaluationsResponse> + listModelEvaluations(com.google.cloud.aiplatform.v1.ListModelEvaluationsRequest request) { + return futureUnaryCall( + getChannel().newCall(getListModelEvaluationsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets a ModelEvaluationSlice.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1.ModelEvaluationSlice> + getModelEvaluationSlice( + com.google.cloud.aiplatform.v1.GetModelEvaluationSliceRequest request) { + return futureUnaryCall( + getChannel().newCall(getGetModelEvaluationSliceMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists ModelEvaluationSlices in a ModelEvaluation.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponse> + listModelEvaluationSlices( + com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesRequest request) { + return futureUnaryCall( + getChannel().newCall(getListModelEvaluationSlicesMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_UPLOAD_MODEL = 0; + private static final int METHODID_GET_MODEL = 1; + private static final int METHODID_LIST_MODELS = 2; + private static final int METHODID_UPDATE_MODEL = 3; + private static final int METHODID_DELETE_MODEL = 4; + private static final int METHODID_EXPORT_MODEL = 5; + private static final int METHODID_GET_MODEL_EVALUATION = 6; + private static final int METHODID_LIST_MODEL_EVALUATIONS = 7; + private static final int METHODID_GET_MODEL_EVALUATION_SLICE = 8; + private static final int METHODID_LIST_MODEL_EVALUATION_SLICES = 9; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final ModelServiceImplBase serviceImpl; + private final int methodId; + + MethodHandlers(ModelServiceImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_UPLOAD_MODEL: + serviceImpl.uploadModel( + (com.google.cloud.aiplatform.v1.UploadModelRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_MODEL: + serviceImpl.getModel( + (com.google.cloud.aiplatform.v1.GetModelRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_MODELS: + serviceImpl.listModels( + (com.google.cloud.aiplatform.v1.ListModelsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_MODEL: + serviceImpl.updateModel( + (com.google.cloud.aiplatform.v1.UpdateModelRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_MODEL: + serviceImpl.deleteModel( + (com.google.cloud.aiplatform.v1.DeleteModelRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_EXPORT_MODEL: + serviceImpl.exportModel( + (com.google.cloud.aiplatform.v1.ExportModelRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_MODEL_EVALUATION: + serviceImpl.getModelEvaluation( + (com.google.cloud.aiplatform.v1.GetModelEvaluationRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_MODEL_EVALUATIONS: + serviceImpl.listModelEvaluations( + (com.google.cloud.aiplatform.v1.ListModelEvaluationsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.aiplatform.v1.ListModelEvaluationsResponse>) + responseObserver); + break; + case METHODID_GET_MODEL_EVALUATION_SLICE: + serviceImpl.getModelEvaluationSlice( + (com.google.cloud.aiplatform.v1.GetModelEvaluationSliceRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_MODEL_EVALUATION_SLICES: + serviceImpl.listModelEvaluationSlices( + (com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponse>) + responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + private abstract static class ModelServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + ModelServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.aiplatform.v1.ModelServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("ModelService"); + } + } + + private static final class ModelServiceFileDescriptorSupplier + extends ModelServiceBaseDescriptorSupplier { + ModelServiceFileDescriptorSupplier() {} + } + + private static final class ModelServiceMethodDescriptorSupplier + extends ModelServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + ModelServiceMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (ModelServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new ModelServiceFileDescriptorSupplier()) + .addMethod(getUploadModelMethod()) + .addMethod(getGetModelMethod()) + .addMethod(getListModelsMethod()) + .addMethod(getUpdateModelMethod()) + .addMethod(getDeleteModelMethod()) + .addMethod(getExportModelMethod()) + .addMethod(getGetModelEvaluationMethod()) + .addMethod(getListModelEvaluationsMethod()) + .addMethod(getGetModelEvaluationSliceMethod()) + .addMethod(getListModelEvaluationSlicesMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/grpc-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PipelineServiceGrpc.java b/grpc-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PipelineServiceGrpc.java new file mode 100644 index 000000000..8dc0d11f3 --- /dev/null +++ b/grpc-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PipelineServiceGrpc.java @@ -0,0 +1,887 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; +import static io.grpc.stub.ClientCalls.asyncUnaryCall; +import static io.grpc.stub.ClientCalls.blockingUnaryCall; +import static io.grpc.stub.ClientCalls.futureUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; + +/** + * + * + *
+ * A service for creating and managing AI Platform's pipelines.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/aiplatform/v1/pipeline_service.proto") +public final class PipelineServiceGrpc { + + private PipelineServiceGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.aiplatform.v1.PipelineService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CreateTrainingPipelineRequest, + com.google.cloud.aiplatform.v1.TrainingPipeline> + getCreateTrainingPipelineMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateTrainingPipeline", + requestType = com.google.cloud.aiplatform.v1.CreateTrainingPipelineRequest.class, + responseType = com.google.cloud.aiplatform.v1.TrainingPipeline.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CreateTrainingPipelineRequest, + com.google.cloud.aiplatform.v1.TrainingPipeline> + getCreateTrainingPipelineMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CreateTrainingPipelineRequest, + com.google.cloud.aiplatform.v1.TrainingPipeline> + getCreateTrainingPipelineMethod; + if ((getCreateTrainingPipelineMethod = PipelineServiceGrpc.getCreateTrainingPipelineMethod) + == null) { + synchronized (PipelineServiceGrpc.class) { + if ((getCreateTrainingPipelineMethod = PipelineServiceGrpc.getCreateTrainingPipelineMethod) + == null) { + PipelineServiceGrpc.getCreateTrainingPipelineMethod = + getCreateTrainingPipelineMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreateTrainingPipeline")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.CreateTrainingPipelineRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.TrainingPipeline.getDefaultInstance())) + .setSchemaDescriptor( + new PipelineServiceMethodDescriptorSupplier("CreateTrainingPipeline")) + .build(); + } + } + } + return getCreateTrainingPipelineMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.GetTrainingPipelineRequest, + com.google.cloud.aiplatform.v1.TrainingPipeline> + getGetTrainingPipelineMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetTrainingPipeline", + requestType = com.google.cloud.aiplatform.v1.GetTrainingPipelineRequest.class, + responseType = com.google.cloud.aiplatform.v1.TrainingPipeline.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.GetTrainingPipelineRequest, + com.google.cloud.aiplatform.v1.TrainingPipeline> + getGetTrainingPipelineMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.GetTrainingPipelineRequest, + com.google.cloud.aiplatform.v1.TrainingPipeline> + getGetTrainingPipelineMethod; + if ((getGetTrainingPipelineMethod = PipelineServiceGrpc.getGetTrainingPipelineMethod) == null) { + synchronized (PipelineServiceGrpc.class) { + if ((getGetTrainingPipelineMethod = PipelineServiceGrpc.getGetTrainingPipelineMethod) + == null) { + PipelineServiceGrpc.getGetTrainingPipelineMethod = + getGetTrainingPipelineMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetTrainingPipeline")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.GetTrainingPipelineRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.TrainingPipeline.getDefaultInstance())) + .setSchemaDescriptor( + new PipelineServiceMethodDescriptorSupplier("GetTrainingPipeline")) + .build(); + } + } + } + return getGetTrainingPipelineMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ListTrainingPipelinesRequest, + com.google.cloud.aiplatform.v1.ListTrainingPipelinesResponse> + getListTrainingPipelinesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListTrainingPipelines", + requestType = com.google.cloud.aiplatform.v1.ListTrainingPipelinesRequest.class, + responseType = com.google.cloud.aiplatform.v1.ListTrainingPipelinesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ListTrainingPipelinesRequest, + com.google.cloud.aiplatform.v1.ListTrainingPipelinesResponse> + getListTrainingPipelinesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ListTrainingPipelinesRequest, + com.google.cloud.aiplatform.v1.ListTrainingPipelinesResponse> + getListTrainingPipelinesMethod; + if ((getListTrainingPipelinesMethod = PipelineServiceGrpc.getListTrainingPipelinesMethod) + == null) { + synchronized (PipelineServiceGrpc.class) { + if ((getListTrainingPipelinesMethod = PipelineServiceGrpc.getListTrainingPipelinesMethod) + == null) { + PipelineServiceGrpc.getListTrainingPipelinesMethod = + getListTrainingPipelinesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListTrainingPipelines")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.ListTrainingPipelinesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.ListTrainingPipelinesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new PipelineServiceMethodDescriptorSupplier("ListTrainingPipelines")) + .build(); + } + } + } + return getListTrainingPipelinesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.DeleteTrainingPipelineRequest, + com.google.longrunning.Operation> + getDeleteTrainingPipelineMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteTrainingPipeline", + requestType = com.google.cloud.aiplatform.v1.DeleteTrainingPipelineRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.DeleteTrainingPipelineRequest, + com.google.longrunning.Operation> + getDeleteTrainingPipelineMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.DeleteTrainingPipelineRequest, + com.google.longrunning.Operation> + getDeleteTrainingPipelineMethod; + if ((getDeleteTrainingPipelineMethod = PipelineServiceGrpc.getDeleteTrainingPipelineMethod) + == null) { + synchronized (PipelineServiceGrpc.class) { + if ((getDeleteTrainingPipelineMethod = PipelineServiceGrpc.getDeleteTrainingPipelineMethod) + == null) { + PipelineServiceGrpc.getDeleteTrainingPipelineMethod = + getDeleteTrainingPipelineMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DeleteTrainingPipeline")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.DeleteTrainingPipelineRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new PipelineServiceMethodDescriptorSupplier("DeleteTrainingPipeline")) + .build(); + } + } + } + return getDeleteTrainingPipelineMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CancelTrainingPipelineRequest, com.google.protobuf.Empty> + getCancelTrainingPipelineMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CancelTrainingPipeline", + requestType = com.google.cloud.aiplatform.v1.CancelTrainingPipelineRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CancelTrainingPipelineRequest, com.google.protobuf.Empty> + getCancelTrainingPipelineMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CancelTrainingPipelineRequest, com.google.protobuf.Empty> + getCancelTrainingPipelineMethod; + if ((getCancelTrainingPipelineMethod = PipelineServiceGrpc.getCancelTrainingPipelineMethod) + == null) { + synchronized (PipelineServiceGrpc.class) { + if ((getCancelTrainingPipelineMethod = PipelineServiceGrpc.getCancelTrainingPipelineMethod) + == null) { + PipelineServiceGrpc.getCancelTrainingPipelineMethod = + getCancelTrainingPipelineMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CancelTrainingPipeline")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.CancelTrainingPipelineRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new PipelineServiceMethodDescriptorSupplier("CancelTrainingPipeline")) + .build(); + } + } + } + return getCancelTrainingPipelineMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static PipelineServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public PipelineServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PipelineServiceStub(channel, callOptions); + } + }; + return PipelineServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static PipelineServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public PipelineServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PipelineServiceBlockingStub(channel, callOptions); + } + }; + return PipelineServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static PipelineServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public PipelineServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PipelineServiceFutureStub(channel, callOptions); + } + }; + return PipelineServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * A service for creating and managing AI Platform's pipelines.
+   * 
+ */ + public abstract static class PipelineServiceImplBase implements io.grpc.BindableService { + + /** + * + * + *
+     * Creates a TrainingPipeline. A created TrainingPipeline right away will be
+     * attempted to be run.
+     * 
+ */ + public void createTrainingPipeline( + com.google.cloud.aiplatform.v1.CreateTrainingPipelineRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getCreateTrainingPipelineMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets a TrainingPipeline.
+     * 
+ */ + public void getTrainingPipeline( + com.google.cloud.aiplatform.v1.GetTrainingPipelineRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getGetTrainingPipelineMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists TrainingPipelines in a Location.
+     * 
+ */ + public void listTrainingPipelines( + com.google.cloud.aiplatform.v1.ListTrainingPipelinesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getListTrainingPipelinesMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a TrainingPipeline.
+     * 
+ */ + public void deleteTrainingPipeline( + com.google.cloud.aiplatform.v1.DeleteTrainingPipelineRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getDeleteTrainingPipelineMethod(), responseObserver); + } + + /** + * + * + *
+     * 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 use [PipelineService.GetTrainingPipeline][google.cloud.aiplatform.v1.PipelineService.GetTrainingPipeline] or
+     * other methods to check whether the cancellation succeeded or whether the
+     * pipeline completed despite cancellation. On successful cancellation,
+     * the TrainingPipeline is not deleted; instead it becomes a pipeline with
+     * a [TrainingPipeline.error][google.cloud.aiplatform.v1.TrainingPipeline.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
+     * corresponding to `Code.CANCELLED`, and [TrainingPipeline.state][google.cloud.aiplatform.v1.TrainingPipeline.state] is set to
+     * `CANCELLED`.
+     * 
+ */ + public void cancelTrainingPipeline( + com.google.cloud.aiplatform.v1.CancelTrainingPipelineRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getCancelTrainingPipelineMethod(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getCreateTrainingPipelineMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.CreateTrainingPipelineRequest, + com.google.cloud.aiplatform.v1.TrainingPipeline>( + this, METHODID_CREATE_TRAINING_PIPELINE))) + .addMethod( + getGetTrainingPipelineMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.GetTrainingPipelineRequest, + com.google.cloud.aiplatform.v1.TrainingPipeline>( + this, METHODID_GET_TRAINING_PIPELINE))) + .addMethod( + getListTrainingPipelinesMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.ListTrainingPipelinesRequest, + com.google.cloud.aiplatform.v1.ListTrainingPipelinesResponse>( + this, METHODID_LIST_TRAINING_PIPELINES))) + .addMethod( + getDeleteTrainingPipelineMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.DeleteTrainingPipelineRequest, + com.google.longrunning.Operation>(this, METHODID_DELETE_TRAINING_PIPELINE))) + .addMethod( + getCancelTrainingPipelineMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.CancelTrainingPipelineRequest, + com.google.protobuf.Empty>(this, METHODID_CANCEL_TRAINING_PIPELINE))) + .build(); + } + } + + /** + * + * + *
+   * A service for creating and managing AI Platform's pipelines.
+   * 
+ */ + public static final class PipelineServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private PipelineServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected PipelineServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PipelineServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a TrainingPipeline. A created TrainingPipeline right away will be
+     * attempted to be run.
+     * 
+ */ + public void createTrainingPipeline( + com.google.cloud.aiplatform.v1.CreateTrainingPipelineRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getCreateTrainingPipelineMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets a TrainingPipeline.
+     * 
+ */ + public void getTrainingPipeline( + com.google.cloud.aiplatform.v1.GetTrainingPipelineRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getGetTrainingPipelineMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists TrainingPipelines in a Location.
+     * 
+ */ + public void listTrainingPipelines( + com.google.cloud.aiplatform.v1.ListTrainingPipelinesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getListTrainingPipelinesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a TrainingPipeline.
+     * 
+ */ + public void deleteTrainingPipeline( + com.google.cloud.aiplatform.v1.DeleteTrainingPipelineRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getDeleteTrainingPipelineMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * 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 use [PipelineService.GetTrainingPipeline][google.cloud.aiplatform.v1.PipelineService.GetTrainingPipeline] or
+     * other methods to check whether the cancellation succeeded or whether the
+     * pipeline completed despite cancellation. On successful cancellation,
+     * the TrainingPipeline is not deleted; instead it becomes a pipeline with
+     * a [TrainingPipeline.error][google.cloud.aiplatform.v1.TrainingPipeline.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
+     * corresponding to `Code.CANCELLED`, and [TrainingPipeline.state][google.cloud.aiplatform.v1.TrainingPipeline.state] is set to
+     * `CANCELLED`.
+     * 
+ */ + public void cancelTrainingPipeline( + com.google.cloud.aiplatform.v1.CancelTrainingPipelineRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getCancelTrainingPipelineMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * + * + *
+   * A service for creating and managing AI Platform's pipelines.
+   * 
+ */ + public static final class PipelineServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private PipelineServiceBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected PipelineServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PipelineServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a TrainingPipeline. A created TrainingPipeline right away will be
+     * attempted to be run.
+     * 
+ */ + public com.google.cloud.aiplatform.v1.TrainingPipeline createTrainingPipeline( + com.google.cloud.aiplatform.v1.CreateTrainingPipelineRequest request) { + return blockingUnaryCall( + getChannel(), getCreateTrainingPipelineMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a TrainingPipeline.
+     * 
+ */ + public com.google.cloud.aiplatform.v1.TrainingPipeline getTrainingPipeline( + com.google.cloud.aiplatform.v1.GetTrainingPipelineRequest request) { + return blockingUnaryCall( + getChannel(), getGetTrainingPipelineMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists TrainingPipelines in a Location.
+     * 
+ */ + public com.google.cloud.aiplatform.v1.ListTrainingPipelinesResponse listTrainingPipelines( + com.google.cloud.aiplatform.v1.ListTrainingPipelinesRequest request) { + return blockingUnaryCall( + getChannel(), getListTrainingPipelinesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a TrainingPipeline.
+     * 
+ */ + public com.google.longrunning.Operation deleteTrainingPipeline( + com.google.cloud.aiplatform.v1.DeleteTrainingPipelineRequest request) { + return blockingUnaryCall( + getChannel(), getDeleteTrainingPipelineMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * 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 use [PipelineService.GetTrainingPipeline][google.cloud.aiplatform.v1.PipelineService.GetTrainingPipeline] or
+     * other methods to check whether the cancellation succeeded or whether the
+     * pipeline completed despite cancellation. On successful cancellation,
+     * the TrainingPipeline is not deleted; instead it becomes a pipeline with
+     * a [TrainingPipeline.error][google.cloud.aiplatform.v1.TrainingPipeline.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
+     * corresponding to `Code.CANCELLED`, and [TrainingPipeline.state][google.cloud.aiplatform.v1.TrainingPipeline.state] is set to
+     * `CANCELLED`.
+     * 
+ */ + public com.google.protobuf.Empty cancelTrainingPipeline( + com.google.cloud.aiplatform.v1.CancelTrainingPipelineRequest request) { + return blockingUnaryCall( + getChannel(), getCancelTrainingPipelineMethod(), getCallOptions(), request); + } + } + + /** + * + * + *
+   * A service for creating and managing AI Platform's pipelines.
+   * 
+ */ + public static final class PipelineServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private PipelineServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected PipelineServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PipelineServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a TrainingPipeline. A created TrainingPipeline right away will be
+     * attempted to be run.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1.TrainingPipeline> + createTrainingPipeline( + com.google.cloud.aiplatform.v1.CreateTrainingPipelineRequest request) { + return futureUnaryCall( + getChannel().newCall(getCreateTrainingPipelineMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets a TrainingPipeline.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1.TrainingPipeline> + getTrainingPipeline(com.google.cloud.aiplatform.v1.GetTrainingPipelineRequest request) { + return futureUnaryCall( + getChannel().newCall(getGetTrainingPipelineMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists TrainingPipelines in a Location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1.ListTrainingPipelinesResponse> + listTrainingPipelines(com.google.cloud.aiplatform.v1.ListTrainingPipelinesRequest request) { + return futureUnaryCall( + getChannel().newCall(getListTrainingPipelinesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a TrainingPipeline.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteTrainingPipeline( + com.google.cloud.aiplatform.v1.DeleteTrainingPipelineRequest request) { + return futureUnaryCall( + getChannel().newCall(getDeleteTrainingPipelineMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * 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 use [PipelineService.GetTrainingPipeline][google.cloud.aiplatform.v1.PipelineService.GetTrainingPipeline] or
+     * other methods to check whether the cancellation succeeded or whether the
+     * pipeline completed despite cancellation. On successful cancellation,
+     * the TrainingPipeline is not deleted; instead it becomes a pipeline with
+     * a [TrainingPipeline.error][google.cloud.aiplatform.v1.TrainingPipeline.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
+     * corresponding to `Code.CANCELLED`, and [TrainingPipeline.state][google.cloud.aiplatform.v1.TrainingPipeline.state] is set to
+     * `CANCELLED`.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + cancelTrainingPipeline( + com.google.cloud.aiplatform.v1.CancelTrainingPipelineRequest request) { + return futureUnaryCall( + getChannel().newCall(getCancelTrainingPipelineMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_CREATE_TRAINING_PIPELINE = 0; + private static final int METHODID_GET_TRAINING_PIPELINE = 1; + private static final int METHODID_LIST_TRAINING_PIPELINES = 2; + private static final int METHODID_DELETE_TRAINING_PIPELINE = 3; + private static final int METHODID_CANCEL_TRAINING_PIPELINE = 4; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final PipelineServiceImplBase serviceImpl; + private final int methodId; + + MethodHandlers(PipelineServiceImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_CREATE_TRAINING_PIPELINE: + serviceImpl.createTrainingPipeline( + (com.google.cloud.aiplatform.v1.CreateTrainingPipelineRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_TRAINING_PIPELINE: + serviceImpl.getTrainingPipeline( + (com.google.cloud.aiplatform.v1.GetTrainingPipelineRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_TRAINING_PIPELINES: + serviceImpl.listTrainingPipelines( + (com.google.cloud.aiplatform.v1.ListTrainingPipelinesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.aiplatform.v1.ListTrainingPipelinesResponse>) + responseObserver); + break; + case METHODID_DELETE_TRAINING_PIPELINE: + serviceImpl.deleteTrainingPipeline( + (com.google.cloud.aiplatform.v1.DeleteTrainingPipelineRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CANCEL_TRAINING_PIPELINE: + serviceImpl.cancelTrainingPipeline( + (com.google.cloud.aiplatform.v1.CancelTrainingPipelineRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + private abstract static class PipelineServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + PipelineServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.aiplatform.v1.PipelineServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("PipelineService"); + } + } + + private static final class PipelineServiceFileDescriptorSupplier + extends PipelineServiceBaseDescriptorSupplier { + PipelineServiceFileDescriptorSupplier() {} + } + + private static final class PipelineServiceMethodDescriptorSupplier + extends PipelineServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + PipelineServiceMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (PipelineServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new PipelineServiceFileDescriptorSupplier()) + .addMethod(getCreateTrainingPipelineMethod()) + .addMethod(getGetTrainingPipelineMethod()) + .addMethod(getListTrainingPipelinesMethod()) + .addMethod(getDeleteTrainingPipelineMethod()) + .addMethod(getCancelTrainingPipelineMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/grpc-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PredictionServiceGrpc.java b/grpc-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PredictionServiceGrpc.java new file mode 100644 index 000000000..1be987274 --- /dev/null +++ b/grpc-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PredictionServiceGrpc.java @@ -0,0 +1,360 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; +import static io.grpc.stub.ClientCalls.asyncUnaryCall; +import static io.grpc.stub.ClientCalls.blockingUnaryCall; +import static io.grpc.stub.ClientCalls.futureUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; + +/** + * + * + *
+ * A service for online predictions and explanations.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/aiplatform/v1/prediction_service.proto") +public final class PredictionServiceGrpc { + + private PredictionServiceGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.aiplatform.v1.PredictionService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.PredictRequest, + com.google.cloud.aiplatform.v1.PredictResponse> + getPredictMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "Predict", + requestType = com.google.cloud.aiplatform.v1.PredictRequest.class, + responseType = com.google.cloud.aiplatform.v1.PredictResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.PredictRequest, + com.google.cloud.aiplatform.v1.PredictResponse> + getPredictMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.PredictRequest, + com.google.cloud.aiplatform.v1.PredictResponse> + getPredictMethod; + if ((getPredictMethod = PredictionServiceGrpc.getPredictMethod) == null) { + synchronized (PredictionServiceGrpc.class) { + if ((getPredictMethod = PredictionServiceGrpc.getPredictMethod) == null) { + PredictionServiceGrpc.getPredictMethod = + getPredictMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Predict")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.PredictRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.PredictResponse.getDefaultInstance())) + .setSchemaDescriptor(new PredictionServiceMethodDescriptorSupplier("Predict")) + .build(); + } + } + } + return getPredictMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static PredictionServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public PredictionServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PredictionServiceStub(channel, callOptions); + } + }; + return PredictionServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static PredictionServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public PredictionServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PredictionServiceBlockingStub(channel, callOptions); + } + }; + return PredictionServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static PredictionServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public PredictionServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PredictionServiceFutureStub(channel, callOptions); + } + }; + return PredictionServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * A service for online predictions and explanations.
+   * 
+ */ + public abstract static class PredictionServiceImplBase implements io.grpc.BindableService { + + /** + * + * + *
+     * Perform an online prediction.
+     * 
+ */ + public void predict( + com.google.cloud.aiplatform.v1.PredictRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getPredictMethod(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getPredictMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.PredictRequest, + com.google.cloud.aiplatform.v1.PredictResponse>(this, METHODID_PREDICT))) + .build(); + } + } + + /** + * + * + *
+   * A service for online predictions and explanations.
+   * 
+ */ + public static final class PredictionServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private PredictionServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected PredictionServiceStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PredictionServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * Perform an online prediction.
+     * 
+ */ + public void predict( + com.google.cloud.aiplatform.v1.PredictRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getPredictMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + * + * + *
+   * A service for online predictions and explanations.
+   * 
+ */ + public static final class PredictionServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private PredictionServiceBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected PredictionServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PredictionServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Perform an online prediction.
+     * 
+ */ + public com.google.cloud.aiplatform.v1.PredictResponse predict( + com.google.cloud.aiplatform.v1.PredictRequest request) { + return blockingUnaryCall(getChannel(), getPredictMethod(), getCallOptions(), request); + } + } + + /** + * + * + *
+   * A service for online predictions and explanations.
+   * 
+ */ + public static final class PredictionServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private PredictionServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected PredictionServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PredictionServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Perform an online prediction.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1.PredictResponse> + predict(com.google.cloud.aiplatform.v1.PredictRequest request) { + return futureUnaryCall(getChannel().newCall(getPredictMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_PREDICT = 0; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final PredictionServiceImplBase serviceImpl; + private final int methodId; + + MethodHandlers(PredictionServiceImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_PREDICT: + serviceImpl.predict( + (com.google.cloud.aiplatform.v1.PredictRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + private abstract static class PredictionServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + PredictionServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.aiplatform.v1.PredictionServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("PredictionService"); + } + } + + private static final class PredictionServiceFileDescriptorSupplier + extends PredictionServiceBaseDescriptorSupplier { + PredictionServiceFileDescriptorSupplier() {} + } + + private static final class PredictionServiceMethodDescriptorSupplier + extends PredictionServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + PredictionServiceMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (PredictionServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new PredictionServiceFileDescriptorSupplier()) + .addMethod(getPredictMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/grpc-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SpecialistPoolServiceGrpc.java b/grpc-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SpecialistPoolServiceGrpc.java new file mode 100644 index 000000000..8eb3880f4 --- /dev/null +++ b/grpc-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SpecialistPoolServiceGrpc.java @@ -0,0 +1,873 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; +import static io.grpc.stub.ClientCalls.asyncUnaryCall; +import static io.grpc.stub.ClientCalls.blockingUnaryCall; +import static io.grpc.stub.ClientCalls.futureUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; + +/** + * + * + *
+ * 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 to label the data.
+ * Customers can add/remove Managers for the Specialist Pool on Cloud console,
+ * then Managers will get email notifications to manage Specialists and tasks on
+ * CrowdCompute console.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/aiplatform/v1/specialist_pool_service.proto") +public final class SpecialistPoolServiceGrpc { + + private SpecialistPoolServiceGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.aiplatform.v1.SpecialistPoolService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CreateSpecialistPoolRequest, + com.google.longrunning.Operation> + getCreateSpecialistPoolMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateSpecialistPool", + requestType = com.google.cloud.aiplatform.v1.CreateSpecialistPoolRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CreateSpecialistPoolRequest, + com.google.longrunning.Operation> + getCreateSpecialistPoolMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CreateSpecialistPoolRequest, + com.google.longrunning.Operation> + getCreateSpecialistPoolMethod; + if ((getCreateSpecialistPoolMethod = SpecialistPoolServiceGrpc.getCreateSpecialistPoolMethod) + == null) { + synchronized (SpecialistPoolServiceGrpc.class) { + if ((getCreateSpecialistPoolMethod = + SpecialistPoolServiceGrpc.getCreateSpecialistPoolMethod) + == null) { + SpecialistPoolServiceGrpc.getCreateSpecialistPoolMethod = + getCreateSpecialistPoolMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreateSpecialistPool")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.CreateSpecialistPoolRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new SpecialistPoolServiceMethodDescriptorSupplier("CreateSpecialistPool")) + .build(); + } + } + } + return getCreateSpecialistPoolMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.GetSpecialistPoolRequest, + com.google.cloud.aiplatform.v1.SpecialistPool> + getGetSpecialistPoolMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetSpecialistPool", + requestType = com.google.cloud.aiplatform.v1.GetSpecialistPoolRequest.class, + responseType = com.google.cloud.aiplatform.v1.SpecialistPool.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.GetSpecialistPoolRequest, + com.google.cloud.aiplatform.v1.SpecialistPool> + getGetSpecialistPoolMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.GetSpecialistPoolRequest, + com.google.cloud.aiplatform.v1.SpecialistPool> + getGetSpecialistPoolMethod; + if ((getGetSpecialistPoolMethod = SpecialistPoolServiceGrpc.getGetSpecialistPoolMethod) + == null) { + synchronized (SpecialistPoolServiceGrpc.class) { + if ((getGetSpecialistPoolMethod = SpecialistPoolServiceGrpc.getGetSpecialistPoolMethod) + == null) { + SpecialistPoolServiceGrpc.getGetSpecialistPoolMethod = + getGetSpecialistPoolMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetSpecialistPool")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.GetSpecialistPoolRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.SpecialistPool.getDefaultInstance())) + .setSchemaDescriptor( + new SpecialistPoolServiceMethodDescriptorSupplier("GetSpecialistPool")) + .build(); + } + } + } + return getGetSpecialistPoolMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ListSpecialistPoolsRequest, + com.google.cloud.aiplatform.v1.ListSpecialistPoolsResponse> + getListSpecialistPoolsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListSpecialistPools", + requestType = com.google.cloud.aiplatform.v1.ListSpecialistPoolsRequest.class, + responseType = com.google.cloud.aiplatform.v1.ListSpecialistPoolsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ListSpecialistPoolsRequest, + com.google.cloud.aiplatform.v1.ListSpecialistPoolsResponse> + getListSpecialistPoolsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ListSpecialistPoolsRequest, + com.google.cloud.aiplatform.v1.ListSpecialistPoolsResponse> + getListSpecialistPoolsMethod; + if ((getListSpecialistPoolsMethod = SpecialistPoolServiceGrpc.getListSpecialistPoolsMethod) + == null) { + synchronized (SpecialistPoolServiceGrpc.class) { + if ((getListSpecialistPoolsMethod = SpecialistPoolServiceGrpc.getListSpecialistPoolsMethod) + == null) { + SpecialistPoolServiceGrpc.getListSpecialistPoolsMethod = + getListSpecialistPoolsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListSpecialistPools")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.ListSpecialistPoolsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.ListSpecialistPoolsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new SpecialistPoolServiceMethodDescriptorSupplier("ListSpecialistPools")) + .build(); + } + } + } + return getListSpecialistPoolsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.DeleteSpecialistPoolRequest, + com.google.longrunning.Operation> + getDeleteSpecialistPoolMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteSpecialistPool", + requestType = com.google.cloud.aiplatform.v1.DeleteSpecialistPoolRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.DeleteSpecialistPoolRequest, + com.google.longrunning.Operation> + getDeleteSpecialistPoolMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.DeleteSpecialistPoolRequest, + com.google.longrunning.Operation> + getDeleteSpecialistPoolMethod; + if ((getDeleteSpecialistPoolMethod = SpecialistPoolServiceGrpc.getDeleteSpecialistPoolMethod) + == null) { + synchronized (SpecialistPoolServiceGrpc.class) { + if ((getDeleteSpecialistPoolMethod = + SpecialistPoolServiceGrpc.getDeleteSpecialistPoolMethod) + == null) { + SpecialistPoolServiceGrpc.getDeleteSpecialistPoolMethod = + getDeleteSpecialistPoolMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DeleteSpecialistPool")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.DeleteSpecialistPoolRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new SpecialistPoolServiceMethodDescriptorSupplier("DeleteSpecialistPool")) + .build(); + } + } + } + return getDeleteSpecialistPoolMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.UpdateSpecialistPoolRequest, + com.google.longrunning.Operation> + getUpdateSpecialistPoolMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateSpecialistPool", + requestType = com.google.cloud.aiplatform.v1.UpdateSpecialistPoolRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.UpdateSpecialistPoolRequest, + com.google.longrunning.Operation> + getUpdateSpecialistPoolMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.UpdateSpecialistPoolRequest, + com.google.longrunning.Operation> + getUpdateSpecialistPoolMethod; + if ((getUpdateSpecialistPoolMethod = SpecialistPoolServiceGrpc.getUpdateSpecialistPoolMethod) + == null) { + synchronized (SpecialistPoolServiceGrpc.class) { + if ((getUpdateSpecialistPoolMethod = + SpecialistPoolServiceGrpc.getUpdateSpecialistPoolMethod) + == null) { + SpecialistPoolServiceGrpc.getUpdateSpecialistPoolMethod = + getUpdateSpecialistPoolMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "UpdateSpecialistPool")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.UpdateSpecialistPoolRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new SpecialistPoolServiceMethodDescriptorSupplier("UpdateSpecialistPool")) + .build(); + } + } + } + return getUpdateSpecialistPoolMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static SpecialistPoolServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public SpecialistPoolServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SpecialistPoolServiceStub(channel, callOptions); + } + }; + return SpecialistPoolServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static SpecialistPoolServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public SpecialistPoolServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SpecialistPoolServiceBlockingStub(channel, callOptions); + } + }; + return SpecialistPoolServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static SpecialistPoolServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public SpecialistPoolServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SpecialistPoolServiceFutureStub(channel, callOptions); + } + }; + return SpecialistPoolServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * 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 to label the data.
+   * Customers can add/remove Managers for the Specialist Pool on Cloud console,
+   * then Managers will get email notifications to manage Specialists and tasks on
+   * CrowdCompute console.
+   * 
+ */ + public abstract static class SpecialistPoolServiceImplBase implements io.grpc.BindableService { + + /** + * + * + *
+     * Creates a SpecialistPool.
+     * 
+ */ + public void createSpecialistPool( + com.google.cloud.aiplatform.v1.CreateSpecialistPoolRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getCreateSpecialistPoolMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets a SpecialistPool.
+     * 
+ */ + public void getSpecialistPool( + com.google.cloud.aiplatform.v1.GetSpecialistPoolRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getGetSpecialistPoolMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists SpecialistPools in a Location.
+     * 
+ */ + public void listSpecialistPools( + com.google.cloud.aiplatform.v1.ListSpecialistPoolsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getListSpecialistPoolsMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a SpecialistPool as well as all Specialists in the pool.
+     * 
+ */ + public void deleteSpecialistPool( + com.google.cloud.aiplatform.v1.DeleteSpecialistPoolRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getDeleteSpecialistPoolMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates a SpecialistPool.
+     * 
+ */ + public void updateSpecialistPool( + com.google.cloud.aiplatform.v1.UpdateSpecialistPoolRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getUpdateSpecialistPoolMethod(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getCreateSpecialistPoolMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.CreateSpecialistPoolRequest, + com.google.longrunning.Operation>(this, METHODID_CREATE_SPECIALIST_POOL))) + .addMethod( + getGetSpecialistPoolMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.GetSpecialistPoolRequest, + com.google.cloud.aiplatform.v1.SpecialistPool>( + this, METHODID_GET_SPECIALIST_POOL))) + .addMethod( + getListSpecialistPoolsMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.ListSpecialistPoolsRequest, + com.google.cloud.aiplatform.v1.ListSpecialistPoolsResponse>( + this, METHODID_LIST_SPECIALIST_POOLS))) + .addMethod( + getDeleteSpecialistPoolMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.DeleteSpecialistPoolRequest, + com.google.longrunning.Operation>(this, METHODID_DELETE_SPECIALIST_POOL))) + .addMethod( + getUpdateSpecialistPoolMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.UpdateSpecialistPoolRequest, + com.google.longrunning.Operation>(this, METHODID_UPDATE_SPECIALIST_POOL))) + .build(); + } + } + + /** + * + * + *
+   * 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 to label the data.
+   * Customers can add/remove Managers for the Specialist Pool on Cloud console,
+   * then Managers will get email notifications to manage Specialists and tasks on
+   * CrowdCompute console.
+   * 
+ */ + public static final class SpecialistPoolServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private SpecialistPoolServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected SpecialistPoolServiceStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SpecialistPoolServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a SpecialistPool.
+     * 
+ */ + public void createSpecialistPool( + com.google.cloud.aiplatform.v1.CreateSpecialistPoolRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getCreateSpecialistPoolMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets a SpecialistPool.
+     * 
+ */ + public void getSpecialistPool( + com.google.cloud.aiplatform.v1.GetSpecialistPoolRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getGetSpecialistPoolMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists SpecialistPools in a Location.
+     * 
+ */ + public void listSpecialistPools( + com.google.cloud.aiplatform.v1.ListSpecialistPoolsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getListSpecialistPoolsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a SpecialistPool as well as all Specialists in the pool.
+     * 
+ */ + public void deleteSpecialistPool( + com.google.cloud.aiplatform.v1.DeleteSpecialistPoolRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getDeleteSpecialistPoolMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates a SpecialistPool.
+     * 
+ */ + public void updateSpecialistPool( + com.google.cloud.aiplatform.v1.UpdateSpecialistPoolRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getUpdateSpecialistPoolMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * + * + *
+   * 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 to label the data.
+   * Customers can add/remove Managers for the Specialist Pool on Cloud console,
+   * then Managers will get email notifications to manage Specialists and tasks on
+   * CrowdCompute console.
+   * 
+ */ + public static final class SpecialistPoolServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private SpecialistPoolServiceBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected SpecialistPoolServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SpecialistPoolServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a SpecialistPool.
+     * 
+ */ + public com.google.longrunning.Operation createSpecialistPool( + com.google.cloud.aiplatform.v1.CreateSpecialistPoolRequest request) { + return blockingUnaryCall( + getChannel(), getCreateSpecialistPoolMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a SpecialistPool.
+     * 
+ */ + public com.google.cloud.aiplatform.v1.SpecialistPool getSpecialistPool( + com.google.cloud.aiplatform.v1.GetSpecialistPoolRequest request) { + return blockingUnaryCall( + getChannel(), getGetSpecialistPoolMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists SpecialistPools in a Location.
+     * 
+ */ + public com.google.cloud.aiplatform.v1.ListSpecialistPoolsResponse listSpecialistPools( + com.google.cloud.aiplatform.v1.ListSpecialistPoolsRequest request) { + return blockingUnaryCall( + getChannel(), getListSpecialistPoolsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a SpecialistPool as well as all Specialists in the pool.
+     * 
+ */ + public com.google.longrunning.Operation deleteSpecialistPool( + com.google.cloud.aiplatform.v1.DeleteSpecialistPoolRequest request) { + return blockingUnaryCall( + getChannel(), getDeleteSpecialistPoolMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates a SpecialistPool.
+     * 
+ */ + public com.google.longrunning.Operation updateSpecialistPool( + com.google.cloud.aiplatform.v1.UpdateSpecialistPoolRequest request) { + return blockingUnaryCall( + getChannel(), getUpdateSpecialistPoolMethod(), getCallOptions(), request); + } + } + + /** + * + * + *
+   * 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 to label the data.
+   * Customers can add/remove Managers for the Specialist Pool on Cloud console,
+   * then Managers will get email notifications to manage Specialists and tasks on
+   * CrowdCompute console.
+   * 
+ */ + public static final class SpecialistPoolServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private SpecialistPoolServiceFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected SpecialistPoolServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SpecialistPoolServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a SpecialistPool.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createSpecialistPool(com.google.cloud.aiplatform.v1.CreateSpecialistPoolRequest request) { + return futureUnaryCall( + getChannel().newCall(getCreateSpecialistPoolMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets a SpecialistPool.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1.SpecialistPool> + getSpecialistPool(com.google.cloud.aiplatform.v1.GetSpecialistPoolRequest request) { + return futureUnaryCall( + getChannel().newCall(getGetSpecialistPoolMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists SpecialistPools in a Location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1.ListSpecialistPoolsResponse> + listSpecialistPools(com.google.cloud.aiplatform.v1.ListSpecialistPoolsRequest request) { + return futureUnaryCall( + getChannel().newCall(getListSpecialistPoolsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a SpecialistPool as well as all Specialists in the pool.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteSpecialistPool(com.google.cloud.aiplatform.v1.DeleteSpecialistPoolRequest request) { + return futureUnaryCall( + getChannel().newCall(getDeleteSpecialistPoolMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates a SpecialistPool.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateSpecialistPool(com.google.cloud.aiplatform.v1.UpdateSpecialistPoolRequest request) { + return futureUnaryCall( + getChannel().newCall(getUpdateSpecialistPoolMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_CREATE_SPECIALIST_POOL = 0; + private static final int METHODID_GET_SPECIALIST_POOL = 1; + private static final int METHODID_LIST_SPECIALIST_POOLS = 2; + private static final int METHODID_DELETE_SPECIALIST_POOL = 3; + private static final int METHODID_UPDATE_SPECIALIST_POOL = 4; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final SpecialistPoolServiceImplBase serviceImpl; + private final int methodId; + + MethodHandlers(SpecialistPoolServiceImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_CREATE_SPECIALIST_POOL: + serviceImpl.createSpecialistPool( + (com.google.cloud.aiplatform.v1.CreateSpecialistPoolRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_SPECIALIST_POOL: + serviceImpl.getSpecialistPool( + (com.google.cloud.aiplatform.v1.GetSpecialistPoolRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_SPECIALIST_POOLS: + serviceImpl.listSpecialistPools( + (com.google.cloud.aiplatform.v1.ListSpecialistPoolsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.aiplatform.v1.ListSpecialistPoolsResponse>) + responseObserver); + break; + case METHODID_DELETE_SPECIALIST_POOL: + serviceImpl.deleteSpecialistPool( + (com.google.cloud.aiplatform.v1.DeleteSpecialistPoolRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_SPECIALIST_POOL: + serviceImpl.updateSpecialistPool( + (com.google.cloud.aiplatform.v1.UpdateSpecialistPoolRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + private abstract static class SpecialistPoolServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + SpecialistPoolServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.aiplatform.v1.SpecialistPoolServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("SpecialistPoolService"); + } + } + + private static final class SpecialistPoolServiceFileDescriptorSupplier + extends SpecialistPoolServiceBaseDescriptorSupplier { + SpecialistPoolServiceFileDescriptorSupplier() {} + } + + private static final class SpecialistPoolServiceMethodDescriptorSupplier + extends SpecialistPoolServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + SpecialistPoolServiceMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (SpecialistPoolServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new SpecialistPoolServiceFileDescriptorSupplier()) + .addMethod(getCreateSpecialistPoolMethod()) + .addMethod(getGetSpecialistPoolMethod()) + .addMethod(getListSpecialistPoolsMethod()) + .addMethod(getDeleteSpecialistPoolMethod()) + .addMethod(getUpdateSpecialistPoolMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/grpc-google-cloud-aiplatform-v1beta1/pom.xml b/grpc-google-cloud-aiplatform-v1beta1/pom.xml index 797caade2..3c9738c5b 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.2.0 + 0.3.0 grpc-google-cloud-aiplatform-v1beta1 GRPC library for google-cloud-aiplatform com.google.cloud google-cloud-aiplatform-parent - 0.2.0 + 0.3.0 diff --git a/pom.xml b/pom.xml index be0293a9c..0b71b5176 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-aiplatform-parent pom - 0.2.0 + 0.3.0 Google AI Platform Parent https://github.com/googleapis/java- @@ -14,7 +14,7 @@ com.google.cloud google-cloud-shared-config - 0.9.4 + 0.11.0 @@ -38,7 +38,7 @@ HEAD - https://github.com/googleapis/java-/issues + https://github.com/googleapis/java-aiplatform/issues GitHub Issues @@ -70,23 +70,32 @@ com.google.cloud google-cloud-aiplatform - 0.2.0 + 0.3.0 + + + com.google.api.grpc + proto-google-cloud-aiplatform-v1 + 0.3.0 com.google.api.grpc proto-google-cloud-aiplatform-v1beta1 - 0.2.0 + 0.3.0 + + + com.google.api.grpc + grpc-google-cloud-aiplatform-v1 + 0.3.0 com.google.api.grpc grpc-google-cloud-aiplatform-v1beta1 - 0.2.0 + 0.3.0 - com.google.cloud google-cloud-shared-dependencies - 0.17.0 + 0.20.0 pom import @@ -113,7 +122,9 @@ google-cloud-aiplatform proto-google-cloud-aiplatform-v1beta1 + proto-google-cloud-aiplatform-v1 grpc-google-cloud-aiplatform-v1beta1 + grpc-google-cloud-aiplatform-v1 google-cloud-aiplatform-bom @@ -186,4 +197,4 @@ - \ No newline at end of file + diff --git a/proto-google-cloud-aiplatform-v1/pom.xml b/proto-google-cloud-aiplatform-v1/pom.xml new file mode 100644 index 000000000..9714764a4 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/pom.xml @@ -0,0 +1,42 @@ + + 4.0.0 + com.google.api.grpc + proto-google-cloud-aiplatform-v1 + 0.3.0 + proto-google-cloud-aiplatform-v1 + Proto library for google-cloud-aiplatform + + com.google.cloud + google-cloud-aiplatform-parent + 0.3.0 + + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api + api-common + + + com.google.guava + guava + + + + + + + org.codehaus.mojo + flatten-maven-plugin + + + + \ No newline at end of file diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/AcceleratorType.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/AcceleratorType.java new file mode 100644 index 000000000..e166dfd3d --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/AcceleratorType.java @@ -0,0 +1,288 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/accelerator_type.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Represents a hardware accelerator type.
+ * 
+ * + * Protobuf enum {@code google.cloud.aiplatform.v1.AcceleratorType} + */ +public enum AcceleratorType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Unspecified accelerator type, which means no accelerator.
+   * 
+ * + * ACCELERATOR_TYPE_UNSPECIFIED = 0; + */ + ACCELERATOR_TYPE_UNSPECIFIED(0), + /** + * + * + *
+   * Nvidia Tesla K80 GPU.
+   * 
+ * + * NVIDIA_TESLA_K80 = 1; + */ + NVIDIA_TESLA_K80(1), + /** + * + * + *
+   * Nvidia Tesla P100 GPU.
+   * 
+ * + * NVIDIA_TESLA_P100 = 2; + */ + NVIDIA_TESLA_P100(2), + /** + * + * + *
+   * Nvidia Tesla V100 GPU.
+   * 
+ * + * NVIDIA_TESLA_V100 = 3; + */ + NVIDIA_TESLA_V100(3), + /** + * + * + *
+   * Nvidia Tesla P4 GPU.
+   * 
+ * + * NVIDIA_TESLA_P4 = 4; + */ + NVIDIA_TESLA_P4(4), + /** + * + * + *
+   * Nvidia Tesla T4 GPU.
+   * 
+ * + * NVIDIA_TESLA_T4 = 5; + */ + NVIDIA_TESLA_T4(5), + /** + * + * + *
+   * TPU v2.
+   * 
+ * + * TPU_V2 = 6; + */ + TPU_V2(6), + /** + * + * + *
+   * TPU v3.
+   * 
+ * + * TPU_V3 = 7; + */ + TPU_V3(7), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Unspecified accelerator type, which means no accelerator.
+   * 
+ * + * ACCELERATOR_TYPE_UNSPECIFIED = 0; + */ + public static final int ACCELERATOR_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * Nvidia Tesla K80 GPU.
+   * 
+ * + * NVIDIA_TESLA_K80 = 1; + */ + public static final int NVIDIA_TESLA_K80_VALUE = 1; + /** + * + * + *
+   * Nvidia Tesla P100 GPU.
+   * 
+ * + * NVIDIA_TESLA_P100 = 2; + */ + public static final int NVIDIA_TESLA_P100_VALUE = 2; + /** + * + * + *
+   * Nvidia Tesla V100 GPU.
+   * 
+ * + * NVIDIA_TESLA_V100 = 3; + */ + public static final int NVIDIA_TESLA_V100_VALUE = 3; + /** + * + * + *
+   * Nvidia Tesla P4 GPU.
+   * 
+ * + * NVIDIA_TESLA_P4 = 4; + */ + public static final int NVIDIA_TESLA_P4_VALUE = 4; + /** + * + * + *
+   * Nvidia Tesla T4 GPU.
+   * 
+ * + * NVIDIA_TESLA_T4 = 5; + */ + public static final int NVIDIA_TESLA_T4_VALUE = 5; + /** + * + * + *
+   * TPU v2.
+   * 
+ * + * TPU_V2 = 6; + */ + public static final int TPU_V2_VALUE = 6; + /** + * + * + *
+   * TPU v3.
+   * 
+ * + * TPU_V3 = 7; + */ + public static final int TPU_V3_VALUE = 7; + + 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 AcceleratorType 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 AcceleratorType forNumber(int value) { + switch (value) { + case 0: + return ACCELERATOR_TYPE_UNSPECIFIED; + case 1: + return NVIDIA_TESLA_K80; + case 2: + return NVIDIA_TESLA_P100; + case 3: + return NVIDIA_TESLA_V100; + case 4: + return NVIDIA_TESLA_P4; + case 5: + return NVIDIA_TESLA_T4; + case 6: + return TPU_V2; + case 7: + return TPU_V3; + 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 AcceleratorType findValueByNumber(int number) { + return AcceleratorType.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.v1.AcceleratorTypeProto.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final AcceleratorType[] VALUES = values(); + + public static AcceleratorType 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 AcceleratorType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.aiplatform.v1.AcceleratorType) +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/AcceleratorTypeProto.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/AcceleratorTypeProto.java new file mode 100644 index 000000000..75c321f49 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/AcceleratorTypeProto.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/v1/accelerator_type.proto + +package com.google.cloud.aiplatform.v1; + +public final class AcceleratorTypeProto { + private AcceleratorTypeProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n1google/cloud/aiplatform/v1/accelerator" + + "_type.proto\022\032google.cloud.aiplatform.v1\032" + + "\034google/api/annotations.proto*\271\001\n\017Accele" + + "ratorType\022 \n\034ACCELERATOR_TYPE_UNSPECIFIE" + + "D\020\000\022\024\n\020NVIDIA_TESLA_K80\020\001\022\025\n\021NVIDIA_TESL" + + "A_P100\020\002\022\025\n\021NVIDIA_TESLA_V100\020\003\022\023\n\017NVIDI" + + "A_TESLA_P4\020\004\022\023\n\017NVIDIA_TESLA_T4\020\005\022\n\n\006TPU" + + "_V2\020\006\022\n\n\006TPU_V3\020\007B~\n\036com.google.cloud.ai" + + "platform.v1B\024AcceleratorTypeProtoP\001ZDgoo" + + "gle.golang.org/genproto/googleapis/cloud" + + "/aiplatform/v1;aiplatformb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + }); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ActiveLearningConfig.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ActiveLearningConfig.java new file mode 100644 index 000000000..9aaef0687 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ActiveLearningConfig.java @@ -0,0 +1,1339 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/data_labeling_job.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Parameters that configure the active learning pipeline. Active learning will
+ *  label the data incrementally by several iterations. For every iteration, it
+ *  will select a batch of data based on the sampling strategy.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ActiveLearningConfig} + */ +public final class ActiveLearningConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ActiveLearningConfig) + ActiveLearningConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use ActiveLearningConfig.newBuilder() to construct. + private ActiveLearningConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ActiveLearningConfig() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ActiveLearningConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ActiveLearningConfig( + 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: + { + humanLabelingBudgetCase_ = 1; + humanLabelingBudget_ = input.readInt64(); + break; + } + case 16: + { + humanLabelingBudgetCase_ = 2; + humanLabelingBudget_ = input.readInt32(); + break; + } + case 26: + { + com.google.cloud.aiplatform.v1.SampleConfig.Builder subBuilder = null; + if (sampleConfig_ != null) { + subBuilder = sampleConfig_.toBuilder(); + } + sampleConfig_ = + input.readMessage( + com.google.cloud.aiplatform.v1.SampleConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(sampleConfig_); + sampleConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + com.google.cloud.aiplatform.v1.TrainingConfig.Builder subBuilder = null; + if (trainingConfig_ != null) { + subBuilder = trainingConfig_.toBuilder(); + } + trainingConfig_ = + input.readMessage( + com.google.cloud.aiplatform.v1.TrainingConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(trainingConfig_); + trainingConfig_ = 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.v1.DataLabelingJobProto + .internal_static_google_cloud_aiplatform_v1_ActiveLearningConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.DataLabelingJobProto + .internal_static_google_cloud_aiplatform_v1_ActiveLearningConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ActiveLearningConfig.class, + com.google.cloud.aiplatform.v1.ActiveLearningConfig.Builder.class); + } + + private int humanLabelingBudgetCase_ = 0; + private java.lang.Object humanLabelingBudget_; + + public enum HumanLabelingBudgetCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + MAX_DATA_ITEM_COUNT(1), + MAX_DATA_ITEM_PERCENTAGE(2), + HUMANLABELINGBUDGET_NOT_SET(0); + private final int value; + + private HumanLabelingBudgetCase(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 HumanLabelingBudgetCase valueOf(int value) { + return forNumber(value); + } + + public static HumanLabelingBudgetCase forNumber(int value) { + switch (value) { + case 1: + return MAX_DATA_ITEM_COUNT; + case 2: + return MAX_DATA_ITEM_PERCENTAGE; + case 0: + return HUMANLABELINGBUDGET_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public HumanLabelingBudgetCase getHumanLabelingBudgetCase() { + return HumanLabelingBudgetCase.forNumber(humanLabelingBudgetCase_); + } + + public static final int MAX_DATA_ITEM_COUNT_FIELD_NUMBER = 1; + /** + * + * + *
+   * Max number of human labeled DataItems.
+   * 
+ * + * int64 max_data_item_count = 1; + * + * @return The maxDataItemCount. + */ + @java.lang.Override + public long getMaxDataItemCount() { + if (humanLabelingBudgetCase_ == 1) { + return (java.lang.Long) humanLabelingBudget_; + } + return 0L; + } + + public static final int MAX_DATA_ITEM_PERCENTAGE_FIELD_NUMBER = 2; + /** + * + * + *
+   * Max percent of total DataItems for human labeling.
+   * 
+ * + * int32 max_data_item_percentage = 2; + * + * @return The maxDataItemPercentage. + */ + @java.lang.Override + public int getMaxDataItemPercentage() { + if (humanLabelingBudgetCase_ == 2) { + return (java.lang.Integer) humanLabelingBudget_; + } + return 0; + } + + public static final int SAMPLE_CONFIG_FIELD_NUMBER = 3; + private com.google.cloud.aiplatform.v1.SampleConfig sampleConfig_; + /** + * + * + *
+   * Active learning data sampling config. For every active learning labeling
+   * iteration, it will select a batch of data based on the sampling strategy.
+   * 
+ * + * .google.cloud.aiplatform.v1.SampleConfig sample_config = 3; + * + * @return Whether the sampleConfig field is set. + */ + @java.lang.Override + public boolean hasSampleConfig() { + return sampleConfig_ != null; + } + /** + * + * + *
+   * Active learning data sampling config. For every active learning labeling
+   * iteration, it will select a batch of data based on the sampling strategy.
+   * 
+ * + * .google.cloud.aiplatform.v1.SampleConfig sample_config = 3; + * + * @return The sampleConfig. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.SampleConfig getSampleConfig() { + return sampleConfig_ == null + ? com.google.cloud.aiplatform.v1.SampleConfig.getDefaultInstance() + : sampleConfig_; + } + /** + * + * + *
+   * Active learning data sampling config. For every active learning labeling
+   * iteration, it will select a batch of data based on the sampling strategy.
+   * 
+ * + * .google.cloud.aiplatform.v1.SampleConfig sample_config = 3; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.SampleConfigOrBuilder getSampleConfigOrBuilder() { + return getSampleConfig(); + } + + public static final int TRAINING_CONFIG_FIELD_NUMBER = 4; + private com.google.cloud.aiplatform.v1.TrainingConfig trainingConfig_; + /** + * + * + *
+   * CMLE training config. For every active learning labeling iteration, system
+   * will train a machine learning model on CMLE. The trained model will be used
+   * by data sampling algorithm to select DataItems.
+   * 
+ * + * .google.cloud.aiplatform.v1.TrainingConfig training_config = 4; + * + * @return Whether the trainingConfig field is set. + */ + @java.lang.Override + public boolean hasTrainingConfig() { + return trainingConfig_ != null; + } + /** + * + * + *
+   * CMLE training config. For every active learning labeling iteration, system
+   * will train a machine learning model on CMLE. The trained model will be used
+   * by data sampling algorithm to select DataItems.
+   * 
+ * + * .google.cloud.aiplatform.v1.TrainingConfig training_config = 4; + * + * @return The trainingConfig. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.TrainingConfig getTrainingConfig() { + return trainingConfig_ == null + ? com.google.cloud.aiplatform.v1.TrainingConfig.getDefaultInstance() + : trainingConfig_; + } + /** + * + * + *
+   * CMLE training config. For every active learning labeling iteration, system
+   * will train a machine learning model on CMLE. The trained model will be used
+   * by data sampling algorithm to select DataItems.
+   * 
+ * + * .google.cloud.aiplatform.v1.TrainingConfig training_config = 4; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.TrainingConfigOrBuilder getTrainingConfigOrBuilder() { + return getTrainingConfig(); + } + + 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 (humanLabelingBudgetCase_ == 1) { + output.writeInt64(1, (long) ((java.lang.Long) humanLabelingBudget_)); + } + if (humanLabelingBudgetCase_ == 2) { + output.writeInt32(2, (int) ((java.lang.Integer) humanLabelingBudget_)); + } + if (sampleConfig_ != null) { + output.writeMessage(3, getSampleConfig()); + } + if (trainingConfig_ != null) { + output.writeMessage(4, getTrainingConfig()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (humanLabelingBudgetCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeInt64Size( + 1, (long) ((java.lang.Long) humanLabelingBudget_)); + } + if (humanLabelingBudgetCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeInt32Size( + 2, (int) ((java.lang.Integer) humanLabelingBudget_)); + } + if (sampleConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getSampleConfig()); + } + if (trainingConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getTrainingConfig()); + } + 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.v1.ActiveLearningConfig)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ActiveLearningConfig other = + (com.google.cloud.aiplatform.v1.ActiveLearningConfig) obj; + + if (hasSampleConfig() != other.hasSampleConfig()) return false; + if (hasSampleConfig()) { + if (!getSampleConfig().equals(other.getSampleConfig())) return false; + } + if (hasTrainingConfig() != other.hasTrainingConfig()) return false; + if (hasTrainingConfig()) { + if (!getTrainingConfig().equals(other.getTrainingConfig())) return false; + } + if (!getHumanLabelingBudgetCase().equals(other.getHumanLabelingBudgetCase())) return false; + switch (humanLabelingBudgetCase_) { + case 1: + if (getMaxDataItemCount() != other.getMaxDataItemCount()) return false; + break; + case 2: + if (getMaxDataItemPercentage() != other.getMaxDataItemPercentage()) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasSampleConfig()) { + hash = (37 * hash) + SAMPLE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getSampleConfig().hashCode(); + } + if (hasTrainingConfig()) { + hash = (37 * hash) + TRAINING_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getTrainingConfig().hashCode(); + } + switch (humanLabelingBudgetCase_) { + case 1: + hash = (37 * hash) + MAX_DATA_ITEM_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getMaxDataItemCount()); + break; + case 2: + hash = (37 * hash) + MAX_DATA_ITEM_PERCENTAGE_FIELD_NUMBER; + hash = (53 * hash) + getMaxDataItemPercentage(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.ActiveLearningConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ActiveLearningConfig 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.v1.ActiveLearningConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ActiveLearningConfig 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.v1.ActiveLearningConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ActiveLearningConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ActiveLearningConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ActiveLearningConfig 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.v1.ActiveLearningConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ActiveLearningConfig 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.v1.ActiveLearningConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ActiveLearningConfig 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.v1.ActiveLearningConfig 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; + } + /** + * + * + *
+   * Parameters that configure the active learning pipeline. Active learning will
+   *  label the data incrementally by several iterations. For every iteration, it
+   *  will select a batch of data based on the sampling strategy.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ActiveLearningConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ActiveLearningConfig) + com.google.cloud.aiplatform.v1.ActiveLearningConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.DataLabelingJobProto + .internal_static_google_cloud_aiplatform_v1_ActiveLearningConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.DataLabelingJobProto + .internal_static_google_cloud_aiplatform_v1_ActiveLearningConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ActiveLearningConfig.class, + com.google.cloud.aiplatform.v1.ActiveLearningConfig.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ActiveLearningConfig.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 (sampleConfigBuilder_ == null) { + sampleConfig_ = null; + } else { + sampleConfig_ = null; + sampleConfigBuilder_ = null; + } + if (trainingConfigBuilder_ == null) { + trainingConfig_ = null; + } else { + trainingConfig_ = null; + trainingConfigBuilder_ = null; + } + humanLabelingBudgetCase_ = 0; + humanLabelingBudget_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.DataLabelingJobProto + .internal_static_google_cloud_aiplatform_v1_ActiveLearningConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ActiveLearningConfig getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ActiveLearningConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ActiveLearningConfig build() { + com.google.cloud.aiplatform.v1.ActiveLearningConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ActiveLearningConfig buildPartial() { + com.google.cloud.aiplatform.v1.ActiveLearningConfig result = + new com.google.cloud.aiplatform.v1.ActiveLearningConfig(this); + if (humanLabelingBudgetCase_ == 1) { + result.humanLabelingBudget_ = humanLabelingBudget_; + } + if (humanLabelingBudgetCase_ == 2) { + result.humanLabelingBudget_ = humanLabelingBudget_; + } + if (sampleConfigBuilder_ == null) { + result.sampleConfig_ = sampleConfig_; + } else { + result.sampleConfig_ = sampleConfigBuilder_.build(); + } + if (trainingConfigBuilder_ == null) { + result.trainingConfig_ = trainingConfig_; + } else { + result.trainingConfig_ = trainingConfigBuilder_.build(); + } + result.humanLabelingBudgetCase_ = humanLabelingBudgetCase_; + 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.v1.ActiveLearningConfig) { + return mergeFrom((com.google.cloud.aiplatform.v1.ActiveLearningConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.ActiveLearningConfig other) { + if (other == com.google.cloud.aiplatform.v1.ActiveLearningConfig.getDefaultInstance()) + return this; + if (other.hasSampleConfig()) { + mergeSampleConfig(other.getSampleConfig()); + } + if (other.hasTrainingConfig()) { + mergeTrainingConfig(other.getTrainingConfig()); + } + switch (other.getHumanLabelingBudgetCase()) { + case MAX_DATA_ITEM_COUNT: + { + setMaxDataItemCount(other.getMaxDataItemCount()); + break; + } + case MAX_DATA_ITEM_PERCENTAGE: + { + setMaxDataItemPercentage(other.getMaxDataItemPercentage()); + break; + } + case HUMANLABELINGBUDGET_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.v1.ActiveLearningConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.ActiveLearningConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int humanLabelingBudgetCase_ = 0; + private java.lang.Object humanLabelingBudget_; + + public HumanLabelingBudgetCase getHumanLabelingBudgetCase() { + return HumanLabelingBudgetCase.forNumber(humanLabelingBudgetCase_); + } + + public Builder clearHumanLabelingBudget() { + humanLabelingBudgetCase_ = 0; + humanLabelingBudget_ = null; + onChanged(); + return this; + } + + /** + * + * + *
+     * Max number of human labeled DataItems.
+     * 
+ * + * int64 max_data_item_count = 1; + * + * @return The maxDataItemCount. + */ + public long getMaxDataItemCount() { + if (humanLabelingBudgetCase_ == 1) { + return (java.lang.Long) humanLabelingBudget_; + } + return 0L; + } + /** + * + * + *
+     * Max number of human labeled DataItems.
+     * 
+ * + * int64 max_data_item_count = 1; + * + * @param value The maxDataItemCount to set. + * @return This builder for chaining. + */ + public Builder setMaxDataItemCount(long value) { + humanLabelingBudgetCase_ = 1; + humanLabelingBudget_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Max number of human labeled DataItems.
+     * 
+ * + * int64 max_data_item_count = 1; + * + * @return This builder for chaining. + */ + public Builder clearMaxDataItemCount() { + if (humanLabelingBudgetCase_ == 1) { + humanLabelingBudgetCase_ = 0; + humanLabelingBudget_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Max percent of total DataItems for human labeling.
+     * 
+ * + * int32 max_data_item_percentage = 2; + * + * @return The maxDataItemPercentage. + */ + public int getMaxDataItemPercentage() { + if (humanLabelingBudgetCase_ == 2) { + return (java.lang.Integer) humanLabelingBudget_; + } + return 0; + } + /** + * + * + *
+     * Max percent of total DataItems for human labeling.
+     * 
+ * + * int32 max_data_item_percentage = 2; + * + * @param value The maxDataItemPercentage to set. + * @return This builder for chaining. + */ + public Builder setMaxDataItemPercentage(int value) { + humanLabelingBudgetCase_ = 2; + humanLabelingBudget_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Max percent of total DataItems for human labeling.
+     * 
+ * + * int32 max_data_item_percentage = 2; + * + * @return This builder for chaining. + */ + public Builder clearMaxDataItemPercentage() { + if (humanLabelingBudgetCase_ == 2) { + humanLabelingBudgetCase_ = 0; + humanLabelingBudget_ = null; + onChanged(); + } + return this; + } + + private com.google.cloud.aiplatform.v1.SampleConfig sampleConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.SampleConfig, + com.google.cloud.aiplatform.v1.SampleConfig.Builder, + com.google.cloud.aiplatform.v1.SampleConfigOrBuilder> + sampleConfigBuilder_; + /** + * + * + *
+     * Active learning data sampling config. For every active learning labeling
+     * iteration, it will select a batch of data based on the sampling strategy.
+     * 
+ * + * .google.cloud.aiplatform.v1.SampleConfig sample_config = 3; + * + * @return Whether the sampleConfig field is set. + */ + public boolean hasSampleConfig() { + return sampleConfigBuilder_ != null || sampleConfig_ != null; + } + /** + * + * + *
+     * Active learning data sampling config. For every active learning labeling
+     * iteration, it will select a batch of data based on the sampling strategy.
+     * 
+ * + * .google.cloud.aiplatform.v1.SampleConfig sample_config = 3; + * + * @return The sampleConfig. + */ + public com.google.cloud.aiplatform.v1.SampleConfig getSampleConfig() { + if (sampleConfigBuilder_ == null) { + return sampleConfig_ == null + ? com.google.cloud.aiplatform.v1.SampleConfig.getDefaultInstance() + : sampleConfig_; + } else { + return sampleConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Active learning data sampling config. For every active learning labeling
+     * iteration, it will select a batch of data based on the sampling strategy.
+     * 
+ * + * .google.cloud.aiplatform.v1.SampleConfig sample_config = 3; + */ + public Builder setSampleConfig(com.google.cloud.aiplatform.v1.SampleConfig value) { + if (sampleConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sampleConfig_ = value; + onChanged(); + } else { + sampleConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Active learning data sampling config. For every active learning labeling
+     * iteration, it will select a batch of data based on the sampling strategy.
+     * 
+ * + * .google.cloud.aiplatform.v1.SampleConfig sample_config = 3; + */ + public Builder setSampleConfig( + com.google.cloud.aiplatform.v1.SampleConfig.Builder builderForValue) { + if (sampleConfigBuilder_ == null) { + sampleConfig_ = builderForValue.build(); + onChanged(); + } else { + sampleConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Active learning data sampling config. For every active learning labeling
+     * iteration, it will select a batch of data based on the sampling strategy.
+     * 
+ * + * .google.cloud.aiplatform.v1.SampleConfig sample_config = 3; + */ + public Builder mergeSampleConfig(com.google.cloud.aiplatform.v1.SampleConfig value) { + if (sampleConfigBuilder_ == null) { + if (sampleConfig_ != null) { + sampleConfig_ = + com.google.cloud.aiplatform.v1.SampleConfig.newBuilder(sampleConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + sampleConfig_ = value; + } + onChanged(); + } else { + sampleConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Active learning data sampling config. For every active learning labeling
+     * iteration, it will select a batch of data based on the sampling strategy.
+     * 
+ * + * .google.cloud.aiplatform.v1.SampleConfig sample_config = 3; + */ + public Builder clearSampleConfig() { + if (sampleConfigBuilder_ == null) { + sampleConfig_ = null; + onChanged(); + } else { + sampleConfig_ = null; + sampleConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Active learning data sampling config. For every active learning labeling
+     * iteration, it will select a batch of data based on the sampling strategy.
+     * 
+ * + * .google.cloud.aiplatform.v1.SampleConfig sample_config = 3; + */ + public com.google.cloud.aiplatform.v1.SampleConfig.Builder getSampleConfigBuilder() { + + onChanged(); + return getSampleConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Active learning data sampling config. For every active learning labeling
+     * iteration, it will select a batch of data based on the sampling strategy.
+     * 
+ * + * .google.cloud.aiplatform.v1.SampleConfig sample_config = 3; + */ + public com.google.cloud.aiplatform.v1.SampleConfigOrBuilder getSampleConfigOrBuilder() { + if (sampleConfigBuilder_ != null) { + return sampleConfigBuilder_.getMessageOrBuilder(); + } else { + return sampleConfig_ == null + ? com.google.cloud.aiplatform.v1.SampleConfig.getDefaultInstance() + : sampleConfig_; + } + } + /** + * + * + *
+     * Active learning data sampling config. For every active learning labeling
+     * iteration, it will select a batch of data based on the sampling strategy.
+     * 
+ * + * .google.cloud.aiplatform.v1.SampleConfig sample_config = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.SampleConfig, + com.google.cloud.aiplatform.v1.SampleConfig.Builder, + com.google.cloud.aiplatform.v1.SampleConfigOrBuilder> + getSampleConfigFieldBuilder() { + if (sampleConfigBuilder_ == null) { + sampleConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.SampleConfig, + com.google.cloud.aiplatform.v1.SampleConfig.Builder, + com.google.cloud.aiplatform.v1.SampleConfigOrBuilder>( + getSampleConfig(), getParentForChildren(), isClean()); + sampleConfig_ = null; + } + return sampleConfigBuilder_; + } + + private com.google.cloud.aiplatform.v1.TrainingConfig trainingConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.TrainingConfig, + com.google.cloud.aiplatform.v1.TrainingConfig.Builder, + com.google.cloud.aiplatform.v1.TrainingConfigOrBuilder> + trainingConfigBuilder_; + /** + * + * + *
+     * CMLE training config. For every active learning labeling iteration, system
+     * will train a machine learning model on CMLE. The trained model will be used
+     * by data sampling algorithm to select DataItems.
+     * 
+ * + * .google.cloud.aiplatform.v1.TrainingConfig training_config = 4; + * + * @return Whether the trainingConfig field is set. + */ + public boolean hasTrainingConfig() { + return trainingConfigBuilder_ != null || trainingConfig_ != null; + } + /** + * + * + *
+     * CMLE training config. For every active learning labeling iteration, system
+     * will train a machine learning model on CMLE. The trained model will be used
+     * by data sampling algorithm to select DataItems.
+     * 
+ * + * .google.cloud.aiplatform.v1.TrainingConfig training_config = 4; + * + * @return The trainingConfig. + */ + public com.google.cloud.aiplatform.v1.TrainingConfig getTrainingConfig() { + if (trainingConfigBuilder_ == null) { + return trainingConfig_ == null + ? com.google.cloud.aiplatform.v1.TrainingConfig.getDefaultInstance() + : trainingConfig_; + } else { + return trainingConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * CMLE training config. For every active learning labeling iteration, system
+     * will train a machine learning model on CMLE. The trained model will be used
+     * by data sampling algorithm to select DataItems.
+     * 
+ * + * .google.cloud.aiplatform.v1.TrainingConfig training_config = 4; + */ + public Builder setTrainingConfig(com.google.cloud.aiplatform.v1.TrainingConfig value) { + if (trainingConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + trainingConfig_ = value; + onChanged(); + } else { + trainingConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * CMLE training config. For every active learning labeling iteration, system
+     * will train a machine learning model on CMLE. The trained model will be used
+     * by data sampling algorithm to select DataItems.
+     * 
+ * + * .google.cloud.aiplatform.v1.TrainingConfig training_config = 4; + */ + public Builder setTrainingConfig( + com.google.cloud.aiplatform.v1.TrainingConfig.Builder builderForValue) { + if (trainingConfigBuilder_ == null) { + trainingConfig_ = builderForValue.build(); + onChanged(); + } else { + trainingConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * CMLE training config. For every active learning labeling iteration, system
+     * will train a machine learning model on CMLE. The trained model will be used
+     * by data sampling algorithm to select DataItems.
+     * 
+ * + * .google.cloud.aiplatform.v1.TrainingConfig training_config = 4; + */ + public Builder mergeTrainingConfig(com.google.cloud.aiplatform.v1.TrainingConfig value) { + if (trainingConfigBuilder_ == null) { + if (trainingConfig_ != null) { + trainingConfig_ = + com.google.cloud.aiplatform.v1.TrainingConfig.newBuilder(trainingConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + trainingConfig_ = value; + } + onChanged(); + } else { + trainingConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * CMLE training config. For every active learning labeling iteration, system
+     * will train a machine learning model on CMLE. The trained model will be used
+     * by data sampling algorithm to select DataItems.
+     * 
+ * + * .google.cloud.aiplatform.v1.TrainingConfig training_config = 4; + */ + public Builder clearTrainingConfig() { + if (trainingConfigBuilder_ == null) { + trainingConfig_ = null; + onChanged(); + } else { + trainingConfig_ = null; + trainingConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * CMLE training config. For every active learning labeling iteration, system
+     * will train a machine learning model on CMLE. The trained model will be used
+     * by data sampling algorithm to select DataItems.
+     * 
+ * + * .google.cloud.aiplatform.v1.TrainingConfig training_config = 4; + */ + public com.google.cloud.aiplatform.v1.TrainingConfig.Builder getTrainingConfigBuilder() { + + onChanged(); + return getTrainingConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * CMLE training config. For every active learning labeling iteration, system
+     * will train a machine learning model on CMLE. The trained model will be used
+     * by data sampling algorithm to select DataItems.
+     * 
+ * + * .google.cloud.aiplatform.v1.TrainingConfig training_config = 4; + */ + public com.google.cloud.aiplatform.v1.TrainingConfigOrBuilder getTrainingConfigOrBuilder() { + if (trainingConfigBuilder_ != null) { + return trainingConfigBuilder_.getMessageOrBuilder(); + } else { + return trainingConfig_ == null + ? com.google.cloud.aiplatform.v1.TrainingConfig.getDefaultInstance() + : trainingConfig_; + } + } + /** + * + * + *
+     * CMLE training config. For every active learning labeling iteration, system
+     * will train a machine learning model on CMLE. The trained model will be used
+     * by data sampling algorithm to select DataItems.
+     * 
+ * + * .google.cloud.aiplatform.v1.TrainingConfig training_config = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.TrainingConfig, + com.google.cloud.aiplatform.v1.TrainingConfig.Builder, + com.google.cloud.aiplatform.v1.TrainingConfigOrBuilder> + getTrainingConfigFieldBuilder() { + if (trainingConfigBuilder_ == null) { + trainingConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.TrainingConfig, + com.google.cloud.aiplatform.v1.TrainingConfig.Builder, + com.google.cloud.aiplatform.v1.TrainingConfigOrBuilder>( + getTrainingConfig(), getParentForChildren(), isClean()); + trainingConfig_ = null; + } + return trainingConfigBuilder_; + } + + @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.v1.ActiveLearningConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ActiveLearningConfig) + private static final com.google.cloud.aiplatform.v1.ActiveLearningConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ActiveLearningConfig(); + } + + public static com.google.cloud.aiplatform.v1.ActiveLearningConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ActiveLearningConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ActiveLearningConfig(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.v1.ActiveLearningConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ActiveLearningConfigOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ActiveLearningConfigOrBuilder.java new file mode 100644 index 000000000..6ec2924d5 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ActiveLearningConfigOrBuilder.java @@ -0,0 +1,133 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/data_labeling_job.proto + +package com.google.cloud.aiplatform.v1; + +public interface ActiveLearningConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ActiveLearningConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Max number of human labeled DataItems.
+   * 
+ * + * int64 max_data_item_count = 1; + * + * @return The maxDataItemCount. + */ + long getMaxDataItemCount(); + + /** + * + * + *
+   * Max percent of total DataItems for human labeling.
+   * 
+ * + * int32 max_data_item_percentage = 2; + * + * @return The maxDataItemPercentage. + */ + int getMaxDataItemPercentage(); + + /** + * + * + *
+   * Active learning data sampling config. For every active learning labeling
+   * iteration, it will select a batch of data based on the sampling strategy.
+   * 
+ * + * .google.cloud.aiplatform.v1.SampleConfig sample_config = 3; + * + * @return Whether the sampleConfig field is set. + */ + boolean hasSampleConfig(); + /** + * + * + *
+   * Active learning data sampling config. For every active learning labeling
+   * iteration, it will select a batch of data based on the sampling strategy.
+   * 
+ * + * .google.cloud.aiplatform.v1.SampleConfig sample_config = 3; + * + * @return The sampleConfig. + */ + com.google.cloud.aiplatform.v1.SampleConfig getSampleConfig(); + /** + * + * + *
+   * Active learning data sampling config. For every active learning labeling
+   * iteration, it will select a batch of data based on the sampling strategy.
+   * 
+ * + * .google.cloud.aiplatform.v1.SampleConfig sample_config = 3; + */ + com.google.cloud.aiplatform.v1.SampleConfigOrBuilder getSampleConfigOrBuilder(); + + /** + * + * + *
+   * CMLE training config. For every active learning labeling iteration, system
+   * will train a machine learning model on CMLE. The trained model will be used
+   * by data sampling algorithm to select DataItems.
+   * 
+ * + * .google.cloud.aiplatform.v1.TrainingConfig training_config = 4; + * + * @return Whether the trainingConfig field is set. + */ + boolean hasTrainingConfig(); + /** + * + * + *
+   * CMLE training config. For every active learning labeling iteration, system
+   * will train a machine learning model on CMLE. The trained model will be used
+   * by data sampling algorithm to select DataItems.
+   * 
+ * + * .google.cloud.aiplatform.v1.TrainingConfig training_config = 4; + * + * @return The trainingConfig. + */ + com.google.cloud.aiplatform.v1.TrainingConfig getTrainingConfig(); + /** + * + * + *
+   * CMLE training config. For every active learning labeling iteration, system
+   * will train a machine learning model on CMLE. The trained model will be used
+   * by data sampling algorithm to select DataItems.
+   * 
+ * + * .google.cloud.aiplatform.v1.TrainingConfig training_config = 4; + */ + com.google.cloud.aiplatform.v1.TrainingConfigOrBuilder getTrainingConfigOrBuilder(); + + public com.google.cloud.aiplatform.v1.ActiveLearningConfig.HumanLabelingBudgetCase + getHumanLabelingBudgetCase(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/AnnotatedDatasetName.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/AnnotatedDatasetName.java new file mode 100644 index 000000000..8e18374dd --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/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.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +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-v1/src/main/java/com/google/cloud/aiplatform/v1/Annotation.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/Annotation.java new file mode 100644 index 000000000..b5f8ae868 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/Annotation.java @@ -0,0 +1,2690 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/annotation.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Used to assign specific AnnotationSpec to a particular area of a DataItem or
+ * the whole part of the DataItem.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.Annotation} + */ +public final class Annotation extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.Annotation) + AnnotationOrBuilder { + private static final long serialVersionUID = 0L; + // Use Annotation.newBuilder() to construct. + private Annotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Annotation() { + name_ = ""; + payloadSchemaUri_ = ""; + etag_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Annotation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Annotation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + payloadSchemaUri_ = s; + break; + } + case 26: + { + com.google.protobuf.Value.Builder subBuilder = null; + if (payload_ != null) { + subBuilder = payload_.toBuilder(); + } + payload_ = input.readMessage(com.google.protobuf.Value.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(payload_); + payload_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 42: + { + com.google.cloud.aiplatform.v1.UserActionReference.Builder subBuilder = null; + if (annotationSource_ != null) { + subBuilder = annotationSource_.toBuilder(); + } + annotationSource_ = + input.readMessage( + com.google.cloud.aiplatform.v1.UserActionReference.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(annotationSource_); + annotationSource_ = subBuilder.buildPartial(); + } + + break; + } + case 50: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + labels_ = + com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); + break; + } + case 58: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + case 66: + { + java.lang.String s = input.readStringRequireUtf8(); + + etag_ = 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.v1.AnnotationProto + .internal_static_google_cloud_aiplatform_v1_Annotation_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 6: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.AnnotationProto + .internal_static_google_cloud_aiplatform_v1_Annotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.Annotation.class, + com.google.cloud.aiplatform.v1.Annotation.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Output only. Resource name of the Annotation.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Resource name of the Annotation.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAYLOAD_SCHEMA_URI_FIELD_NUMBER = 2; + private volatile java.lang.Object payloadSchemaUri_; + /** + * + * + *
+   * Required. Google Cloud Storage URI points to a YAML file describing [payload][google.cloud.aiplatform.v1.Annotation.payload]. The
+   * schema is defined as an
+   * [OpenAPI 3.0.2 Schema Object](https://tinyurl.com/y538mdwt).
+   * The schema files that can be used here are found in
+   * gs://google-cloud-aiplatform/schema/dataset/annotation/, note that the
+   * chosen schema must be consistent with the parent Dataset's
+   * [metadata][google.cloud.aiplatform.v1.Dataset.metadata_schema_uri].
+   * 
+ * + * string payload_schema_uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The payloadSchemaUri. + */ + @java.lang.Override + public java.lang.String getPayloadSchemaUri() { + java.lang.Object ref = payloadSchemaUri_; + 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(); + payloadSchemaUri_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Google Cloud Storage URI points to a YAML file describing [payload][google.cloud.aiplatform.v1.Annotation.payload]. The
+   * schema is defined as an
+   * [OpenAPI 3.0.2 Schema Object](https://tinyurl.com/y538mdwt).
+   * The schema files that can be used here are found in
+   * gs://google-cloud-aiplatform/schema/dataset/annotation/, note that the
+   * chosen schema must be consistent with the parent Dataset's
+   * [metadata][google.cloud.aiplatform.v1.Dataset.metadata_schema_uri].
+   * 
+ * + * string payload_schema_uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for payloadSchemaUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPayloadSchemaUriBytes() { + java.lang.Object ref = payloadSchemaUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + payloadSchemaUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAYLOAD_FIELD_NUMBER = 3; + private com.google.protobuf.Value payload_; + /** + * + * + *
+   * Required. The schema of the payload can be found in
+   * [payload_schema][google.cloud.aiplatform.v1.Annotation.payload_schema_uri].
+   * 
+ * + * .google.protobuf.Value payload = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the payload field is set. + */ + @java.lang.Override + public boolean hasPayload() { + return payload_ != null; + } + /** + * + * + *
+   * Required. The schema of the payload can be found in
+   * [payload_schema][google.cloud.aiplatform.v1.Annotation.payload_schema_uri].
+   * 
+ * + * .google.protobuf.Value payload = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The payload. + */ + @java.lang.Override + public com.google.protobuf.Value getPayload() { + return payload_ == null ? com.google.protobuf.Value.getDefaultInstance() : payload_; + } + /** + * + * + *
+   * Required. The schema of the payload can be found in
+   * [payload_schema][google.cloud.aiplatform.v1.Annotation.payload_schema_uri].
+   * 
+ * + * .google.protobuf.Value payload = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.protobuf.ValueOrBuilder getPayloadOrBuilder() { + return getPayload(); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. Timestamp when this Annotation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. Timestamp when this Annotation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. Timestamp when this Annotation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. Timestamp when this Annotation was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. Timestamp when this Annotation was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. Timestamp when this Annotation was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + public static final int ETAG_FIELD_NUMBER = 8; + private volatile java.lang.Object etag_; + /** + * + * + *
+   * Optional. Used to perform consistent read-modify-write updates. If not set, a blind
+   * "overwrite" update happens.
+   * 
+ * + * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Used to perform consistent read-modify-write updates. If not set, a blind
+   * "overwrite" update happens.
+   * 
+ * + * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ANNOTATION_SOURCE_FIELD_NUMBER = 5; + private com.google.cloud.aiplatform.v1.UserActionReference annotationSource_; + /** + * + * + *
+   * Output only. The source of the Annotation.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.UserActionReference annotation_source = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the annotationSource field is set. + */ + @java.lang.Override + public boolean hasAnnotationSource() { + return annotationSource_ != null; + } + /** + * + * + *
+   * Output only. The source of the Annotation.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.UserActionReference annotation_source = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The annotationSource. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.UserActionReference getAnnotationSource() { + return annotationSource_ == null + ? com.google.cloud.aiplatform.v1.UserActionReference.getDefaultInstance() + : annotationSource_; + } + /** + * + * + *
+   * Output only. The source of the Annotation.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.UserActionReference annotation_source = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.UserActionReferenceOrBuilder + getAnnotationSourceOrBuilder() { + return getAnnotationSource(); + } + + public static final int LABELS_FIELD_NUMBER = 6; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.aiplatform.v1.AnnotationProto + .internal_static_google_cloud_aiplatform_v1_Annotation_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize your Annotations.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one Annotation(System
+   * labels are excluded).
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+   * and are immutable. Following system labels exist for each Annotation:
+   * * "aiplatform.googleapis.com/annotation_set_name":
+   *   optional, name of the UI's annotation set this Annotation belongs to.
+   *   If not set, the Annotation is not visible in the UI.
+   * * "aiplatform.googleapis.com/payload_schema":
+   *   output only, its value is the [payload_schema's][google.cloud.aiplatform.v1.Annotation.payload_schema_uri]
+   *   title.
+   * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize your Annotations.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one Annotation(System
+   * labels are excluded).
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+   * and are immutable. Following system labels exist for each Annotation:
+   * * "aiplatform.googleapis.com/annotation_set_name":
+   *   optional, name of the UI's annotation set this Annotation belongs to.
+   *   If not set, the Annotation is not visible in the UI.
+   * * "aiplatform.googleapis.com/payload_schema":
+   *   output only, its value is the [payload_schema's][google.cloud.aiplatform.v1.Annotation.payload_schema_uri]
+   *   title.
+   * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize your Annotations.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one Annotation(System
+   * labels are excluded).
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+   * and are immutable. Following system labels exist for each Annotation:
+   * * "aiplatform.googleapis.com/annotation_set_name":
+   *   optional, name of the UI's annotation set this Annotation belongs to.
+   *   If not set, the Annotation is not visible in the UI.
+   * * "aiplatform.googleapis.com/payload_schema":
+   *   output only, its value is the [payload_schema's][google.cloud.aiplatform.v1.Annotation.payload_schema_uri]
+   *   title.
+   * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize your Annotations.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one Annotation(System
+   * labels are excluded).
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+   * and are immutable. Following system labels exist for each Annotation:
+   * * "aiplatform.googleapis.com/annotation_set_name":
+   *   optional, name of the UI's annotation set this Annotation belongs to.
+   *   If not set, the Annotation is not visible in the UI.
+   * * "aiplatform.googleapis.com/payload_schema":
+   *   output only, its value is the [payload_schema's][google.cloud.aiplatform.v1.Annotation.payload_schema_uri]
+   *   title.
+   * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getPayloadSchemaUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, payloadSchemaUri_); + } + if (payload_ != null) { + output.writeMessage(3, getPayload()); + } + if (createTime_ != null) { + output.writeMessage(4, getCreateTime()); + } + if (annotationSource_ != null) { + output.writeMessage(5, getAnnotationSource()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 6); + if (updateTime_ != null) { + output.writeMessage(7, getUpdateTime()); + } + if (!getEtagBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, etag_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getPayloadSchemaUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, payloadSchemaUri_); + } + if (payload_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getPayload()); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getCreateTime()); + } + if (annotationSource_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getAnnotationSource()); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, labels__); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getUpdateTime()); + } + if (!getEtagBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, etag_); + } + 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.v1.Annotation)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.Annotation other = + (com.google.cloud.aiplatform.v1.Annotation) obj; + + if (!getName().equals(other.getName())) return false; + if (!getPayloadSchemaUri().equals(other.getPayloadSchemaUri())) return false; + if (hasPayload() != other.hasPayload()) return false; + if (hasPayload()) { + if (!getPayload().equals(other.getPayload())) return false; + } + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!getEtag().equals(other.getEtag())) return false; + if (hasAnnotationSource() != other.hasAnnotationSource()) return false; + if (hasAnnotationSource()) { + if (!getAnnotationSource().equals(other.getAnnotationSource())) return false; + } + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + PAYLOAD_SCHEMA_URI_FIELD_NUMBER; + hash = (53 * hash) + getPayloadSchemaUri().hashCode(); + if (hasPayload()) { + hash = (37 * hash) + PAYLOAD_FIELD_NUMBER; + hash = (53 * hash) + getPayload().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + if (hasAnnotationSource()) { + hash = (37 * hash) + ANNOTATION_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getAnnotationSource().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.Annotation parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.Annotation 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.v1.Annotation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.Annotation 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.v1.Annotation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.Annotation parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.Annotation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.Annotation 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.v1.Annotation parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.Annotation 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.v1.Annotation parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.Annotation 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.v1.Annotation 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; + } + /** + * + * + *
+   * Used to assign specific AnnotationSpec to a particular area of a DataItem or
+   * the whole part of the DataItem.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.Annotation} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.Annotation) + com.google.cloud.aiplatform.v1.AnnotationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.AnnotationProto + .internal_static_google_cloud_aiplatform_v1_Annotation_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 6: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 6: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.AnnotationProto + .internal_static_google_cloud_aiplatform_v1_Annotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.Annotation.class, + com.google.cloud.aiplatform.v1.Annotation.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.Annotation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + payloadSchemaUri_ = ""; + + if (payloadBuilder_ == null) { + payload_ = null; + } else { + payload_ = null; + payloadBuilder_ = null; + } + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + etag_ = ""; + + if (annotationSourceBuilder_ == null) { + annotationSource_ = null; + } else { + annotationSource_ = null; + annotationSourceBuilder_ = null; + } + internalGetMutableLabels().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.AnnotationProto + .internal_static_google_cloud_aiplatform_v1_Annotation_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.Annotation getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.Annotation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.Annotation build() { + com.google.cloud.aiplatform.v1.Annotation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.Annotation buildPartial() { + com.google.cloud.aiplatform.v1.Annotation result = + new com.google.cloud.aiplatform.v1.Annotation(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.payloadSchemaUri_ = payloadSchemaUri_; + if (payloadBuilder_ == null) { + result.payload_ = payload_; + } else { + result.payload_ = payloadBuilder_.build(); + } + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + result.etag_ = etag_; + if (annotationSourceBuilder_ == null) { + result.annotationSource_ = annotationSource_; + } else { + result.annotationSource_ = annotationSourceBuilder_.build(); + } + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.Annotation) { + return mergeFrom((com.google.cloud.aiplatform.v1.Annotation) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.Annotation other) { + if (other == com.google.cloud.aiplatform.v1.Annotation.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getPayloadSchemaUri().isEmpty()) { + payloadSchemaUri_ = other.payloadSchemaUri_; + onChanged(); + } + if (other.hasPayload()) { + mergePayload(other.getPayload()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + onChanged(); + } + if (other.hasAnnotationSource()) { + mergeAnnotationSource(other.getAnnotationSource()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + 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.v1.Annotation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.aiplatform.v1.Annotation) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. Resource name of the Annotation.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Resource name of the Annotation.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Resource name of the Annotation.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Resource name of the Annotation.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Resource name of the Annotation.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object payloadSchemaUri_ = ""; + /** + * + * + *
+     * Required. Google Cloud Storage URI points to a YAML file describing [payload][google.cloud.aiplatform.v1.Annotation.payload]. The
+     * schema is defined as an
+     * [OpenAPI 3.0.2 Schema Object](https://tinyurl.com/y538mdwt).
+     * The schema files that can be used here are found in
+     * gs://google-cloud-aiplatform/schema/dataset/annotation/, note that the
+     * chosen schema must be consistent with the parent Dataset's
+     * [metadata][google.cloud.aiplatform.v1.Dataset.metadata_schema_uri].
+     * 
+ * + * string payload_schema_uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The payloadSchemaUri. + */ + public java.lang.String getPayloadSchemaUri() { + java.lang.Object ref = payloadSchemaUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + payloadSchemaUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Google Cloud Storage URI points to a YAML file describing [payload][google.cloud.aiplatform.v1.Annotation.payload]. The
+     * schema is defined as an
+     * [OpenAPI 3.0.2 Schema Object](https://tinyurl.com/y538mdwt).
+     * The schema files that can be used here are found in
+     * gs://google-cloud-aiplatform/schema/dataset/annotation/, note that the
+     * chosen schema must be consistent with the parent Dataset's
+     * [metadata][google.cloud.aiplatform.v1.Dataset.metadata_schema_uri].
+     * 
+ * + * string payload_schema_uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for payloadSchemaUri. + */ + public com.google.protobuf.ByteString getPayloadSchemaUriBytes() { + java.lang.Object ref = payloadSchemaUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + payloadSchemaUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Google Cloud Storage URI points to a YAML file describing [payload][google.cloud.aiplatform.v1.Annotation.payload]. The
+     * schema is defined as an
+     * [OpenAPI 3.0.2 Schema Object](https://tinyurl.com/y538mdwt).
+     * The schema files that can be used here are found in
+     * gs://google-cloud-aiplatform/schema/dataset/annotation/, note that the
+     * chosen schema must be consistent with the parent Dataset's
+     * [metadata][google.cloud.aiplatform.v1.Dataset.metadata_schema_uri].
+     * 
+ * + * string payload_schema_uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The payloadSchemaUri to set. + * @return This builder for chaining. + */ + public Builder setPayloadSchemaUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + payloadSchemaUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Google Cloud Storage URI points to a YAML file describing [payload][google.cloud.aiplatform.v1.Annotation.payload]. The
+     * schema is defined as an
+     * [OpenAPI 3.0.2 Schema Object](https://tinyurl.com/y538mdwt).
+     * The schema files that can be used here are found in
+     * gs://google-cloud-aiplatform/schema/dataset/annotation/, note that the
+     * chosen schema must be consistent with the parent Dataset's
+     * [metadata][google.cloud.aiplatform.v1.Dataset.metadata_schema_uri].
+     * 
+ * + * string payload_schema_uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearPayloadSchemaUri() { + + payloadSchemaUri_ = getDefaultInstance().getPayloadSchemaUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Google Cloud Storage URI points to a YAML file describing [payload][google.cloud.aiplatform.v1.Annotation.payload]. The
+     * schema is defined as an
+     * [OpenAPI 3.0.2 Schema Object](https://tinyurl.com/y538mdwt).
+     * The schema files that can be used here are found in
+     * gs://google-cloud-aiplatform/schema/dataset/annotation/, note that the
+     * chosen schema must be consistent with the parent Dataset's
+     * [metadata][google.cloud.aiplatform.v1.Dataset.metadata_schema_uri].
+     * 
+ * + * string payload_schema_uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for payloadSchemaUri to set. + * @return This builder for chaining. + */ + public Builder setPayloadSchemaUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + payloadSchemaUri_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Value payload_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Value, + com.google.protobuf.Value.Builder, + com.google.protobuf.ValueOrBuilder> + payloadBuilder_; + /** + * + * + *
+     * Required. The schema of the payload can be found in
+     * [payload_schema][google.cloud.aiplatform.v1.Annotation.payload_schema_uri].
+     * 
+ * + * .google.protobuf.Value payload = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the payload field is set. + */ + public boolean hasPayload() { + return payloadBuilder_ != null || payload_ != null; + } + /** + * + * + *
+     * Required. The schema of the payload can be found in
+     * [payload_schema][google.cloud.aiplatform.v1.Annotation.payload_schema_uri].
+     * 
+ * + * .google.protobuf.Value payload = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The payload. + */ + public com.google.protobuf.Value getPayload() { + if (payloadBuilder_ == null) { + return payload_ == null ? com.google.protobuf.Value.getDefaultInstance() : payload_; + } else { + return payloadBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The schema of the payload can be found in
+     * [payload_schema][google.cloud.aiplatform.v1.Annotation.payload_schema_uri].
+     * 
+ * + * .google.protobuf.Value payload = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setPayload(com.google.protobuf.Value value) { + if (payloadBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + payloadBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The schema of the payload can be found in
+     * [payload_schema][google.cloud.aiplatform.v1.Annotation.payload_schema_uri].
+     * 
+ * + * .google.protobuf.Value payload = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setPayload(com.google.protobuf.Value.Builder builderForValue) { + if (payloadBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + payloadBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The schema of the payload can be found in
+     * [payload_schema][google.cloud.aiplatform.v1.Annotation.payload_schema_uri].
+     * 
+ * + * .google.protobuf.Value payload = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergePayload(com.google.protobuf.Value value) { + if (payloadBuilder_ == null) { + if (payload_ != null) { + payload_ = com.google.protobuf.Value.newBuilder(payload_).mergeFrom(value).buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + payloadBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The schema of the payload can be found in
+     * [payload_schema][google.cloud.aiplatform.v1.Annotation.payload_schema_uri].
+     * 
+ * + * .google.protobuf.Value payload = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearPayload() { + if (payloadBuilder_ == null) { + payload_ = null; + onChanged(); + } else { + payload_ = null; + payloadBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The schema of the payload can be found in
+     * [payload_schema][google.cloud.aiplatform.v1.Annotation.payload_schema_uri].
+     * 
+ * + * .google.protobuf.Value payload = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.protobuf.Value.Builder getPayloadBuilder() { + + onChanged(); + return getPayloadFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The schema of the payload can be found in
+     * [payload_schema][google.cloud.aiplatform.v1.Annotation.payload_schema_uri].
+     * 
+ * + * .google.protobuf.Value payload = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.protobuf.ValueOrBuilder getPayloadOrBuilder() { + if (payloadBuilder_ != null) { + return payloadBuilder_.getMessageOrBuilder(); + } else { + return payload_ == null ? com.google.protobuf.Value.getDefaultInstance() : payload_; + } + } + /** + * + * + *
+     * Required. The schema of the payload can be found in
+     * [payload_schema][google.cloud.aiplatform.v1.Annotation.payload_schema_uri].
+     * 
+ * + * .google.protobuf.Value payload = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Value, + com.google.protobuf.Value.Builder, + com.google.protobuf.ValueOrBuilder> + getPayloadFieldBuilder() { + if (payloadBuilder_ == null) { + payloadBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Value, + com.google.protobuf.Value.Builder, + com.google.protobuf.ValueOrBuilder>( + getPayload(), getParentForChildren(), isClean()); + payload_ = null; + } + return payloadBuilder_; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. Timestamp when this Annotation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * Output only. Timestamp when this Annotation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Timestamp when this Annotation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this Annotation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this Annotation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this Annotation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this Annotation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Timestamp when this Annotation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. Timestamp when this Annotation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. Timestamp when this Annotation was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + * + * + *
+     * Output only. Timestamp when this Annotation was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Timestamp when this Annotation was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this Annotation was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this Annotation was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this Annotation was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this Annotation was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Timestamp when this Annotation was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. Timestamp when this Annotation was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private java.lang.Object etag_ = ""; + /** + * + * + *
+     * Optional. Used to perform consistent read-modify-write updates. If not set, a blind
+     * "overwrite" update happens.
+     * 
+ * + * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Used to perform consistent read-modify-write updates. If not set, a blind
+     * "overwrite" update happens.
+     * 
+ * + * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Used to perform consistent read-modify-write updates. If not set, a blind
+     * "overwrite" update happens.
+     * 
+ * + * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + etag_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Used to perform consistent read-modify-write updates. If not set, a blind
+     * "overwrite" update happens.
+     * 
+ * + * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + + etag_ = getDefaultInstance().getEtag(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Used to perform consistent read-modify-write updates. If not set, a blind
+     * "overwrite" update happens.
+     * 
+ * + * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + etag_ = value; + onChanged(); + return this; + } + + private com.google.cloud.aiplatform.v1.UserActionReference annotationSource_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.UserActionReference, + com.google.cloud.aiplatform.v1.UserActionReference.Builder, + com.google.cloud.aiplatform.v1.UserActionReferenceOrBuilder> + annotationSourceBuilder_; + /** + * + * + *
+     * Output only. The source of the Annotation.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.UserActionReference annotation_source = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the annotationSource field is set. + */ + public boolean hasAnnotationSource() { + return annotationSourceBuilder_ != null || annotationSource_ != null; + } + /** + * + * + *
+     * Output only. The source of the Annotation.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.UserActionReference annotation_source = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The annotationSource. + */ + public com.google.cloud.aiplatform.v1.UserActionReference getAnnotationSource() { + if (annotationSourceBuilder_ == null) { + return annotationSource_ == null + ? com.google.cloud.aiplatform.v1.UserActionReference.getDefaultInstance() + : annotationSource_; + } else { + return annotationSourceBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The source of the Annotation.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.UserActionReference annotation_source = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setAnnotationSource(com.google.cloud.aiplatform.v1.UserActionReference value) { + if (annotationSourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + annotationSource_ = value; + onChanged(); + } else { + annotationSourceBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The source of the Annotation.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.UserActionReference annotation_source = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setAnnotationSource( + com.google.cloud.aiplatform.v1.UserActionReference.Builder builderForValue) { + if (annotationSourceBuilder_ == null) { + annotationSource_ = builderForValue.build(); + onChanged(); + } else { + annotationSourceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The source of the Annotation.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.UserActionReference annotation_source = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeAnnotationSource(com.google.cloud.aiplatform.v1.UserActionReference value) { + if (annotationSourceBuilder_ == null) { + if (annotationSource_ != null) { + annotationSource_ = + com.google.cloud.aiplatform.v1.UserActionReference.newBuilder(annotationSource_) + .mergeFrom(value) + .buildPartial(); + } else { + annotationSource_ = value; + } + onChanged(); + } else { + annotationSourceBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The source of the Annotation.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.UserActionReference annotation_source = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearAnnotationSource() { + if (annotationSourceBuilder_ == null) { + annotationSource_ = null; + onChanged(); + } else { + annotationSource_ = null; + annotationSourceBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The source of the Annotation.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.UserActionReference annotation_source = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.UserActionReference.Builder getAnnotationSourceBuilder() { + + onChanged(); + return getAnnotationSourceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The source of the Annotation.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.UserActionReference annotation_source = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.UserActionReferenceOrBuilder + getAnnotationSourceOrBuilder() { + if (annotationSourceBuilder_ != null) { + return annotationSourceBuilder_.getMessageOrBuilder(); + } else { + return annotationSource_ == null + ? com.google.cloud.aiplatform.v1.UserActionReference.getDefaultInstance() + : annotationSource_; + } + } + /** + * + * + *
+     * Output only. The source of the Annotation.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.UserActionReference annotation_source = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.UserActionReference, + com.google.cloud.aiplatform.v1.UserActionReference.Builder, + com.google.cloud.aiplatform.v1.UserActionReferenceOrBuilder> + getAnnotationSourceFieldBuilder() { + if (annotationSourceBuilder_ == null) { + annotationSourceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.UserActionReference, + com.google.cloud.aiplatform.v1.UserActionReference.Builder, + com.google.cloud.aiplatform.v1.UserActionReferenceOrBuilder>( + getAnnotationSource(), getParentForChildren(), isClean()); + annotationSource_ = null; + } + return annotationSourceBuilder_; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + onChanged(); + ; + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Optional. The labels with user-defined metadata to organize your Annotations.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * No more than 64 user labels can be associated with one Annotation(System
+     * labels are excluded).
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+     * and are immutable. Following system labels exist for each Annotation:
+     * * "aiplatform.googleapis.com/annotation_set_name":
+     *   optional, name of the UI's annotation set this Annotation belongs to.
+     *   If not set, the Annotation is not visible in the UI.
+     * * "aiplatform.googleapis.com/payload_schema":
+     *   output only, its value is the [payload_schema's][google.cloud.aiplatform.v1.Annotation.payload_schema_uri]
+     *   title.
+     * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * Optional. The labels with user-defined metadata to organize your Annotations.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * No more than 64 user labels can be associated with one Annotation(System
+     * labels are excluded).
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+     * and are immutable. Following system labels exist for each Annotation:
+     * * "aiplatform.googleapis.com/annotation_set_name":
+     *   optional, name of the UI's annotation set this Annotation belongs to.
+     *   If not set, the Annotation is not visible in the UI.
+     * * "aiplatform.googleapis.com/payload_schema":
+     *   output only, its value is the [payload_schema's][google.cloud.aiplatform.v1.Annotation.payload_schema_uri]
+     *   title.
+     * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Optional. The labels with user-defined metadata to organize your Annotations.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * No more than 64 user labels can be associated with one Annotation(System
+     * labels are excluded).
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+     * and are immutable. Following system labels exist for each Annotation:
+     * * "aiplatform.googleapis.com/annotation_set_name":
+     *   optional, name of the UI's annotation set this Annotation belongs to.
+     *   If not set, the Annotation is not visible in the UI.
+     * * "aiplatform.googleapis.com/payload_schema":
+     *   output only, its value is the [payload_schema's][google.cloud.aiplatform.v1.Annotation.payload_schema_uri]
+     *   title.
+     * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Optional. The labels with user-defined metadata to organize your Annotations.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * No more than 64 user labels can be associated with one Annotation(System
+     * labels are excluded).
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+     * and are immutable. Following system labels exist for each Annotation:
+     * * "aiplatform.googleapis.com/annotation_set_name":
+     *   optional, name of the UI's annotation set this Annotation belongs to.
+     *   If not set, the Annotation is not visible in the UI.
+     * * "aiplatform.googleapis.com/payload_schema":
+     *   output only, its value is the [payload_schema's][google.cloud.aiplatform.v1.Annotation.payload_schema_uri]
+     *   title.
+     * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Optional. The labels with user-defined metadata to organize your Annotations.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * No more than 64 user labels can be associated with one Annotation(System
+     * labels are excluded).
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+     * and are immutable. Following system labels exist for each Annotation:
+     * * "aiplatform.googleapis.com/annotation_set_name":
+     *   optional, name of the UI's annotation set this Annotation belongs to.
+     *   If not set, the Annotation is not visible in the UI.
+     * * "aiplatform.googleapis.com/payload_schema":
+     *   output only, its value is the [payload_schema's][google.cloud.aiplatform.v1.Annotation.payload_schema_uri]
+     *   title.
+     * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Optional. The labels with user-defined metadata to organize your Annotations.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * No more than 64 user labels can be associated with one Annotation(System
+     * labels are excluded).
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+     * and are immutable. Following system labels exist for each Annotation:
+     * * "aiplatform.googleapis.com/annotation_set_name":
+     *   optional, name of the UI's annotation set this Annotation belongs to.
+     *   If not set, the Annotation is not visible in the UI.
+     * * "aiplatform.googleapis.com/payload_schema":
+     *   output only, its value is the [payload_schema's][google.cloud.aiplatform.v1.Annotation.payload_schema_uri]
+     *   title.
+     * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Optional. The labels with user-defined metadata to organize your Annotations.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * No more than 64 user labels can be associated with one Annotation(System
+     * labels are excluded).
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+     * and are immutable. Following system labels exist for each Annotation:
+     * * "aiplatform.googleapis.com/annotation_set_name":
+     *   optional, name of the UI's annotation set this Annotation belongs to.
+     *   If not set, the Annotation is not visible in the UI.
+     * * "aiplatform.googleapis.com/payload_schema":
+     *   output only, its value is the [payload_schema's][google.cloud.aiplatform.v1.Annotation.payload_schema_uri]
+     *   title.
+     * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.Annotation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.Annotation) + private static final com.google.cloud.aiplatform.v1.Annotation DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.Annotation(); + } + + public static com.google.cloud.aiplatform.v1.Annotation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Annotation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Annotation(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.v1.Annotation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/AnnotationName.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/AnnotationName.java new file mode 100644 index 000000000..c24568455 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/AnnotationName.java @@ -0,0 +1,298 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class AnnotationName implements ResourceName { + 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; + } + + public String getLocation() { + return location; + } + + public String getDataset() { + return dataset; + } + + public String getDataItem() { + return dataItem; + } + + public String getAnnotation() { + return annotation; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static AnnotationName of( + String project, String location, String dataset, String dataItem, String annotation) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setDataset(dataset) + .setDataItem(dataItem) + .setAnnotation(annotation) + .build(); + } + + public static String format( + String project, String location, String dataset, String dataItem, String annotation) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setDataset(dataset) + .setDataItem(dataItem) + .setAnnotation(annotation) + .build() + .toString(); + } + + public static AnnotationName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_DATASET_DATA_ITEM_ANNOTATION.validatedMatch( + formattedString, "AnnotationName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("dataset"), + matchMap.get("data_item"), + matchMap.get("annotation")); + } + + 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 (AnnotationName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String 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(); + 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(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_DATASET_DATA_ITEM_ANNOTATION.instantiate( + "project", + project, + "location", + location, + "dataset", + dataset, + "data_item", + dataItem, + "annotation", + annotation); + } + + @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; + } + + public String getLocation() { + return location; + } + + public String getDataset() { + return dataset; + } + + public String getDataItem() { + return dataItem; + } + + public String getAnnotation() { + return annotation; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setDataset(String dataset) { + this.dataset = dataset; + return this; + } + + public Builder setDataItem(String dataItem) { + this.dataItem = dataItem; + return this; + } + + public Builder setAnnotation(String annotation) { + this.annotation = annotation; + return this; + } + + private Builder(AnnotationName annotationName) { + project = annotationName.project; + location = annotationName.location; + dataset = annotationName.dataset; + dataItem = annotationName.dataItem; + annotation = annotationName.annotation; + } + + public AnnotationName build() { + return new AnnotationName(this); + } + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/AnnotationOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/AnnotationOrBuilder.java new file mode 100644 index 000000000..0429440b6 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/AnnotationOrBuilder.java @@ -0,0 +1,393 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/annotation.proto + +package com.google.cloud.aiplatform.v1; + +public interface AnnotationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.Annotation) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Resource name of the Annotation.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. Resource name of the Annotation.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. Google Cloud Storage URI points to a YAML file describing [payload][google.cloud.aiplatform.v1.Annotation.payload]. The
+   * schema is defined as an
+   * [OpenAPI 3.0.2 Schema Object](https://tinyurl.com/y538mdwt).
+   * The schema files that can be used here are found in
+   * gs://google-cloud-aiplatform/schema/dataset/annotation/, note that the
+   * chosen schema must be consistent with the parent Dataset's
+   * [metadata][google.cloud.aiplatform.v1.Dataset.metadata_schema_uri].
+   * 
+ * + * string payload_schema_uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The payloadSchemaUri. + */ + java.lang.String getPayloadSchemaUri(); + /** + * + * + *
+   * Required. Google Cloud Storage URI points to a YAML file describing [payload][google.cloud.aiplatform.v1.Annotation.payload]. The
+   * schema is defined as an
+   * [OpenAPI 3.0.2 Schema Object](https://tinyurl.com/y538mdwt).
+   * The schema files that can be used here are found in
+   * gs://google-cloud-aiplatform/schema/dataset/annotation/, note that the
+   * chosen schema must be consistent with the parent Dataset's
+   * [metadata][google.cloud.aiplatform.v1.Dataset.metadata_schema_uri].
+   * 
+ * + * string payload_schema_uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for payloadSchemaUri. + */ + com.google.protobuf.ByteString getPayloadSchemaUriBytes(); + + /** + * + * + *
+   * Required. The schema of the payload can be found in
+   * [payload_schema][google.cloud.aiplatform.v1.Annotation.payload_schema_uri].
+   * 
+ * + * .google.protobuf.Value payload = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the payload field is set. + */ + boolean hasPayload(); + /** + * + * + *
+   * Required. The schema of the payload can be found in
+   * [payload_schema][google.cloud.aiplatform.v1.Annotation.payload_schema_uri].
+   * 
+ * + * .google.protobuf.Value payload = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The payload. + */ + com.google.protobuf.Value getPayload(); + /** + * + * + *
+   * Required. The schema of the payload can be found in
+   * [payload_schema][google.cloud.aiplatform.v1.Annotation.payload_schema_uri].
+   * 
+ * + * .google.protobuf.Value payload = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.protobuf.ValueOrBuilder getPayloadOrBuilder(); + + /** + * + * + *
+   * Output only. Timestamp when this Annotation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Timestamp when this Annotation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Timestamp when this Annotation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Timestamp when this Annotation was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. Timestamp when this Annotation was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. Timestamp when this Annotation was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Optional. Used to perform consistent read-modify-write updates. If not set, a blind
+   * "overwrite" update happens.
+   * 
+ * + * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + java.lang.String getEtag(); + /** + * + * + *
+   * Optional. Used to perform consistent read-modify-write updates. If not set, a blind
+   * "overwrite" update happens.
+   * 
+ * + * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); + + /** + * + * + *
+   * Output only. The source of the Annotation.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.UserActionReference annotation_source = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the annotationSource field is set. + */ + boolean hasAnnotationSource(); + /** + * + * + *
+   * Output only. The source of the Annotation.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.UserActionReference annotation_source = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The annotationSource. + */ + com.google.cloud.aiplatform.v1.UserActionReference getAnnotationSource(); + /** + * + * + *
+   * Output only. The source of the Annotation.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.UserActionReference annotation_source = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1.UserActionReferenceOrBuilder getAnnotationSourceOrBuilder(); + + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize your Annotations.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one Annotation(System
+   * labels are excluded).
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+   * and are immutable. Following system labels exist for each Annotation:
+   * * "aiplatform.googleapis.com/annotation_set_name":
+   *   optional, name of the UI's annotation set this Annotation belongs to.
+   *   If not set, the Annotation is not visible in the UI.
+   * * "aiplatform.googleapis.com/payload_schema":
+   *   output only, its value is the [payload_schema's][google.cloud.aiplatform.v1.Annotation.payload_schema_uri]
+   *   title.
+   * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + int getLabelsCount(); + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize your Annotations.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one Annotation(System
+   * labels are excluded).
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+   * and are immutable. Following system labels exist for each Annotation:
+   * * "aiplatform.googleapis.com/annotation_set_name":
+   *   optional, name of the UI's annotation set this Annotation belongs to.
+   *   If not set, the Annotation is not visible in the UI.
+   * * "aiplatform.googleapis.com/payload_schema":
+   *   output only, its value is the [payload_schema's][google.cloud.aiplatform.v1.Annotation.payload_schema_uri]
+   *   title.
+   * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize your Annotations.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one Annotation(System
+   * labels are excluded).
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+   * and are immutable. Following system labels exist for each Annotation:
+   * * "aiplatform.googleapis.com/annotation_set_name":
+   *   optional, name of the UI's annotation set this Annotation belongs to.
+   *   If not set, the Annotation is not visible in the UI.
+   * * "aiplatform.googleapis.com/payload_schema":
+   *   output only, its value is the [payload_schema's][google.cloud.aiplatform.v1.Annotation.payload_schema_uri]
+   *   title.
+   * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize your Annotations.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one Annotation(System
+   * labels are excluded).
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+   * and are immutable. Following system labels exist for each Annotation:
+   * * "aiplatform.googleapis.com/annotation_set_name":
+   *   optional, name of the UI's annotation set this Annotation belongs to.
+   *   If not set, the Annotation is not visible in the UI.
+   * * "aiplatform.googleapis.com/payload_schema":
+   *   output only, its value is the [payload_schema's][google.cloud.aiplatform.v1.Annotation.payload_schema_uri]
+   *   title.
+   * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize your Annotations.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one Annotation(System
+   * labels are excluded).
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+   * and are immutable. Following system labels exist for each Annotation:
+   * * "aiplatform.googleapis.com/annotation_set_name":
+   *   optional, name of the UI's annotation set this Annotation belongs to.
+   *   If not set, the Annotation is not visible in the UI.
+   * * "aiplatform.googleapis.com/payload_schema":
+   *   output only, its value is the [payload_schema's][google.cloud.aiplatform.v1.Annotation.payload_schema_uri]
+   *   title.
+   * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/AnnotationProto.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/AnnotationProto.java new file mode 100644 index 000000000..0e063438e --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/AnnotationProto.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/v1/annotation.proto + +package com.google.cloud.aiplatform.v1; + +public final class AnnotationProto { + private AnnotationProto() {} + + 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_v1_Annotation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_Annotation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_Annotation_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_Annotation_LabelsEntry_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n+google/cloud/aiplatform/v1/annotation." + + "proto\022\032google.cloud.aiplatform.v1\032\037googl" + + "e/api/field_behavior.proto\032\031google/api/r" + + "esource.proto\0326google/cloud/aiplatform/v" + + "1/user_action_reference.proto\032\034google/pr" + + "otobuf/struct.proto\032\037google/protobuf/tim" + + "estamp.proto\032\034google/api/annotations.pro" + + "to\"\316\004\n\nAnnotation\022\021\n\004name\030\001 \001(\tB\003\340A\003\022\037\n\022" + + "payload_schema_uri\030\002 \001(\tB\003\340A\002\022,\n\007payload" + + "\030\003 \001(\0132\026.google.protobuf.ValueB\003\340A\002\0224\n\013c" + + "reate_time\030\004 \001(\0132\032.google.protobuf.Times" + + "tampB\003\340A\003\0224\n\013update_time\030\007 \001(\0132\032.google." + + "protobuf.TimestampB\003\340A\003\022\021\n\004etag\030\010 \001(\tB\003\340" + + "A\001\022O\n\021annotation_source\030\005 \001(\0132/.google.c" + + "loud.aiplatform.v1.UserActionReferenceB\003" + + "\340A\003\022G\n\006labels\030\006 \003(\01322.google.cloud.aipla" + + "tform.v1.Annotation.LabelsEntryB\003\340A\001\032-\n\013" + + "LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:" + + "\0028\001:\225\001\352A\221\001\n$aiplatform.googleapis.com/An" + + "notation\022iprojects/{project}/locations/{" + + "location}/datasets/{dataset}/dataItems/{" + + "data_item}/annotations/{annotation}By\n\036c" + + "om.google.cloud.aiplatform.v1B\017Annotatio" + + "nProtoP\001ZDgoogle.golang.org/genproto/goo" + + "gleapis/cloud/aiplatform/v1;aiplatformb\006" + + "proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.aiplatform.v1.UserActionReferenceProto.getDescriptor(), + com.google.protobuf.StructProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1_Annotation_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_Annotation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_Annotation_descriptor, + new java.lang.String[] { + "Name", + "PayloadSchemaUri", + "Payload", + "CreateTime", + "UpdateTime", + "Etag", + "AnnotationSource", + "Labels", + }); + internal_static_google_cloud_aiplatform_v1_Annotation_LabelsEntry_descriptor = + internal_static_google_cloud_aiplatform_v1_Annotation_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_aiplatform_v1_Annotation_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_Annotation_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.aiplatform.v1.UserActionReferenceProto.getDescriptor(); + com.google.protobuf.StructProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/AnnotationSpec.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/AnnotationSpec.java new file mode 100644 index 000000000..9e9ee4923 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/AnnotationSpec.java @@ -0,0 +1,1599 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/annotation_spec.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Identifies a concept with which DataItems may be annotated with.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.AnnotationSpec} + */ +public final class AnnotationSpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.AnnotationSpec) + AnnotationSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use AnnotationSpec.newBuilder() to construct. + private AnnotationSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AnnotationSpec() { + name_ = ""; + displayName_ = ""; + etag_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AnnotationSpec(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AnnotationSpec( + 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(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 26: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + etag_ = 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.v1.AnnotationSpecProto + .internal_static_google_cloud_aiplatform_v1_AnnotationSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.AnnotationSpecProto + .internal_static_google_cloud_aiplatform_v1_AnnotationSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.AnnotationSpec.class, + com.google.cloud.aiplatform.v1.AnnotationSpec.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Output only. Resource name of the AnnotationSpec.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Resource name of the AnnotationSpec.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * Required. The user-defined name of the AnnotationSpec.
+   * The name can be up to 128 characters long and can be consist of any UTF-8
+   * characters.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+   * Required. The user-defined name of the AnnotationSpec.
+   * The name can be up to 128 characters long and can be consist of any UTF-8
+   * characters.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 CREATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. Timestamp when this AnnotationSpec was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. Timestamp when this AnnotationSpec was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. Timestamp when this AnnotationSpec was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. Timestamp when AnnotationSpec was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. Timestamp when AnnotationSpec was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. Timestamp when AnnotationSpec was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + public static final int ETAG_FIELD_NUMBER = 5; + private volatile java.lang.Object etag_; + /** + * + * + *
+   * Optional. Used to perform consistent read-modify-write updates. If not set, a blind
+   * "overwrite" update happens.
+   * 
+ * + * string etag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Used to perform consistent read-modify-write updates. If not set, a blind
+   * "overwrite" update happens.
+   * 
+ * + * string etag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + if (createTime_ != null) { + output.writeMessage(3, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(4, getUpdateTime()); + } + if (!getEtagBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, etag_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getUpdateTime()); + } + if (!getEtagBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, etag_); + } + 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.v1.AnnotationSpec)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.AnnotationSpec other = + (com.google.cloud.aiplatform.v1.AnnotationSpec) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!getEtag().equals(other.getEtag())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.AnnotationSpec parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.AnnotationSpec 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.v1.AnnotationSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.AnnotationSpec 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.v1.AnnotationSpec parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.AnnotationSpec parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.AnnotationSpec parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.AnnotationSpec 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.v1.AnnotationSpec parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.AnnotationSpec 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.v1.AnnotationSpec parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.AnnotationSpec 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.v1.AnnotationSpec 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; + } + /** + * + * + *
+   * Identifies a concept with which DataItems may be annotated with.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.AnnotationSpec} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.AnnotationSpec) + com.google.cloud.aiplatform.v1.AnnotationSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.AnnotationSpecProto + .internal_static_google_cloud_aiplatform_v1_AnnotationSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.AnnotationSpecProto + .internal_static_google_cloud_aiplatform_v1_AnnotationSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.AnnotationSpec.class, + com.google.cloud.aiplatform.v1.AnnotationSpec.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.AnnotationSpec.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + displayName_ = ""; + + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + etag_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.AnnotationSpecProto + .internal_static_google_cloud_aiplatform_v1_AnnotationSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.AnnotationSpec getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.AnnotationSpec.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.AnnotationSpec build() { + com.google.cloud.aiplatform.v1.AnnotationSpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.AnnotationSpec buildPartial() { + com.google.cloud.aiplatform.v1.AnnotationSpec result = + new com.google.cloud.aiplatform.v1.AnnotationSpec(this); + result.name_ = name_; + result.displayName_ = displayName_; + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + result.etag_ = etag_; + 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.v1.AnnotationSpec) { + return mergeFrom((com.google.cloud.aiplatform.v1.AnnotationSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.AnnotationSpec other) { + if (other == com.google.cloud.aiplatform.v1.AnnotationSpec.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + 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.v1.AnnotationSpec parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.aiplatform.v1.AnnotationSpec) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. Resource name of the AnnotationSpec.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Resource name of the AnnotationSpec.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Resource name of the AnnotationSpec.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Resource name of the AnnotationSpec.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Resource name of the AnnotationSpec.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Required. The user-defined name of the AnnotationSpec.
+     * The name can be up to 128 characters long and can be consist of any UTF-8
+     * characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+     * Required. The user-defined name of the AnnotationSpec.
+     * The name can be up to 128 characters long and can be consist of any UTF-8
+     * characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+     * Required. The user-defined name of the AnnotationSpec.
+     * The name can be up to 128 characters long and can be consist of any UTF-8
+     * characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + /** + * + * + *
+     * Required. The user-defined name of the AnnotationSpec.
+     * The name can be up to 128 characters long and can be consist of any UTF-8
+     * characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The user-defined name of the AnnotationSpec.
+     * The name can be up to 128 characters long and can be consist of any UTF-8
+     * characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. Timestamp when this AnnotationSpec was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * Output only. Timestamp when this AnnotationSpec was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Timestamp when this AnnotationSpec was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this AnnotationSpec was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this AnnotationSpec was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this AnnotationSpec was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this AnnotationSpec was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Timestamp when this AnnotationSpec was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. Timestamp when this AnnotationSpec was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. Timestamp when AnnotationSpec was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + * + * + *
+     * Output only. Timestamp when AnnotationSpec was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Timestamp when AnnotationSpec was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when AnnotationSpec was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when AnnotationSpec was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when AnnotationSpec was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when AnnotationSpec was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Timestamp when AnnotationSpec was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. Timestamp when AnnotationSpec was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private java.lang.Object etag_ = ""; + /** + * + * + *
+     * Optional. Used to perform consistent read-modify-write updates. If not set, a blind
+     * "overwrite" update happens.
+     * 
+ * + * string etag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Used to perform consistent read-modify-write updates. If not set, a blind
+     * "overwrite" update happens.
+     * 
+ * + * string etag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Used to perform consistent read-modify-write updates. If not set, a blind
+     * "overwrite" update happens.
+     * 
+ * + * string etag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + etag_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Used to perform consistent read-modify-write updates. If not set, a blind
+     * "overwrite" update happens.
+     * 
+ * + * string etag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + + etag_ = getDefaultInstance().getEtag(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Used to perform consistent read-modify-write updates. If not set, a blind
+     * "overwrite" update happens.
+     * 
+ * + * string etag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + etag_ = 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.v1.AnnotationSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.AnnotationSpec) + private static final com.google.cloud.aiplatform.v1.AnnotationSpec DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.AnnotationSpec(); + } + + public static com.google.cloud.aiplatform.v1.AnnotationSpec getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AnnotationSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AnnotationSpec(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.v1.AnnotationSpec getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/AnnotationSpecName.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/AnnotationSpecName.java new file mode 100644 index 000000000..40f968e65 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/AnnotationSpecName.java @@ -0,0 +1,269 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class AnnotationSpecName implements ResourceName { + 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; + } + + public String getLocation() { + return location; + } + + public String getDataset() { + return dataset; + } + + public String getAnnotationSpec() { + return annotationSpec; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static AnnotationSpecName of( + String project, String location, String dataset, String annotationSpec) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setDataset(dataset) + .setAnnotationSpec(annotationSpec) + .build(); + } + + public static String format( + String project, String location, String dataset, String annotationSpec) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setDataset(dataset) + .setAnnotationSpec(annotationSpec) + .build() + .toString(); + } + + public static AnnotationSpecName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_DATASET_ANNOTATION_SPEC.validatedMatch( + formattedString, "AnnotationSpecName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("dataset"), + matchMap.get("annotation_spec")); + } + + 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 (AnnotationSpecName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String 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(); + 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(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_DATASET_ANNOTATION_SPEC.instantiate( + "project", + project, + "location", + location, + "dataset", + dataset, + "annotation_spec", + annotationSpec); + } + + @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; + } + + public String getLocation() { + return location; + } + + public String getDataset() { + return dataset; + } + + public String getAnnotationSpec() { + return annotationSpec; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setDataset(String dataset) { + this.dataset = dataset; + return this; + } + + public Builder setAnnotationSpec(String annotationSpec) { + this.annotationSpec = annotationSpec; + return this; + } + + private Builder(AnnotationSpecName annotationSpecName) { + project = annotationSpecName.project; + location = annotationSpecName.location; + dataset = annotationSpecName.dataset; + annotationSpec = annotationSpecName.annotationSpec; + } + + public AnnotationSpecName build() { + return new AnnotationSpecName(this); + } + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/AnnotationSpecOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/AnnotationSpecOrBuilder.java new file mode 100644 index 000000000..4e8d39339 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/AnnotationSpecOrBuilder.java @@ -0,0 +1,182 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/annotation_spec.proto + +package com.google.cloud.aiplatform.v1; + +public interface AnnotationSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.AnnotationSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Resource name of the AnnotationSpec.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. Resource name of the AnnotationSpec.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The user-defined name of the AnnotationSpec.
+   * The name can be up to 128 characters long and can be consist of any UTF-8
+   * characters.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Required. The user-defined name of the AnnotationSpec.
+   * The name can be up to 128 characters long and can be consist of any UTF-8
+   * characters.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Output only. Timestamp when this AnnotationSpec was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Timestamp when this AnnotationSpec was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Timestamp when this AnnotationSpec was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Timestamp when AnnotationSpec was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. Timestamp when AnnotationSpec was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. Timestamp when AnnotationSpec was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Optional. Used to perform consistent read-modify-write updates. If not set, a blind
+   * "overwrite" update happens.
+   * 
+ * + * string etag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + java.lang.String getEtag(); + /** + * + * + *
+   * Optional. Used to perform consistent read-modify-write updates. If not set, a blind
+   * "overwrite" update happens.
+   * 
+ * + * string etag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/AnnotationSpecProto.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/AnnotationSpecProto.java new file mode 100644 index 000000000..3e2b723dc --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/AnnotationSpecProto.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/v1/annotation_spec.proto + +package com.google.cloud.aiplatform.v1; + +public final class AnnotationSpecProto { + private AnnotationSpecProto() {} + + 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_v1_AnnotationSpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_AnnotationSpec_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n0google/cloud/aiplatform/v1/annotation_" + + "spec.proto\022\032google.cloud.aiplatform.v1\032\037" + + "google/api/field_behavior.proto\032\031google/" + + "api/resource.proto\032\037google/protobuf/time" + + "stamp.proto\032\034google/api/annotations.prot" + + "o\"\314\002\n\016AnnotationSpec\022\021\n\004name\030\001 \001(\tB\003\340A\003\022" + + "\031\n\014display_name\030\002 \001(\tB\003\340A\002\0224\n\013create_tim" + + "e\030\003 \001(\0132\032.google.protobuf.TimestampB\003\340A\003" + + "\0224\n\013update_time\030\004 \001(\0132\032.google.protobuf." + + "TimestampB\003\340A\003\022\021\n\004etag\030\005 \001(\tB\003\340A\001:\214\001\352A\210\001" + + "\n(aiplatform.googleapis.com/AnnotationSp" + + "ec\022\\projects/{project}/locations/{locati" + + "on}/datasets/{dataset}/annotationSpecs/{" + + "annotation_spec}B}\n\036com.google.cloud.aip" + + "latform.v1B\023AnnotationSpecProtoP\001ZDgoogl" + + "e.golang.org/genproto/googleapis/cloud/a" + + "iplatform/v1;aiplatformb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1_AnnotationSpec_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_AnnotationSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_AnnotationSpec_descriptor, + new java.lang.String[] { + "Name", "DisplayName", "CreateTime", "UpdateTime", "Etag", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/AutomaticResources.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/AutomaticResources.java new file mode 100644 index 000000000..540d061b0 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/AutomaticResources.java @@ -0,0 +1,688 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/machine_resources.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * A description of resources that to large degree are decided by AI Platform,
+ * and require only a modest additional configuration.
+ * Each Model supporting these resources documents its specific guidelines.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.AutomaticResources} + */ +public final class AutomaticResources extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.AutomaticResources) + AutomaticResourcesOrBuilder { + private static final long serialVersionUID = 0L; + // Use AutomaticResources.newBuilder() to construct. + private AutomaticResources(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AutomaticResources() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AutomaticResources(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AutomaticResources( + 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: + { + minReplicaCount_ = input.readInt32(); + break; + } + case 16: + { + maxReplicaCount_ = 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.v1.MachineResourcesProto + .internal_static_google_cloud_aiplatform_v1_AutomaticResources_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.MachineResourcesProto + .internal_static_google_cloud_aiplatform_v1_AutomaticResources_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.AutomaticResources.class, + com.google.cloud.aiplatform.v1.AutomaticResources.Builder.class); + } + + public static final int MIN_REPLICA_COUNT_FIELD_NUMBER = 1; + private int minReplicaCount_; + /** + * + * + *
+   * Immutable. The minimum number of replicas this DeployedModel will be always deployed
+   * on. If traffic against it increases, it may dynamically be deployed onto
+   * more replicas up to [max_replica_count][google.cloud.aiplatform.v1.AutomaticResources.max_replica_count], and as traffic decreases, some
+   * of these extra replicas may be freed.
+   * If the requested value is too large, the deployment will error.
+   * 
+ * + * int32 min_replica_count = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The minReplicaCount. + */ + @java.lang.Override + public int getMinReplicaCount() { + return minReplicaCount_; + } + + public static final int MAX_REPLICA_COUNT_FIELD_NUMBER = 2; + private int maxReplicaCount_; + /** + * + * + *
+   * Immutable. The maximum number of replicas this DeployedModel may be deployed on when
+   * the traffic against it increases. If the requested value is too large,
+   * the deployment will error, but if deployment succeeds then the ability
+   * to scale the model to that many replicas is guaranteed (barring service
+   * outages). If traffic against the DeployedModel increases beyond what its
+   * replicas at maximum may handle, a portion of the traffic will be dropped.
+   * If this value is not provided, a no upper bound for scaling under heavy
+   * traffic will be assume, though AI Platform may be unable to scale beyond
+   * certain replica number.
+   * 
+ * + * int32 max_replica_count = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The maxReplicaCount. + */ + @java.lang.Override + public int getMaxReplicaCount() { + return maxReplicaCount_; + } + + 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 (minReplicaCount_ != 0) { + output.writeInt32(1, minReplicaCount_); + } + if (maxReplicaCount_ != 0) { + output.writeInt32(2, maxReplicaCount_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (minReplicaCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, minReplicaCount_); + } + if (maxReplicaCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, maxReplicaCount_); + } + 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.v1.AutomaticResources)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.AutomaticResources other = + (com.google.cloud.aiplatform.v1.AutomaticResources) obj; + + if (getMinReplicaCount() != other.getMinReplicaCount()) return false; + if (getMaxReplicaCount() != other.getMaxReplicaCount()) 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) + MIN_REPLICA_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getMinReplicaCount(); + hash = (37 * hash) + MAX_REPLICA_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getMaxReplicaCount(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.AutomaticResources parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.AutomaticResources 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.v1.AutomaticResources parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.AutomaticResources 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.v1.AutomaticResources parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.AutomaticResources parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.AutomaticResources parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.AutomaticResources 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.v1.AutomaticResources parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.AutomaticResources 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.v1.AutomaticResources parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.AutomaticResources 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.v1.AutomaticResources 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 description of resources that to large degree are decided by AI Platform,
+   * and require only a modest additional configuration.
+   * Each Model supporting these resources documents its specific guidelines.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.AutomaticResources} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.AutomaticResources) + com.google.cloud.aiplatform.v1.AutomaticResourcesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.MachineResourcesProto + .internal_static_google_cloud_aiplatform_v1_AutomaticResources_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.MachineResourcesProto + .internal_static_google_cloud_aiplatform_v1_AutomaticResources_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.AutomaticResources.class, + com.google.cloud.aiplatform.v1.AutomaticResources.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.AutomaticResources.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(); + minReplicaCount_ = 0; + + maxReplicaCount_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.MachineResourcesProto + .internal_static_google_cloud_aiplatform_v1_AutomaticResources_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.AutomaticResources getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.AutomaticResources.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.AutomaticResources build() { + com.google.cloud.aiplatform.v1.AutomaticResources result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.AutomaticResources buildPartial() { + com.google.cloud.aiplatform.v1.AutomaticResources result = + new com.google.cloud.aiplatform.v1.AutomaticResources(this); + result.minReplicaCount_ = minReplicaCount_; + result.maxReplicaCount_ = maxReplicaCount_; + 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.v1.AutomaticResources) { + return mergeFrom((com.google.cloud.aiplatform.v1.AutomaticResources) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.AutomaticResources other) { + if (other == com.google.cloud.aiplatform.v1.AutomaticResources.getDefaultInstance()) + return this; + if (other.getMinReplicaCount() != 0) { + setMinReplicaCount(other.getMinReplicaCount()); + } + if (other.getMaxReplicaCount() != 0) { + setMaxReplicaCount(other.getMaxReplicaCount()); + } + 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.v1.AutomaticResources parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.AutomaticResources) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int minReplicaCount_; + /** + * + * + *
+     * Immutable. The minimum number of replicas this DeployedModel will be always deployed
+     * on. If traffic against it increases, it may dynamically be deployed onto
+     * more replicas up to [max_replica_count][google.cloud.aiplatform.v1.AutomaticResources.max_replica_count], and as traffic decreases, some
+     * of these extra replicas may be freed.
+     * If the requested value is too large, the deployment will error.
+     * 
+ * + * int32 min_replica_count = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The minReplicaCount. + */ + @java.lang.Override + public int getMinReplicaCount() { + return minReplicaCount_; + } + /** + * + * + *
+     * Immutable. The minimum number of replicas this DeployedModel will be always deployed
+     * on. If traffic against it increases, it may dynamically be deployed onto
+     * more replicas up to [max_replica_count][google.cloud.aiplatform.v1.AutomaticResources.max_replica_count], and as traffic decreases, some
+     * of these extra replicas may be freed.
+     * If the requested value is too large, the deployment will error.
+     * 
+ * + * int32 min_replica_count = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The minReplicaCount to set. + * @return This builder for chaining. + */ + public Builder setMinReplicaCount(int value) { + + minReplicaCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The minimum number of replicas this DeployedModel will be always deployed
+     * on. If traffic against it increases, it may dynamically be deployed onto
+     * more replicas up to [max_replica_count][google.cloud.aiplatform.v1.AutomaticResources.max_replica_count], and as traffic decreases, some
+     * of these extra replicas may be freed.
+     * If the requested value is too large, the deployment will error.
+     * 
+ * + * int32 min_replica_count = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearMinReplicaCount() { + + minReplicaCount_ = 0; + onChanged(); + return this; + } + + private int maxReplicaCount_; + /** + * + * + *
+     * Immutable. The maximum number of replicas this DeployedModel may be deployed on when
+     * the traffic against it increases. If the requested value is too large,
+     * the deployment will error, but if deployment succeeds then the ability
+     * to scale the model to that many replicas is guaranteed (barring service
+     * outages). If traffic against the DeployedModel increases beyond what its
+     * replicas at maximum may handle, a portion of the traffic will be dropped.
+     * If this value is not provided, a no upper bound for scaling under heavy
+     * traffic will be assume, though AI Platform may be unable to scale beyond
+     * certain replica number.
+     * 
+ * + * int32 max_replica_count = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The maxReplicaCount. + */ + @java.lang.Override + public int getMaxReplicaCount() { + return maxReplicaCount_; + } + /** + * + * + *
+     * Immutable. The maximum number of replicas this DeployedModel may be deployed on when
+     * the traffic against it increases. If the requested value is too large,
+     * the deployment will error, but if deployment succeeds then the ability
+     * to scale the model to that many replicas is guaranteed (barring service
+     * outages). If traffic against the DeployedModel increases beyond what its
+     * replicas at maximum may handle, a portion of the traffic will be dropped.
+     * If this value is not provided, a no upper bound for scaling under heavy
+     * traffic will be assume, though AI Platform may be unable to scale beyond
+     * certain replica number.
+     * 
+ * + * int32 max_replica_count = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The maxReplicaCount to set. + * @return This builder for chaining. + */ + public Builder setMaxReplicaCount(int value) { + + maxReplicaCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The maximum number of replicas this DeployedModel may be deployed on when
+     * the traffic against it increases. If the requested value is too large,
+     * the deployment will error, but if deployment succeeds then the ability
+     * to scale the model to that many replicas is guaranteed (barring service
+     * outages). If traffic against the DeployedModel increases beyond what its
+     * replicas at maximum may handle, a portion of the traffic will be dropped.
+     * If this value is not provided, a no upper bound for scaling under heavy
+     * traffic will be assume, though AI Platform may be unable to scale beyond
+     * certain replica number.
+     * 
+ * + * int32 max_replica_count = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearMaxReplicaCount() { + + maxReplicaCount_ = 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.v1.AutomaticResources) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.AutomaticResources) + private static final com.google.cloud.aiplatform.v1.AutomaticResources DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.AutomaticResources(); + } + + public static com.google.cloud.aiplatform.v1.AutomaticResources getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AutomaticResources parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AutomaticResources(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.v1.AutomaticResources getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/AutomaticResourcesOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/AutomaticResourcesOrBuilder.java new file mode 100644 index 000000000..e41ec4e37 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/AutomaticResourcesOrBuilder.java @@ -0,0 +1,63 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/machine_resources.proto + +package com.google.cloud.aiplatform.v1; + +public interface AutomaticResourcesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.AutomaticResources) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Immutable. The minimum number of replicas this DeployedModel will be always deployed
+   * on. If traffic against it increases, it may dynamically be deployed onto
+   * more replicas up to [max_replica_count][google.cloud.aiplatform.v1.AutomaticResources.max_replica_count], and as traffic decreases, some
+   * of these extra replicas may be freed.
+   * If the requested value is too large, the deployment will error.
+   * 
+ * + * int32 min_replica_count = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The minReplicaCount. + */ + int getMinReplicaCount(); + + /** + * + * + *
+   * Immutable. The maximum number of replicas this DeployedModel may be deployed on when
+   * the traffic against it increases. If the requested value is too large,
+   * the deployment will error, but if deployment succeeds then the ability
+   * to scale the model to that many replicas is guaranteed (barring service
+   * outages). If traffic against the DeployedModel increases beyond what its
+   * replicas at maximum may handle, a portion of the traffic will be dropped.
+   * If this value is not provided, a no upper bound for scaling under heavy
+   * traffic will be assume, though AI Platform may be unable to scale beyond
+   * certain replica number.
+   * 
+ * + * int32 max_replica_count = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The maxReplicaCount. + */ + int getMaxReplicaCount(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BatchDedicatedResources.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BatchDedicatedResources.java new file mode 100644 index 000000000..02ef10b5e --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BatchDedicatedResources.java @@ -0,0 +1,953 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/machine_resources.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * A description of resources that are used for performing batch operations, are
+ * dedicated to a Model, and need manual configuration.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.BatchDedicatedResources} + */ +public final class BatchDedicatedResources extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.BatchDedicatedResources) + BatchDedicatedResourcesOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchDedicatedResources.newBuilder() to construct. + private BatchDedicatedResources(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BatchDedicatedResources() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BatchDedicatedResources(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private BatchDedicatedResources( + 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.v1.MachineSpec.Builder subBuilder = null; + if (machineSpec_ != null) { + subBuilder = machineSpec_.toBuilder(); + } + machineSpec_ = + input.readMessage( + com.google.cloud.aiplatform.v1.MachineSpec.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(machineSpec_); + machineSpec_ = subBuilder.buildPartial(); + } + + break; + } + case 16: + { + startingReplicaCount_ = input.readInt32(); + break; + } + case 24: + { + maxReplicaCount_ = 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.v1.MachineResourcesProto + .internal_static_google_cloud_aiplatform_v1_BatchDedicatedResources_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.MachineResourcesProto + .internal_static_google_cloud_aiplatform_v1_BatchDedicatedResources_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.BatchDedicatedResources.class, + com.google.cloud.aiplatform.v1.BatchDedicatedResources.Builder.class); + } + + public static final int MACHINE_SPEC_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1.MachineSpec machineSpec_; + /** + * + * + *
+   * Required. Immutable. The specification of a single machine.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the machineSpec field is set. + */ + @java.lang.Override + public boolean hasMachineSpec() { + return machineSpec_ != null; + } + /** + * + * + *
+   * Required. Immutable. The specification of a single machine.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The machineSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.MachineSpec getMachineSpec() { + return machineSpec_ == null + ? com.google.cloud.aiplatform.v1.MachineSpec.getDefaultInstance() + : machineSpec_; + } + /** + * + * + *
+   * Required. Immutable. The specification of a single machine.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.MachineSpecOrBuilder getMachineSpecOrBuilder() { + return getMachineSpec(); + } + + public static final int STARTING_REPLICA_COUNT_FIELD_NUMBER = 2; + private int startingReplicaCount_; + /** + * + * + *
+   * Immutable. The number of machine replicas used at the start of the batch operation.
+   * If not set, AI Platform decides starting number, not greater than
+   * [max_replica_count][google.cloud.aiplatform.v1.BatchDedicatedResources.max_replica_count]
+   * 
+ * + * int32 starting_replica_count = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The startingReplicaCount. + */ + @java.lang.Override + public int getStartingReplicaCount() { + return startingReplicaCount_; + } + + public static final int MAX_REPLICA_COUNT_FIELD_NUMBER = 3; + private int maxReplicaCount_; + /** + * + * + *
+   * Immutable. The maximum number of machine replicas the batch operation may be scaled
+   * to. The default value is 10.
+   * 
+ * + * int32 max_replica_count = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The maxReplicaCount. + */ + @java.lang.Override + public int getMaxReplicaCount() { + return maxReplicaCount_; + } + + 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 (machineSpec_ != null) { + output.writeMessage(1, getMachineSpec()); + } + if (startingReplicaCount_ != 0) { + output.writeInt32(2, startingReplicaCount_); + } + if (maxReplicaCount_ != 0) { + output.writeInt32(3, maxReplicaCount_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (machineSpec_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getMachineSpec()); + } + if (startingReplicaCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, startingReplicaCount_); + } + if (maxReplicaCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, maxReplicaCount_); + } + 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.v1.BatchDedicatedResources)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.BatchDedicatedResources other = + (com.google.cloud.aiplatform.v1.BatchDedicatedResources) obj; + + if (hasMachineSpec() != other.hasMachineSpec()) return false; + if (hasMachineSpec()) { + if (!getMachineSpec().equals(other.getMachineSpec())) return false; + } + if (getStartingReplicaCount() != other.getStartingReplicaCount()) return false; + if (getMaxReplicaCount() != other.getMaxReplicaCount()) 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 (hasMachineSpec()) { + hash = (37 * hash) + MACHINE_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getMachineSpec().hashCode(); + } + hash = (37 * hash) + STARTING_REPLICA_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getStartingReplicaCount(); + hash = (37 * hash) + MAX_REPLICA_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getMaxReplicaCount(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.BatchDedicatedResources parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.BatchDedicatedResources 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.v1.BatchDedicatedResources parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.BatchDedicatedResources 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.v1.BatchDedicatedResources parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.BatchDedicatedResources parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.BatchDedicatedResources parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.BatchDedicatedResources 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.v1.BatchDedicatedResources parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.BatchDedicatedResources 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.v1.BatchDedicatedResources parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.BatchDedicatedResources 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.v1.BatchDedicatedResources 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 description of resources that are used for performing batch operations, are
+   * dedicated to a Model, and need manual configuration.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.BatchDedicatedResources} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.BatchDedicatedResources) + com.google.cloud.aiplatform.v1.BatchDedicatedResourcesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.MachineResourcesProto + .internal_static_google_cloud_aiplatform_v1_BatchDedicatedResources_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.MachineResourcesProto + .internal_static_google_cloud_aiplatform_v1_BatchDedicatedResources_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.BatchDedicatedResources.class, + com.google.cloud.aiplatform.v1.BatchDedicatedResources.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.BatchDedicatedResources.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 (machineSpecBuilder_ == null) { + machineSpec_ = null; + } else { + machineSpec_ = null; + machineSpecBuilder_ = null; + } + startingReplicaCount_ = 0; + + maxReplicaCount_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.MachineResourcesProto + .internal_static_google_cloud_aiplatform_v1_BatchDedicatedResources_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.BatchDedicatedResources getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.BatchDedicatedResources.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.BatchDedicatedResources build() { + com.google.cloud.aiplatform.v1.BatchDedicatedResources result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.BatchDedicatedResources buildPartial() { + com.google.cloud.aiplatform.v1.BatchDedicatedResources result = + new com.google.cloud.aiplatform.v1.BatchDedicatedResources(this); + if (machineSpecBuilder_ == null) { + result.machineSpec_ = machineSpec_; + } else { + result.machineSpec_ = machineSpecBuilder_.build(); + } + result.startingReplicaCount_ = startingReplicaCount_; + result.maxReplicaCount_ = maxReplicaCount_; + 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.v1.BatchDedicatedResources) { + return mergeFrom((com.google.cloud.aiplatform.v1.BatchDedicatedResources) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.BatchDedicatedResources other) { + if (other == com.google.cloud.aiplatform.v1.BatchDedicatedResources.getDefaultInstance()) + return this; + if (other.hasMachineSpec()) { + mergeMachineSpec(other.getMachineSpec()); + } + if (other.getStartingReplicaCount() != 0) { + setStartingReplicaCount(other.getStartingReplicaCount()); + } + if (other.getMaxReplicaCount() != 0) { + setMaxReplicaCount(other.getMaxReplicaCount()); + } + 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.v1.BatchDedicatedResources parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.BatchDedicatedResources) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.aiplatform.v1.MachineSpec machineSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.MachineSpec, + com.google.cloud.aiplatform.v1.MachineSpec.Builder, + com.google.cloud.aiplatform.v1.MachineSpecOrBuilder> + machineSpecBuilder_; + /** + * + * + *
+     * Required. Immutable. The specification of a single machine.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the machineSpec field is set. + */ + public boolean hasMachineSpec() { + return machineSpecBuilder_ != null || machineSpec_ != null; + } + /** + * + * + *
+     * Required. Immutable. The specification of a single machine.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The machineSpec. + */ + public com.google.cloud.aiplatform.v1.MachineSpec getMachineSpec() { + if (machineSpecBuilder_ == null) { + return machineSpec_ == null + ? com.google.cloud.aiplatform.v1.MachineSpec.getDefaultInstance() + : machineSpec_; + } else { + return machineSpecBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Immutable. The specification of a single machine.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder setMachineSpec(com.google.cloud.aiplatform.v1.MachineSpec value) { + if (machineSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + machineSpec_ = value; + onChanged(); + } else { + machineSpecBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. Immutable. The specification of a single machine.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder setMachineSpec( + com.google.cloud.aiplatform.v1.MachineSpec.Builder builderForValue) { + if (machineSpecBuilder_ == null) { + machineSpec_ = builderForValue.build(); + onChanged(); + } else { + machineSpecBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. Immutable. The specification of a single machine.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder mergeMachineSpec(com.google.cloud.aiplatform.v1.MachineSpec value) { + if (machineSpecBuilder_ == null) { + if (machineSpec_ != null) { + machineSpec_ = + com.google.cloud.aiplatform.v1.MachineSpec.newBuilder(machineSpec_) + .mergeFrom(value) + .buildPartial(); + } else { + machineSpec_ = value; + } + onChanged(); + } else { + machineSpecBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. Immutable. The specification of a single machine.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder clearMachineSpec() { + if (machineSpecBuilder_ == null) { + machineSpec_ = null; + onChanged(); + } else { + machineSpec_ = null; + machineSpecBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. Immutable. The specification of a single machine.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public com.google.cloud.aiplatform.v1.MachineSpec.Builder getMachineSpecBuilder() { + + onChanged(); + return getMachineSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Immutable. The specification of a single machine.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public com.google.cloud.aiplatform.v1.MachineSpecOrBuilder getMachineSpecOrBuilder() { + if (machineSpecBuilder_ != null) { + return machineSpecBuilder_.getMessageOrBuilder(); + } else { + return machineSpec_ == null + ? com.google.cloud.aiplatform.v1.MachineSpec.getDefaultInstance() + : machineSpec_; + } + } + /** + * + * + *
+     * Required. Immutable. The specification of a single machine.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.MachineSpec, + com.google.cloud.aiplatform.v1.MachineSpec.Builder, + com.google.cloud.aiplatform.v1.MachineSpecOrBuilder> + getMachineSpecFieldBuilder() { + if (machineSpecBuilder_ == null) { + machineSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.MachineSpec, + com.google.cloud.aiplatform.v1.MachineSpec.Builder, + com.google.cloud.aiplatform.v1.MachineSpecOrBuilder>( + getMachineSpec(), getParentForChildren(), isClean()); + machineSpec_ = null; + } + return machineSpecBuilder_; + } + + private int startingReplicaCount_; + /** + * + * + *
+     * Immutable. The number of machine replicas used at the start of the batch operation.
+     * If not set, AI Platform decides starting number, not greater than
+     * [max_replica_count][google.cloud.aiplatform.v1.BatchDedicatedResources.max_replica_count]
+     * 
+ * + * int32 starting_replica_count = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The startingReplicaCount. + */ + @java.lang.Override + public int getStartingReplicaCount() { + return startingReplicaCount_; + } + /** + * + * + *
+     * Immutable. The number of machine replicas used at the start of the batch operation.
+     * If not set, AI Platform decides starting number, not greater than
+     * [max_replica_count][google.cloud.aiplatform.v1.BatchDedicatedResources.max_replica_count]
+     * 
+ * + * int32 starting_replica_count = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The startingReplicaCount to set. + * @return This builder for chaining. + */ + public Builder setStartingReplicaCount(int value) { + + startingReplicaCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The number of machine replicas used at the start of the batch operation.
+     * If not set, AI Platform decides starting number, not greater than
+     * [max_replica_count][google.cloud.aiplatform.v1.BatchDedicatedResources.max_replica_count]
+     * 
+ * + * int32 starting_replica_count = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearStartingReplicaCount() { + + startingReplicaCount_ = 0; + onChanged(); + return this; + } + + private int maxReplicaCount_; + /** + * + * + *
+     * Immutable. The maximum number of machine replicas the batch operation may be scaled
+     * to. The default value is 10.
+     * 
+ * + * int32 max_replica_count = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The maxReplicaCount. + */ + @java.lang.Override + public int getMaxReplicaCount() { + return maxReplicaCount_; + } + /** + * + * + *
+     * Immutable. The maximum number of machine replicas the batch operation may be scaled
+     * to. The default value is 10.
+     * 
+ * + * int32 max_replica_count = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The maxReplicaCount to set. + * @return This builder for chaining. + */ + public Builder setMaxReplicaCount(int value) { + + maxReplicaCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The maximum number of machine replicas the batch operation may be scaled
+     * to. The default value is 10.
+     * 
+ * + * int32 max_replica_count = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearMaxReplicaCount() { + + maxReplicaCount_ = 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.v1.BatchDedicatedResources) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.BatchDedicatedResources) + private static final com.google.cloud.aiplatform.v1.BatchDedicatedResources DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.BatchDedicatedResources(); + } + + public static com.google.cloud.aiplatform.v1.BatchDedicatedResources getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchDedicatedResources parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BatchDedicatedResources(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.v1.BatchDedicatedResources getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BatchDedicatedResourcesOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BatchDedicatedResourcesOrBuilder.java new file mode 100644 index 000000000..dfd29c22e --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BatchDedicatedResourcesOrBuilder.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/v1/machine_resources.proto + +package com.google.cloud.aiplatform.v1; + +public interface BatchDedicatedResourcesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.BatchDedicatedResources) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Immutable. The specification of a single machine.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the machineSpec field is set. + */ + boolean hasMachineSpec(); + /** + * + * + *
+   * Required. Immutable. The specification of a single machine.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The machineSpec. + */ + com.google.cloud.aiplatform.v1.MachineSpec getMachineSpec(); + /** + * + * + *
+   * Required. Immutable. The specification of a single machine.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + com.google.cloud.aiplatform.v1.MachineSpecOrBuilder getMachineSpecOrBuilder(); + + /** + * + * + *
+   * Immutable. The number of machine replicas used at the start of the batch operation.
+   * If not set, AI Platform decides starting number, not greater than
+   * [max_replica_count][google.cloud.aiplatform.v1.BatchDedicatedResources.max_replica_count]
+   * 
+ * + * int32 starting_replica_count = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The startingReplicaCount. + */ + int getStartingReplicaCount(); + + /** + * + * + *
+   * Immutable. The maximum number of machine replicas the batch operation may be scaled
+   * to. The default value is 10.
+   * 
+ * + * int32 max_replica_count = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The maxReplicaCount. + */ + int getMaxReplicaCount(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BatchMigrateResourcesOperationMetadata.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BatchMigrateResourcesOperationMetadata.java new file mode 100644 index 000000000..fa0751fec --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BatchMigrateResourcesOperationMetadata.java @@ -0,0 +1,3059 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/migration_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Runtime operation information for [MigrationService.BatchMigrateResources][google.cloud.aiplatform.v1.MigrationService.BatchMigrateResources].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata} + */ +public final class BatchMigrateResourcesOperationMetadata + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata) + BatchMigrateResourcesOperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchMigrateResourcesOperationMetadata.newBuilder() to construct. + private BatchMigrateResourcesOperationMetadata( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BatchMigrateResourcesOperationMetadata() { + partialResults_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BatchMigrateResourcesOperationMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private BatchMigrateResourcesOperationMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder subBuilder = null; + if (genericMetadata_ != null) { + subBuilder = genericMetadata_.toBuilder(); + } + genericMetadata_ = + input.readMessage( + com.google.cloud.aiplatform.v1.GenericOperationMetadata.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(genericMetadata_); + genericMetadata_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + partialResults_ = + new java.util.ArrayList< + com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata + .PartialResult>(); + mutable_bitField0_ |= 0x00000001; + } + partialResults_.add( + input.readMessage( + com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata + .PartialResult.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)) { + partialResults_ = java.util.Collections.unmodifiableList(partialResults_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.MigrationServiceProto + .internal_static_google_cloud_aiplatform_v1_BatchMigrateResourcesOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.MigrationServiceProto + .internal_static_google_cloud_aiplatform_v1_BatchMigrateResourcesOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.class, + com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.Builder.class); + } + + public interface PartialResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The error result of the migration request in case of failure.
+     * 
+ * + * .google.rpc.Status error = 2; + * + * @return Whether the error field is set. + */ + boolean hasError(); + /** + * + * + *
+     * The error result of the migration request in case of failure.
+     * 
+ * + * .google.rpc.Status error = 2; + * + * @return The error. + */ + com.google.rpc.Status getError(); + /** + * + * + *
+     * The error result of the migration request in case of failure.
+     * 
+ * + * .google.rpc.Status error = 2; + */ + com.google.rpc.StatusOrBuilder getErrorOrBuilder(); + + /** + * + * + *
+     * Migrated model resource name.
+     * 
+ * + * string model = 3 [(.google.api.resource_reference) = { ... } + * + * @return The model. + */ + java.lang.String getModel(); + /** + * + * + *
+     * Migrated model resource name.
+     * 
+ * + * string model = 3 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for model. + */ + com.google.protobuf.ByteString getModelBytes(); + + /** + * + * + *
+     * Migrated dataset resource name.
+     * 
+ * + * string dataset = 4 [(.google.api.resource_reference) = { ... } + * + * @return The dataset. + */ + java.lang.String getDataset(); + /** + * + * + *
+     * Migrated dataset resource name.
+     * 
+ * + * string dataset = 4 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for dataset. + */ + com.google.protobuf.ByteString getDatasetBytes(); + + /** + * + * + *
+     * It's the same as the value in
+     * [MigrateResourceRequest.migrate_resource_requests][].
+     * 
+ * + * .google.cloud.aiplatform.v1.MigrateResourceRequest request = 1; + * + * @return Whether the request field is set. + */ + boolean hasRequest(); + /** + * + * + *
+     * It's the same as the value in
+     * [MigrateResourceRequest.migrate_resource_requests][].
+     * 
+ * + * .google.cloud.aiplatform.v1.MigrateResourceRequest request = 1; + * + * @return The request. + */ + com.google.cloud.aiplatform.v1.MigrateResourceRequest getRequest(); + /** + * + * + *
+     * It's the same as the value in
+     * [MigrateResourceRequest.migrate_resource_requests][].
+     * 
+ * + * .google.cloud.aiplatform.v1.MigrateResourceRequest request = 1; + */ + com.google.cloud.aiplatform.v1.MigrateResourceRequestOrBuilder getRequestOrBuilder(); + + public com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult + .ResultCase + getResultCase(); + } + /** + * + * + *
+   * Represents a partial result in batch migration operation for one
+   * [MigrateResourceRequest][google.cloud.aiplatform.v1.MigrateResourceRequest].
+   * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult} + */ + public static final class PartialResult extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult) + PartialResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use PartialResult.newBuilder() to construct. + private PartialResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PartialResult() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PartialResult(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private PartialResult( + 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.v1.MigrateResourceRequest.Builder subBuilder = null; + if (request_ != null) { + subBuilder = request_.toBuilder(); + } + request_ = + input.readMessage( + com.google.cloud.aiplatform.v1.MigrateResourceRequest.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(request_); + request_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.rpc.Status.Builder subBuilder = null; + if (resultCase_ == 2) { + subBuilder = ((com.google.rpc.Status) result_).toBuilder(); + } + result_ = input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.rpc.Status) result_); + result_ = subBuilder.buildPartial(); + } + resultCase_ = 2; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + resultCase_ = 3; + result_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + resultCase_ = 4; + result_ = 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.v1.MigrationServiceProto + .internal_static_google_cloud_aiplatform_v1_BatchMigrateResourcesOperationMetadata_PartialResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.MigrationServiceProto + .internal_static_google_cloud_aiplatform_v1_BatchMigrateResourcesOperationMetadata_PartialResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult + .class, + com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult + .Builder.class); + } + + private int resultCase_ = 0; + private java.lang.Object result_; + + public enum ResultCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + ERROR(2), + MODEL(3), + DATASET(4), + RESULT_NOT_SET(0); + private final int value; + + private ResultCase(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 ResultCase valueOf(int value) { + return forNumber(value); + } + + public static ResultCase forNumber(int value) { + switch (value) { + case 2: + return ERROR; + case 3: + return MODEL; + case 4: + return DATASET; + case 0: + return RESULT_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ResultCase getResultCase() { + return ResultCase.forNumber(resultCase_); + } + + public static final int ERROR_FIELD_NUMBER = 2; + /** + * + * + *
+     * The error result of the migration request in case of failure.
+     * 
+ * + * .google.rpc.Status error = 2; + * + * @return Whether the error field is set. + */ + @java.lang.Override + public boolean hasError() { + return resultCase_ == 2; + } + /** + * + * + *
+     * The error result of the migration request in case of failure.
+     * 
+ * + * .google.rpc.Status error = 2; + * + * @return The error. + */ + @java.lang.Override + public com.google.rpc.Status getError() { + if (resultCase_ == 2) { + return (com.google.rpc.Status) result_; + } + return com.google.rpc.Status.getDefaultInstance(); + } + /** + * + * + *
+     * The error result of the migration request in case of failure.
+     * 
+ * + * .google.rpc.Status error = 2; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + if (resultCase_ == 2) { + return (com.google.rpc.Status) result_; + } + return com.google.rpc.Status.getDefaultInstance(); + } + + public static final int MODEL_FIELD_NUMBER = 3; + /** + * + * + *
+     * Migrated model resource name.
+     * 
+ * + * string model = 3 [(.google.api.resource_reference) = { ... } + * + * @return The model. + */ + public java.lang.String getModel() { + java.lang.Object ref = ""; + if (resultCase_ == 3) { + ref = result_; + } + 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(); + if (resultCase_ == 3) { + result_ = s; + } + return s; + } + } + /** + * + * + *
+     * Migrated model resource name.
+     * 
+ * + * string model = 3 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for model. + */ + public com.google.protobuf.ByteString getModelBytes() { + java.lang.Object ref = ""; + if (resultCase_ == 3) { + ref = result_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (resultCase_ == 3) { + result_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATASET_FIELD_NUMBER = 4; + /** + * + * + *
+     * Migrated dataset resource name.
+     * 
+ * + * string dataset = 4 [(.google.api.resource_reference) = { ... } + * + * @return The dataset. + */ + public java.lang.String getDataset() { + java.lang.Object ref = ""; + if (resultCase_ == 4) { + ref = result_; + } + 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(); + if (resultCase_ == 4) { + result_ = s; + } + return s; + } + } + /** + * + * + *
+     * Migrated dataset resource name.
+     * 
+ * + * string dataset = 4 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for dataset. + */ + public com.google.protobuf.ByteString getDatasetBytes() { + java.lang.Object ref = ""; + if (resultCase_ == 4) { + ref = result_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (resultCase_ == 4) { + result_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1.MigrateResourceRequest request_; + /** + * + * + *
+     * It's the same as the value in
+     * [MigrateResourceRequest.migrate_resource_requests][].
+     * 
+ * + * .google.cloud.aiplatform.v1.MigrateResourceRequest request = 1; + * + * @return Whether the request field is set. + */ + @java.lang.Override + public boolean hasRequest() { + return request_ != null; + } + /** + * + * + *
+     * It's the same as the value in
+     * [MigrateResourceRequest.migrate_resource_requests][].
+     * 
+ * + * .google.cloud.aiplatform.v1.MigrateResourceRequest request = 1; + * + * @return The request. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigrateResourceRequest getRequest() { + return request_ == null + ? com.google.cloud.aiplatform.v1.MigrateResourceRequest.getDefaultInstance() + : request_; + } + /** + * + * + *
+     * It's the same as the value in
+     * [MigrateResourceRequest.migrate_resource_requests][].
+     * 
+ * + * .google.cloud.aiplatform.v1.MigrateResourceRequest request = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigrateResourceRequestOrBuilder getRequestOrBuilder() { + return getRequest(); + } + + 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 (request_ != null) { + output.writeMessage(1, getRequest()); + } + if (resultCase_ == 2) { + output.writeMessage(2, (com.google.rpc.Status) result_); + } + if (resultCase_ == 3) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, result_); + } + if (resultCase_ == 4) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, result_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (request_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getRequest()); + } + if (resultCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.rpc.Status) result_); + } + if (resultCase_ == 3) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, result_); + } + if (resultCase_ == 4) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, result_); + } + 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.v1.BatchMigrateResourcesOperationMetadata.PartialResult)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult other = + (com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult) obj; + + if (hasRequest() != other.hasRequest()) return false; + if (hasRequest()) { + if (!getRequest().equals(other.getRequest())) return false; + } + if (!getResultCase().equals(other.getResultCase())) return false; + switch (resultCase_) { + case 2: + if (!getError().equals(other.getError())) return false; + break; + case 3: + if (!getModel().equals(other.getModel())) return false; + break; + case 4: + if (!getDataset().equals(other.getDataset())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasRequest()) { + hash = (37 * hash) + REQUEST_FIELD_NUMBER; + hash = (53 * hash) + getRequest().hashCode(); + } + switch (resultCase_) { + case 2: + hash = (37 * hash) + ERROR_FIELD_NUMBER; + hash = (53 * hash) + getError().hashCode(); + break; + case 3: + hash = (37 * hash) + MODEL_FIELD_NUMBER; + hash = (53 * hash) + getModel().hashCode(); + break; + case 4: + hash = (37 * hash) + DATASET_FIELD_NUMBER; + hash = (53 * hash) + getDataset().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata + .PartialResult + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata + .PartialResult + 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.v1.BatchMigrateResourcesOperationMetadata + .PartialResult + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata + .PartialResult + 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.v1.BatchMigrateResourcesOperationMetadata + .PartialResult + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata + .PartialResult + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata + .PartialResult + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata + .PartialResult + 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.v1.BatchMigrateResourcesOperationMetadata + .PartialResult + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata + .PartialResult + 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.v1.BatchMigrateResourcesOperationMetadata + .PartialResult + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata + .PartialResult + 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.v1.BatchMigrateResourcesOperationMetadata.PartialResult + 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 partial result in batch migration operation for one
+     * [MigrateResourceRequest][google.cloud.aiplatform.v1.MigrateResourceRequest].
+     * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult) + com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata + .PartialResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.MigrationServiceProto + .internal_static_google_cloud_aiplatform_v1_BatchMigrateResourcesOperationMetadata_PartialResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.MigrationServiceProto + .internal_static_google_cloud_aiplatform_v1_BatchMigrateResourcesOperationMetadata_PartialResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult + .class, + com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult + .Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult.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 (requestBuilder_ == null) { + request_ = null; + } else { + request_ = null; + requestBuilder_ = null; + } + resultCase_ = 0; + result_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.MigrationServiceProto + .internal_static_google_cloud_aiplatform_v1_BatchMigrateResourcesOperationMetadata_PartialResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult + build() { + com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult + buildPartial() { + com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult result = + new com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult( + this); + if (resultCase_ == 2) { + if (errorBuilder_ == null) { + result.result_ = result_; + } else { + result.result_ = errorBuilder_.build(); + } + } + if (resultCase_ == 3) { + result.result_ = result_; + } + if (resultCase_ == 4) { + result.result_ = result_; + } + if (requestBuilder_ == null) { + result.request_ = request_; + } else { + result.request_ = requestBuilder_.build(); + } + result.resultCase_ = resultCase_; + 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.v1.BatchMigrateResourcesOperationMetadata.PartialResult) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult + other) { + if (other + == com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult + .getDefaultInstance()) return this; + if (other.hasRequest()) { + mergeRequest(other.getRequest()); + } + switch (other.getResultCase()) { + case ERROR: + { + mergeError(other.getError()); + break; + } + case MODEL: + { + resultCase_ = 3; + result_ = other.result_; + onChanged(); + break; + } + case DATASET: + { + resultCase_ = 4; + result_ = other.result_; + onChanged(); + break; + } + case RESULT_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.v1.BatchMigrateResourcesOperationMetadata.PartialResult + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int resultCase_ = 0; + private java.lang.Object result_; + + public ResultCase getResultCase() { + return ResultCase.forNumber(resultCase_); + } + + public Builder clearResult() { + resultCase_ = 0; + result_ = null; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + errorBuilder_; + /** + * + * + *
+       * The error result of the migration request in case of failure.
+       * 
+ * + * .google.rpc.Status error = 2; + * + * @return Whether the error field is set. + */ + @java.lang.Override + public boolean hasError() { + return resultCase_ == 2; + } + /** + * + * + *
+       * The error result of the migration request in case of failure.
+       * 
+ * + * .google.rpc.Status error = 2; + * + * @return The error. + */ + @java.lang.Override + public com.google.rpc.Status getError() { + if (errorBuilder_ == null) { + if (resultCase_ == 2) { + return (com.google.rpc.Status) result_; + } + return com.google.rpc.Status.getDefaultInstance(); + } else { + if (resultCase_ == 2) { + return errorBuilder_.getMessage(); + } + return com.google.rpc.Status.getDefaultInstance(); + } + } + /** + * + * + *
+       * The error result of the migration request in case of failure.
+       * 
+ * + * .google.rpc.Status error = 2; + */ + public Builder setError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + result_ = value; + onChanged(); + } else { + errorBuilder_.setMessage(value); + } + resultCase_ = 2; + return this; + } + /** + * + * + *
+       * The error result of the migration request in case of failure.
+       * 
+ * + * .google.rpc.Status error = 2; + */ + public Builder setError(com.google.rpc.Status.Builder builderForValue) { + if (errorBuilder_ == null) { + result_ = builderForValue.build(); + onChanged(); + } else { + errorBuilder_.setMessage(builderForValue.build()); + } + resultCase_ = 2; + return this; + } + /** + * + * + *
+       * The error result of the migration request in case of failure.
+       * 
+ * + * .google.rpc.Status error = 2; + */ + public Builder mergeError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (resultCase_ == 2 && result_ != com.google.rpc.Status.getDefaultInstance()) { + result_ = + com.google.rpc.Status.newBuilder((com.google.rpc.Status) result_) + .mergeFrom(value) + .buildPartial(); + } else { + result_ = value; + } + onChanged(); + } else { + if (resultCase_ == 2) { + errorBuilder_.mergeFrom(value); + } + errorBuilder_.setMessage(value); + } + resultCase_ = 2; + return this; + } + /** + * + * + *
+       * The error result of the migration request in case of failure.
+       * 
+ * + * .google.rpc.Status error = 2; + */ + public Builder clearError() { + if (errorBuilder_ == null) { + if (resultCase_ == 2) { + resultCase_ = 0; + result_ = null; + onChanged(); + } + } else { + if (resultCase_ == 2) { + resultCase_ = 0; + result_ = null; + } + errorBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * The error result of the migration request in case of failure.
+       * 
+ * + * .google.rpc.Status error = 2; + */ + public com.google.rpc.Status.Builder getErrorBuilder() { + return getErrorFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The error result of the migration request in case of failure.
+       * 
+ * + * .google.rpc.Status error = 2; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + if ((resultCase_ == 2) && (errorBuilder_ != null)) { + return errorBuilder_.getMessageOrBuilder(); + } else { + if (resultCase_ == 2) { + return (com.google.rpc.Status) result_; + } + return com.google.rpc.Status.getDefaultInstance(); + } + } + /** + * + * + *
+       * The error result of the migration request in case of failure.
+       * 
+ * + * .google.rpc.Status error = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getErrorFieldBuilder() { + if (errorBuilder_ == null) { + if (!(resultCase_ == 2)) { + result_ = com.google.rpc.Status.getDefaultInstance(); + } + errorBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, + com.google.rpc.Status.Builder, + com.google.rpc.StatusOrBuilder>( + (com.google.rpc.Status) result_, getParentForChildren(), isClean()); + result_ = null; + } + resultCase_ = 2; + onChanged(); + ; + return errorBuilder_; + } + + /** + * + * + *
+       * Migrated model resource name.
+       * 
+ * + * string model = 3 [(.google.api.resource_reference) = { ... } + * + * @return The model. + */ + @java.lang.Override + public java.lang.String getModel() { + java.lang.Object ref = ""; + if (resultCase_ == 3) { + ref = result_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (resultCase_ == 3) { + result_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Migrated model resource name.
+       * 
+ * + * string model = 3 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for model. + */ + @java.lang.Override + public com.google.protobuf.ByteString getModelBytes() { + java.lang.Object ref = ""; + if (resultCase_ == 3) { + ref = result_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (resultCase_ == 3) { + result_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Migrated model resource name.
+       * 
+ * + * string model = 3 [(.google.api.resource_reference) = { ... } + * + * @param value The model to set. + * @return This builder for chaining. + */ + public Builder setModel(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + resultCase_ = 3; + result_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Migrated model resource name.
+       * 
+ * + * string model = 3 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearModel() { + if (resultCase_ == 3) { + resultCase_ = 0; + result_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+       * Migrated model resource name.
+       * 
+ * + * string model = 3 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for model to set. + * @return This builder for chaining. + */ + public Builder setModelBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + resultCase_ = 3; + result_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+       * Migrated dataset resource name.
+       * 
+ * + * string dataset = 4 [(.google.api.resource_reference) = { ... } + * + * @return The dataset. + */ + @java.lang.Override + public java.lang.String getDataset() { + java.lang.Object ref = ""; + if (resultCase_ == 4) { + ref = result_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (resultCase_ == 4) { + result_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Migrated dataset resource name.
+       * 
+ * + * string dataset = 4 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for dataset. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDatasetBytes() { + java.lang.Object ref = ""; + if (resultCase_ == 4) { + ref = result_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (resultCase_ == 4) { + result_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Migrated dataset resource name.
+       * 
+ * + * string dataset = 4 [(.google.api.resource_reference) = { ... } + * + * @param value The dataset to set. + * @return This builder for chaining. + */ + public Builder setDataset(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + resultCase_ = 4; + result_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Migrated dataset resource name.
+       * 
+ * + * string dataset = 4 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearDataset() { + if (resultCase_ == 4) { + resultCase_ = 0; + result_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+       * Migrated dataset resource name.
+       * 
+ * + * string dataset = 4 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for dataset to set. + * @return This builder for chaining. + */ + public Builder setDatasetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + resultCase_ = 4; + result_ = value; + onChanged(); + return this; + } + + private com.google.cloud.aiplatform.v1.MigrateResourceRequest request_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.MigrateResourceRequest, + com.google.cloud.aiplatform.v1.MigrateResourceRequest.Builder, + com.google.cloud.aiplatform.v1.MigrateResourceRequestOrBuilder> + requestBuilder_; + /** + * + * + *
+       * It's the same as the value in
+       * [MigrateResourceRequest.migrate_resource_requests][].
+       * 
+ * + * .google.cloud.aiplatform.v1.MigrateResourceRequest request = 1; + * + * @return Whether the request field is set. + */ + public boolean hasRequest() { + return requestBuilder_ != null || request_ != null; + } + /** + * + * + *
+       * It's the same as the value in
+       * [MigrateResourceRequest.migrate_resource_requests][].
+       * 
+ * + * .google.cloud.aiplatform.v1.MigrateResourceRequest request = 1; + * + * @return The request. + */ + public com.google.cloud.aiplatform.v1.MigrateResourceRequest getRequest() { + if (requestBuilder_ == null) { + return request_ == null + ? com.google.cloud.aiplatform.v1.MigrateResourceRequest.getDefaultInstance() + : request_; + } else { + return requestBuilder_.getMessage(); + } + } + /** + * + * + *
+       * It's the same as the value in
+       * [MigrateResourceRequest.migrate_resource_requests][].
+       * 
+ * + * .google.cloud.aiplatform.v1.MigrateResourceRequest request = 1; + */ + public Builder setRequest(com.google.cloud.aiplatform.v1.MigrateResourceRequest value) { + if (requestBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + request_ = value; + onChanged(); + } else { + requestBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * It's the same as the value in
+       * [MigrateResourceRequest.migrate_resource_requests][].
+       * 
+ * + * .google.cloud.aiplatform.v1.MigrateResourceRequest request = 1; + */ + public Builder setRequest( + com.google.cloud.aiplatform.v1.MigrateResourceRequest.Builder builderForValue) { + if (requestBuilder_ == null) { + request_ = builderForValue.build(); + onChanged(); + } else { + requestBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * It's the same as the value in
+       * [MigrateResourceRequest.migrate_resource_requests][].
+       * 
+ * + * .google.cloud.aiplatform.v1.MigrateResourceRequest request = 1; + */ + public Builder mergeRequest(com.google.cloud.aiplatform.v1.MigrateResourceRequest value) { + if (requestBuilder_ == null) { + if (request_ != null) { + request_ = + com.google.cloud.aiplatform.v1.MigrateResourceRequest.newBuilder(request_) + .mergeFrom(value) + .buildPartial(); + } else { + request_ = value; + } + onChanged(); + } else { + requestBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * It's the same as the value in
+       * [MigrateResourceRequest.migrate_resource_requests][].
+       * 
+ * + * .google.cloud.aiplatform.v1.MigrateResourceRequest request = 1; + */ + public Builder clearRequest() { + if (requestBuilder_ == null) { + request_ = null; + onChanged(); + } else { + request_ = null; + requestBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * It's the same as the value in
+       * [MigrateResourceRequest.migrate_resource_requests][].
+       * 
+ * + * .google.cloud.aiplatform.v1.MigrateResourceRequest request = 1; + */ + public com.google.cloud.aiplatform.v1.MigrateResourceRequest.Builder getRequestBuilder() { + + onChanged(); + return getRequestFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * It's the same as the value in
+       * [MigrateResourceRequest.migrate_resource_requests][].
+       * 
+ * + * .google.cloud.aiplatform.v1.MigrateResourceRequest request = 1; + */ + public com.google.cloud.aiplatform.v1.MigrateResourceRequestOrBuilder getRequestOrBuilder() { + if (requestBuilder_ != null) { + return requestBuilder_.getMessageOrBuilder(); + } else { + return request_ == null + ? com.google.cloud.aiplatform.v1.MigrateResourceRequest.getDefaultInstance() + : request_; + } + } + /** + * + * + *
+       * It's the same as the value in
+       * [MigrateResourceRequest.migrate_resource_requests][].
+       * 
+ * + * .google.cloud.aiplatform.v1.MigrateResourceRequest request = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.MigrateResourceRequest, + com.google.cloud.aiplatform.v1.MigrateResourceRequest.Builder, + com.google.cloud.aiplatform.v1.MigrateResourceRequestOrBuilder> + getRequestFieldBuilder() { + if (requestBuilder_ == null) { + requestBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.MigrateResourceRequest, + com.google.cloud.aiplatform.v1.MigrateResourceRequest.Builder, + com.google.cloud.aiplatform.v1.MigrateResourceRequestOrBuilder>( + getRequest(), getParentForChildren(), isClean()); + request_ = null; + } + return requestBuilder_; + } + + @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.v1.BatchMigrateResourcesOperationMetadata.PartialResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult) + private static final com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata + .PartialResult + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult(); + } + + public static com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata + .PartialResult + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PartialResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PartialResult(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.v1.BatchMigrateResourcesOperationMetadata.PartialResult + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int GENERIC_METADATA_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1.GenericOperationMetadata genericMetadata_; + /** + * + * + *
+   * The common part of the operation metadata.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + @java.lang.Override + public boolean hasGenericMetadata() { + return genericMetadata_ != null; + } + /** + * + * + *
+   * The common part of the operation metadata.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata() { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + /** + * + * + *
+   * The common part of the operation metadata.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder() { + return getGenericMetadata(); + } + + public static final int PARTIAL_RESULTS_FIELD_NUMBER = 2; + private java.util.List< + com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult> + partialResults_; + /** + * + * + *
+   * Partial results that reflect the latest migration operation progress.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult partial_results = 2; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult> + getPartialResultsList() { + return partialResults_; + } + /** + * + * + *
+   * Partial results that reflect the latest migration operation progress.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult partial_results = 2; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata + .PartialResultOrBuilder> + getPartialResultsOrBuilderList() { + return partialResults_; + } + /** + * + * + *
+   * Partial results that reflect the latest migration operation progress.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult partial_results = 2; + * + */ + @java.lang.Override + public int getPartialResultsCount() { + return partialResults_.size(); + } + /** + * + * + *
+   * Partial results that reflect the latest migration operation progress.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult partial_results = 2; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult + getPartialResults(int index) { + return partialResults_.get(index); + } + /** + * + * + *
+   * Partial results that reflect the latest migration operation progress.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult partial_results = 2; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata + .PartialResultOrBuilder + getPartialResultsOrBuilder(int index) { + return partialResults_.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 (genericMetadata_ != null) { + output.writeMessage(1, getGenericMetadata()); + } + for (int i = 0; i < partialResults_.size(); i++) { + output.writeMessage(2, partialResults_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (genericMetadata_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getGenericMetadata()); + } + for (int i = 0; i < partialResults_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, partialResults_.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.v1.BatchMigrateResourcesOperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata other = + (com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata) obj; + + if (hasGenericMetadata() != other.hasGenericMetadata()) return false; + if (hasGenericMetadata()) { + if (!getGenericMetadata().equals(other.getGenericMetadata())) return false; + } + if (!getPartialResultsList().equals(other.getPartialResultsList())) 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 (hasGenericMetadata()) { + hash = (37 * hash) + GENERIC_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getGenericMetadata().hashCode(); + } + if (getPartialResultsCount() > 0) { + hash = (37 * hash) + PARTIAL_RESULTS_FIELD_NUMBER; + hash = (53 * hash) + getPartialResultsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata 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.v1.BatchMigrateResourcesOperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata 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.v1.BatchMigrateResourcesOperationMetadata parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata 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.v1.BatchMigrateResourcesOperationMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata + 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.v1.BatchMigrateResourcesOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata 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.v1.BatchMigrateResourcesOperationMetadata 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; + } + /** + * + * + *
+   * Runtime operation information for [MigrationService.BatchMigrateResources][google.cloud.aiplatform.v1.MigrationService.BatchMigrateResources].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata) + com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.MigrationServiceProto + .internal_static_google_cloud_aiplatform_v1_BatchMigrateResourcesOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.MigrationServiceProto + .internal_static_google_cloud_aiplatform_v1_BatchMigrateResourcesOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.class, + com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPartialResultsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (genericMetadataBuilder_ == null) { + genericMetadata_ = null; + } else { + genericMetadata_ = null; + genericMetadataBuilder_ = null; + } + if (partialResultsBuilder_ == null) { + partialResults_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + partialResultsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.MigrationServiceProto + .internal_static_google_cloud_aiplatform_v1_BatchMigrateResourcesOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata build() { + com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata buildPartial() { + com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata result = + new com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata(this); + int from_bitField0_ = bitField0_; + if (genericMetadataBuilder_ == null) { + result.genericMetadata_ = genericMetadata_; + } else { + result.genericMetadata_ = genericMetadataBuilder_.build(); + } + if (partialResultsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + partialResults_ = java.util.Collections.unmodifiableList(partialResults_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.partialResults_ = partialResults_; + } else { + result.partialResults_ = partialResultsBuilder_.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.v1.BatchMigrateResourcesOperationMetadata) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata other) { + if (other + == com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata + .getDefaultInstance()) return this; + if (other.hasGenericMetadata()) { + mergeGenericMetadata(other.getGenericMetadata()); + } + if (partialResultsBuilder_ == null) { + if (!other.partialResults_.isEmpty()) { + if (partialResults_.isEmpty()) { + partialResults_ = other.partialResults_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePartialResultsIsMutable(); + partialResults_.addAll(other.partialResults_); + } + onChanged(); + } + } else { + if (!other.partialResults_.isEmpty()) { + if (partialResultsBuilder_.isEmpty()) { + partialResultsBuilder_.dispose(); + partialResultsBuilder_ = null; + partialResults_ = other.partialResults_; + bitField0_ = (bitField0_ & ~0x00000001); + partialResultsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPartialResultsFieldBuilder() + : null; + } else { + partialResultsBuilder_.addAllMessages(other.partialResults_); + } + } + } + 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.v1.BatchMigrateResourcesOperationMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.cloud.aiplatform.v1.GenericOperationMetadata genericMetadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder> + genericMetadataBuilder_; + /** + * + * + *
+     * The common part of the operation metadata.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + public boolean hasGenericMetadata() { + return genericMetadataBuilder_ != null || genericMetadata_ != null; + } + /** + * + * + *
+     * The common part of the operation metadata.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata() { + if (genericMetadataBuilder_ == null) { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } else { + return genericMetadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The common part of the operation metadata.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder setGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata value) { + if (genericMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + genericMetadata_ = value; + onChanged(); + } else { + genericMetadataBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The common part of the operation metadata.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder setGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder builderForValue) { + if (genericMetadataBuilder_ == null) { + genericMetadata_ = builderForValue.build(); + onChanged(); + } else { + genericMetadataBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The common part of the operation metadata.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder mergeGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata value) { + if (genericMetadataBuilder_ == null) { + if (genericMetadata_ != null) { + genericMetadata_ = + com.google.cloud.aiplatform.v1.GenericOperationMetadata.newBuilder(genericMetadata_) + .mergeFrom(value) + .buildPartial(); + } else { + genericMetadata_ = value; + } + onChanged(); + } else { + genericMetadataBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The common part of the operation metadata.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder clearGenericMetadata() { + if (genericMetadataBuilder_ == null) { + genericMetadata_ = null; + onChanged(); + } else { + genericMetadata_ = null; + genericMetadataBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The common part of the operation metadata.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder + getGenericMetadataBuilder() { + + onChanged(); + return getGenericMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The common part of the operation metadata.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder() { + if (genericMetadataBuilder_ != null) { + return genericMetadataBuilder_.getMessageOrBuilder(); + } else { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + } + /** + * + * + *
+     * The common part of the operation metadata.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder> + getGenericMetadataFieldBuilder() { + if (genericMetadataBuilder_ == null) { + genericMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder>( + getGenericMetadata(), getParentForChildren(), isClean()); + genericMetadata_ = null; + } + return genericMetadataBuilder_; + } + + private java.util.List< + com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult> + partialResults_ = java.util.Collections.emptyList(); + + private void ensurePartialResultsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + partialResults_ = + new java.util.ArrayList< + com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata + .PartialResult>(partialResults_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult, + com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult + .Builder, + com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata + .PartialResultOrBuilder> + partialResultsBuilder_; + + /** + * + * + *
+     * Partial results that reflect the latest migration operation progress.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult partial_results = 2; + * + */ + public java.util.List< + com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult> + getPartialResultsList() { + if (partialResultsBuilder_ == null) { + return java.util.Collections.unmodifiableList(partialResults_); + } else { + return partialResultsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Partial results that reflect the latest migration operation progress.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult partial_results = 2; + * + */ + public int getPartialResultsCount() { + if (partialResultsBuilder_ == null) { + return partialResults_.size(); + } else { + return partialResultsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Partial results that reflect the latest migration operation progress.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult partial_results = 2; + * + */ + public com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult + getPartialResults(int index) { + if (partialResultsBuilder_ == null) { + return partialResults_.get(index); + } else { + return partialResultsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Partial results that reflect the latest migration operation progress.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult partial_results = 2; + * + */ + public Builder setPartialResults( + int index, + com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult value) { + if (partialResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartialResultsIsMutable(); + partialResults_.set(index, value); + onChanged(); + } else { + partialResultsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Partial results that reflect the latest migration operation progress.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult partial_results = 2; + * + */ + public Builder setPartialResults( + int index, + com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult.Builder + builderForValue) { + if (partialResultsBuilder_ == null) { + ensurePartialResultsIsMutable(); + partialResults_.set(index, builderForValue.build()); + onChanged(); + } else { + partialResultsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Partial results that reflect the latest migration operation progress.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult partial_results = 2; + * + */ + public Builder addPartialResults( + com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult value) { + if (partialResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartialResultsIsMutable(); + partialResults_.add(value); + onChanged(); + } else { + partialResultsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Partial results that reflect the latest migration operation progress.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult partial_results = 2; + * + */ + public Builder addPartialResults( + int index, + com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult value) { + if (partialResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartialResultsIsMutable(); + partialResults_.add(index, value); + onChanged(); + } else { + partialResultsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Partial results that reflect the latest migration operation progress.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult partial_results = 2; + * + */ + public Builder addPartialResults( + com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult.Builder + builderForValue) { + if (partialResultsBuilder_ == null) { + ensurePartialResultsIsMutable(); + partialResults_.add(builderForValue.build()); + onChanged(); + } else { + partialResultsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Partial results that reflect the latest migration operation progress.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult partial_results = 2; + * + */ + public Builder addPartialResults( + int index, + com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult.Builder + builderForValue) { + if (partialResultsBuilder_ == null) { + ensurePartialResultsIsMutable(); + partialResults_.add(index, builderForValue.build()); + onChanged(); + } else { + partialResultsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Partial results that reflect the latest migration operation progress.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult partial_results = 2; + * + */ + public Builder addAllPartialResults( + java.lang.Iterable< + ? extends + com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata + .PartialResult> + values) { + if (partialResultsBuilder_ == null) { + ensurePartialResultsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, partialResults_); + onChanged(); + } else { + partialResultsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Partial results that reflect the latest migration operation progress.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult partial_results = 2; + * + */ + public Builder clearPartialResults() { + if (partialResultsBuilder_ == null) { + partialResults_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + partialResultsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Partial results that reflect the latest migration operation progress.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult partial_results = 2; + * + */ + public Builder removePartialResults(int index) { + if (partialResultsBuilder_ == null) { + ensurePartialResultsIsMutable(); + partialResults_.remove(index); + onChanged(); + } else { + partialResultsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Partial results that reflect the latest migration operation progress.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult partial_results = 2; + * + */ + public com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult + .Builder + getPartialResultsBuilder(int index) { + return getPartialResultsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Partial results that reflect the latest migration operation progress.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult partial_results = 2; + * + */ + public com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata + .PartialResultOrBuilder + getPartialResultsOrBuilder(int index) { + if (partialResultsBuilder_ == null) { + return partialResults_.get(index); + } else { + return partialResultsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Partial results that reflect the latest migration operation progress.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult partial_results = 2; + * + */ + public java.util.List< + ? extends + com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata + .PartialResultOrBuilder> + getPartialResultsOrBuilderList() { + if (partialResultsBuilder_ != null) { + return partialResultsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(partialResults_); + } + } + /** + * + * + *
+     * Partial results that reflect the latest migration operation progress.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult partial_results = 2; + * + */ + public com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult + .Builder + addPartialResultsBuilder() { + return getPartialResultsFieldBuilder() + .addBuilder( + com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult + .getDefaultInstance()); + } + /** + * + * + *
+     * Partial results that reflect the latest migration operation progress.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult partial_results = 2; + * + */ + public com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult + .Builder + addPartialResultsBuilder(int index) { + return getPartialResultsFieldBuilder() + .addBuilder( + index, + com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult + .getDefaultInstance()); + } + /** + * + * + *
+     * Partial results that reflect the latest migration operation progress.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult partial_results = 2; + * + */ + public java.util.List< + com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult + .Builder> + getPartialResultsBuilderList() { + return getPartialResultsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult, + com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult + .Builder, + com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata + .PartialResultOrBuilder> + getPartialResultsFieldBuilder() { + if (partialResultsBuilder_ == null) { + partialResultsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult, + com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult + .Builder, + com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata + .PartialResultOrBuilder>( + partialResults_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + partialResults_ = null; + } + return partialResultsBuilder_; + } + + @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.v1.BatchMigrateResourcesOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata) + private static final com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata(); + } + + public static com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchMigrateResourcesOperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BatchMigrateResourcesOperationMetadata(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.v1.BatchMigrateResourcesOperationMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BatchMigrateResourcesOperationMetadataOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BatchMigrateResourcesOperationMetadataOrBuilder.java new file mode 100644 index 000000000..b363b10bb --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BatchMigrateResourcesOperationMetadataOrBuilder.java @@ -0,0 +1,129 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/migration_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface BatchMigrateResourcesOperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The common part of the operation metadata.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + boolean hasGenericMetadata(); + /** + * + * + *
+   * The common part of the operation metadata.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata(); + /** + * + * + *
+   * The common part of the operation metadata.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder getGenericMetadataOrBuilder(); + + /** + * + * + *
+   * Partial results that reflect the latest migration operation progress.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult partial_results = 2; + * + */ + java.util.List< + com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult> + getPartialResultsList(); + /** + * + * + *
+   * Partial results that reflect the latest migration operation progress.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult partial_results = 2; + * + */ + com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult + getPartialResults(int index); + /** + * + * + *
+   * Partial results that reflect the latest migration operation progress.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult partial_results = 2; + * + */ + int getPartialResultsCount(); + /** + * + * + *
+   * Partial results that reflect the latest migration operation progress.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult partial_results = 2; + * + */ + java.util.List< + ? extends + com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata + .PartialResultOrBuilder> + getPartialResultsOrBuilderList(); + /** + * + * + *
+   * Partial results that reflect the latest migration operation progress.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult partial_results = 2; + * + */ + com.google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResultOrBuilder + getPartialResultsOrBuilder(int index); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BatchMigrateResourcesRequest.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BatchMigrateResourcesRequest.java new file mode 100644 index 000000000..566c2a3a3 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BatchMigrateResourcesRequest.java @@ -0,0 +1,1270 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/migration_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for [MigrationService.BatchMigrateResources][google.cloud.aiplatform.v1.MigrationService.BatchMigrateResources].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.BatchMigrateResourcesRequest} + */ +public final class BatchMigrateResourcesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.BatchMigrateResourcesRequest) + BatchMigrateResourcesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchMigrateResourcesRequest.newBuilder() to construct. + private BatchMigrateResourcesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BatchMigrateResourcesRequest() { + parent_ = ""; + migrateResourceRequests_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BatchMigrateResourcesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private BatchMigrateResourcesRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + migrateResourceRequests_ = + new java.util.ArrayList< + com.google.cloud.aiplatform.v1.MigrateResourceRequest>(); + mutable_bitField0_ |= 0x00000001; + } + migrateResourceRequests_.add( + input.readMessage( + com.google.cloud.aiplatform.v1.MigrateResourceRequest.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)) { + migrateResourceRequests_ = java.util.Collections.unmodifiableList(migrateResourceRequests_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.MigrationServiceProto + .internal_static_google_cloud_aiplatform_v1_BatchMigrateResourcesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.MigrationServiceProto + .internal_static_google_cloud_aiplatform_v1_BatchMigrateResourcesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.BatchMigrateResourcesRequest.class, + com.google.cloud.aiplatform.v1.BatchMigrateResourcesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The location of the migrated resource will live in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The location of the migrated resource will live in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MIGRATE_RESOURCE_REQUESTS_FIELD_NUMBER = 2; + private java.util.List + migrateResourceRequests_; + /** + * + * + *
+   * Required. The request messages specifying the resources to migrate.
+   * They must be in the same location as the destination.
+   * Up to 50 resources can be migrated in one batch.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceRequest migrate_resource_requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getMigrateResourceRequestsList() { + return migrateResourceRequests_; + } + /** + * + * + *
+   * Required. The request messages specifying the resources to migrate.
+   * They must be in the same location as the destination.
+   * Up to 50 resources can be migrated in one batch.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceRequest migrate_resource_requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getMigrateResourceRequestsOrBuilderList() { + return migrateResourceRequests_; + } + /** + * + * + *
+   * Required. The request messages specifying the resources to migrate.
+   * They must be in the same location as the destination.
+   * Up to 50 resources can be migrated in one batch.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceRequest migrate_resource_requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getMigrateResourceRequestsCount() { + return migrateResourceRequests_.size(); + } + /** + * + * + *
+   * Required. The request messages specifying the resources to migrate.
+   * They must be in the same location as the destination.
+   * Up to 50 resources can be migrated in one batch.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceRequest migrate_resource_requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigrateResourceRequest getMigrateResourceRequests( + int index) { + return migrateResourceRequests_.get(index); + } + /** + * + * + *
+   * Required. The request messages specifying the resources to migrate.
+   * They must be in the same location as the destination.
+   * Up to 50 resources can be migrated in one batch.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceRequest migrate_resource_requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigrateResourceRequestOrBuilder + getMigrateResourceRequestsOrBuilder(int index) { + return migrateResourceRequests_.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 (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + for (int i = 0; i < migrateResourceRequests_.size(); i++) { + output.writeMessage(2, migrateResourceRequests_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + for (int i = 0; i < migrateResourceRequests_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, migrateResourceRequests_.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.v1.BatchMigrateResourcesRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.BatchMigrateResourcesRequest other = + (com.google.cloud.aiplatform.v1.BatchMigrateResourcesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getMigrateResourceRequestsList().equals(other.getMigrateResourceRequestsList())) + return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (getMigrateResourceRequestsCount() > 0) { + hash = (37 * hash) + MIGRATE_RESOURCE_REQUESTS_FIELD_NUMBER; + hash = (53 * hash) + getMigrateResourceRequestsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.BatchMigrateResourcesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.BatchMigrateResourcesRequest 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.v1.BatchMigrateResourcesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.BatchMigrateResourcesRequest 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.v1.BatchMigrateResourcesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.BatchMigrateResourcesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.BatchMigrateResourcesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.BatchMigrateResourcesRequest 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.v1.BatchMigrateResourcesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.BatchMigrateResourcesRequest 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.v1.BatchMigrateResourcesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.BatchMigrateResourcesRequest 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.v1.BatchMigrateResourcesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [MigrationService.BatchMigrateResources][google.cloud.aiplatform.v1.MigrationService.BatchMigrateResources].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.BatchMigrateResourcesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.BatchMigrateResourcesRequest) + com.google.cloud.aiplatform.v1.BatchMigrateResourcesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.MigrationServiceProto + .internal_static_google_cloud_aiplatform_v1_BatchMigrateResourcesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.MigrationServiceProto + .internal_static_google_cloud_aiplatform_v1_BatchMigrateResourcesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.BatchMigrateResourcesRequest.class, + com.google.cloud.aiplatform.v1.BatchMigrateResourcesRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.BatchMigrateResourcesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getMigrateResourceRequestsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (migrateResourceRequestsBuilder_ == null) { + migrateResourceRequests_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + migrateResourceRequestsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.MigrationServiceProto + .internal_static_google_cloud_aiplatform_v1_BatchMigrateResourcesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.BatchMigrateResourcesRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.BatchMigrateResourcesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.BatchMigrateResourcesRequest build() { + com.google.cloud.aiplatform.v1.BatchMigrateResourcesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.BatchMigrateResourcesRequest buildPartial() { + com.google.cloud.aiplatform.v1.BatchMigrateResourcesRequest result = + new com.google.cloud.aiplatform.v1.BatchMigrateResourcesRequest(this); + int from_bitField0_ = bitField0_; + result.parent_ = parent_; + if (migrateResourceRequestsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + migrateResourceRequests_ = + java.util.Collections.unmodifiableList(migrateResourceRequests_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.migrateResourceRequests_ = migrateResourceRequests_; + } else { + result.migrateResourceRequests_ = migrateResourceRequestsBuilder_.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.v1.BatchMigrateResourcesRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.BatchMigrateResourcesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.BatchMigrateResourcesRequest other) { + if (other == com.google.cloud.aiplatform.v1.BatchMigrateResourcesRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (migrateResourceRequestsBuilder_ == null) { + if (!other.migrateResourceRequests_.isEmpty()) { + if (migrateResourceRequests_.isEmpty()) { + migrateResourceRequests_ = other.migrateResourceRequests_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureMigrateResourceRequestsIsMutable(); + migrateResourceRequests_.addAll(other.migrateResourceRequests_); + } + onChanged(); + } + } else { + if (!other.migrateResourceRequests_.isEmpty()) { + if (migrateResourceRequestsBuilder_.isEmpty()) { + migrateResourceRequestsBuilder_.dispose(); + migrateResourceRequestsBuilder_ = null; + migrateResourceRequests_ = other.migrateResourceRequests_; + bitField0_ = (bitField0_ & ~0x00000001); + migrateResourceRequestsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getMigrateResourceRequestsFieldBuilder() + : null; + } else { + migrateResourceRequestsBuilder_.addAllMessages(other.migrateResourceRequests_); + } + } + } + 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.v1.BatchMigrateResourcesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.BatchMigrateResourcesRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The location of the migrated resource will live in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The location of the migrated resource will live in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The location of the migrated resource will live in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The location of the migrated resource will live in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The location of the migrated resource will live in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private java.util.List + migrateResourceRequests_ = java.util.Collections.emptyList(); + + private void ensureMigrateResourceRequestsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + migrateResourceRequests_ = + new java.util.ArrayList( + migrateResourceRequests_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.MigrateResourceRequest, + com.google.cloud.aiplatform.v1.MigrateResourceRequest.Builder, + com.google.cloud.aiplatform.v1.MigrateResourceRequestOrBuilder> + migrateResourceRequestsBuilder_; + + /** + * + * + *
+     * Required. The request messages specifying the resources to migrate.
+     * They must be in the same location as the destination.
+     * Up to 50 resources can be migrated in one batch.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceRequest migrate_resource_requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getMigrateResourceRequestsList() { + if (migrateResourceRequestsBuilder_ == null) { + return java.util.Collections.unmodifiableList(migrateResourceRequests_); + } else { + return migrateResourceRequestsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Required. The request messages specifying the resources to migrate.
+     * They must be in the same location as the destination.
+     * Up to 50 resources can be migrated in one batch.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceRequest migrate_resource_requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getMigrateResourceRequestsCount() { + if (migrateResourceRequestsBuilder_ == null) { + return migrateResourceRequests_.size(); + } else { + return migrateResourceRequestsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Required. The request messages specifying the resources to migrate.
+     * They must be in the same location as the destination.
+     * Up to 50 resources can be migrated in one batch.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceRequest migrate_resource_requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.MigrateResourceRequest getMigrateResourceRequests( + int index) { + if (migrateResourceRequestsBuilder_ == null) { + return migrateResourceRequests_.get(index); + } else { + return migrateResourceRequestsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Required. The request messages specifying the resources to migrate.
+     * They must be in the same location as the destination.
+     * Up to 50 resources can be migrated in one batch.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceRequest migrate_resource_requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setMigrateResourceRequests( + int index, com.google.cloud.aiplatform.v1.MigrateResourceRequest value) { + if (migrateResourceRequestsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMigrateResourceRequestsIsMutable(); + migrateResourceRequests_.set(index, value); + onChanged(); + } else { + migrateResourceRequestsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. The request messages specifying the resources to migrate.
+     * They must be in the same location as the destination.
+     * Up to 50 resources can be migrated in one batch.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceRequest migrate_resource_requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setMigrateResourceRequests( + int index, com.google.cloud.aiplatform.v1.MigrateResourceRequest.Builder builderForValue) { + if (migrateResourceRequestsBuilder_ == null) { + ensureMigrateResourceRequestsIsMutable(); + migrateResourceRequests_.set(index, builderForValue.build()); + onChanged(); + } else { + migrateResourceRequestsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The request messages specifying the resources to migrate.
+     * They must be in the same location as the destination.
+     * Up to 50 resources can be migrated in one batch.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceRequest migrate_resource_requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addMigrateResourceRequests( + com.google.cloud.aiplatform.v1.MigrateResourceRequest value) { + if (migrateResourceRequestsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMigrateResourceRequestsIsMutable(); + migrateResourceRequests_.add(value); + onChanged(); + } else { + migrateResourceRequestsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Required. The request messages specifying the resources to migrate.
+     * They must be in the same location as the destination.
+     * Up to 50 resources can be migrated in one batch.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceRequest migrate_resource_requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addMigrateResourceRequests( + int index, com.google.cloud.aiplatform.v1.MigrateResourceRequest value) { + if (migrateResourceRequestsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMigrateResourceRequestsIsMutable(); + migrateResourceRequests_.add(index, value); + onChanged(); + } else { + migrateResourceRequestsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. The request messages specifying the resources to migrate.
+     * They must be in the same location as the destination.
+     * Up to 50 resources can be migrated in one batch.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceRequest migrate_resource_requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addMigrateResourceRequests( + com.google.cloud.aiplatform.v1.MigrateResourceRequest.Builder builderForValue) { + if (migrateResourceRequestsBuilder_ == null) { + ensureMigrateResourceRequestsIsMutable(); + migrateResourceRequests_.add(builderForValue.build()); + onChanged(); + } else { + migrateResourceRequestsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The request messages specifying the resources to migrate.
+     * They must be in the same location as the destination.
+     * Up to 50 resources can be migrated in one batch.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceRequest migrate_resource_requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addMigrateResourceRequests( + int index, com.google.cloud.aiplatform.v1.MigrateResourceRequest.Builder builderForValue) { + if (migrateResourceRequestsBuilder_ == null) { + ensureMigrateResourceRequestsIsMutable(); + migrateResourceRequests_.add(index, builderForValue.build()); + onChanged(); + } else { + migrateResourceRequestsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The request messages specifying the resources to migrate.
+     * They must be in the same location as the destination.
+     * Up to 50 resources can be migrated in one batch.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceRequest migrate_resource_requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllMigrateResourceRequests( + java.lang.Iterable + values) { + if (migrateResourceRequestsBuilder_ == null) { + ensureMigrateResourceRequestsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, migrateResourceRequests_); + onChanged(); + } else { + migrateResourceRequestsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Required. The request messages specifying the resources to migrate.
+     * They must be in the same location as the destination.
+     * Up to 50 resources can be migrated in one batch.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceRequest migrate_resource_requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearMigrateResourceRequests() { + if (migrateResourceRequestsBuilder_ == null) { + migrateResourceRequests_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + migrateResourceRequestsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Required. The request messages specifying the resources to migrate.
+     * They must be in the same location as the destination.
+     * Up to 50 resources can be migrated in one batch.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceRequest migrate_resource_requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeMigrateResourceRequests(int index) { + if (migrateResourceRequestsBuilder_ == null) { + ensureMigrateResourceRequestsIsMutable(); + migrateResourceRequests_.remove(index); + onChanged(); + } else { + migrateResourceRequestsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Required. The request messages specifying the resources to migrate.
+     * They must be in the same location as the destination.
+     * Up to 50 resources can be migrated in one batch.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceRequest migrate_resource_requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.MigrateResourceRequest.Builder + getMigrateResourceRequestsBuilder(int index) { + return getMigrateResourceRequestsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Required. The request messages specifying the resources to migrate.
+     * They must be in the same location as the destination.
+     * Up to 50 resources can be migrated in one batch.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceRequest migrate_resource_requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.MigrateResourceRequestOrBuilder + getMigrateResourceRequestsOrBuilder(int index) { + if (migrateResourceRequestsBuilder_ == null) { + return migrateResourceRequests_.get(index); + } else { + return migrateResourceRequestsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Required. The request messages specifying the resources to migrate.
+     * They must be in the same location as the destination.
+     * Up to 50 resources can be migrated in one batch.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceRequest migrate_resource_requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getMigrateResourceRequestsOrBuilderList() { + if (migrateResourceRequestsBuilder_ != null) { + return migrateResourceRequestsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(migrateResourceRequests_); + } + } + /** + * + * + *
+     * Required. The request messages specifying the resources to migrate.
+     * They must be in the same location as the destination.
+     * Up to 50 resources can be migrated in one batch.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceRequest migrate_resource_requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.MigrateResourceRequest.Builder + addMigrateResourceRequestsBuilder() { + return getMigrateResourceRequestsFieldBuilder() + .addBuilder(com.google.cloud.aiplatform.v1.MigrateResourceRequest.getDefaultInstance()); + } + /** + * + * + *
+     * Required. The request messages specifying the resources to migrate.
+     * They must be in the same location as the destination.
+     * Up to 50 resources can be migrated in one batch.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceRequest migrate_resource_requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.MigrateResourceRequest.Builder + addMigrateResourceRequestsBuilder(int index) { + return getMigrateResourceRequestsFieldBuilder() + .addBuilder( + index, com.google.cloud.aiplatform.v1.MigrateResourceRequest.getDefaultInstance()); + } + /** + * + * + *
+     * Required. The request messages specifying the resources to migrate.
+     * They must be in the same location as the destination.
+     * Up to 50 resources can be migrated in one batch.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceRequest migrate_resource_requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getMigrateResourceRequestsBuilderList() { + return getMigrateResourceRequestsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.MigrateResourceRequest, + com.google.cloud.aiplatform.v1.MigrateResourceRequest.Builder, + com.google.cloud.aiplatform.v1.MigrateResourceRequestOrBuilder> + getMigrateResourceRequestsFieldBuilder() { + if (migrateResourceRequestsBuilder_ == null) { + migrateResourceRequestsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.MigrateResourceRequest, + com.google.cloud.aiplatform.v1.MigrateResourceRequest.Builder, + com.google.cloud.aiplatform.v1.MigrateResourceRequestOrBuilder>( + migrateResourceRequests_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + migrateResourceRequests_ = null; + } + return migrateResourceRequestsBuilder_; + } + + @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.v1.BatchMigrateResourcesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.BatchMigrateResourcesRequest) + private static final com.google.cloud.aiplatform.v1.BatchMigrateResourcesRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.BatchMigrateResourcesRequest(); + } + + public static com.google.cloud.aiplatform.v1.BatchMigrateResourcesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchMigrateResourcesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BatchMigrateResourcesRequest(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.v1.BatchMigrateResourcesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BatchMigrateResourcesRequestOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BatchMigrateResourcesRequestOrBuilder.java new file mode 100644 index 000000000..a489983d0 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BatchMigrateResourcesRequestOrBuilder.java @@ -0,0 +1,130 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/migration_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface BatchMigrateResourcesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.BatchMigrateResourcesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The location of the migrated resource will live in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The location of the migrated resource will live in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The request messages specifying the resources to migrate.
+   * They must be in the same location as the destination.
+   * Up to 50 resources can be migrated in one batch.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceRequest migrate_resource_requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getMigrateResourceRequestsList(); + /** + * + * + *
+   * Required. The request messages specifying the resources to migrate.
+   * They must be in the same location as the destination.
+   * Up to 50 resources can be migrated in one batch.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceRequest migrate_resource_requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1.MigrateResourceRequest getMigrateResourceRequests(int index); + /** + * + * + *
+   * Required. The request messages specifying the resources to migrate.
+   * They must be in the same location as the destination.
+   * Up to 50 resources can be migrated in one batch.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceRequest migrate_resource_requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getMigrateResourceRequestsCount(); + /** + * + * + *
+   * Required. The request messages specifying the resources to migrate.
+   * They must be in the same location as the destination.
+   * Up to 50 resources can be migrated in one batch.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceRequest migrate_resource_requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getMigrateResourceRequestsOrBuilderList(); + /** + * + * + *
+   * Required. The request messages specifying the resources to migrate.
+   * They must be in the same location as the destination.
+   * Up to 50 resources can be migrated in one batch.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceRequest migrate_resource_requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1.MigrateResourceRequestOrBuilder + getMigrateResourceRequestsOrBuilder(int index); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BatchMigrateResourcesResponse.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BatchMigrateResourcesResponse.java new file mode 100644 index 000000000..83a269d36 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BatchMigrateResourcesResponse.java @@ -0,0 +1,1028 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/migration_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Response message for [MigrationService.BatchMigrateResources][google.cloud.aiplatform.v1.MigrationService.BatchMigrateResources].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.BatchMigrateResourcesResponse} + */ +public final class BatchMigrateResourcesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.BatchMigrateResourcesResponse) + BatchMigrateResourcesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchMigrateResourcesResponse.newBuilder() to construct. + private BatchMigrateResourcesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BatchMigrateResourcesResponse() { + migrateResourceResponses_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BatchMigrateResourcesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private BatchMigrateResourcesResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + migrateResourceResponses_ = + new java.util.ArrayList< + com.google.cloud.aiplatform.v1.MigrateResourceResponse>(); + mutable_bitField0_ |= 0x00000001; + } + migrateResourceResponses_.add( + input.readMessage( + com.google.cloud.aiplatform.v1.MigrateResourceResponse.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)) { + migrateResourceResponses_ = + java.util.Collections.unmodifiableList(migrateResourceResponses_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.MigrationServiceProto + .internal_static_google_cloud_aiplatform_v1_BatchMigrateResourcesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.MigrationServiceProto + .internal_static_google_cloud_aiplatform_v1_BatchMigrateResourcesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.BatchMigrateResourcesResponse.class, + com.google.cloud.aiplatform.v1.BatchMigrateResourcesResponse.Builder.class); + } + + public static final int MIGRATE_RESOURCE_RESPONSES_FIELD_NUMBER = 1; + private java.util.List + migrateResourceResponses_; + /** + * + * + *
+   * Successfully migrated resources.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceResponse migrate_resource_responses = 1; + * + */ + @java.lang.Override + public java.util.List + getMigrateResourceResponsesList() { + return migrateResourceResponses_; + } + /** + * + * + *
+   * Successfully migrated resources.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceResponse migrate_resource_responses = 1; + * + */ + @java.lang.Override + public java.util.List + getMigrateResourceResponsesOrBuilderList() { + return migrateResourceResponses_; + } + /** + * + * + *
+   * Successfully migrated resources.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceResponse migrate_resource_responses = 1; + * + */ + @java.lang.Override + public int getMigrateResourceResponsesCount() { + return migrateResourceResponses_.size(); + } + /** + * + * + *
+   * Successfully migrated resources.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceResponse migrate_resource_responses = 1; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigrateResourceResponse getMigrateResourceResponses( + int index) { + return migrateResourceResponses_.get(index); + } + /** + * + * + *
+   * Successfully migrated resources.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceResponse migrate_resource_responses = 1; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigrateResourceResponseOrBuilder + getMigrateResourceResponsesOrBuilder(int index) { + return migrateResourceResponses_.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 { + for (int i = 0; i < migrateResourceResponses_.size(); i++) { + output.writeMessage(1, migrateResourceResponses_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < migrateResourceResponses_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, migrateResourceResponses_.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.v1.BatchMigrateResourcesResponse)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.BatchMigrateResourcesResponse other = + (com.google.cloud.aiplatform.v1.BatchMigrateResourcesResponse) obj; + + if (!getMigrateResourceResponsesList().equals(other.getMigrateResourceResponsesList())) + 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 (getMigrateResourceResponsesCount() > 0) { + hash = (37 * hash) + MIGRATE_RESOURCE_RESPONSES_FIELD_NUMBER; + hash = (53 * hash) + getMigrateResourceResponsesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.BatchMigrateResourcesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.BatchMigrateResourcesResponse 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.v1.BatchMigrateResourcesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.BatchMigrateResourcesResponse 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.v1.BatchMigrateResourcesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.BatchMigrateResourcesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.BatchMigrateResourcesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.BatchMigrateResourcesResponse 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.v1.BatchMigrateResourcesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.BatchMigrateResourcesResponse 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.v1.BatchMigrateResourcesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.BatchMigrateResourcesResponse 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.v1.BatchMigrateResourcesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for [MigrationService.BatchMigrateResources][google.cloud.aiplatform.v1.MigrationService.BatchMigrateResources].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.BatchMigrateResourcesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.BatchMigrateResourcesResponse) + com.google.cloud.aiplatform.v1.BatchMigrateResourcesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.MigrationServiceProto + .internal_static_google_cloud_aiplatform_v1_BatchMigrateResourcesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.MigrationServiceProto + .internal_static_google_cloud_aiplatform_v1_BatchMigrateResourcesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.BatchMigrateResourcesResponse.class, + com.google.cloud.aiplatform.v1.BatchMigrateResourcesResponse.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.BatchMigrateResourcesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getMigrateResourceResponsesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (migrateResourceResponsesBuilder_ == null) { + migrateResourceResponses_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + migrateResourceResponsesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.MigrationServiceProto + .internal_static_google_cloud_aiplatform_v1_BatchMigrateResourcesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.BatchMigrateResourcesResponse + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.BatchMigrateResourcesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.BatchMigrateResourcesResponse build() { + com.google.cloud.aiplatform.v1.BatchMigrateResourcesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.BatchMigrateResourcesResponse buildPartial() { + com.google.cloud.aiplatform.v1.BatchMigrateResourcesResponse result = + new com.google.cloud.aiplatform.v1.BatchMigrateResourcesResponse(this); + int from_bitField0_ = bitField0_; + if (migrateResourceResponsesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + migrateResourceResponses_ = + java.util.Collections.unmodifiableList(migrateResourceResponses_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.migrateResourceResponses_ = migrateResourceResponses_; + } else { + result.migrateResourceResponses_ = migrateResourceResponsesBuilder_.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.v1.BatchMigrateResourcesResponse) { + return mergeFrom((com.google.cloud.aiplatform.v1.BatchMigrateResourcesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.BatchMigrateResourcesResponse other) { + if (other + == com.google.cloud.aiplatform.v1.BatchMigrateResourcesResponse.getDefaultInstance()) + return this; + if (migrateResourceResponsesBuilder_ == null) { + if (!other.migrateResourceResponses_.isEmpty()) { + if (migrateResourceResponses_.isEmpty()) { + migrateResourceResponses_ = other.migrateResourceResponses_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureMigrateResourceResponsesIsMutable(); + migrateResourceResponses_.addAll(other.migrateResourceResponses_); + } + onChanged(); + } + } else { + if (!other.migrateResourceResponses_.isEmpty()) { + if (migrateResourceResponsesBuilder_.isEmpty()) { + migrateResourceResponsesBuilder_.dispose(); + migrateResourceResponsesBuilder_ = null; + migrateResourceResponses_ = other.migrateResourceResponses_; + bitField0_ = (bitField0_ & ~0x00000001); + migrateResourceResponsesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getMigrateResourceResponsesFieldBuilder() + : null; + } else { + migrateResourceResponsesBuilder_.addAllMessages(other.migrateResourceResponses_); + } + } + } + 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.v1.BatchMigrateResourcesResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.BatchMigrateResourcesResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List + migrateResourceResponses_ = java.util.Collections.emptyList(); + + private void ensureMigrateResourceResponsesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + migrateResourceResponses_ = + new java.util.ArrayList( + migrateResourceResponses_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.MigrateResourceResponse, + com.google.cloud.aiplatform.v1.MigrateResourceResponse.Builder, + com.google.cloud.aiplatform.v1.MigrateResourceResponseOrBuilder> + migrateResourceResponsesBuilder_; + + /** + * + * + *
+     * Successfully migrated resources.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceResponse migrate_resource_responses = 1; + * + */ + public java.util.List + getMigrateResourceResponsesList() { + if (migrateResourceResponsesBuilder_ == null) { + return java.util.Collections.unmodifiableList(migrateResourceResponses_); + } else { + return migrateResourceResponsesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Successfully migrated resources.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceResponse migrate_resource_responses = 1; + * + */ + public int getMigrateResourceResponsesCount() { + if (migrateResourceResponsesBuilder_ == null) { + return migrateResourceResponses_.size(); + } else { + return migrateResourceResponsesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Successfully migrated resources.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceResponse migrate_resource_responses = 1; + * + */ + public com.google.cloud.aiplatform.v1.MigrateResourceResponse getMigrateResourceResponses( + int index) { + if (migrateResourceResponsesBuilder_ == null) { + return migrateResourceResponses_.get(index); + } else { + return migrateResourceResponsesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Successfully migrated resources.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceResponse migrate_resource_responses = 1; + * + */ + public Builder setMigrateResourceResponses( + int index, com.google.cloud.aiplatform.v1.MigrateResourceResponse value) { + if (migrateResourceResponsesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMigrateResourceResponsesIsMutable(); + migrateResourceResponses_.set(index, value); + onChanged(); + } else { + migrateResourceResponsesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Successfully migrated resources.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceResponse migrate_resource_responses = 1; + * + */ + public Builder setMigrateResourceResponses( + int index, com.google.cloud.aiplatform.v1.MigrateResourceResponse.Builder builderForValue) { + if (migrateResourceResponsesBuilder_ == null) { + ensureMigrateResourceResponsesIsMutable(); + migrateResourceResponses_.set(index, builderForValue.build()); + onChanged(); + } else { + migrateResourceResponsesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Successfully migrated resources.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceResponse migrate_resource_responses = 1; + * + */ + public Builder addMigrateResourceResponses( + com.google.cloud.aiplatform.v1.MigrateResourceResponse value) { + if (migrateResourceResponsesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMigrateResourceResponsesIsMutable(); + migrateResourceResponses_.add(value); + onChanged(); + } else { + migrateResourceResponsesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Successfully migrated resources.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceResponse migrate_resource_responses = 1; + * + */ + public Builder addMigrateResourceResponses( + int index, com.google.cloud.aiplatform.v1.MigrateResourceResponse value) { + if (migrateResourceResponsesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMigrateResourceResponsesIsMutable(); + migrateResourceResponses_.add(index, value); + onChanged(); + } else { + migrateResourceResponsesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Successfully migrated resources.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceResponse migrate_resource_responses = 1; + * + */ + public Builder addMigrateResourceResponses( + com.google.cloud.aiplatform.v1.MigrateResourceResponse.Builder builderForValue) { + if (migrateResourceResponsesBuilder_ == null) { + ensureMigrateResourceResponsesIsMutable(); + migrateResourceResponses_.add(builderForValue.build()); + onChanged(); + } else { + migrateResourceResponsesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Successfully migrated resources.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceResponse migrate_resource_responses = 1; + * + */ + public Builder addMigrateResourceResponses( + int index, com.google.cloud.aiplatform.v1.MigrateResourceResponse.Builder builderForValue) { + if (migrateResourceResponsesBuilder_ == null) { + ensureMigrateResourceResponsesIsMutable(); + migrateResourceResponses_.add(index, builderForValue.build()); + onChanged(); + } else { + migrateResourceResponsesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Successfully migrated resources.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceResponse migrate_resource_responses = 1; + * + */ + public Builder addAllMigrateResourceResponses( + java.lang.Iterable + values) { + if (migrateResourceResponsesBuilder_ == null) { + ensureMigrateResourceResponsesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, migrateResourceResponses_); + onChanged(); + } else { + migrateResourceResponsesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Successfully migrated resources.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceResponse migrate_resource_responses = 1; + * + */ + public Builder clearMigrateResourceResponses() { + if (migrateResourceResponsesBuilder_ == null) { + migrateResourceResponses_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + migrateResourceResponsesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Successfully migrated resources.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceResponse migrate_resource_responses = 1; + * + */ + public Builder removeMigrateResourceResponses(int index) { + if (migrateResourceResponsesBuilder_ == null) { + ensureMigrateResourceResponsesIsMutable(); + migrateResourceResponses_.remove(index); + onChanged(); + } else { + migrateResourceResponsesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Successfully migrated resources.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceResponse migrate_resource_responses = 1; + * + */ + public com.google.cloud.aiplatform.v1.MigrateResourceResponse.Builder + getMigrateResourceResponsesBuilder(int index) { + return getMigrateResourceResponsesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Successfully migrated resources.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceResponse migrate_resource_responses = 1; + * + */ + public com.google.cloud.aiplatform.v1.MigrateResourceResponseOrBuilder + getMigrateResourceResponsesOrBuilder(int index) { + if (migrateResourceResponsesBuilder_ == null) { + return migrateResourceResponses_.get(index); + } else { + return migrateResourceResponsesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Successfully migrated resources.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceResponse migrate_resource_responses = 1; + * + */ + public java.util.List + getMigrateResourceResponsesOrBuilderList() { + if (migrateResourceResponsesBuilder_ != null) { + return migrateResourceResponsesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(migrateResourceResponses_); + } + } + /** + * + * + *
+     * Successfully migrated resources.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceResponse migrate_resource_responses = 1; + * + */ + public com.google.cloud.aiplatform.v1.MigrateResourceResponse.Builder + addMigrateResourceResponsesBuilder() { + return getMigrateResourceResponsesFieldBuilder() + .addBuilder(com.google.cloud.aiplatform.v1.MigrateResourceResponse.getDefaultInstance()); + } + /** + * + * + *
+     * Successfully migrated resources.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceResponse migrate_resource_responses = 1; + * + */ + public com.google.cloud.aiplatform.v1.MigrateResourceResponse.Builder + addMigrateResourceResponsesBuilder(int index) { + return getMigrateResourceResponsesFieldBuilder() + .addBuilder( + index, com.google.cloud.aiplatform.v1.MigrateResourceResponse.getDefaultInstance()); + } + /** + * + * + *
+     * Successfully migrated resources.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceResponse migrate_resource_responses = 1; + * + */ + public java.util.List + getMigrateResourceResponsesBuilderList() { + return getMigrateResourceResponsesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.MigrateResourceResponse, + com.google.cloud.aiplatform.v1.MigrateResourceResponse.Builder, + com.google.cloud.aiplatform.v1.MigrateResourceResponseOrBuilder> + getMigrateResourceResponsesFieldBuilder() { + if (migrateResourceResponsesBuilder_ == null) { + migrateResourceResponsesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.MigrateResourceResponse, + com.google.cloud.aiplatform.v1.MigrateResourceResponse.Builder, + com.google.cloud.aiplatform.v1.MigrateResourceResponseOrBuilder>( + migrateResourceResponses_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + migrateResourceResponses_ = null; + } + return migrateResourceResponsesBuilder_; + } + + @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.v1.BatchMigrateResourcesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.BatchMigrateResourcesResponse) + private static final com.google.cloud.aiplatform.v1.BatchMigrateResourcesResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.BatchMigrateResourcesResponse(); + } + + public static com.google.cloud.aiplatform.v1.BatchMigrateResourcesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchMigrateResourcesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BatchMigrateResourcesResponse(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.v1.BatchMigrateResourcesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BatchMigrateResourcesResponseOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BatchMigrateResourcesResponseOrBuilder.java new file mode 100644 index 000000000..d0634cadc --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BatchMigrateResourcesResponseOrBuilder.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/v1/migration_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface BatchMigrateResourcesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.BatchMigrateResourcesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Successfully migrated resources.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceResponse migrate_resource_responses = 1; + * + */ + java.util.List + getMigrateResourceResponsesList(); + /** + * + * + *
+   * Successfully migrated resources.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceResponse migrate_resource_responses = 1; + * + */ + com.google.cloud.aiplatform.v1.MigrateResourceResponse getMigrateResourceResponses(int index); + /** + * + * + *
+   * Successfully migrated resources.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceResponse migrate_resource_responses = 1; + * + */ + int getMigrateResourceResponsesCount(); + /** + * + * + *
+   * Successfully migrated resources.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceResponse migrate_resource_responses = 1; + * + */ + java.util.List + getMigrateResourceResponsesOrBuilderList(); + /** + * + * + *
+   * Successfully migrated resources.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceResponse migrate_resource_responses = 1; + * + */ + com.google.cloud.aiplatform.v1.MigrateResourceResponseOrBuilder + getMigrateResourceResponsesOrBuilder(int index); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BatchPredictionJob.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BatchPredictionJob.java new file mode 100644 index 000000000..6e2883ba7 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BatchPredictionJob.java @@ -0,0 +1,11152 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/batch_prediction_job.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * A job that uses a [Model][google.cloud.aiplatform.v1.BatchPredictionJob.model] to produce predictions
+ * on multiple [input instances][google.cloud.aiplatform.v1.BatchPredictionJob.input_config]. If
+ * predictions for significant portion of the instances fail, the job may finish
+ * without attempting predictions for all remaining instances.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.BatchPredictionJob} + */ +public final class BatchPredictionJob extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.BatchPredictionJob) + BatchPredictionJobOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchPredictionJob.newBuilder() to construct. + private BatchPredictionJob(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BatchPredictionJob() { + name_ = ""; + displayName_ = ""; + model_ = ""; + state_ = 0; + partialFailures_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BatchPredictionJob(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private BatchPredictionJob( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + model_ = s; + break; + } + case 34: + { + com.google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.Builder subBuilder = + null; + if (inputConfig_ != null) { + subBuilder = inputConfig_.toBuilder(); + } + inputConfig_ = + input.readMessage( + com.google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(inputConfig_); + inputConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 42: + { + com.google.protobuf.Value.Builder subBuilder = null; + if (modelParameters_ != null) { + subBuilder = modelParameters_.toBuilder(); + } + modelParameters_ = + input.readMessage(com.google.protobuf.Value.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(modelParameters_); + modelParameters_ = subBuilder.buildPartial(); + } + + break; + } + case 50: + { + com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.Builder subBuilder = + null; + if (outputConfig_ != null) { + subBuilder = outputConfig_.toBuilder(); + } + outputConfig_ = + input.readMessage( + com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(outputConfig_); + outputConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 58: + { + com.google.cloud.aiplatform.v1.BatchDedicatedResources.Builder subBuilder = null; + if (dedicatedResources_ != null) { + subBuilder = dedicatedResources_.toBuilder(); + } + dedicatedResources_ = + input.readMessage( + com.google.cloud.aiplatform.v1.BatchDedicatedResources.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(dedicatedResources_); + dedicatedResources_ = subBuilder.buildPartial(); + } + + break; + } + case 66: + { + com.google.cloud.aiplatform.v1.ManualBatchTuningParameters.Builder subBuilder = null; + if (manualBatchTuningParameters_ != null) { + subBuilder = manualBatchTuningParameters_.toBuilder(); + } + manualBatchTuningParameters_ = + input.readMessage( + com.google.cloud.aiplatform.v1.ManualBatchTuningParameters.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(manualBatchTuningParameters_); + manualBatchTuningParameters_ = subBuilder.buildPartial(); + } + + break; + } + case 74: + { + com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfo.Builder subBuilder = + null; + if (outputInfo_ != null) { + subBuilder = outputInfo_.toBuilder(); + } + outputInfo_ = + input.readMessage( + com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfo.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(outputInfo_); + outputInfo_ = subBuilder.buildPartial(); + } + + break; + } + case 80: + { + int rawValue = input.readEnum(); + + state_ = rawValue; + break; + } + case 90: + { + com.google.rpc.Status.Builder subBuilder = null; + if (error_ != null) { + subBuilder = error_.toBuilder(); + } + error_ = input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(error_); + error_ = subBuilder.buildPartial(); + } + + break; + } + case 98: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + partialFailures_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + partialFailures_.add( + input.readMessage(com.google.rpc.Status.parser(), extensionRegistry)); + break; + } + case 106: + { + com.google.cloud.aiplatform.v1.ResourcesConsumed.Builder subBuilder = null; + if (resourcesConsumed_ != null) { + subBuilder = resourcesConsumed_.toBuilder(); + } + resourcesConsumed_ = + input.readMessage( + com.google.cloud.aiplatform.v1.ResourcesConsumed.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(resourcesConsumed_); + resourcesConsumed_ = subBuilder.buildPartial(); + } + + break; + } + case 114: + { + com.google.cloud.aiplatform.v1.CompletionStats.Builder subBuilder = null; + if (completionStats_ != null) { + subBuilder = completionStats_.toBuilder(); + } + completionStats_ = + input.readMessage( + com.google.cloud.aiplatform.v1.CompletionStats.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(completionStats_); + completionStats_ = subBuilder.buildPartial(); + } + + break; + } + case 122: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 130: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (startTime_ != null) { + subBuilder = startTime_.toBuilder(); + } + startTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(startTime_); + startTime_ = subBuilder.buildPartial(); + } + + break; + } + case 138: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (endTime_ != null) { + subBuilder = endTime_.toBuilder(); + } + endTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(endTime_); + endTime_ = subBuilder.buildPartial(); + } + + break; + } + case 146: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + case 154: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + labels_ = + com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000002; + } + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); + break; + } + case 194: + { + com.google.cloud.aiplatform.v1.EncryptionSpec.Builder subBuilder = null; + if (encryptionSpec_ != null) { + subBuilder = encryptionSpec_.toBuilder(); + } + encryptionSpec_ = + input.readMessage( + com.google.cloud.aiplatform.v1.EncryptionSpec.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(encryptionSpec_); + encryptionSpec_ = 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)) { + partialFailures_ = java.util.Collections.unmodifiableList(partialFailures_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.BatchPredictionJobProto + .internal_static_google_cloud_aiplatform_v1_BatchPredictionJob_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 19: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.BatchPredictionJobProto + .internal_static_google_cloud_aiplatform_v1_BatchPredictionJob_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.BatchPredictionJob.class, + com.google.cloud.aiplatform.v1.BatchPredictionJob.Builder.class); + } + + public interface InputConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The Cloud Storage location for the input instances.
+     * 
+ * + * .google.cloud.aiplatform.v1.GcsSource gcs_source = 2; + * + * @return Whether the gcsSource field is set. + */ + boolean hasGcsSource(); + /** + * + * + *
+     * The Cloud Storage location for the input instances.
+     * 
+ * + * .google.cloud.aiplatform.v1.GcsSource gcs_source = 2; + * + * @return The gcsSource. + */ + com.google.cloud.aiplatform.v1.GcsSource getGcsSource(); + /** + * + * + *
+     * The Cloud Storage location for the input instances.
+     * 
+ * + * .google.cloud.aiplatform.v1.GcsSource gcs_source = 2; + */ + com.google.cloud.aiplatform.v1.GcsSourceOrBuilder getGcsSourceOrBuilder(); + + /** + * + * + *
+     * The BigQuery location of the input table.
+     * The schema of the table should be in the format described by the given
+     * context OpenAPI Schema, if one is provided. The table may contain
+     * additional columns that are not described by the schema, and they will
+     * be ignored.
+     * 
+ * + * .google.cloud.aiplatform.v1.BigQuerySource bigquery_source = 3; + * + * @return Whether the bigquerySource field is set. + */ + boolean hasBigquerySource(); + /** + * + * + *
+     * The BigQuery location of the input table.
+     * The schema of the table should be in the format described by the given
+     * context OpenAPI Schema, if one is provided. The table may contain
+     * additional columns that are not described by the schema, and they will
+     * be ignored.
+     * 
+ * + * .google.cloud.aiplatform.v1.BigQuerySource bigquery_source = 3; + * + * @return The bigquerySource. + */ + com.google.cloud.aiplatform.v1.BigQuerySource getBigquerySource(); + /** + * + * + *
+     * The BigQuery location of the input table.
+     * The schema of the table should be in the format described by the given
+     * context OpenAPI Schema, if one is provided. The table may contain
+     * additional columns that are not described by the schema, and they will
+     * be ignored.
+     * 
+ * + * .google.cloud.aiplatform.v1.BigQuerySource bigquery_source = 3; + */ + com.google.cloud.aiplatform.v1.BigQuerySourceOrBuilder getBigquerySourceOrBuilder(); + + /** + * + * + *
+     * Required. The format in which instances are given, must be one of the
+     * [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model]
+     * [supported_input_storage_formats][google.cloud.aiplatform.v1.Model.supported_input_storage_formats].
+     * 
+ * + * string instances_format = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The instancesFormat. + */ + java.lang.String getInstancesFormat(); + /** + * + * + *
+     * Required. The format in which instances are given, must be one of the
+     * [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model]
+     * [supported_input_storage_formats][google.cloud.aiplatform.v1.Model.supported_input_storage_formats].
+     * 
+ * + * string instances_format = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for instancesFormat. + */ + com.google.protobuf.ByteString getInstancesFormatBytes(); + + public com.google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.SourceCase getSourceCase(); + } + /** + * + * + *
+   * Configures the input to [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob].
+   * See [Model.supported_input_storage_formats][google.cloud.aiplatform.v1.Model.supported_input_storage_formats] for Model's supported input
+   * formats, and how instances should be expressed via any of them.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig} + */ + public static final class InputConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig) + InputConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use InputConfig.newBuilder() to construct. + private InputConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private InputConfig() { + instancesFormat_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new InputConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private InputConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + 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(); + + instancesFormat_ = s; + break; + } + case 18: + { + com.google.cloud.aiplatform.v1.GcsSource.Builder subBuilder = null; + if (sourceCase_ == 2) { + subBuilder = ((com.google.cloud.aiplatform.v1.GcsSource) source_).toBuilder(); + } + source_ = + input.readMessage( + com.google.cloud.aiplatform.v1.GcsSource.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.aiplatform.v1.GcsSource) source_); + source_ = subBuilder.buildPartial(); + } + sourceCase_ = 2; + break; + } + case 26: + { + com.google.cloud.aiplatform.v1.BigQuerySource.Builder subBuilder = null; + if (sourceCase_ == 3) { + subBuilder = + ((com.google.cloud.aiplatform.v1.BigQuerySource) source_).toBuilder(); + } + source_ = + input.readMessage( + com.google.cloud.aiplatform.v1.BigQuerySource.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.aiplatform.v1.BigQuerySource) source_); + source_ = subBuilder.buildPartial(); + } + sourceCase_ = 3; + 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.v1.BatchPredictionJobProto + .internal_static_google_cloud_aiplatform_v1_BatchPredictionJob_InputConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.BatchPredictionJobProto + .internal_static_google_cloud_aiplatform_v1_BatchPredictionJob_InputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.class, + com.google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.Builder.class); + } + + private int sourceCase_ = 0; + private java.lang.Object source_; + + public enum SourceCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + GCS_SOURCE(2), + BIGQUERY_SOURCE(3), + SOURCE_NOT_SET(0); + private final int value; + + private SourceCase(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 SourceCase valueOf(int value) { + return forNumber(value); + } + + public static SourceCase forNumber(int value) { + switch (value) { + case 2: + return GCS_SOURCE; + case 3: + return BIGQUERY_SOURCE; + case 0: + return SOURCE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public SourceCase getSourceCase() { + return SourceCase.forNumber(sourceCase_); + } + + public static final int GCS_SOURCE_FIELD_NUMBER = 2; + /** + * + * + *
+     * The Cloud Storage location for the input instances.
+     * 
+ * + * .google.cloud.aiplatform.v1.GcsSource gcs_source = 2; + * + * @return Whether the gcsSource field is set. + */ + @java.lang.Override + public boolean hasGcsSource() { + return sourceCase_ == 2; + } + /** + * + * + *
+     * The Cloud Storage location for the input instances.
+     * 
+ * + * .google.cloud.aiplatform.v1.GcsSource gcs_source = 2; + * + * @return The gcsSource. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GcsSource getGcsSource() { + if (sourceCase_ == 2) { + return (com.google.cloud.aiplatform.v1.GcsSource) source_; + } + return com.google.cloud.aiplatform.v1.GcsSource.getDefaultInstance(); + } + /** + * + * + *
+     * The Cloud Storage location for the input instances.
+     * 
+ * + * .google.cloud.aiplatform.v1.GcsSource gcs_source = 2; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GcsSourceOrBuilder getGcsSourceOrBuilder() { + if (sourceCase_ == 2) { + return (com.google.cloud.aiplatform.v1.GcsSource) source_; + } + return com.google.cloud.aiplatform.v1.GcsSource.getDefaultInstance(); + } + + public static final int BIGQUERY_SOURCE_FIELD_NUMBER = 3; + /** + * + * + *
+     * The BigQuery location of the input table.
+     * The schema of the table should be in the format described by the given
+     * context OpenAPI Schema, if one is provided. The table may contain
+     * additional columns that are not described by the schema, and they will
+     * be ignored.
+     * 
+ * + * .google.cloud.aiplatform.v1.BigQuerySource bigquery_source = 3; + * + * @return Whether the bigquerySource field is set. + */ + @java.lang.Override + public boolean hasBigquerySource() { + return sourceCase_ == 3; + } + /** + * + * + *
+     * The BigQuery location of the input table.
+     * The schema of the table should be in the format described by the given
+     * context OpenAPI Schema, if one is provided. The table may contain
+     * additional columns that are not described by the schema, and they will
+     * be ignored.
+     * 
+ * + * .google.cloud.aiplatform.v1.BigQuerySource bigquery_source = 3; + * + * @return The bigquerySource. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.BigQuerySource getBigquerySource() { + if (sourceCase_ == 3) { + return (com.google.cloud.aiplatform.v1.BigQuerySource) source_; + } + return com.google.cloud.aiplatform.v1.BigQuerySource.getDefaultInstance(); + } + /** + * + * + *
+     * The BigQuery location of the input table.
+     * The schema of the table should be in the format described by the given
+     * context OpenAPI Schema, if one is provided. The table may contain
+     * additional columns that are not described by the schema, and they will
+     * be ignored.
+     * 
+ * + * .google.cloud.aiplatform.v1.BigQuerySource bigquery_source = 3; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.BigQuerySourceOrBuilder getBigquerySourceOrBuilder() { + if (sourceCase_ == 3) { + return (com.google.cloud.aiplatform.v1.BigQuerySource) source_; + } + return com.google.cloud.aiplatform.v1.BigQuerySource.getDefaultInstance(); + } + + public static final int INSTANCES_FORMAT_FIELD_NUMBER = 1; + private volatile java.lang.Object instancesFormat_; + /** + * + * + *
+     * Required. The format in which instances are given, must be one of the
+     * [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model]
+     * [supported_input_storage_formats][google.cloud.aiplatform.v1.Model.supported_input_storage_formats].
+     * 
+ * + * string instances_format = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The instancesFormat. + */ + @java.lang.Override + public java.lang.String getInstancesFormat() { + java.lang.Object ref = instancesFormat_; + 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(); + instancesFormat_ = s; + return s; + } + } + /** + * + * + *
+     * Required. The format in which instances are given, must be one of the
+     * [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model]
+     * [supported_input_storage_formats][google.cloud.aiplatform.v1.Model.supported_input_storage_formats].
+     * 
+ * + * string instances_format = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for instancesFormat. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInstancesFormatBytes() { + java.lang.Object ref = instancesFormat_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instancesFormat_ = 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 (!getInstancesFormatBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, instancesFormat_); + } + if (sourceCase_ == 2) { + output.writeMessage(2, (com.google.cloud.aiplatform.v1.GcsSource) source_); + } + if (sourceCase_ == 3) { + output.writeMessage(3, (com.google.cloud.aiplatform.v1.BigQuerySource) source_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getInstancesFormatBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, instancesFormat_); + } + if (sourceCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.aiplatform.v1.GcsSource) source_); + } + if (sourceCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.cloud.aiplatform.v1.BigQuerySource) source_); + } + 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.v1.BatchPredictionJob.InputConfig)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig other = + (com.google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig) obj; + + if (!getInstancesFormat().equals(other.getInstancesFormat())) return false; + if (!getSourceCase().equals(other.getSourceCase())) return false; + switch (sourceCase_) { + case 2: + if (!getGcsSource().equals(other.getGcsSource())) return false; + break; + case 3: + if (!getBigquerySource().equals(other.getBigquerySource())) 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) + INSTANCES_FORMAT_FIELD_NUMBER; + hash = (53 * hash) + getInstancesFormat().hashCode(); + switch (sourceCase_) { + case 2: + hash = (37 * hash) + GCS_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getGcsSource().hashCode(); + break; + case 3: + hash = (37 * hash) + BIGQUERY_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getBigquerySource().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Configures the input to [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob].
+     * See [Model.supported_input_storage_formats][google.cloud.aiplatform.v1.Model.supported_input_storage_formats] for Model's supported input
+     * formats, and how instances should be expressed via any of them.
+     * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig) + com.google.cloud.aiplatform.v1.BatchPredictionJob.InputConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.BatchPredictionJobProto + .internal_static_google_cloud_aiplatform_v1_BatchPredictionJob_InputConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.BatchPredictionJobProto + .internal_static_google_cloud_aiplatform_v1_BatchPredictionJob_InputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.class, + com.google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + instancesFormat_ = ""; + + sourceCase_ = 0; + source_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.BatchPredictionJobProto + .internal_static_google_cloud_aiplatform_v1_BatchPredictionJob_InputConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig build() { + com.google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig buildPartial() { + com.google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig result = + new com.google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig(this); + if (sourceCase_ == 2) { + if (gcsSourceBuilder_ == null) { + result.source_ = source_; + } else { + result.source_ = gcsSourceBuilder_.build(); + } + } + if (sourceCase_ == 3) { + if (bigquerySourceBuilder_ == null) { + result.source_ = source_; + } else { + result.source_ = bigquerySourceBuilder_.build(); + } + } + result.instancesFormat_ = instancesFormat_; + result.sourceCase_ = sourceCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig) { + return mergeFrom((com.google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig other) { + if (other + == com.google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.getDefaultInstance()) + return this; + if (!other.getInstancesFormat().isEmpty()) { + instancesFormat_ = other.instancesFormat_; + onChanged(); + } + switch (other.getSourceCase()) { + case GCS_SOURCE: + { + mergeGcsSource(other.getGcsSource()); + break; + } + case BIGQUERY_SOURCE: + { + mergeBigquerySource(other.getBigquerySource()); + break; + } + case SOURCE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int sourceCase_ = 0; + private java.lang.Object source_; + + public SourceCase getSourceCase() { + return SourceCase.forNumber(sourceCase_); + } + + public Builder clearSource() { + sourceCase_ = 0; + source_ = null; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GcsSource, + com.google.cloud.aiplatform.v1.GcsSource.Builder, + com.google.cloud.aiplatform.v1.GcsSourceOrBuilder> + gcsSourceBuilder_; + /** + * + * + *
+       * The Cloud Storage location for the input instances.
+       * 
+ * + * .google.cloud.aiplatform.v1.GcsSource gcs_source = 2; + * + * @return Whether the gcsSource field is set. + */ + @java.lang.Override + public boolean hasGcsSource() { + return sourceCase_ == 2; + } + /** + * + * + *
+       * The Cloud Storage location for the input instances.
+       * 
+ * + * .google.cloud.aiplatform.v1.GcsSource gcs_source = 2; + * + * @return The gcsSource. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GcsSource getGcsSource() { + if (gcsSourceBuilder_ == null) { + if (sourceCase_ == 2) { + return (com.google.cloud.aiplatform.v1.GcsSource) source_; + } + return com.google.cloud.aiplatform.v1.GcsSource.getDefaultInstance(); + } else { + if (sourceCase_ == 2) { + return gcsSourceBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1.GcsSource.getDefaultInstance(); + } + } + /** + * + * + *
+       * The Cloud Storage location for the input instances.
+       * 
+ * + * .google.cloud.aiplatform.v1.GcsSource gcs_source = 2; + */ + public Builder setGcsSource(com.google.cloud.aiplatform.v1.GcsSource value) { + if (gcsSourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + onChanged(); + } else { + gcsSourceBuilder_.setMessage(value); + } + sourceCase_ = 2; + return this; + } + /** + * + * + *
+       * The Cloud Storage location for the input instances.
+       * 
+ * + * .google.cloud.aiplatform.v1.GcsSource gcs_source = 2; + */ + public Builder setGcsSource( + com.google.cloud.aiplatform.v1.GcsSource.Builder builderForValue) { + if (gcsSourceBuilder_ == null) { + source_ = builderForValue.build(); + onChanged(); + } else { + gcsSourceBuilder_.setMessage(builderForValue.build()); + } + sourceCase_ = 2; + return this; + } + /** + * + * + *
+       * The Cloud Storage location for the input instances.
+       * 
+ * + * .google.cloud.aiplatform.v1.GcsSource gcs_source = 2; + */ + public Builder mergeGcsSource(com.google.cloud.aiplatform.v1.GcsSource value) { + if (gcsSourceBuilder_ == null) { + if (sourceCase_ == 2 + && source_ != com.google.cloud.aiplatform.v1.GcsSource.getDefaultInstance()) { + source_ = + com.google.cloud.aiplatform.v1.GcsSource.newBuilder( + (com.google.cloud.aiplatform.v1.GcsSource) source_) + .mergeFrom(value) + .buildPartial(); + } else { + source_ = value; + } + onChanged(); + } else { + if (sourceCase_ == 2) { + gcsSourceBuilder_.mergeFrom(value); + } + gcsSourceBuilder_.setMessage(value); + } + sourceCase_ = 2; + return this; + } + /** + * + * + *
+       * The Cloud Storage location for the input instances.
+       * 
+ * + * .google.cloud.aiplatform.v1.GcsSource gcs_source = 2; + */ + public Builder clearGcsSource() { + if (gcsSourceBuilder_ == null) { + if (sourceCase_ == 2) { + sourceCase_ = 0; + source_ = null; + onChanged(); + } + } else { + if (sourceCase_ == 2) { + sourceCase_ = 0; + source_ = null; + } + gcsSourceBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * The Cloud Storage location for the input instances.
+       * 
+ * + * .google.cloud.aiplatform.v1.GcsSource gcs_source = 2; + */ + public com.google.cloud.aiplatform.v1.GcsSource.Builder getGcsSourceBuilder() { + return getGcsSourceFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The Cloud Storage location for the input instances.
+       * 
+ * + * .google.cloud.aiplatform.v1.GcsSource gcs_source = 2; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GcsSourceOrBuilder getGcsSourceOrBuilder() { + if ((sourceCase_ == 2) && (gcsSourceBuilder_ != null)) { + return gcsSourceBuilder_.getMessageOrBuilder(); + } else { + if (sourceCase_ == 2) { + return (com.google.cloud.aiplatform.v1.GcsSource) source_; + } + return com.google.cloud.aiplatform.v1.GcsSource.getDefaultInstance(); + } + } + /** + * + * + *
+       * The Cloud Storage location for the input instances.
+       * 
+ * + * .google.cloud.aiplatform.v1.GcsSource gcs_source = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GcsSource, + com.google.cloud.aiplatform.v1.GcsSource.Builder, + com.google.cloud.aiplatform.v1.GcsSourceOrBuilder> + getGcsSourceFieldBuilder() { + if (gcsSourceBuilder_ == null) { + if (!(sourceCase_ == 2)) { + source_ = com.google.cloud.aiplatform.v1.GcsSource.getDefaultInstance(); + } + gcsSourceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GcsSource, + com.google.cloud.aiplatform.v1.GcsSource.Builder, + com.google.cloud.aiplatform.v1.GcsSourceOrBuilder>( + (com.google.cloud.aiplatform.v1.GcsSource) source_, + getParentForChildren(), + isClean()); + source_ = null; + } + sourceCase_ = 2; + onChanged(); + ; + return gcsSourceBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.BigQuerySource, + com.google.cloud.aiplatform.v1.BigQuerySource.Builder, + com.google.cloud.aiplatform.v1.BigQuerySourceOrBuilder> + bigquerySourceBuilder_; + /** + * + * + *
+       * The BigQuery location of the input table.
+       * The schema of the table should be in the format described by the given
+       * context OpenAPI Schema, if one is provided. The table may contain
+       * additional columns that are not described by the schema, and they will
+       * be ignored.
+       * 
+ * + * .google.cloud.aiplatform.v1.BigQuerySource bigquery_source = 3; + * + * @return Whether the bigquerySource field is set. + */ + @java.lang.Override + public boolean hasBigquerySource() { + return sourceCase_ == 3; + } + /** + * + * + *
+       * The BigQuery location of the input table.
+       * The schema of the table should be in the format described by the given
+       * context OpenAPI Schema, if one is provided. The table may contain
+       * additional columns that are not described by the schema, and they will
+       * be ignored.
+       * 
+ * + * .google.cloud.aiplatform.v1.BigQuerySource bigquery_source = 3; + * + * @return The bigquerySource. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.BigQuerySource getBigquerySource() { + if (bigquerySourceBuilder_ == null) { + if (sourceCase_ == 3) { + return (com.google.cloud.aiplatform.v1.BigQuerySource) source_; + } + return com.google.cloud.aiplatform.v1.BigQuerySource.getDefaultInstance(); + } else { + if (sourceCase_ == 3) { + return bigquerySourceBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1.BigQuerySource.getDefaultInstance(); + } + } + /** + * + * + *
+       * The BigQuery location of the input table.
+       * The schema of the table should be in the format described by the given
+       * context OpenAPI Schema, if one is provided. The table may contain
+       * additional columns that are not described by the schema, and they will
+       * be ignored.
+       * 
+ * + * .google.cloud.aiplatform.v1.BigQuerySource bigquery_source = 3; + */ + public Builder setBigquerySource(com.google.cloud.aiplatform.v1.BigQuerySource value) { + if (bigquerySourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + onChanged(); + } else { + bigquerySourceBuilder_.setMessage(value); + } + sourceCase_ = 3; + return this; + } + /** + * + * + *
+       * The BigQuery location of the input table.
+       * The schema of the table should be in the format described by the given
+       * context OpenAPI Schema, if one is provided. The table may contain
+       * additional columns that are not described by the schema, and they will
+       * be ignored.
+       * 
+ * + * .google.cloud.aiplatform.v1.BigQuerySource bigquery_source = 3; + */ + public Builder setBigquerySource( + com.google.cloud.aiplatform.v1.BigQuerySource.Builder builderForValue) { + if (bigquerySourceBuilder_ == null) { + source_ = builderForValue.build(); + onChanged(); + } else { + bigquerySourceBuilder_.setMessage(builderForValue.build()); + } + sourceCase_ = 3; + return this; + } + /** + * + * + *
+       * The BigQuery location of the input table.
+       * The schema of the table should be in the format described by the given
+       * context OpenAPI Schema, if one is provided. The table may contain
+       * additional columns that are not described by the schema, and they will
+       * be ignored.
+       * 
+ * + * .google.cloud.aiplatform.v1.BigQuerySource bigquery_source = 3; + */ + public Builder mergeBigquerySource(com.google.cloud.aiplatform.v1.BigQuerySource value) { + if (bigquerySourceBuilder_ == null) { + if (sourceCase_ == 3 + && source_ != com.google.cloud.aiplatform.v1.BigQuerySource.getDefaultInstance()) { + source_ = + com.google.cloud.aiplatform.v1.BigQuerySource.newBuilder( + (com.google.cloud.aiplatform.v1.BigQuerySource) source_) + .mergeFrom(value) + .buildPartial(); + } else { + source_ = value; + } + onChanged(); + } else { + if (sourceCase_ == 3) { + bigquerySourceBuilder_.mergeFrom(value); + } + bigquerySourceBuilder_.setMessage(value); + } + sourceCase_ = 3; + return this; + } + /** + * + * + *
+       * The BigQuery location of the input table.
+       * The schema of the table should be in the format described by the given
+       * context OpenAPI Schema, if one is provided. The table may contain
+       * additional columns that are not described by the schema, and they will
+       * be ignored.
+       * 
+ * + * .google.cloud.aiplatform.v1.BigQuerySource bigquery_source = 3; + */ + public Builder clearBigquerySource() { + if (bigquerySourceBuilder_ == null) { + if (sourceCase_ == 3) { + sourceCase_ = 0; + source_ = null; + onChanged(); + } + } else { + if (sourceCase_ == 3) { + sourceCase_ = 0; + source_ = null; + } + bigquerySourceBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * The BigQuery location of the input table.
+       * The schema of the table should be in the format described by the given
+       * context OpenAPI Schema, if one is provided. The table may contain
+       * additional columns that are not described by the schema, and they will
+       * be ignored.
+       * 
+ * + * .google.cloud.aiplatform.v1.BigQuerySource bigquery_source = 3; + */ + public com.google.cloud.aiplatform.v1.BigQuerySource.Builder getBigquerySourceBuilder() { + return getBigquerySourceFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The BigQuery location of the input table.
+       * The schema of the table should be in the format described by the given
+       * context OpenAPI Schema, if one is provided. The table may contain
+       * additional columns that are not described by the schema, and they will
+       * be ignored.
+       * 
+ * + * .google.cloud.aiplatform.v1.BigQuerySource bigquery_source = 3; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.BigQuerySourceOrBuilder getBigquerySourceOrBuilder() { + if ((sourceCase_ == 3) && (bigquerySourceBuilder_ != null)) { + return bigquerySourceBuilder_.getMessageOrBuilder(); + } else { + if (sourceCase_ == 3) { + return (com.google.cloud.aiplatform.v1.BigQuerySource) source_; + } + return com.google.cloud.aiplatform.v1.BigQuerySource.getDefaultInstance(); + } + } + /** + * + * + *
+       * The BigQuery location of the input table.
+       * The schema of the table should be in the format described by the given
+       * context OpenAPI Schema, if one is provided. The table may contain
+       * additional columns that are not described by the schema, and they will
+       * be ignored.
+       * 
+ * + * .google.cloud.aiplatform.v1.BigQuerySource bigquery_source = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.BigQuerySource, + com.google.cloud.aiplatform.v1.BigQuerySource.Builder, + com.google.cloud.aiplatform.v1.BigQuerySourceOrBuilder> + getBigquerySourceFieldBuilder() { + if (bigquerySourceBuilder_ == null) { + if (!(sourceCase_ == 3)) { + source_ = com.google.cloud.aiplatform.v1.BigQuerySource.getDefaultInstance(); + } + bigquerySourceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.BigQuerySource, + com.google.cloud.aiplatform.v1.BigQuerySource.Builder, + com.google.cloud.aiplatform.v1.BigQuerySourceOrBuilder>( + (com.google.cloud.aiplatform.v1.BigQuerySource) source_, + getParentForChildren(), + isClean()); + source_ = null; + } + sourceCase_ = 3; + onChanged(); + ; + return bigquerySourceBuilder_; + } + + private java.lang.Object instancesFormat_ = ""; + /** + * + * + *
+       * Required. The format in which instances are given, must be one of the
+       * [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model]
+       * [supported_input_storage_formats][google.cloud.aiplatform.v1.Model.supported_input_storage_formats].
+       * 
+ * + * string instances_format = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The instancesFormat. + */ + public java.lang.String getInstancesFormat() { + java.lang.Object ref = instancesFormat_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instancesFormat_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. The format in which instances are given, must be one of the
+       * [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model]
+       * [supported_input_storage_formats][google.cloud.aiplatform.v1.Model.supported_input_storage_formats].
+       * 
+ * + * string instances_format = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for instancesFormat. + */ + public com.google.protobuf.ByteString getInstancesFormatBytes() { + java.lang.Object ref = instancesFormat_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instancesFormat_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. The format in which instances are given, must be one of the
+       * [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model]
+       * [supported_input_storage_formats][google.cloud.aiplatform.v1.Model.supported_input_storage_formats].
+       * 
+ * + * string instances_format = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The instancesFormat to set. + * @return This builder for chaining. + */ + public Builder setInstancesFormat(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + instancesFormat_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The format in which instances are given, must be one of the
+       * [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model]
+       * [supported_input_storage_formats][google.cloud.aiplatform.v1.Model.supported_input_storage_formats].
+       * 
+ * + * string instances_format = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearInstancesFormat() { + + instancesFormat_ = getDefaultInstance().getInstancesFormat(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The format in which instances are given, must be one of the
+       * [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model]
+       * [supported_input_storage_formats][google.cloud.aiplatform.v1.Model.supported_input_storage_formats].
+       * 
+ * + * string instances_format = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for instancesFormat to set. + * @return This builder for chaining. + */ + public Builder setInstancesFormatBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + instancesFormat_ = 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.v1.BatchPredictionJob.InputConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig) + private static final com.google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig(); + } + + public static com.google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InputConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new InputConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface OutputConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The Cloud Storage location of the directory where the output is
+     * to be written to. In the given directory a new directory is created.
+     * Its name is `prediction-<model-display-name>-<job-create-time>`,
+     * where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format.
+     * Inside of it files `predictions_0001.<extension>`,
+     * `predictions_0002.<extension>`, ..., `predictions_N.<extension>`
+     * are created where `<extension>` depends on chosen
+     * [predictions_format][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.predictions_format], and N may equal 0001 and depends on the total
+     * number of successfully predicted instances.
+     * If the Model has both [instance][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]
+     * and [prediction][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri] schemata
+     * defined then each such file contains predictions as per the
+     * [predictions_format][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.predictions_format].
+     * If prediction for any instance failed (partially or completely), then
+     * an additional `errors_0001.<extension>`, `errors_0002.<extension>`,...,
+     * `errors_N.<extension>` files are created (N depends on total number
+     * of failed predictions). These files contain the failed instances,
+     * as per their schema, followed by an additional `error` field which as
+     * value has
+     * [`google.rpc.Status`](Status)
+     * containing only `code` and `message` fields.
+     * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination gcs_destination = 2; + * + * @return Whether the gcsDestination field is set. + */ + boolean hasGcsDestination(); + /** + * + * + *
+     * The Cloud Storage location of the directory where the output is
+     * to be written to. In the given directory a new directory is created.
+     * Its name is `prediction-<model-display-name>-<job-create-time>`,
+     * where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format.
+     * Inside of it files `predictions_0001.<extension>`,
+     * `predictions_0002.<extension>`, ..., `predictions_N.<extension>`
+     * are created where `<extension>` depends on chosen
+     * [predictions_format][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.predictions_format], and N may equal 0001 and depends on the total
+     * number of successfully predicted instances.
+     * If the Model has both [instance][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]
+     * and [prediction][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri] schemata
+     * defined then each such file contains predictions as per the
+     * [predictions_format][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.predictions_format].
+     * If prediction for any instance failed (partially or completely), then
+     * an additional `errors_0001.<extension>`, `errors_0002.<extension>`,...,
+     * `errors_N.<extension>` files are created (N depends on total number
+     * of failed predictions). These files contain the failed instances,
+     * as per their schema, followed by an additional `error` field which as
+     * value has
+     * [`google.rpc.Status`](Status)
+     * containing only `code` and `message` fields.
+     * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination gcs_destination = 2; + * + * @return The gcsDestination. + */ + com.google.cloud.aiplatform.v1.GcsDestination getGcsDestination(); + /** + * + * + *
+     * The Cloud Storage location of the directory where the output is
+     * to be written to. In the given directory a new directory is created.
+     * Its name is `prediction-<model-display-name>-<job-create-time>`,
+     * where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format.
+     * Inside of it files `predictions_0001.<extension>`,
+     * `predictions_0002.<extension>`, ..., `predictions_N.<extension>`
+     * are created where `<extension>` depends on chosen
+     * [predictions_format][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.predictions_format], and N may equal 0001 and depends on the total
+     * number of successfully predicted instances.
+     * If the Model has both [instance][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]
+     * and [prediction][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri] schemata
+     * defined then each such file contains predictions as per the
+     * [predictions_format][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.predictions_format].
+     * If prediction for any instance failed (partially or completely), then
+     * an additional `errors_0001.<extension>`, `errors_0002.<extension>`,...,
+     * `errors_N.<extension>` files are created (N depends on total number
+     * of failed predictions). These files contain the failed instances,
+     * as per their schema, followed by an additional `error` field which as
+     * value has
+     * [`google.rpc.Status`](Status)
+     * containing only `code` and `message` fields.
+     * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination gcs_destination = 2; + */ + com.google.cloud.aiplatform.v1.GcsDestinationOrBuilder getGcsDestinationOrBuilder(); + + /** + * + * + *
+     * The BigQuery project location where the output is to be written to.
+     * In the given project a new dataset is created with name
+     * `prediction_<model-display-name>_<job-create-time>`
+     * where <model-display-name> is made
+     * BigQuery-dataset-name compatible (for example, most special characters
+     * become underscores), and timestamp is in
+     * YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601" format. In the dataset
+     * two tables will be created, `predictions`, and `errors`.
+     * If the Model has both [instance][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]
+     * and [prediction][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri] schemata
+     * defined then the tables have columns as follows: The `predictions`
+     * table contains instances for which the prediction succeeded, it
+     * has columns as per a concatenation of the Model's instance and
+     * prediction schemata. The `errors` table contains rows for which the
+     * prediction has failed, it has instance columns, as per the
+     * instance schema, followed by a single "errors" column, which as values
+     * has [`google.rpc.Status`](Status)
+     * represented as a STRUCT, and containing only `code` and `message`.
+     * 
+ * + * .google.cloud.aiplatform.v1.BigQueryDestination bigquery_destination = 3; + * + * @return Whether the bigqueryDestination field is set. + */ + boolean hasBigqueryDestination(); + /** + * + * + *
+     * The BigQuery project location where the output is to be written to.
+     * In the given project a new dataset is created with name
+     * `prediction_<model-display-name>_<job-create-time>`
+     * where <model-display-name> is made
+     * BigQuery-dataset-name compatible (for example, most special characters
+     * become underscores), and timestamp is in
+     * YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601" format. In the dataset
+     * two tables will be created, `predictions`, and `errors`.
+     * If the Model has both [instance][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]
+     * and [prediction][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri] schemata
+     * defined then the tables have columns as follows: The `predictions`
+     * table contains instances for which the prediction succeeded, it
+     * has columns as per a concatenation of the Model's instance and
+     * prediction schemata. The `errors` table contains rows for which the
+     * prediction has failed, it has instance columns, as per the
+     * instance schema, followed by a single "errors" column, which as values
+     * has [`google.rpc.Status`](Status)
+     * represented as a STRUCT, and containing only `code` and `message`.
+     * 
+ * + * .google.cloud.aiplatform.v1.BigQueryDestination bigquery_destination = 3; + * + * @return The bigqueryDestination. + */ + com.google.cloud.aiplatform.v1.BigQueryDestination getBigqueryDestination(); + /** + * + * + *
+     * The BigQuery project location where the output is to be written to.
+     * In the given project a new dataset is created with name
+     * `prediction_<model-display-name>_<job-create-time>`
+     * where <model-display-name> is made
+     * BigQuery-dataset-name compatible (for example, most special characters
+     * become underscores), and timestamp is in
+     * YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601" format. In the dataset
+     * two tables will be created, `predictions`, and `errors`.
+     * If the Model has both [instance][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]
+     * and [prediction][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri] schemata
+     * defined then the tables have columns as follows: The `predictions`
+     * table contains instances for which the prediction succeeded, it
+     * has columns as per a concatenation of the Model's instance and
+     * prediction schemata. The `errors` table contains rows for which the
+     * prediction has failed, it has instance columns, as per the
+     * instance schema, followed by a single "errors" column, which as values
+     * has [`google.rpc.Status`](Status)
+     * represented as a STRUCT, and containing only `code` and `message`.
+     * 
+ * + * .google.cloud.aiplatform.v1.BigQueryDestination bigquery_destination = 3; + */ + com.google.cloud.aiplatform.v1.BigQueryDestinationOrBuilder getBigqueryDestinationOrBuilder(); + + /** + * + * + *
+     * Required. The format in which AI Platform gives the predictions, must be one of the
+     * [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model]
+     * [supported_output_storage_formats][google.cloud.aiplatform.v1.Model.supported_output_storage_formats].
+     * 
+ * + * string predictions_format = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The predictionsFormat. + */ + java.lang.String getPredictionsFormat(); + /** + * + * + *
+     * Required. The format in which AI Platform gives the predictions, must be one of the
+     * [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model]
+     * [supported_output_storage_formats][google.cloud.aiplatform.v1.Model.supported_output_storage_formats].
+     * 
+ * + * string predictions_format = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for predictionsFormat. + */ + com.google.protobuf.ByteString getPredictionsFormatBytes(); + + public com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.DestinationCase + getDestinationCase(); + } + /** + * + * + *
+   * Configures the output of [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob].
+   * See [Model.supported_output_storage_formats][google.cloud.aiplatform.v1.Model.supported_output_storage_formats] for supported output
+   * formats, and how predictions are expressed via any of them.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig} + */ + public static final class OutputConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig) + OutputConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use OutputConfig.newBuilder() to construct. + private OutputConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private OutputConfig() { + predictionsFormat_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OutputConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private OutputConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + 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(); + + predictionsFormat_ = s; + break; + } + case 18: + { + com.google.cloud.aiplatform.v1.GcsDestination.Builder subBuilder = null; + if (destinationCase_ == 2) { + subBuilder = + ((com.google.cloud.aiplatform.v1.GcsDestination) destination_).toBuilder(); + } + destination_ = + input.readMessage( + com.google.cloud.aiplatform.v1.GcsDestination.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.aiplatform.v1.GcsDestination) destination_); + destination_ = subBuilder.buildPartial(); + } + destinationCase_ = 2; + break; + } + case 26: + { + com.google.cloud.aiplatform.v1.BigQueryDestination.Builder subBuilder = null; + if (destinationCase_ == 3) { + subBuilder = + ((com.google.cloud.aiplatform.v1.BigQueryDestination) destination_) + .toBuilder(); + } + destination_ = + input.readMessage( + com.google.cloud.aiplatform.v1.BigQueryDestination.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.aiplatform.v1.BigQueryDestination) destination_); + destination_ = subBuilder.buildPartial(); + } + destinationCase_ = 3; + 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.v1.BatchPredictionJobProto + .internal_static_google_cloud_aiplatform_v1_BatchPredictionJob_OutputConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.BatchPredictionJobProto + .internal_static_google_cloud_aiplatform_v1_BatchPredictionJob_OutputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.class, + com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.Builder.class); + } + + private int destinationCase_ = 0; + private java.lang.Object destination_; + + public enum DestinationCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + GCS_DESTINATION(2), + BIGQUERY_DESTINATION(3), + DESTINATION_NOT_SET(0); + private final int value; + + private DestinationCase(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 DestinationCase valueOf(int value) { + return forNumber(value); + } + + public static DestinationCase forNumber(int value) { + switch (value) { + case 2: + return GCS_DESTINATION; + case 3: + return BIGQUERY_DESTINATION; + case 0: + return DESTINATION_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public DestinationCase getDestinationCase() { + return DestinationCase.forNumber(destinationCase_); + } + + public static final int GCS_DESTINATION_FIELD_NUMBER = 2; + /** + * + * + *
+     * The Cloud Storage location of the directory where the output is
+     * to be written to. In the given directory a new directory is created.
+     * Its name is `prediction-<model-display-name>-<job-create-time>`,
+     * where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format.
+     * Inside of it files `predictions_0001.<extension>`,
+     * `predictions_0002.<extension>`, ..., `predictions_N.<extension>`
+     * are created where `<extension>` depends on chosen
+     * [predictions_format][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.predictions_format], and N may equal 0001 and depends on the total
+     * number of successfully predicted instances.
+     * If the Model has both [instance][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]
+     * and [prediction][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri] schemata
+     * defined then each such file contains predictions as per the
+     * [predictions_format][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.predictions_format].
+     * If prediction for any instance failed (partially or completely), then
+     * an additional `errors_0001.<extension>`, `errors_0002.<extension>`,...,
+     * `errors_N.<extension>` files are created (N depends on total number
+     * of failed predictions). These files contain the failed instances,
+     * as per their schema, followed by an additional `error` field which as
+     * value has
+     * [`google.rpc.Status`](Status)
+     * containing only `code` and `message` fields.
+     * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination gcs_destination = 2; + * + * @return Whether the gcsDestination field is set. + */ + @java.lang.Override + public boolean hasGcsDestination() { + return destinationCase_ == 2; + } + /** + * + * + *
+     * The Cloud Storage location of the directory where the output is
+     * to be written to. In the given directory a new directory is created.
+     * Its name is `prediction-<model-display-name>-<job-create-time>`,
+     * where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format.
+     * Inside of it files `predictions_0001.<extension>`,
+     * `predictions_0002.<extension>`, ..., `predictions_N.<extension>`
+     * are created where `<extension>` depends on chosen
+     * [predictions_format][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.predictions_format], and N may equal 0001 and depends on the total
+     * number of successfully predicted instances.
+     * If the Model has both [instance][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]
+     * and [prediction][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri] schemata
+     * defined then each such file contains predictions as per the
+     * [predictions_format][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.predictions_format].
+     * If prediction for any instance failed (partially or completely), then
+     * an additional `errors_0001.<extension>`, `errors_0002.<extension>`,...,
+     * `errors_N.<extension>` files are created (N depends on total number
+     * of failed predictions). These files contain the failed instances,
+     * as per their schema, followed by an additional `error` field which as
+     * value has
+     * [`google.rpc.Status`](Status)
+     * containing only `code` and `message` fields.
+     * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination gcs_destination = 2; + * + * @return The gcsDestination. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GcsDestination getGcsDestination() { + if (destinationCase_ == 2) { + return (com.google.cloud.aiplatform.v1.GcsDestination) destination_; + } + return com.google.cloud.aiplatform.v1.GcsDestination.getDefaultInstance(); + } + /** + * + * + *
+     * The Cloud Storage location of the directory where the output is
+     * to be written to. In the given directory a new directory is created.
+     * Its name is `prediction-<model-display-name>-<job-create-time>`,
+     * where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format.
+     * Inside of it files `predictions_0001.<extension>`,
+     * `predictions_0002.<extension>`, ..., `predictions_N.<extension>`
+     * are created where `<extension>` depends on chosen
+     * [predictions_format][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.predictions_format], and N may equal 0001 and depends on the total
+     * number of successfully predicted instances.
+     * If the Model has both [instance][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]
+     * and [prediction][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri] schemata
+     * defined then each such file contains predictions as per the
+     * [predictions_format][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.predictions_format].
+     * If prediction for any instance failed (partially or completely), then
+     * an additional `errors_0001.<extension>`, `errors_0002.<extension>`,...,
+     * `errors_N.<extension>` files are created (N depends on total number
+     * of failed predictions). These files contain the failed instances,
+     * as per their schema, followed by an additional `error` field which as
+     * value has
+     * [`google.rpc.Status`](Status)
+     * containing only `code` and `message` fields.
+     * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination gcs_destination = 2; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GcsDestinationOrBuilder getGcsDestinationOrBuilder() { + if (destinationCase_ == 2) { + return (com.google.cloud.aiplatform.v1.GcsDestination) destination_; + } + return com.google.cloud.aiplatform.v1.GcsDestination.getDefaultInstance(); + } + + public static final int BIGQUERY_DESTINATION_FIELD_NUMBER = 3; + /** + * + * + *
+     * The BigQuery project location where the output is to be written to.
+     * In the given project a new dataset is created with name
+     * `prediction_<model-display-name>_<job-create-time>`
+     * where <model-display-name> is made
+     * BigQuery-dataset-name compatible (for example, most special characters
+     * become underscores), and timestamp is in
+     * YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601" format. In the dataset
+     * two tables will be created, `predictions`, and `errors`.
+     * If the Model has both [instance][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]
+     * and [prediction][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri] schemata
+     * defined then the tables have columns as follows: The `predictions`
+     * table contains instances for which the prediction succeeded, it
+     * has columns as per a concatenation of the Model's instance and
+     * prediction schemata. The `errors` table contains rows for which the
+     * prediction has failed, it has instance columns, as per the
+     * instance schema, followed by a single "errors" column, which as values
+     * has [`google.rpc.Status`](Status)
+     * represented as a STRUCT, and containing only `code` and `message`.
+     * 
+ * + * .google.cloud.aiplatform.v1.BigQueryDestination bigquery_destination = 3; + * + * @return Whether the bigqueryDestination field is set. + */ + @java.lang.Override + public boolean hasBigqueryDestination() { + return destinationCase_ == 3; + } + /** + * + * + *
+     * The BigQuery project location where the output is to be written to.
+     * In the given project a new dataset is created with name
+     * `prediction_<model-display-name>_<job-create-time>`
+     * where <model-display-name> is made
+     * BigQuery-dataset-name compatible (for example, most special characters
+     * become underscores), and timestamp is in
+     * YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601" format. In the dataset
+     * two tables will be created, `predictions`, and `errors`.
+     * If the Model has both [instance][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]
+     * and [prediction][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri] schemata
+     * defined then the tables have columns as follows: The `predictions`
+     * table contains instances for which the prediction succeeded, it
+     * has columns as per a concatenation of the Model's instance and
+     * prediction schemata. The `errors` table contains rows for which the
+     * prediction has failed, it has instance columns, as per the
+     * instance schema, followed by a single "errors" column, which as values
+     * has [`google.rpc.Status`](Status)
+     * represented as a STRUCT, and containing only `code` and `message`.
+     * 
+ * + * .google.cloud.aiplatform.v1.BigQueryDestination bigquery_destination = 3; + * + * @return The bigqueryDestination. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.BigQueryDestination getBigqueryDestination() { + if (destinationCase_ == 3) { + return (com.google.cloud.aiplatform.v1.BigQueryDestination) destination_; + } + return com.google.cloud.aiplatform.v1.BigQueryDestination.getDefaultInstance(); + } + /** + * + * + *
+     * The BigQuery project location where the output is to be written to.
+     * In the given project a new dataset is created with name
+     * `prediction_<model-display-name>_<job-create-time>`
+     * where <model-display-name> is made
+     * BigQuery-dataset-name compatible (for example, most special characters
+     * become underscores), and timestamp is in
+     * YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601" format. In the dataset
+     * two tables will be created, `predictions`, and `errors`.
+     * If the Model has both [instance][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]
+     * and [prediction][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri] schemata
+     * defined then the tables have columns as follows: The `predictions`
+     * table contains instances for which the prediction succeeded, it
+     * has columns as per a concatenation of the Model's instance and
+     * prediction schemata. The `errors` table contains rows for which the
+     * prediction has failed, it has instance columns, as per the
+     * instance schema, followed by a single "errors" column, which as values
+     * has [`google.rpc.Status`](Status)
+     * represented as a STRUCT, and containing only `code` and `message`.
+     * 
+ * + * .google.cloud.aiplatform.v1.BigQueryDestination bigquery_destination = 3; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.BigQueryDestinationOrBuilder + getBigqueryDestinationOrBuilder() { + if (destinationCase_ == 3) { + return (com.google.cloud.aiplatform.v1.BigQueryDestination) destination_; + } + return com.google.cloud.aiplatform.v1.BigQueryDestination.getDefaultInstance(); + } + + public static final int PREDICTIONS_FORMAT_FIELD_NUMBER = 1; + private volatile java.lang.Object predictionsFormat_; + /** + * + * + *
+     * Required. The format in which AI Platform gives the predictions, must be one of the
+     * [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model]
+     * [supported_output_storage_formats][google.cloud.aiplatform.v1.Model.supported_output_storage_formats].
+     * 
+ * + * string predictions_format = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The predictionsFormat. + */ + @java.lang.Override + public java.lang.String getPredictionsFormat() { + java.lang.Object ref = predictionsFormat_; + 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(); + predictionsFormat_ = s; + return s; + } + } + /** + * + * + *
+     * Required. The format in which AI Platform gives the predictions, must be one of the
+     * [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model]
+     * [supported_output_storage_formats][google.cloud.aiplatform.v1.Model.supported_output_storage_formats].
+     * 
+ * + * string predictions_format = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for predictionsFormat. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPredictionsFormatBytes() { + java.lang.Object ref = predictionsFormat_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + predictionsFormat_ = 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 (!getPredictionsFormatBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, predictionsFormat_); + } + if (destinationCase_ == 2) { + output.writeMessage(2, (com.google.cloud.aiplatform.v1.GcsDestination) destination_); + } + if (destinationCase_ == 3) { + output.writeMessage(3, (com.google.cloud.aiplatform.v1.BigQueryDestination) destination_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getPredictionsFormatBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, predictionsFormat_); + } + if (destinationCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.aiplatform.v1.GcsDestination) destination_); + } + if (destinationCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.cloud.aiplatform.v1.BigQueryDestination) destination_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig other = + (com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig) obj; + + if (!getPredictionsFormat().equals(other.getPredictionsFormat())) return false; + if (!getDestinationCase().equals(other.getDestinationCase())) return false; + switch (destinationCase_) { + case 2: + if (!getGcsDestination().equals(other.getGcsDestination())) return false; + break; + case 3: + if (!getBigqueryDestination().equals(other.getBigqueryDestination())) 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) + PREDICTIONS_FORMAT_FIELD_NUMBER; + hash = (53 * hash) + getPredictionsFormat().hashCode(); + switch (destinationCase_) { + case 2: + hash = (37 * hash) + GCS_DESTINATION_FIELD_NUMBER; + hash = (53 * hash) + getGcsDestination().hashCode(); + break; + case 3: + hash = (37 * hash) + BIGQUERY_DESTINATION_FIELD_NUMBER; + hash = (53 * hash) + getBigqueryDestination().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Configures the output of [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob].
+     * See [Model.supported_output_storage_formats][google.cloud.aiplatform.v1.Model.supported_output_storage_formats] for supported output
+     * formats, and how predictions are expressed via any of them.
+     * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig) + com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.BatchPredictionJobProto + .internal_static_google_cloud_aiplatform_v1_BatchPredictionJob_OutputConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.BatchPredictionJobProto + .internal_static_google_cloud_aiplatform_v1_BatchPredictionJob_OutputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.class, + com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + predictionsFormat_ = ""; + + destinationCase_ = 0; + destination_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.BatchPredictionJobProto + .internal_static_google_cloud_aiplatform_v1_BatchPredictionJob_OutputConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig build() { + com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig buildPartial() { + com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig result = + new com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig(this); + if (destinationCase_ == 2) { + if (gcsDestinationBuilder_ == null) { + result.destination_ = destination_; + } else { + result.destination_ = gcsDestinationBuilder_.build(); + } + } + if (destinationCase_ == 3) { + if (bigqueryDestinationBuilder_ == null) { + result.destination_ = destination_; + } else { + result.destination_ = bigqueryDestinationBuilder_.build(); + } + } + result.predictionsFormat_ = predictionsFormat_; + result.destinationCase_ = destinationCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig) { + return mergeFrom((com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig other) { + if (other + == com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.getDefaultInstance()) + return this; + if (!other.getPredictionsFormat().isEmpty()) { + predictionsFormat_ = other.predictionsFormat_; + onChanged(); + } + switch (other.getDestinationCase()) { + case GCS_DESTINATION: + { + mergeGcsDestination(other.getGcsDestination()); + break; + } + case BIGQUERY_DESTINATION: + { + mergeBigqueryDestination(other.getBigqueryDestination()); + break; + } + case DESTINATION_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int destinationCase_ = 0; + private java.lang.Object destination_; + + public DestinationCase getDestinationCase() { + return DestinationCase.forNumber(destinationCase_); + } + + public Builder clearDestination() { + destinationCase_ = 0; + destination_ = null; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GcsDestination, + com.google.cloud.aiplatform.v1.GcsDestination.Builder, + com.google.cloud.aiplatform.v1.GcsDestinationOrBuilder> + gcsDestinationBuilder_; + /** + * + * + *
+       * The Cloud Storage location of the directory where the output is
+       * to be written to. In the given directory a new directory is created.
+       * Its name is `prediction-<model-display-name>-<job-create-time>`,
+       * where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format.
+       * Inside of it files `predictions_0001.<extension>`,
+       * `predictions_0002.<extension>`, ..., `predictions_N.<extension>`
+       * are created where `<extension>` depends on chosen
+       * [predictions_format][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.predictions_format], and N may equal 0001 and depends on the total
+       * number of successfully predicted instances.
+       * If the Model has both [instance][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]
+       * and [prediction][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri] schemata
+       * defined then each such file contains predictions as per the
+       * [predictions_format][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.predictions_format].
+       * If prediction for any instance failed (partially or completely), then
+       * an additional `errors_0001.<extension>`, `errors_0002.<extension>`,...,
+       * `errors_N.<extension>` files are created (N depends on total number
+       * of failed predictions). These files contain the failed instances,
+       * as per their schema, followed by an additional `error` field which as
+       * value has
+       * [`google.rpc.Status`](Status)
+       * containing only `code` and `message` fields.
+       * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination gcs_destination = 2; + * + * @return Whether the gcsDestination field is set. + */ + @java.lang.Override + public boolean hasGcsDestination() { + return destinationCase_ == 2; + } + /** + * + * + *
+       * The Cloud Storage location of the directory where the output is
+       * to be written to. In the given directory a new directory is created.
+       * Its name is `prediction-<model-display-name>-<job-create-time>`,
+       * where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format.
+       * Inside of it files `predictions_0001.<extension>`,
+       * `predictions_0002.<extension>`, ..., `predictions_N.<extension>`
+       * are created where `<extension>` depends on chosen
+       * [predictions_format][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.predictions_format], and N may equal 0001 and depends on the total
+       * number of successfully predicted instances.
+       * If the Model has both [instance][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]
+       * and [prediction][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri] schemata
+       * defined then each such file contains predictions as per the
+       * [predictions_format][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.predictions_format].
+       * If prediction for any instance failed (partially or completely), then
+       * an additional `errors_0001.<extension>`, `errors_0002.<extension>`,...,
+       * `errors_N.<extension>` files are created (N depends on total number
+       * of failed predictions). These files contain the failed instances,
+       * as per their schema, followed by an additional `error` field which as
+       * value has
+       * [`google.rpc.Status`](Status)
+       * containing only `code` and `message` fields.
+       * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination gcs_destination = 2; + * + * @return The gcsDestination. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GcsDestination getGcsDestination() { + if (gcsDestinationBuilder_ == null) { + if (destinationCase_ == 2) { + return (com.google.cloud.aiplatform.v1.GcsDestination) destination_; + } + return com.google.cloud.aiplatform.v1.GcsDestination.getDefaultInstance(); + } else { + if (destinationCase_ == 2) { + return gcsDestinationBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1.GcsDestination.getDefaultInstance(); + } + } + /** + * + * + *
+       * The Cloud Storage location of the directory where the output is
+       * to be written to. In the given directory a new directory is created.
+       * Its name is `prediction-<model-display-name>-<job-create-time>`,
+       * where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format.
+       * Inside of it files `predictions_0001.<extension>`,
+       * `predictions_0002.<extension>`, ..., `predictions_N.<extension>`
+       * are created where `<extension>` depends on chosen
+       * [predictions_format][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.predictions_format], and N may equal 0001 and depends on the total
+       * number of successfully predicted instances.
+       * If the Model has both [instance][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]
+       * and [prediction][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri] schemata
+       * defined then each such file contains predictions as per the
+       * [predictions_format][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.predictions_format].
+       * If prediction for any instance failed (partially or completely), then
+       * an additional `errors_0001.<extension>`, `errors_0002.<extension>`,...,
+       * `errors_N.<extension>` files are created (N depends on total number
+       * of failed predictions). These files contain the failed instances,
+       * as per their schema, followed by an additional `error` field which as
+       * value has
+       * [`google.rpc.Status`](Status)
+       * containing only `code` and `message` fields.
+       * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination gcs_destination = 2; + */ + public Builder setGcsDestination(com.google.cloud.aiplatform.v1.GcsDestination value) { + if (gcsDestinationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + destination_ = value; + onChanged(); + } else { + gcsDestinationBuilder_.setMessage(value); + } + destinationCase_ = 2; + return this; + } + /** + * + * + *
+       * The Cloud Storage location of the directory where the output is
+       * to be written to. In the given directory a new directory is created.
+       * Its name is `prediction-<model-display-name>-<job-create-time>`,
+       * where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format.
+       * Inside of it files `predictions_0001.<extension>`,
+       * `predictions_0002.<extension>`, ..., `predictions_N.<extension>`
+       * are created where `<extension>` depends on chosen
+       * [predictions_format][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.predictions_format], and N may equal 0001 and depends on the total
+       * number of successfully predicted instances.
+       * If the Model has both [instance][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]
+       * and [prediction][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri] schemata
+       * defined then each such file contains predictions as per the
+       * [predictions_format][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.predictions_format].
+       * If prediction for any instance failed (partially or completely), then
+       * an additional `errors_0001.<extension>`, `errors_0002.<extension>`,...,
+       * `errors_N.<extension>` files are created (N depends on total number
+       * of failed predictions). These files contain the failed instances,
+       * as per their schema, followed by an additional `error` field which as
+       * value has
+       * [`google.rpc.Status`](Status)
+       * containing only `code` and `message` fields.
+       * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination gcs_destination = 2; + */ + public Builder setGcsDestination( + com.google.cloud.aiplatform.v1.GcsDestination.Builder builderForValue) { + if (gcsDestinationBuilder_ == null) { + destination_ = builderForValue.build(); + onChanged(); + } else { + gcsDestinationBuilder_.setMessage(builderForValue.build()); + } + destinationCase_ = 2; + return this; + } + /** + * + * + *
+       * The Cloud Storage location of the directory where the output is
+       * to be written to. In the given directory a new directory is created.
+       * Its name is `prediction-<model-display-name>-<job-create-time>`,
+       * where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format.
+       * Inside of it files `predictions_0001.<extension>`,
+       * `predictions_0002.<extension>`, ..., `predictions_N.<extension>`
+       * are created where `<extension>` depends on chosen
+       * [predictions_format][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.predictions_format], and N may equal 0001 and depends on the total
+       * number of successfully predicted instances.
+       * If the Model has both [instance][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]
+       * and [prediction][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri] schemata
+       * defined then each such file contains predictions as per the
+       * [predictions_format][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.predictions_format].
+       * If prediction for any instance failed (partially or completely), then
+       * an additional `errors_0001.<extension>`, `errors_0002.<extension>`,...,
+       * `errors_N.<extension>` files are created (N depends on total number
+       * of failed predictions). These files contain the failed instances,
+       * as per their schema, followed by an additional `error` field which as
+       * value has
+       * [`google.rpc.Status`](Status)
+       * containing only `code` and `message` fields.
+       * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination gcs_destination = 2; + */ + public Builder mergeGcsDestination(com.google.cloud.aiplatform.v1.GcsDestination value) { + if (gcsDestinationBuilder_ == null) { + if (destinationCase_ == 2 + && destination_ + != com.google.cloud.aiplatform.v1.GcsDestination.getDefaultInstance()) { + destination_ = + com.google.cloud.aiplatform.v1.GcsDestination.newBuilder( + (com.google.cloud.aiplatform.v1.GcsDestination) destination_) + .mergeFrom(value) + .buildPartial(); + } else { + destination_ = value; + } + onChanged(); + } else { + if (destinationCase_ == 2) { + gcsDestinationBuilder_.mergeFrom(value); + } + gcsDestinationBuilder_.setMessage(value); + } + destinationCase_ = 2; + return this; + } + /** + * + * + *
+       * The Cloud Storage location of the directory where the output is
+       * to be written to. In the given directory a new directory is created.
+       * Its name is `prediction-<model-display-name>-<job-create-time>`,
+       * where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format.
+       * Inside of it files `predictions_0001.<extension>`,
+       * `predictions_0002.<extension>`, ..., `predictions_N.<extension>`
+       * are created where `<extension>` depends on chosen
+       * [predictions_format][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.predictions_format], and N may equal 0001 and depends on the total
+       * number of successfully predicted instances.
+       * If the Model has both [instance][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]
+       * and [prediction][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri] schemata
+       * defined then each such file contains predictions as per the
+       * [predictions_format][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.predictions_format].
+       * If prediction for any instance failed (partially or completely), then
+       * an additional `errors_0001.<extension>`, `errors_0002.<extension>`,...,
+       * `errors_N.<extension>` files are created (N depends on total number
+       * of failed predictions). These files contain the failed instances,
+       * as per their schema, followed by an additional `error` field which as
+       * value has
+       * [`google.rpc.Status`](Status)
+       * containing only `code` and `message` fields.
+       * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination gcs_destination = 2; + */ + public Builder clearGcsDestination() { + if (gcsDestinationBuilder_ == null) { + if (destinationCase_ == 2) { + destinationCase_ = 0; + destination_ = null; + onChanged(); + } + } else { + if (destinationCase_ == 2) { + destinationCase_ = 0; + destination_ = null; + } + gcsDestinationBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * The Cloud Storage location of the directory where the output is
+       * to be written to. In the given directory a new directory is created.
+       * Its name is `prediction-<model-display-name>-<job-create-time>`,
+       * where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format.
+       * Inside of it files `predictions_0001.<extension>`,
+       * `predictions_0002.<extension>`, ..., `predictions_N.<extension>`
+       * are created where `<extension>` depends on chosen
+       * [predictions_format][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.predictions_format], and N may equal 0001 and depends on the total
+       * number of successfully predicted instances.
+       * If the Model has both [instance][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]
+       * and [prediction][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri] schemata
+       * defined then each such file contains predictions as per the
+       * [predictions_format][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.predictions_format].
+       * If prediction for any instance failed (partially or completely), then
+       * an additional `errors_0001.<extension>`, `errors_0002.<extension>`,...,
+       * `errors_N.<extension>` files are created (N depends on total number
+       * of failed predictions). These files contain the failed instances,
+       * as per their schema, followed by an additional `error` field which as
+       * value has
+       * [`google.rpc.Status`](Status)
+       * containing only `code` and `message` fields.
+       * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination gcs_destination = 2; + */ + public com.google.cloud.aiplatform.v1.GcsDestination.Builder getGcsDestinationBuilder() { + return getGcsDestinationFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The Cloud Storage location of the directory where the output is
+       * to be written to. In the given directory a new directory is created.
+       * Its name is `prediction-<model-display-name>-<job-create-time>`,
+       * where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format.
+       * Inside of it files `predictions_0001.<extension>`,
+       * `predictions_0002.<extension>`, ..., `predictions_N.<extension>`
+       * are created where `<extension>` depends on chosen
+       * [predictions_format][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.predictions_format], and N may equal 0001 and depends on the total
+       * number of successfully predicted instances.
+       * If the Model has both [instance][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]
+       * and [prediction][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri] schemata
+       * defined then each such file contains predictions as per the
+       * [predictions_format][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.predictions_format].
+       * If prediction for any instance failed (partially or completely), then
+       * an additional `errors_0001.<extension>`, `errors_0002.<extension>`,...,
+       * `errors_N.<extension>` files are created (N depends on total number
+       * of failed predictions). These files contain the failed instances,
+       * as per their schema, followed by an additional `error` field which as
+       * value has
+       * [`google.rpc.Status`](Status)
+       * containing only `code` and `message` fields.
+       * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination gcs_destination = 2; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GcsDestinationOrBuilder getGcsDestinationOrBuilder() { + if ((destinationCase_ == 2) && (gcsDestinationBuilder_ != null)) { + return gcsDestinationBuilder_.getMessageOrBuilder(); + } else { + if (destinationCase_ == 2) { + return (com.google.cloud.aiplatform.v1.GcsDestination) destination_; + } + return com.google.cloud.aiplatform.v1.GcsDestination.getDefaultInstance(); + } + } + /** + * + * + *
+       * The Cloud Storage location of the directory where the output is
+       * to be written to. In the given directory a new directory is created.
+       * Its name is `prediction-<model-display-name>-<job-create-time>`,
+       * where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format.
+       * Inside of it files `predictions_0001.<extension>`,
+       * `predictions_0002.<extension>`, ..., `predictions_N.<extension>`
+       * are created where `<extension>` depends on chosen
+       * [predictions_format][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.predictions_format], and N may equal 0001 and depends on the total
+       * number of successfully predicted instances.
+       * If the Model has both [instance][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]
+       * and [prediction][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri] schemata
+       * defined then each such file contains predictions as per the
+       * [predictions_format][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.predictions_format].
+       * If prediction for any instance failed (partially or completely), then
+       * an additional `errors_0001.<extension>`, `errors_0002.<extension>`,...,
+       * `errors_N.<extension>` files are created (N depends on total number
+       * of failed predictions). These files contain the failed instances,
+       * as per their schema, followed by an additional `error` field which as
+       * value has
+       * [`google.rpc.Status`](Status)
+       * containing only `code` and `message` fields.
+       * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination gcs_destination = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GcsDestination, + com.google.cloud.aiplatform.v1.GcsDestination.Builder, + com.google.cloud.aiplatform.v1.GcsDestinationOrBuilder> + getGcsDestinationFieldBuilder() { + if (gcsDestinationBuilder_ == null) { + if (!(destinationCase_ == 2)) { + destination_ = com.google.cloud.aiplatform.v1.GcsDestination.getDefaultInstance(); + } + gcsDestinationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GcsDestination, + com.google.cloud.aiplatform.v1.GcsDestination.Builder, + com.google.cloud.aiplatform.v1.GcsDestinationOrBuilder>( + (com.google.cloud.aiplatform.v1.GcsDestination) destination_, + getParentForChildren(), + isClean()); + destination_ = null; + } + destinationCase_ = 2; + onChanged(); + ; + return gcsDestinationBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.BigQueryDestination, + com.google.cloud.aiplatform.v1.BigQueryDestination.Builder, + com.google.cloud.aiplatform.v1.BigQueryDestinationOrBuilder> + bigqueryDestinationBuilder_; + /** + * + * + *
+       * The BigQuery project location where the output is to be written to.
+       * In the given project a new dataset is created with name
+       * `prediction_<model-display-name>_<job-create-time>`
+       * where <model-display-name> is made
+       * BigQuery-dataset-name compatible (for example, most special characters
+       * become underscores), and timestamp is in
+       * YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601" format. In the dataset
+       * two tables will be created, `predictions`, and `errors`.
+       * If the Model has both [instance][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]
+       * and [prediction][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri] schemata
+       * defined then the tables have columns as follows: The `predictions`
+       * table contains instances for which the prediction succeeded, it
+       * has columns as per a concatenation of the Model's instance and
+       * prediction schemata. The `errors` table contains rows for which the
+       * prediction has failed, it has instance columns, as per the
+       * instance schema, followed by a single "errors" column, which as values
+       * has [`google.rpc.Status`](Status)
+       * represented as a STRUCT, and containing only `code` and `message`.
+       * 
+ * + * .google.cloud.aiplatform.v1.BigQueryDestination bigquery_destination = 3; + * + * @return Whether the bigqueryDestination field is set. + */ + @java.lang.Override + public boolean hasBigqueryDestination() { + return destinationCase_ == 3; + } + /** + * + * + *
+       * The BigQuery project location where the output is to be written to.
+       * In the given project a new dataset is created with name
+       * `prediction_<model-display-name>_<job-create-time>`
+       * where <model-display-name> is made
+       * BigQuery-dataset-name compatible (for example, most special characters
+       * become underscores), and timestamp is in
+       * YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601" format. In the dataset
+       * two tables will be created, `predictions`, and `errors`.
+       * If the Model has both [instance][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]
+       * and [prediction][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri] schemata
+       * defined then the tables have columns as follows: The `predictions`
+       * table contains instances for which the prediction succeeded, it
+       * has columns as per a concatenation of the Model's instance and
+       * prediction schemata. The `errors` table contains rows for which the
+       * prediction has failed, it has instance columns, as per the
+       * instance schema, followed by a single "errors" column, which as values
+       * has [`google.rpc.Status`](Status)
+       * represented as a STRUCT, and containing only `code` and `message`.
+       * 
+ * + * .google.cloud.aiplatform.v1.BigQueryDestination bigquery_destination = 3; + * + * @return The bigqueryDestination. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.BigQueryDestination getBigqueryDestination() { + if (bigqueryDestinationBuilder_ == null) { + if (destinationCase_ == 3) { + return (com.google.cloud.aiplatform.v1.BigQueryDestination) destination_; + } + return com.google.cloud.aiplatform.v1.BigQueryDestination.getDefaultInstance(); + } else { + if (destinationCase_ == 3) { + return bigqueryDestinationBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1.BigQueryDestination.getDefaultInstance(); + } + } + /** + * + * + *
+       * The BigQuery project location where the output is to be written to.
+       * In the given project a new dataset is created with name
+       * `prediction_<model-display-name>_<job-create-time>`
+       * where <model-display-name> is made
+       * BigQuery-dataset-name compatible (for example, most special characters
+       * become underscores), and timestamp is in
+       * YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601" format. In the dataset
+       * two tables will be created, `predictions`, and `errors`.
+       * If the Model has both [instance][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]
+       * and [prediction][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri] schemata
+       * defined then the tables have columns as follows: The `predictions`
+       * table contains instances for which the prediction succeeded, it
+       * has columns as per a concatenation of the Model's instance and
+       * prediction schemata. The `errors` table contains rows for which the
+       * prediction has failed, it has instance columns, as per the
+       * instance schema, followed by a single "errors" column, which as values
+       * has [`google.rpc.Status`](Status)
+       * represented as a STRUCT, and containing only `code` and `message`.
+       * 
+ * + * .google.cloud.aiplatform.v1.BigQueryDestination bigquery_destination = 3; + */ + public Builder setBigqueryDestination( + com.google.cloud.aiplatform.v1.BigQueryDestination value) { + if (bigqueryDestinationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + destination_ = value; + onChanged(); + } else { + bigqueryDestinationBuilder_.setMessage(value); + } + destinationCase_ = 3; + return this; + } + /** + * + * + *
+       * The BigQuery project location where the output is to be written to.
+       * In the given project a new dataset is created with name
+       * `prediction_<model-display-name>_<job-create-time>`
+       * where <model-display-name> is made
+       * BigQuery-dataset-name compatible (for example, most special characters
+       * become underscores), and timestamp is in
+       * YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601" format. In the dataset
+       * two tables will be created, `predictions`, and `errors`.
+       * If the Model has both [instance][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]
+       * and [prediction][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri] schemata
+       * defined then the tables have columns as follows: The `predictions`
+       * table contains instances for which the prediction succeeded, it
+       * has columns as per a concatenation of the Model's instance and
+       * prediction schemata. The `errors` table contains rows for which the
+       * prediction has failed, it has instance columns, as per the
+       * instance schema, followed by a single "errors" column, which as values
+       * has [`google.rpc.Status`](Status)
+       * represented as a STRUCT, and containing only `code` and `message`.
+       * 
+ * + * .google.cloud.aiplatform.v1.BigQueryDestination bigquery_destination = 3; + */ + public Builder setBigqueryDestination( + com.google.cloud.aiplatform.v1.BigQueryDestination.Builder builderForValue) { + if (bigqueryDestinationBuilder_ == null) { + destination_ = builderForValue.build(); + onChanged(); + } else { + bigqueryDestinationBuilder_.setMessage(builderForValue.build()); + } + destinationCase_ = 3; + return this; + } + /** + * + * + *
+       * The BigQuery project location where the output is to be written to.
+       * In the given project a new dataset is created with name
+       * `prediction_<model-display-name>_<job-create-time>`
+       * where <model-display-name> is made
+       * BigQuery-dataset-name compatible (for example, most special characters
+       * become underscores), and timestamp is in
+       * YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601" format. In the dataset
+       * two tables will be created, `predictions`, and `errors`.
+       * If the Model has both [instance][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]
+       * and [prediction][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri] schemata
+       * defined then the tables have columns as follows: The `predictions`
+       * table contains instances for which the prediction succeeded, it
+       * has columns as per a concatenation of the Model's instance and
+       * prediction schemata. The `errors` table contains rows for which the
+       * prediction has failed, it has instance columns, as per the
+       * instance schema, followed by a single "errors" column, which as values
+       * has [`google.rpc.Status`](Status)
+       * represented as a STRUCT, and containing only `code` and `message`.
+       * 
+ * + * .google.cloud.aiplatform.v1.BigQueryDestination bigquery_destination = 3; + */ + public Builder mergeBigqueryDestination( + com.google.cloud.aiplatform.v1.BigQueryDestination value) { + if (bigqueryDestinationBuilder_ == null) { + if (destinationCase_ == 3 + && destination_ + != com.google.cloud.aiplatform.v1.BigQueryDestination.getDefaultInstance()) { + destination_ = + com.google.cloud.aiplatform.v1.BigQueryDestination.newBuilder( + (com.google.cloud.aiplatform.v1.BigQueryDestination) destination_) + .mergeFrom(value) + .buildPartial(); + } else { + destination_ = value; + } + onChanged(); + } else { + if (destinationCase_ == 3) { + bigqueryDestinationBuilder_.mergeFrom(value); + } + bigqueryDestinationBuilder_.setMessage(value); + } + destinationCase_ = 3; + return this; + } + /** + * + * + *
+       * The BigQuery project location where the output is to be written to.
+       * In the given project a new dataset is created with name
+       * `prediction_<model-display-name>_<job-create-time>`
+       * where <model-display-name> is made
+       * BigQuery-dataset-name compatible (for example, most special characters
+       * become underscores), and timestamp is in
+       * YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601" format. In the dataset
+       * two tables will be created, `predictions`, and `errors`.
+       * If the Model has both [instance][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]
+       * and [prediction][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri] schemata
+       * defined then the tables have columns as follows: The `predictions`
+       * table contains instances for which the prediction succeeded, it
+       * has columns as per a concatenation of the Model's instance and
+       * prediction schemata. The `errors` table contains rows for which the
+       * prediction has failed, it has instance columns, as per the
+       * instance schema, followed by a single "errors" column, which as values
+       * has [`google.rpc.Status`](Status)
+       * represented as a STRUCT, and containing only `code` and `message`.
+       * 
+ * + * .google.cloud.aiplatform.v1.BigQueryDestination bigquery_destination = 3; + */ + public Builder clearBigqueryDestination() { + if (bigqueryDestinationBuilder_ == null) { + if (destinationCase_ == 3) { + destinationCase_ = 0; + destination_ = null; + onChanged(); + } + } else { + if (destinationCase_ == 3) { + destinationCase_ = 0; + destination_ = null; + } + bigqueryDestinationBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * The BigQuery project location where the output is to be written to.
+       * In the given project a new dataset is created with name
+       * `prediction_<model-display-name>_<job-create-time>`
+       * where <model-display-name> is made
+       * BigQuery-dataset-name compatible (for example, most special characters
+       * become underscores), and timestamp is in
+       * YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601" format. In the dataset
+       * two tables will be created, `predictions`, and `errors`.
+       * If the Model has both [instance][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]
+       * and [prediction][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri] schemata
+       * defined then the tables have columns as follows: The `predictions`
+       * table contains instances for which the prediction succeeded, it
+       * has columns as per a concatenation of the Model's instance and
+       * prediction schemata. The `errors` table contains rows for which the
+       * prediction has failed, it has instance columns, as per the
+       * instance schema, followed by a single "errors" column, which as values
+       * has [`google.rpc.Status`](Status)
+       * represented as a STRUCT, and containing only `code` and `message`.
+       * 
+ * + * .google.cloud.aiplatform.v1.BigQueryDestination bigquery_destination = 3; + */ + public com.google.cloud.aiplatform.v1.BigQueryDestination.Builder + getBigqueryDestinationBuilder() { + return getBigqueryDestinationFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The BigQuery project location where the output is to be written to.
+       * In the given project a new dataset is created with name
+       * `prediction_<model-display-name>_<job-create-time>`
+       * where <model-display-name> is made
+       * BigQuery-dataset-name compatible (for example, most special characters
+       * become underscores), and timestamp is in
+       * YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601" format. In the dataset
+       * two tables will be created, `predictions`, and `errors`.
+       * If the Model has both [instance][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]
+       * and [prediction][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri] schemata
+       * defined then the tables have columns as follows: The `predictions`
+       * table contains instances for which the prediction succeeded, it
+       * has columns as per a concatenation of the Model's instance and
+       * prediction schemata. The `errors` table contains rows for which the
+       * prediction has failed, it has instance columns, as per the
+       * instance schema, followed by a single "errors" column, which as values
+       * has [`google.rpc.Status`](Status)
+       * represented as a STRUCT, and containing only `code` and `message`.
+       * 
+ * + * .google.cloud.aiplatform.v1.BigQueryDestination bigquery_destination = 3; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.BigQueryDestinationOrBuilder + getBigqueryDestinationOrBuilder() { + if ((destinationCase_ == 3) && (bigqueryDestinationBuilder_ != null)) { + return bigqueryDestinationBuilder_.getMessageOrBuilder(); + } else { + if (destinationCase_ == 3) { + return (com.google.cloud.aiplatform.v1.BigQueryDestination) destination_; + } + return com.google.cloud.aiplatform.v1.BigQueryDestination.getDefaultInstance(); + } + } + /** + * + * + *
+       * The BigQuery project location where the output is to be written to.
+       * In the given project a new dataset is created with name
+       * `prediction_<model-display-name>_<job-create-time>`
+       * where <model-display-name> is made
+       * BigQuery-dataset-name compatible (for example, most special characters
+       * become underscores), and timestamp is in
+       * YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601" format. In the dataset
+       * two tables will be created, `predictions`, and `errors`.
+       * If the Model has both [instance][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]
+       * and [prediction][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri] schemata
+       * defined then the tables have columns as follows: The `predictions`
+       * table contains instances for which the prediction succeeded, it
+       * has columns as per a concatenation of the Model's instance and
+       * prediction schemata. The `errors` table contains rows for which the
+       * prediction has failed, it has instance columns, as per the
+       * instance schema, followed by a single "errors" column, which as values
+       * has [`google.rpc.Status`](Status)
+       * represented as a STRUCT, and containing only `code` and `message`.
+       * 
+ * + * .google.cloud.aiplatform.v1.BigQueryDestination bigquery_destination = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.BigQueryDestination, + com.google.cloud.aiplatform.v1.BigQueryDestination.Builder, + com.google.cloud.aiplatform.v1.BigQueryDestinationOrBuilder> + getBigqueryDestinationFieldBuilder() { + if (bigqueryDestinationBuilder_ == null) { + if (!(destinationCase_ == 3)) { + destination_ = com.google.cloud.aiplatform.v1.BigQueryDestination.getDefaultInstance(); + } + bigqueryDestinationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.BigQueryDestination, + com.google.cloud.aiplatform.v1.BigQueryDestination.Builder, + com.google.cloud.aiplatform.v1.BigQueryDestinationOrBuilder>( + (com.google.cloud.aiplatform.v1.BigQueryDestination) destination_, + getParentForChildren(), + isClean()); + destination_ = null; + } + destinationCase_ = 3; + onChanged(); + ; + return bigqueryDestinationBuilder_; + } + + private java.lang.Object predictionsFormat_ = ""; + /** + * + * + *
+       * Required. The format in which AI Platform gives the predictions, must be one of the
+       * [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model]
+       * [supported_output_storage_formats][google.cloud.aiplatform.v1.Model.supported_output_storage_formats].
+       * 
+ * + * string predictions_format = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The predictionsFormat. + */ + public java.lang.String getPredictionsFormat() { + java.lang.Object ref = predictionsFormat_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + predictionsFormat_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. The format in which AI Platform gives the predictions, must be one of the
+       * [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model]
+       * [supported_output_storage_formats][google.cloud.aiplatform.v1.Model.supported_output_storage_formats].
+       * 
+ * + * string predictions_format = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for predictionsFormat. + */ + public com.google.protobuf.ByteString getPredictionsFormatBytes() { + java.lang.Object ref = predictionsFormat_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + predictionsFormat_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. The format in which AI Platform gives the predictions, must be one of the
+       * [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model]
+       * [supported_output_storage_formats][google.cloud.aiplatform.v1.Model.supported_output_storage_formats].
+       * 
+ * + * string predictions_format = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The predictionsFormat to set. + * @return This builder for chaining. + */ + public Builder setPredictionsFormat(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + predictionsFormat_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The format in which AI Platform gives the predictions, must be one of the
+       * [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model]
+       * [supported_output_storage_formats][google.cloud.aiplatform.v1.Model.supported_output_storage_formats].
+       * 
+ * + * string predictions_format = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearPredictionsFormat() { + + predictionsFormat_ = getDefaultInstance().getPredictionsFormat(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The format in which AI Platform gives the predictions, must be one of the
+       * [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model]
+       * [supported_output_storage_formats][google.cloud.aiplatform.v1.Model.supported_output_storage_formats].
+       * 
+ * + * string predictions_format = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for predictionsFormat to set. + * @return This builder for chaining. + */ + public Builder setPredictionsFormatBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + predictionsFormat_ = 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.v1.BatchPredictionJob.OutputConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig) + private static final com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig(); + } + + public static com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OutputConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new OutputConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface OutputInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Output only. The full path of the Cloud Storage directory created, into which
+     * the prediction output is written.
+     * 
+ * + * string gcs_output_directory = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The gcsOutputDirectory. + */ + java.lang.String getGcsOutputDirectory(); + /** + * + * + *
+     * Output only. The full path of the Cloud Storage directory created, into which
+     * the prediction output is written.
+     * 
+ * + * string gcs_output_directory = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for gcsOutputDirectory. + */ + com.google.protobuf.ByteString getGcsOutputDirectoryBytes(); + + /** + * + * + *
+     * Output only. The path of the BigQuery dataset created, in
+     * `bq://projectId.bqDatasetId`
+     * format, into which the prediction output is written.
+     * 
+ * + * string bigquery_output_dataset = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bigqueryOutputDataset. + */ + java.lang.String getBigqueryOutputDataset(); + /** + * + * + *
+     * Output only. The path of the BigQuery dataset created, in
+     * `bq://projectId.bqDatasetId`
+     * format, into which the prediction output is written.
+     * 
+ * + * string bigquery_output_dataset = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for bigqueryOutputDataset. + */ + com.google.protobuf.ByteString getBigqueryOutputDatasetBytes(); + + public com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfo.OutputLocationCase + getOutputLocationCase(); + } + /** + * + * + *
+   * Further describes this job's output.
+   * Supplements [output_config][google.cloud.aiplatform.v1.BatchPredictionJob.output_config].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfo} + */ + public static final class OutputInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfo) + OutputInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use OutputInfo.newBuilder() to construct. + private OutputInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private OutputInfo() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OutputInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private OutputInfo( + 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(); + outputLocationCase_ = 1; + outputLocation_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + outputLocationCase_ = 2; + outputLocation_ = 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.v1.BatchPredictionJobProto + .internal_static_google_cloud_aiplatform_v1_BatchPredictionJob_OutputInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.BatchPredictionJobProto + .internal_static_google_cloud_aiplatform_v1_BatchPredictionJob_OutputInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfo.class, + com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfo.Builder.class); + } + + private int outputLocationCase_ = 0; + private java.lang.Object outputLocation_; + + public enum OutputLocationCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + GCS_OUTPUT_DIRECTORY(1), + BIGQUERY_OUTPUT_DATASET(2), + OUTPUTLOCATION_NOT_SET(0); + private final int value; + + private OutputLocationCase(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 OutputLocationCase valueOf(int value) { + return forNumber(value); + } + + public static OutputLocationCase forNumber(int value) { + switch (value) { + case 1: + return GCS_OUTPUT_DIRECTORY; + case 2: + return BIGQUERY_OUTPUT_DATASET; + case 0: + return OUTPUTLOCATION_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public OutputLocationCase getOutputLocationCase() { + return OutputLocationCase.forNumber(outputLocationCase_); + } + + public static final int GCS_OUTPUT_DIRECTORY_FIELD_NUMBER = 1; + /** + * + * + *
+     * Output only. The full path of the Cloud Storage directory created, into which
+     * the prediction output is written.
+     * 
+ * + * string gcs_output_directory = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The gcsOutputDirectory. + */ + public java.lang.String getGcsOutputDirectory() { + java.lang.Object ref = ""; + if (outputLocationCase_ == 1) { + ref = outputLocation_; + } + 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(); + if (outputLocationCase_ == 1) { + outputLocation_ = s; + } + return s; + } + } + /** + * + * + *
+     * Output only. The full path of the Cloud Storage directory created, into which
+     * the prediction output is written.
+     * 
+ * + * string gcs_output_directory = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for gcsOutputDirectory. + */ + public com.google.protobuf.ByteString getGcsOutputDirectoryBytes() { + java.lang.Object ref = ""; + if (outputLocationCase_ == 1) { + ref = outputLocation_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (outputLocationCase_ == 1) { + outputLocation_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BIGQUERY_OUTPUT_DATASET_FIELD_NUMBER = 2; + /** + * + * + *
+     * Output only. The path of the BigQuery dataset created, in
+     * `bq://projectId.bqDatasetId`
+     * format, into which the prediction output is written.
+     * 
+ * + * string bigquery_output_dataset = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bigqueryOutputDataset. + */ + public java.lang.String getBigqueryOutputDataset() { + java.lang.Object ref = ""; + if (outputLocationCase_ == 2) { + ref = outputLocation_; + } + 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(); + if (outputLocationCase_ == 2) { + outputLocation_ = s; + } + return s; + } + } + /** + * + * + *
+     * Output only. The path of the BigQuery dataset created, in
+     * `bq://projectId.bqDatasetId`
+     * format, into which the prediction output is written.
+     * 
+ * + * string bigquery_output_dataset = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for bigqueryOutputDataset. + */ + public com.google.protobuf.ByteString getBigqueryOutputDatasetBytes() { + java.lang.Object ref = ""; + if (outputLocationCase_ == 2) { + ref = outputLocation_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (outputLocationCase_ == 2) { + outputLocation_ = 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 (outputLocationCase_ == 1) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, outputLocation_); + } + if (outputLocationCase_ == 2) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, outputLocation_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (outputLocationCase_ == 1) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, outputLocation_); + } + if (outputLocationCase_ == 2) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, outputLocation_); + } + 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.v1.BatchPredictionJob.OutputInfo)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfo other = + (com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfo) obj; + + if (!getOutputLocationCase().equals(other.getOutputLocationCase())) return false; + switch (outputLocationCase_) { + case 1: + if (!getGcsOutputDirectory().equals(other.getGcsOutputDirectory())) return false; + break; + case 2: + if (!getBigqueryOutputDataset().equals(other.getBigqueryOutputDataset())) 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 (outputLocationCase_) { + case 1: + hash = (37 * hash) + GCS_OUTPUT_DIRECTORY_FIELD_NUMBER; + hash = (53 * hash) + getGcsOutputDirectory().hashCode(); + break; + case 2: + hash = (37 * hash) + BIGQUERY_OUTPUT_DATASET_FIELD_NUMBER; + hash = (53 * hash) + getBigqueryOutputDataset().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfo 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.v1.BatchPredictionJob.OutputInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfo 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.v1.BatchPredictionJob.OutputInfo parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfo 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.v1.BatchPredictionJob.OutputInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfo 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.v1.BatchPredictionJob.OutputInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfo 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.v1.BatchPredictionJob.OutputInfo 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; + } + /** + * + * + *
+     * Further describes this job's output.
+     * Supplements [output_config][google.cloud.aiplatform.v1.BatchPredictionJob.output_config].
+     * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfo} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfo) + com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.BatchPredictionJobProto + .internal_static_google_cloud_aiplatform_v1_BatchPredictionJob_OutputInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.BatchPredictionJobProto + .internal_static_google_cloud_aiplatform_v1_BatchPredictionJob_OutputInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfo.class, + com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfo.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfo.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(); + outputLocationCase_ = 0; + outputLocation_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.BatchPredictionJobProto + .internal_static_google_cloud_aiplatform_v1_BatchPredictionJob_OutputInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfo + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfo build() { + com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfo buildPartial() { + com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfo result = + new com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfo(this); + if (outputLocationCase_ == 1) { + result.outputLocation_ = outputLocation_; + } + if (outputLocationCase_ == 2) { + result.outputLocation_ = outputLocation_; + } + result.outputLocationCase_ = outputLocationCase_; + 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.v1.BatchPredictionJob.OutputInfo) { + return mergeFrom((com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfo other) { + if (other + == com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfo.getDefaultInstance()) + return this; + switch (other.getOutputLocationCase()) { + case GCS_OUTPUT_DIRECTORY: + { + outputLocationCase_ = 1; + outputLocation_ = other.outputLocation_; + onChanged(); + break; + } + case BIGQUERY_OUTPUT_DATASET: + { + outputLocationCase_ = 2; + outputLocation_ = other.outputLocation_; + onChanged(); + break; + } + case OUTPUTLOCATION_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.v1.BatchPredictionJob.OutputInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfo) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int outputLocationCase_ = 0; + private java.lang.Object outputLocation_; + + public OutputLocationCase getOutputLocationCase() { + return OutputLocationCase.forNumber(outputLocationCase_); + } + + public Builder clearOutputLocation() { + outputLocationCase_ = 0; + outputLocation_ = null; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. The full path of the Cloud Storage directory created, into which
+       * the prediction output is written.
+       * 
+ * + * string gcs_output_directory = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The gcsOutputDirectory. + */ + @java.lang.Override + public java.lang.String getGcsOutputDirectory() { + java.lang.Object ref = ""; + if (outputLocationCase_ == 1) { + ref = outputLocation_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (outputLocationCase_ == 1) { + outputLocation_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Output only. The full path of the Cloud Storage directory created, into which
+       * the prediction output is written.
+       * 
+ * + * string gcs_output_directory = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for gcsOutputDirectory. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGcsOutputDirectoryBytes() { + java.lang.Object ref = ""; + if (outputLocationCase_ == 1) { + ref = outputLocation_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (outputLocationCase_ == 1) { + outputLocation_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Output only. The full path of the Cloud Storage directory created, into which
+       * the prediction output is written.
+       * 
+ * + * string gcs_output_directory = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The gcsOutputDirectory to set. + * @return This builder for chaining. + */ + public Builder setGcsOutputDirectory(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + outputLocationCase_ = 1; + outputLocation_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. The full path of the Cloud Storage directory created, into which
+       * the prediction output is written.
+       * 
+ * + * string gcs_output_directory = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearGcsOutputDirectory() { + if (outputLocationCase_ == 1) { + outputLocationCase_ = 0; + outputLocation_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+       * Output only. The full path of the Cloud Storage directory created, into which
+       * the prediction output is written.
+       * 
+ * + * string gcs_output_directory = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for gcsOutputDirectory to set. + * @return This builder for chaining. + */ + public Builder setGcsOutputDirectoryBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + outputLocationCase_ = 1; + outputLocation_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. The path of the BigQuery dataset created, in
+       * `bq://projectId.bqDatasetId`
+       * format, into which the prediction output is written.
+       * 
+ * + * string bigquery_output_dataset = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bigqueryOutputDataset. + */ + @java.lang.Override + public java.lang.String getBigqueryOutputDataset() { + java.lang.Object ref = ""; + if (outputLocationCase_ == 2) { + ref = outputLocation_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (outputLocationCase_ == 2) { + outputLocation_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Output only. The path of the BigQuery dataset created, in
+       * `bq://projectId.bqDatasetId`
+       * format, into which the prediction output is written.
+       * 
+ * + * string bigquery_output_dataset = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for bigqueryOutputDataset. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBigqueryOutputDatasetBytes() { + java.lang.Object ref = ""; + if (outputLocationCase_ == 2) { + ref = outputLocation_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (outputLocationCase_ == 2) { + outputLocation_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Output only. The path of the BigQuery dataset created, in
+       * `bq://projectId.bqDatasetId`
+       * format, into which the prediction output is written.
+       * 
+ * + * string bigquery_output_dataset = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The bigqueryOutputDataset to set. + * @return This builder for chaining. + */ + public Builder setBigqueryOutputDataset(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + outputLocationCase_ = 2; + outputLocation_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. The path of the BigQuery dataset created, in
+       * `bq://projectId.bqDatasetId`
+       * format, into which the prediction output is written.
+       * 
+ * + * string bigquery_output_dataset = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearBigqueryOutputDataset() { + if (outputLocationCase_ == 2) { + outputLocationCase_ = 0; + outputLocation_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+       * Output only. The path of the BigQuery dataset created, in
+       * `bq://projectId.bqDatasetId`
+       * format, into which the prediction output is written.
+       * 
+ * + * string bigquery_output_dataset = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The bytes for bigqueryOutputDataset to set. + * @return This builder for chaining. + */ + public Builder setBigqueryOutputDatasetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + outputLocationCase_ = 2; + outputLocation_ = 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.v1.BatchPredictionJob.OutputInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfo) + private static final com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfo + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfo(); + } + + public static com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfo + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OutputInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new OutputInfo(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.v1.BatchPredictionJob.OutputInfo + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Output only. Resource name of the BatchPredictionJob.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Resource name of the BatchPredictionJob.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * Required. The user-defined name of this BatchPredictionJob.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+   * Required. The user-defined name of this BatchPredictionJob.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 MODEL_FIELD_NUMBER = 3; + private volatile java.lang.Object model_; + /** + * + * + *
+   * Required. The name of the Model that produces the predictions via this job,
+   * must share the same ancestor Location.
+   * Starting this job has no impact on any existing deployments of the Model
+   * and their resources.
+   * 
+ * + * + * string model = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The model. + */ + @java.lang.Override + public java.lang.String getModel() { + java.lang.Object ref = model_; + 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(); + model_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the Model that produces the predictions via this job,
+   * must share the same ancestor Location.
+   * Starting this job has no impact on any existing deployments of the Model
+   * and their resources.
+   * 
+ * + * + * string model = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for model. + */ + @java.lang.Override + public com.google.protobuf.ByteString getModelBytes() { + java.lang.Object ref = model_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + model_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INPUT_CONFIG_FIELD_NUMBER = 4; + private com.google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig inputConfig_; + /** + * + * + *
+   * Required. Input configuration of the instances on which predictions are performed.
+   * The schema of any single instance may be specified via
+   * the [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model]
+   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+   * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
+   * 
+ * + * + * .google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig input_config = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the inputConfig field is set. + */ + @java.lang.Override + public boolean hasInputConfig() { + return inputConfig_ != null; + } + /** + * + * + *
+   * Required. Input configuration of the instances on which predictions are performed.
+   * The schema of any single instance may be specified via
+   * the [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model]
+   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+   * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
+   * 
+ * + * + * .google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig input_config = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The inputConfig. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig getInputConfig() { + return inputConfig_ == null + ? com.google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.getDefaultInstance() + : inputConfig_; + } + /** + * + * + *
+   * Required. Input configuration of the instances on which predictions are performed.
+   * The schema of any single instance may be specified via
+   * the [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model]
+   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+   * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
+   * 
+ * + * + * .google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig input_config = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.BatchPredictionJob.InputConfigOrBuilder + getInputConfigOrBuilder() { + return getInputConfig(); + } + + public static final int MODEL_PARAMETERS_FIELD_NUMBER = 5; + private com.google.protobuf.Value modelParameters_; + /** + * + * + *
+   * The parameters that govern the predictions. The schema of the parameters
+   * may be specified via the [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model]
+   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+   * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
+   * 
+ * + * .google.protobuf.Value model_parameters = 5; + * + * @return Whether the modelParameters field is set. + */ + @java.lang.Override + public boolean hasModelParameters() { + return modelParameters_ != null; + } + /** + * + * + *
+   * The parameters that govern the predictions. The schema of the parameters
+   * may be specified via the [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model]
+   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+   * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
+   * 
+ * + * .google.protobuf.Value model_parameters = 5; + * + * @return The modelParameters. + */ + @java.lang.Override + public com.google.protobuf.Value getModelParameters() { + return modelParameters_ == null + ? com.google.protobuf.Value.getDefaultInstance() + : modelParameters_; + } + /** + * + * + *
+   * The parameters that govern the predictions. The schema of the parameters
+   * may be specified via the [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model]
+   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+   * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
+   * 
+ * + * .google.protobuf.Value model_parameters = 5; + */ + @java.lang.Override + public com.google.protobuf.ValueOrBuilder getModelParametersOrBuilder() { + return getModelParameters(); + } + + public static final int OUTPUT_CONFIG_FIELD_NUMBER = 6; + private com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig outputConfig_; + /** + * + * + *
+   * Required. The Configuration specifying where output predictions should
+   * be written.
+   * The schema of any single prediction may be specified as a concatenation
+   * of [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model]
+   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+   * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]
+   * and
+   * [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri].
+   * 
+ * + * + * .google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig output_config = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the outputConfig field is set. + */ + @java.lang.Override + public boolean hasOutputConfig() { + return outputConfig_ != null; + } + /** + * + * + *
+   * Required. The Configuration specifying where output predictions should
+   * be written.
+   * The schema of any single prediction may be specified as a concatenation
+   * of [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model]
+   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+   * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]
+   * and
+   * [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri].
+   * 
+ * + * + * .google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig output_config = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The outputConfig. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig getOutputConfig() { + return outputConfig_ == null + ? com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.getDefaultInstance() + : outputConfig_; + } + /** + * + * + *
+   * Required. The Configuration specifying where output predictions should
+   * be written.
+   * The schema of any single prediction may be specified as a concatenation
+   * of [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model]
+   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+   * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]
+   * and
+   * [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri].
+   * 
+ * + * + * .google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig output_config = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfigOrBuilder + getOutputConfigOrBuilder() { + return getOutputConfig(); + } + + public static final int DEDICATED_RESOURCES_FIELD_NUMBER = 7; + private com.google.cloud.aiplatform.v1.BatchDedicatedResources dedicatedResources_; + /** + * + * + *
+   * The config of resources used by the Model during the batch prediction. If
+   * the Model [supports][google.cloud.aiplatform.v1.Model.supported_deployment_resources_types]
+   * DEDICATED_RESOURCES this config may be provided (and the job will use these
+   * resources), if the Model doesn't support AUTOMATIC_RESOURCES, this config
+   * must be provided.
+   * 
+ * + * .google.cloud.aiplatform.v1.BatchDedicatedResources dedicated_resources = 7; + * + * @return Whether the dedicatedResources field is set. + */ + @java.lang.Override + public boolean hasDedicatedResources() { + return dedicatedResources_ != null; + } + /** + * + * + *
+   * The config of resources used by the Model during the batch prediction. If
+   * the Model [supports][google.cloud.aiplatform.v1.Model.supported_deployment_resources_types]
+   * DEDICATED_RESOURCES this config may be provided (and the job will use these
+   * resources), if the Model doesn't support AUTOMATIC_RESOURCES, this config
+   * must be provided.
+   * 
+ * + * .google.cloud.aiplatform.v1.BatchDedicatedResources dedicated_resources = 7; + * + * @return The dedicatedResources. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.BatchDedicatedResources getDedicatedResources() { + return dedicatedResources_ == null + ? com.google.cloud.aiplatform.v1.BatchDedicatedResources.getDefaultInstance() + : dedicatedResources_; + } + /** + * + * + *
+   * The config of resources used by the Model during the batch prediction. If
+   * the Model [supports][google.cloud.aiplatform.v1.Model.supported_deployment_resources_types]
+   * DEDICATED_RESOURCES this config may be provided (and the job will use these
+   * resources), if the Model doesn't support AUTOMATIC_RESOURCES, this config
+   * must be provided.
+   * 
+ * + * .google.cloud.aiplatform.v1.BatchDedicatedResources dedicated_resources = 7; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.BatchDedicatedResourcesOrBuilder + getDedicatedResourcesOrBuilder() { + return getDedicatedResources(); + } + + public static final int MANUAL_BATCH_TUNING_PARAMETERS_FIELD_NUMBER = 8; + private com.google.cloud.aiplatform.v1.ManualBatchTuningParameters manualBatchTuningParameters_; + /** + * + * + *
+   * Immutable. Parameters configuring the batch behavior. Currently only applicable when
+   * [dedicated_resources][google.cloud.aiplatform.v1.BatchPredictionJob.dedicated_resources] are used (in other cases AI Platform does
+   * the tuning itself).
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ManualBatchTuningParameters manual_batch_tuning_parameters = 8 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the manualBatchTuningParameters field is set. + */ + @java.lang.Override + public boolean hasManualBatchTuningParameters() { + return manualBatchTuningParameters_ != null; + } + /** + * + * + *
+   * Immutable. Parameters configuring the batch behavior. Currently only applicable when
+   * [dedicated_resources][google.cloud.aiplatform.v1.BatchPredictionJob.dedicated_resources] are used (in other cases AI Platform does
+   * the tuning itself).
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ManualBatchTuningParameters manual_batch_tuning_parameters = 8 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The manualBatchTuningParameters. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ManualBatchTuningParameters + getManualBatchTuningParameters() { + return manualBatchTuningParameters_ == null + ? com.google.cloud.aiplatform.v1.ManualBatchTuningParameters.getDefaultInstance() + : manualBatchTuningParameters_; + } + /** + * + * + *
+   * Immutable. Parameters configuring the batch behavior. Currently only applicable when
+   * [dedicated_resources][google.cloud.aiplatform.v1.BatchPredictionJob.dedicated_resources] are used (in other cases AI Platform does
+   * the tuning itself).
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ManualBatchTuningParameters manual_batch_tuning_parameters = 8 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ManualBatchTuningParametersOrBuilder + getManualBatchTuningParametersOrBuilder() { + return getManualBatchTuningParameters(); + } + + public static final int OUTPUT_INFO_FIELD_NUMBER = 9; + private com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfo outputInfo_; + /** + * + * + *
+   * Output only. Information further describing the output of this job.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfo output_info = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the outputInfo field is set. + */ + @java.lang.Override + public boolean hasOutputInfo() { + return outputInfo_ != null; + } + /** + * + * + *
+   * Output only. Information further describing the output of this job.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfo output_info = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The outputInfo. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfo getOutputInfo() { + return outputInfo_ == null + ? com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfo.getDefaultInstance() + : outputInfo_; + } + /** + * + * + *
+   * Output only. Information further describing the output of this job.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfo output_info = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfoOrBuilder + getOutputInfoOrBuilder() { + return getOutputInfo(); + } + + public static final int STATE_FIELD_NUMBER = 10; + private int state_; + /** + * + * + *
+   * Output only. The detailed state of the job.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.JobState state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * Output only. The detailed state of the job.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.JobState state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.JobState getState() { + @SuppressWarnings("deprecation") + com.google.cloud.aiplatform.v1.JobState result = + com.google.cloud.aiplatform.v1.JobState.valueOf(state_); + return result == null ? com.google.cloud.aiplatform.v1.JobState.UNRECOGNIZED : result; + } + + public static final int ERROR_FIELD_NUMBER = 11; + private com.google.rpc.Status error_; + /** + * + * + *
+   * Output only. Only populated when the job's state is JOB_STATE_FAILED or
+   * JOB_STATE_CANCELLED.
+   * 
+ * + * .google.rpc.Status error = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the error field is set. + */ + @java.lang.Override + public boolean hasError() { + return error_ != null; + } + /** + * + * + *
+   * Output only. Only populated when the job's state is JOB_STATE_FAILED or
+   * JOB_STATE_CANCELLED.
+   * 
+ * + * .google.rpc.Status error = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The error. + */ + @java.lang.Override + public com.google.rpc.Status getError() { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } + /** + * + * + *
+   * Output only. Only populated when the job's state is JOB_STATE_FAILED or
+   * JOB_STATE_CANCELLED.
+   * 
+ * + * .google.rpc.Status error = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + return getError(); + } + + public static final int PARTIAL_FAILURES_FIELD_NUMBER = 12; + private java.util.List partialFailures_; + /** + * + * + *
+   * Output only. Partial failures encountered.
+   * For example, single files that can't be read.
+   * This field never exceeds 20 entries.
+   * Status details fields contain standard GCP error details.
+   * 
+ * + * + * repeated .google.rpc.Status partial_failures = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List getPartialFailuresList() { + return partialFailures_; + } + /** + * + * + *
+   * Output only. Partial failures encountered.
+   * For example, single files that can't be read.
+   * This field never exceeds 20 entries.
+   * Status details fields contain standard GCP error details.
+   * 
+ * + * + * repeated .google.rpc.Status partial_failures = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getPartialFailuresOrBuilderList() { + return partialFailures_; + } + /** + * + * + *
+   * Output only. Partial failures encountered.
+   * For example, single files that can't be read.
+   * This field never exceeds 20 entries.
+   * Status details fields contain standard GCP error details.
+   * 
+ * + * + * repeated .google.rpc.Status partial_failures = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getPartialFailuresCount() { + return partialFailures_.size(); + } + /** + * + * + *
+   * Output only. Partial failures encountered.
+   * For example, single files that can't be read.
+   * This field never exceeds 20 entries.
+   * Status details fields contain standard GCP error details.
+   * 
+ * + * + * repeated .google.rpc.Status partial_failures = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.rpc.Status getPartialFailures(int index) { + return partialFailures_.get(index); + } + /** + * + * + *
+   * Output only. Partial failures encountered.
+   * For example, single files that can't be read.
+   * This field never exceeds 20 entries.
+   * Status details fields contain standard GCP error details.
+   * 
+ * + * + * repeated .google.rpc.Status partial_failures = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getPartialFailuresOrBuilder(int index) { + return partialFailures_.get(index); + } + + public static final int RESOURCES_CONSUMED_FIELD_NUMBER = 13; + private com.google.cloud.aiplatform.v1.ResourcesConsumed resourcesConsumed_; + /** + * + * + *
+   * Output only. Information about resources that had been consumed by this job.
+   * Provided in real time at best effort basis, as well as a final value
+   * once the job completes.
+   * Note: This field currently may be not populated for batch predictions that
+   * use AutoML Models.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ResourcesConsumed resources_consumed = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the resourcesConsumed field is set. + */ + @java.lang.Override + public boolean hasResourcesConsumed() { + return resourcesConsumed_ != null; + } + /** + * + * + *
+   * Output only. Information about resources that had been consumed by this job.
+   * Provided in real time at best effort basis, as well as a final value
+   * once the job completes.
+   * Note: This field currently may be not populated for batch predictions that
+   * use AutoML Models.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ResourcesConsumed resources_consumed = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The resourcesConsumed. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ResourcesConsumed getResourcesConsumed() { + return resourcesConsumed_ == null + ? com.google.cloud.aiplatform.v1.ResourcesConsumed.getDefaultInstance() + : resourcesConsumed_; + } + /** + * + * + *
+   * Output only. Information about resources that had been consumed by this job.
+   * Provided in real time at best effort basis, as well as a final value
+   * once the job completes.
+   * Note: This field currently may be not populated for batch predictions that
+   * use AutoML Models.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ResourcesConsumed resources_consumed = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ResourcesConsumedOrBuilder getResourcesConsumedOrBuilder() { + return getResourcesConsumed(); + } + + public static final int COMPLETION_STATS_FIELD_NUMBER = 14; + private com.google.cloud.aiplatform.v1.CompletionStats completionStats_; + /** + * + * + *
+   * Output only. Statistics on completed and failed prediction instances.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.CompletionStats completion_stats = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the completionStats field is set. + */ + @java.lang.Override + public boolean hasCompletionStats() { + return completionStats_ != null; + } + /** + * + * + *
+   * Output only. Statistics on completed and failed prediction instances.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.CompletionStats completion_stats = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The completionStats. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.CompletionStats getCompletionStats() { + return completionStats_ == null + ? com.google.cloud.aiplatform.v1.CompletionStats.getDefaultInstance() + : completionStats_; + } + /** + * + * + *
+   * Output only. Statistics on completed and failed prediction instances.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.CompletionStats completion_stats = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.CompletionStatsOrBuilder getCompletionStatsOrBuilder() { + return getCompletionStats(); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 15; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. Time when the BatchPredictionJob was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. Time when the BatchPredictionJob was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. Time when the BatchPredictionJob was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int START_TIME_FIELD_NUMBER = 16; + private com.google.protobuf.Timestamp startTime_; + /** + * + * + *
+   * Output only. Time when the BatchPredictionJob for the first time entered the
+   * `JOB_STATE_RUNNING` state.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return startTime_ != null; + } + /** + * + * + *
+   * Output only. Time when the BatchPredictionJob for the first time entered the
+   * `JOB_STATE_RUNNING` state.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + /** + * + * + *
+   * Output only. Time when the BatchPredictionJob for the first time entered the
+   * `JOB_STATE_RUNNING` state.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return getStartTime(); + } + + public static final int END_TIME_FIELD_NUMBER = 17; + private com.google.protobuf.Timestamp endTime_; + /** + * + * + *
+   * Output only. Time when the BatchPredictionJob entered any of the following states:
+   * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + * + * + *
+   * Output only. Time when the BatchPredictionJob entered any of the following states:
+   * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + * + * + *
+   * Output only. Time when the BatchPredictionJob entered any of the following states:
+   * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return getEndTime(); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 18; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. Time when the BatchPredictionJob was most recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. Time when the BatchPredictionJob was most recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. Time when the BatchPredictionJob was most recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + public static final int LABELS_FIELD_NUMBER = 19; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.aiplatform.v1.BatchPredictionJobProto + .internal_static_google_cloud_aiplatform_v1_BatchPredictionJob_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * The labels with user-defined metadata to organize BatchPredictionJobs.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 19; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * The labels with user-defined metadata to organize BatchPredictionJobs.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 19; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * The labels with user-defined metadata to organize BatchPredictionJobs.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 19; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * The labels with user-defined metadata to organize BatchPredictionJobs.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 19; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int ENCRYPTION_SPEC_FIELD_NUMBER = 24; + private com.google.cloud.aiplatform.v1.EncryptionSpec encryptionSpec_; + /** + * + * + *
+   * Customer-managed encryption key options for a BatchPredictionJob. If this
+   * is set, then all resources created by the BatchPredictionJob will be
+   * encrypted with the provided encryption key.
+   * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 24; + * + * @return Whether the encryptionSpec field is set. + */ + @java.lang.Override + public boolean hasEncryptionSpec() { + return encryptionSpec_ != null; + } + /** + * + * + *
+   * Customer-managed encryption key options for a BatchPredictionJob. If this
+   * is set, then all resources created by the BatchPredictionJob will be
+   * encrypted with the provided encryption key.
+   * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 24; + * + * @return The encryptionSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.EncryptionSpec getEncryptionSpec() { + return encryptionSpec_ == null + ? com.google.cloud.aiplatform.v1.EncryptionSpec.getDefaultInstance() + : encryptionSpec_; + } + /** + * + * + *
+   * Customer-managed encryption key options for a BatchPredictionJob. If this
+   * is set, then all resources created by the BatchPredictionJob will be
+   * encrypted with the provided encryption key.
+   * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 24; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.EncryptionSpecOrBuilder getEncryptionSpecOrBuilder() { + return getEncryptionSpec(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + if (!getModelBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, model_); + } + if (inputConfig_ != null) { + output.writeMessage(4, getInputConfig()); + } + if (modelParameters_ != null) { + output.writeMessage(5, getModelParameters()); + } + if (outputConfig_ != null) { + output.writeMessage(6, getOutputConfig()); + } + if (dedicatedResources_ != null) { + output.writeMessage(7, getDedicatedResources()); + } + if (manualBatchTuningParameters_ != null) { + output.writeMessage(8, getManualBatchTuningParameters()); + } + if (outputInfo_ != null) { + output.writeMessage(9, getOutputInfo()); + } + if (state_ != com.google.cloud.aiplatform.v1.JobState.JOB_STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(10, state_); + } + if (error_ != null) { + output.writeMessage(11, getError()); + } + for (int i = 0; i < partialFailures_.size(); i++) { + output.writeMessage(12, partialFailures_.get(i)); + } + if (resourcesConsumed_ != null) { + output.writeMessage(13, getResourcesConsumed()); + } + if (completionStats_ != null) { + output.writeMessage(14, getCompletionStats()); + } + if (createTime_ != null) { + output.writeMessage(15, getCreateTime()); + } + if (startTime_ != null) { + output.writeMessage(16, getStartTime()); + } + if (endTime_ != null) { + output.writeMessage(17, getEndTime()); + } + if (updateTime_ != null) { + output.writeMessage(18, getUpdateTime()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 19); + if (encryptionSpec_ != null) { + output.writeMessage(24, getEncryptionSpec()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + if (!getModelBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, model_); + } + if (inputConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getInputConfig()); + } + if (modelParameters_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getModelParameters()); + } + if (outputConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getOutputConfig()); + } + if (dedicatedResources_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getDedicatedResources()); + } + if (manualBatchTuningParameters_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 8, getManualBatchTuningParameters()); + } + if (outputInfo_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getOutputInfo()); + } + if (state_ != com.google.cloud.aiplatform.v1.JobState.JOB_STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(10, state_); + } + if (error_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getError()); + } + for (int i = 0; i < partialFailures_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, partialFailures_.get(i)); + } + if (resourcesConsumed_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getResourcesConsumed()); + } + if (completionStats_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, getCompletionStats()); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(15, getCreateTime()); + } + if (startTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(16, getStartTime()); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(17, getEndTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(18, getUpdateTime()); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(19, labels__); + } + if (encryptionSpec_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(24, getEncryptionSpec()); + } + 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.v1.BatchPredictionJob)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.BatchPredictionJob other = + (com.google.cloud.aiplatform.v1.BatchPredictionJob) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getModel().equals(other.getModel())) return false; + if (hasInputConfig() != other.hasInputConfig()) return false; + if (hasInputConfig()) { + if (!getInputConfig().equals(other.getInputConfig())) return false; + } + if (hasModelParameters() != other.hasModelParameters()) return false; + if (hasModelParameters()) { + if (!getModelParameters().equals(other.getModelParameters())) return false; + } + if (hasOutputConfig() != other.hasOutputConfig()) return false; + if (hasOutputConfig()) { + if (!getOutputConfig().equals(other.getOutputConfig())) return false; + } + if (hasDedicatedResources() != other.hasDedicatedResources()) return false; + if (hasDedicatedResources()) { + if (!getDedicatedResources().equals(other.getDedicatedResources())) return false; + } + if (hasManualBatchTuningParameters() != other.hasManualBatchTuningParameters()) return false; + if (hasManualBatchTuningParameters()) { + if (!getManualBatchTuningParameters().equals(other.getManualBatchTuningParameters())) + return false; + } + if (hasOutputInfo() != other.hasOutputInfo()) return false; + if (hasOutputInfo()) { + if (!getOutputInfo().equals(other.getOutputInfo())) return false; + } + if (state_ != other.state_) return false; + if (hasError() != other.hasError()) return false; + if (hasError()) { + if (!getError().equals(other.getError())) return false; + } + if (!getPartialFailuresList().equals(other.getPartialFailuresList())) return false; + if (hasResourcesConsumed() != other.hasResourcesConsumed()) return false; + if (hasResourcesConsumed()) { + if (!getResourcesConsumed().equals(other.getResourcesConsumed())) return false; + } + if (hasCompletionStats() != other.hasCompletionStats()) return false; + if (hasCompletionStats()) { + if (!getCompletionStats().equals(other.getCompletionStats())) return false; + } + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime().equals(other.getStartTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (hasEncryptionSpec() != other.hasEncryptionSpec()) return false; + if (hasEncryptionSpec()) { + if (!getEncryptionSpec().equals(other.getEncryptionSpec())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + MODEL_FIELD_NUMBER; + hash = (53 * hash) + getModel().hashCode(); + if (hasInputConfig()) { + hash = (37 * hash) + INPUT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getInputConfig().hashCode(); + } + if (hasModelParameters()) { + hash = (37 * hash) + MODEL_PARAMETERS_FIELD_NUMBER; + hash = (53 * hash) + getModelParameters().hashCode(); + } + if (hasOutputConfig()) { + hash = (37 * hash) + OUTPUT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getOutputConfig().hashCode(); + } + if (hasDedicatedResources()) { + hash = (37 * hash) + DEDICATED_RESOURCES_FIELD_NUMBER; + hash = (53 * hash) + getDedicatedResources().hashCode(); + } + if (hasManualBatchTuningParameters()) { + hash = (37 * hash) + MANUAL_BATCH_TUNING_PARAMETERS_FIELD_NUMBER; + hash = (53 * hash) + getManualBatchTuningParameters().hashCode(); + } + if (hasOutputInfo()) { + hash = (37 * hash) + OUTPUT_INFO_FIELD_NUMBER; + hash = (53 * hash) + getOutputInfo().hashCode(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + if (hasError()) { + hash = (37 * hash) + ERROR_FIELD_NUMBER; + hash = (53 * hash) + getError().hashCode(); + } + if (getPartialFailuresCount() > 0) { + hash = (37 * hash) + PARTIAL_FAILURES_FIELD_NUMBER; + hash = (53 * hash) + getPartialFailuresList().hashCode(); + } + if (hasResourcesConsumed()) { + hash = (37 * hash) + RESOURCES_CONSUMED_FIELD_NUMBER; + hash = (53 * hash) + getResourcesConsumed().hashCode(); + } + if (hasCompletionStats()) { + hash = (37 * hash) + COMPLETION_STATS_FIELD_NUMBER; + hash = (53 * hash) + getCompletionStats().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + if (hasEncryptionSpec()) { + hash = (37 * hash) + ENCRYPTION_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getEncryptionSpec().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.BatchPredictionJob parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.BatchPredictionJob 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.v1.BatchPredictionJob parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.BatchPredictionJob 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.v1.BatchPredictionJob parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.BatchPredictionJob parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.BatchPredictionJob parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.BatchPredictionJob 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.v1.BatchPredictionJob parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.BatchPredictionJob 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.v1.BatchPredictionJob parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.BatchPredictionJob 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.v1.BatchPredictionJob 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 job that uses a [Model][google.cloud.aiplatform.v1.BatchPredictionJob.model] to produce predictions
+   * on multiple [input instances][google.cloud.aiplatform.v1.BatchPredictionJob.input_config]. If
+   * predictions for significant portion of the instances fail, the job may finish
+   * without attempting predictions for all remaining instances.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.BatchPredictionJob} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.BatchPredictionJob) + com.google.cloud.aiplatform.v1.BatchPredictionJobOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.BatchPredictionJobProto + .internal_static_google_cloud_aiplatform_v1_BatchPredictionJob_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 19: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 19: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.BatchPredictionJobProto + .internal_static_google_cloud_aiplatform_v1_BatchPredictionJob_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.BatchPredictionJob.class, + com.google.cloud.aiplatform.v1.BatchPredictionJob.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.BatchPredictionJob.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPartialFailuresFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + displayName_ = ""; + + model_ = ""; + + if (inputConfigBuilder_ == null) { + inputConfig_ = null; + } else { + inputConfig_ = null; + inputConfigBuilder_ = null; + } + if (modelParametersBuilder_ == null) { + modelParameters_ = null; + } else { + modelParameters_ = null; + modelParametersBuilder_ = null; + } + if (outputConfigBuilder_ == null) { + outputConfig_ = null; + } else { + outputConfig_ = null; + outputConfigBuilder_ = null; + } + if (dedicatedResourcesBuilder_ == null) { + dedicatedResources_ = null; + } else { + dedicatedResources_ = null; + dedicatedResourcesBuilder_ = null; + } + if (manualBatchTuningParametersBuilder_ == null) { + manualBatchTuningParameters_ = null; + } else { + manualBatchTuningParameters_ = null; + manualBatchTuningParametersBuilder_ = null; + } + if (outputInfoBuilder_ == null) { + outputInfo_ = null; + } else { + outputInfo_ = null; + outputInfoBuilder_ = null; + } + state_ = 0; + + if (errorBuilder_ == null) { + error_ = null; + } else { + error_ = null; + errorBuilder_ = null; + } + if (partialFailuresBuilder_ == null) { + partialFailures_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + partialFailuresBuilder_.clear(); + } + if (resourcesConsumedBuilder_ == null) { + resourcesConsumed_ = null; + } else { + resourcesConsumed_ = null; + resourcesConsumedBuilder_ = null; + } + if (completionStatsBuilder_ == null) { + completionStats_ = null; + } else { + completionStats_ = null; + completionStatsBuilder_ = null; + } + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (startTimeBuilder_ == null) { + startTime_ = null; + } else { + startTime_ = null; + startTimeBuilder_ = null; + } + if (endTimeBuilder_ == null) { + endTime_ = null; + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + internalGetMutableLabels().clear(); + if (encryptionSpecBuilder_ == null) { + encryptionSpec_ = null; + } else { + encryptionSpec_ = null; + encryptionSpecBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.BatchPredictionJobProto + .internal_static_google_cloud_aiplatform_v1_BatchPredictionJob_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.BatchPredictionJob getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.BatchPredictionJob.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.BatchPredictionJob build() { + com.google.cloud.aiplatform.v1.BatchPredictionJob result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.BatchPredictionJob buildPartial() { + com.google.cloud.aiplatform.v1.BatchPredictionJob result = + new com.google.cloud.aiplatform.v1.BatchPredictionJob(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.displayName_ = displayName_; + result.model_ = model_; + if (inputConfigBuilder_ == null) { + result.inputConfig_ = inputConfig_; + } else { + result.inputConfig_ = inputConfigBuilder_.build(); + } + if (modelParametersBuilder_ == null) { + result.modelParameters_ = modelParameters_; + } else { + result.modelParameters_ = modelParametersBuilder_.build(); + } + if (outputConfigBuilder_ == null) { + result.outputConfig_ = outputConfig_; + } else { + result.outputConfig_ = outputConfigBuilder_.build(); + } + if (dedicatedResourcesBuilder_ == null) { + result.dedicatedResources_ = dedicatedResources_; + } else { + result.dedicatedResources_ = dedicatedResourcesBuilder_.build(); + } + if (manualBatchTuningParametersBuilder_ == null) { + result.manualBatchTuningParameters_ = manualBatchTuningParameters_; + } else { + result.manualBatchTuningParameters_ = manualBatchTuningParametersBuilder_.build(); + } + if (outputInfoBuilder_ == null) { + result.outputInfo_ = outputInfo_; + } else { + result.outputInfo_ = outputInfoBuilder_.build(); + } + result.state_ = state_; + if (errorBuilder_ == null) { + result.error_ = error_; + } else { + result.error_ = errorBuilder_.build(); + } + if (partialFailuresBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + partialFailures_ = java.util.Collections.unmodifiableList(partialFailures_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.partialFailures_ = partialFailures_; + } else { + result.partialFailures_ = partialFailuresBuilder_.build(); + } + if (resourcesConsumedBuilder_ == null) { + result.resourcesConsumed_ = resourcesConsumed_; + } else { + result.resourcesConsumed_ = resourcesConsumedBuilder_.build(); + } + if (completionStatsBuilder_ == null) { + result.completionStats_ = completionStats_; + } else { + result.completionStats_ = completionStatsBuilder_.build(); + } + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (startTimeBuilder_ == null) { + result.startTime_ = startTime_; + } else { + result.startTime_ = startTimeBuilder_.build(); + } + if (endTimeBuilder_ == null) { + result.endTime_ = endTime_; + } else { + result.endTime_ = endTimeBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + if (encryptionSpecBuilder_ == null) { + result.encryptionSpec_ = encryptionSpec_; + } else { + result.encryptionSpec_ = encryptionSpecBuilder_.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.v1.BatchPredictionJob) { + return mergeFrom((com.google.cloud.aiplatform.v1.BatchPredictionJob) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.BatchPredictionJob other) { + if (other == com.google.cloud.aiplatform.v1.BatchPredictionJob.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (!other.getModel().isEmpty()) { + model_ = other.model_; + onChanged(); + } + if (other.hasInputConfig()) { + mergeInputConfig(other.getInputConfig()); + } + if (other.hasModelParameters()) { + mergeModelParameters(other.getModelParameters()); + } + if (other.hasOutputConfig()) { + mergeOutputConfig(other.getOutputConfig()); + } + if (other.hasDedicatedResources()) { + mergeDedicatedResources(other.getDedicatedResources()); + } + if (other.hasManualBatchTuningParameters()) { + mergeManualBatchTuningParameters(other.getManualBatchTuningParameters()); + } + if (other.hasOutputInfo()) { + mergeOutputInfo(other.getOutputInfo()); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.hasError()) { + mergeError(other.getError()); + } + if (partialFailuresBuilder_ == null) { + if (!other.partialFailures_.isEmpty()) { + if (partialFailures_.isEmpty()) { + partialFailures_ = other.partialFailures_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePartialFailuresIsMutable(); + partialFailures_.addAll(other.partialFailures_); + } + onChanged(); + } + } else { + if (!other.partialFailures_.isEmpty()) { + if (partialFailuresBuilder_.isEmpty()) { + partialFailuresBuilder_.dispose(); + partialFailuresBuilder_ = null; + partialFailures_ = other.partialFailures_; + bitField0_ = (bitField0_ & ~0x00000001); + partialFailuresBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPartialFailuresFieldBuilder() + : null; + } else { + partialFailuresBuilder_.addAllMessages(other.partialFailures_); + } + } + } + if (other.hasResourcesConsumed()) { + mergeResourcesConsumed(other.getResourcesConsumed()); + } + if (other.hasCompletionStats()) { + mergeCompletionStats(other.getCompletionStats()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + if (other.hasEncryptionSpec()) { + mergeEncryptionSpec(other.getEncryptionSpec()); + } + 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.v1.BatchPredictionJob parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.BatchPredictionJob) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. Resource name of the BatchPredictionJob.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Resource name of the BatchPredictionJob.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Resource name of the BatchPredictionJob.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Resource name of the BatchPredictionJob.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Resource name of the BatchPredictionJob.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Required. The user-defined name of this BatchPredictionJob.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+     * Required. The user-defined name of this BatchPredictionJob.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+     * Required. The user-defined name of this BatchPredictionJob.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + /** + * + * + *
+     * Required. The user-defined name of this BatchPredictionJob.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The user-defined name of this BatchPredictionJob.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 model_ = ""; + /** + * + * + *
+     * Required. The name of the Model that produces the predictions via this job,
+     * must share the same ancestor Location.
+     * Starting this job has no impact on any existing deployments of the Model
+     * and their resources.
+     * 
+ * + * + * string model = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The model. + */ + public java.lang.String getModel() { + java.lang.Object ref = model_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + model_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the Model that produces the predictions via this job,
+     * must share the same ancestor Location.
+     * Starting this job has no impact on any existing deployments of the Model
+     * and their resources.
+     * 
+ * + * + * string model = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for model. + */ + public com.google.protobuf.ByteString getModelBytes() { + java.lang.Object ref = model_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + model_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the Model that produces the predictions via this job,
+     * must share the same ancestor Location.
+     * Starting this job has no impact on any existing deployments of the Model
+     * and their resources.
+     * 
+ * + * + * string model = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The model to set. + * @return This builder for chaining. + */ + public Builder setModel(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + model_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the Model that produces the predictions via this job,
+     * must share the same ancestor Location.
+     * Starting this job has no impact on any existing deployments of the Model
+     * and their resources.
+     * 
+ * + * + * string model = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearModel() { + + model_ = getDefaultInstance().getModel(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the Model that produces the predictions via this job,
+     * must share the same ancestor Location.
+     * Starting this job has no impact on any existing deployments of the Model
+     * and their resources.
+     * 
+ * + * + * string model = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for model to set. + * @return This builder for chaining. + */ + public Builder setModelBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + model_ = value; + onChanged(); + return this; + } + + private com.google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig inputConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig, + com.google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.Builder, + com.google.cloud.aiplatform.v1.BatchPredictionJob.InputConfigOrBuilder> + inputConfigBuilder_; + /** + * + * + *
+     * Required. Input configuration of the instances on which predictions are performed.
+     * The schema of any single instance may be specified via
+     * the [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model]
+     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
+     * 
+ * + * + * .google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig input_config = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the inputConfig field is set. + */ + public boolean hasInputConfig() { + return inputConfigBuilder_ != null || inputConfig_ != null; + } + /** + * + * + *
+     * Required. Input configuration of the instances on which predictions are performed.
+     * The schema of any single instance may be specified via
+     * the [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model]
+     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
+     * 
+ * + * + * .google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig input_config = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The inputConfig. + */ + public com.google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig getInputConfig() { + if (inputConfigBuilder_ == null) { + return inputConfig_ == null + ? com.google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.getDefaultInstance() + : inputConfig_; + } else { + return inputConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Input configuration of the instances on which predictions are performed.
+     * The schema of any single instance may be specified via
+     * the [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model]
+     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
+     * 
+ * + * + * .google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig input_config = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setInputConfig( + com.google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig value) { + if (inputConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + inputConfig_ = value; + onChanged(); + } else { + inputConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. Input configuration of the instances on which predictions are performed.
+     * The schema of any single instance may be specified via
+     * the [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model]
+     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
+     * 
+ * + * + * .google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig input_config = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setInputConfig( + com.google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.Builder builderForValue) { + if (inputConfigBuilder_ == null) { + inputConfig_ = builderForValue.build(); + onChanged(); + } else { + inputConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. Input configuration of the instances on which predictions are performed.
+     * The schema of any single instance may be specified via
+     * the [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model]
+     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
+     * 
+ * + * + * .google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig input_config = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeInputConfig( + com.google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig value) { + if (inputConfigBuilder_ == null) { + if (inputConfig_ != null) { + inputConfig_ = + com.google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.newBuilder(inputConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + inputConfig_ = value; + } + onChanged(); + } else { + inputConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. Input configuration of the instances on which predictions are performed.
+     * The schema of any single instance may be specified via
+     * the [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model]
+     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
+     * 
+ * + * + * .google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig input_config = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearInputConfig() { + if (inputConfigBuilder_ == null) { + inputConfig_ = null; + onChanged(); + } else { + inputConfig_ = null; + inputConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. Input configuration of the instances on which predictions are performed.
+     * The schema of any single instance may be specified via
+     * the [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model]
+     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
+     * 
+ * + * + * .google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig input_config = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.Builder + getInputConfigBuilder() { + + onChanged(); + return getInputConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Input configuration of the instances on which predictions are performed.
+     * The schema of any single instance may be specified via
+     * the [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model]
+     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
+     * 
+ * + * + * .google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig input_config = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.BatchPredictionJob.InputConfigOrBuilder + getInputConfigOrBuilder() { + if (inputConfigBuilder_ != null) { + return inputConfigBuilder_.getMessageOrBuilder(); + } else { + return inputConfig_ == null + ? com.google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.getDefaultInstance() + : inputConfig_; + } + } + /** + * + * + *
+     * Required. Input configuration of the instances on which predictions are performed.
+     * The schema of any single instance may be specified via
+     * the [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model]
+     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
+     * 
+ * + * + * .google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig input_config = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig, + com.google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.Builder, + com.google.cloud.aiplatform.v1.BatchPredictionJob.InputConfigOrBuilder> + getInputConfigFieldBuilder() { + if (inputConfigBuilder_ == null) { + inputConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig, + com.google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.Builder, + com.google.cloud.aiplatform.v1.BatchPredictionJob.InputConfigOrBuilder>( + getInputConfig(), getParentForChildren(), isClean()); + inputConfig_ = null; + } + return inputConfigBuilder_; + } + + private com.google.protobuf.Value modelParameters_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Value, + com.google.protobuf.Value.Builder, + com.google.protobuf.ValueOrBuilder> + modelParametersBuilder_; + /** + * + * + *
+     * The parameters that govern the predictions. The schema of the parameters
+     * may be specified via the [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model]
+     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+     * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
+     * 
+ * + * .google.protobuf.Value model_parameters = 5; + * + * @return Whether the modelParameters field is set. + */ + public boolean hasModelParameters() { + return modelParametersBuilder_ != null || modelParameters_ != null; + } + /** + * + * + *
+     * The parameters that govern the predictions. The schema of the parameters
+     * may be specified via the [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model]
+     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+     * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
+     * 
+ * + * .google.protobuf.Value model_parameters = 5; + * + * @return The modelParameters. + */ + public com.google.protobuf.Value getModelParameters() { + if (modelParametersBuilder_ == null) { + return modelParameters_ == null + ? com.google.protobuf.Value.getDefaultInstance() + : modelParameters_; + } else { + return modelParametersBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The parameters that govern the predictions. The schema of the parameters
+     * may be specified via the [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model]
+     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+     * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
+     * 
+ * + * .google.protobuf.Value model_parameters = 5; + */ + public Builder setModelParameters(com.google.protobuf.Value value) { + if (modelParametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + modelParameters_ = value; + onChanged(); + } else { + modelParametersBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The parameters that govern the predictions. The schema of the parameters
+     * may be specified via the [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model]
+     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+     * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
+     * 
+ * + * .google.protobuf.Value model_parameters = 5; + */ + public Builder setModelParameters(com.google.protobuf.Value.Builder builderForValue) { + if (modelParametersBuilder_ == null) { + modelParameters_ = builderForValue.build(); + onChanged(); + } else { + modelParametersBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The parameters that govern the predictions. The schema of the parameters
+     * may be specified via the [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model]
+     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+     * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
+     * 
+ * + * .google.protobuf.Value model_parameters = 5; + */ + public Builder mergeModelParameters(com.google.protobuf.Value value) { + if (modelParametersBuilder_ == null) { + if (modelParameters_ != null) { + modelParameters_ = + com.google.protobuf.Value.newBuilder(modelParameters_) + .mergeFrom(value) + .buildPartial(); + } else { + modelParameters_ = value; + } + onChanged(); + } else { + modelParametersBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The parameters that govern the predictions. The schema of the parameters
+     * may be specified via the [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model]
+     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+     * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
+     * 
+ * + * .google.protobuf.Value model_parameters = 5; + */ + public Builder clearModelParameters() { + if (modelParametersBuilder_ == null) { + modelParameters_ = null; + onChanged(); + } else { + modelParameters_ = null; + modelParametersBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The parameters that govern the predictions. The schema of the parameters
+     * may be specified via the [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model]
+     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+     * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
+     * 
+ * + * .google.protobuf.Value model_parameters = 5; + */ + public com.google.protobuf.Value.Builder getModelParametersBuilder() { + + onChanged(); + return getModelParametersFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The parameters that govern the predictions. The schema of the parameters
+     * may be specified via the [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model]
+     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+     * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
+     * 
+ * + * .google.protobuf.Value model_parameters = 5; + */ + public com.google.protobuf.ValueOrBuilder getModelParametersOrBuilder() { + if (modelParametersBuilder_ != null) { + return modelParametersBuilder_.getMessageOrBuilder(); + } else { + return modelParameters_ == null + ? com.google.protobuf.Value.getDefaultInstance() + : modelParameters_; + } + } + /** + * + * + *
+     * The parameters that govern the predictions. The schema of the parameters
+     * may be specified via the [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model]
+     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+     * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
+     * 
+ * + * .google.protobuf.Value model_parameters = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Value, + com.google.protobuf.Value.Builder, + com.google.protobuf.ValueOrBuilder> + getModelParametersFieldBuilder() { + if (modelParametersBuilder_ == null) { + modelParametersBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Value, + com.google.protobuf.Value.Builder, + com.google.protobuf.ValueOrBuilder>( + getModelParameters(), getParentForChildren(), isClean()); + modelParameters_ = null; + } + return modelParametersBuilder_; + } + + private com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig outputConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig, + com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.Builder, + com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfigOrBuilder> + outputConfigBuilder_; + /** + * + * + *
+     * Required. The Configuration specifying where output predictions should
+     * be written.
+     * The schema of any single prediction may be specified as a concatenation
+     * of [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model]
+     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]
+     * and
+     * [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri].
+     * 
+ * + * + * .google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig output_config = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the outputConfig field is set. + */ + public boolean hasOutputConfig() { + return outputConfigBuilder_ != null || outputConfig_ != null; + } + /** + * + * + *
+     * Required. The Configuration specifying where output predictions should
+     * be written.
+     * The schema of any single prediction may be specified as a concatenation
+     * of [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model]
+     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]
+     * and
+     * [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri].
+     * 
+ * + * + * .google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig output_config = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The outputConfig. + */ + public com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig getOutputConfig() { + if (outputConfigBuilder_ == null) { + return outputConfig_ == null + ? com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.getDefaultInstance() + : outputConfig_; + } else { + return outputConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The Configuration specifying where output predictions should
+     * be written.
+     * The schema of any single prediction may be specified as a concatenation
+     * of [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model]
+     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]
+     * and
+     * [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri].
+     * 
+ * + * + * .google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig output_config = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setOutputConfig( + com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig value) { + if (outputConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + outputConfig_ = value; + onChanged(); + } else { + outputConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The Configuration specifying where output predictions should
+     * be written.
+     * The schema of any single prediction may be specified as a concatenation
+     * of [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model]
+     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]
+     * and
+     * [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri].
+     * 
+ * + * + * .google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig output_config = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setOutputConfig( + com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.Builder builderForValue) { + if (outputConfigBuilder_ == null) { + outputConfig_ = builderForValue.build(); + onChanged(); + } else { + outputConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The Configuration specifying where output predictions should
+     * be written.
+     * The schema of any single prediction may be specified as a concatenation
+     * of [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model]
+     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]
+     * and
+     * [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri].
+     * 
+ * + * + * .google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig output_config = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeOutputConfig( + com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig value) { + if (outputConfigBuilder_ == null) { + if (outputConfig_ != null) { + outputConfig_ = + com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.newBuilder( + outputConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + outputConfig_ = value; + } + onChanged(); + } else { + outputConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The Configuration specifying where output predictions should
+     * be written.
+     * The schema of any single prediction may be specified as a concatenation
+     * of [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model]
+     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]
+     * and
+     * [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri].
+     * 
+ * + * + * .google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig output_config = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearOutputConfig() { + if (outputConfigBuilder_ == null) { + outputConfig_ = null; + onChanged(); + } else { + outputConfig_ = null; + outputConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The Configuration specifying where output predictions should
+     * be written.
+     * The schema of any single prediction may be specified as a concatenation
+     * of [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model]
+     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]
+     * and
+     * [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri].
+     * 
+ * + * + * .google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig output_config = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.Builder + getOutputConfigBuilder() { + + onChanged(); + return getOutputConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The Configuration specifying where output predictions should
+     * be written.
+     * The schema of any single prediction may be specified as a concatenation
+     * of [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model]
+     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]
+     * and
+     * [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri].
+     * 
+ * + * + * .google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig output_config = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfigOrBuilder + getOutputConfigOrBuilder() { + if (outputConfigBuilder_ != null) { + return outputConfigBuilder_.getMessageOrBuilder(); + } else { + return outputConfig_ == null + ? com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.getDefaultInstance() + : outputConfig_; + } + } + /** + * + * + *
+     * Required. The Configuration specifying where output predictions should
+     * be written.
+     * The schema of any single prediction may be specified as a concatenation
+     * of [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model]
+     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]
+     * and
+     * [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri].
+     * 
+ * + * + * .google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig output_config = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig, + com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.Builder, + com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfigOrBuilder> + getOutputConfigFieldBuilder() { + if (outputConfigBuilder_ == null) { + outputConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig, + com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.Builder, + com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfigOrBuilder>( + getOutputConfig(), getParentForChildren(), isClean()); + outputConfig_ = null; + } + return outputConfigBuilder_; + } + + private com.google.cloud.aiplatform.v1.BatchDedicatedResources dedicatedResources_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.BatchDedicatedResources, + com.google.cloud.aiplatform.v1.BatchDedicatedResources.Builder, + com.google.cloud.aiplatform.v1.BatchDedicatedResourcesOrBuilder> + dedicatedResourcesBuilder_; + /** + * + * + *
+     * The config of resources used by the Model during the batch prediction. If
+     * the Model [supports][google.cloud.aiplatform.v1.Model.supported_deployment_resources_types]
+     * DEDICATED_RESOURCES this config may be provided (and the job will use these
+     * resources), if the Model doesn't support AUTOMATIC_RESOURCES, this config
+     * must be provided.
+     * 
+ * + * .google.cloud.aiplatform.v1.BatchDedicatedResources dedicated_resources = 7; + * + * @return Whether the dedicatedResources field is set. + */ + public boolean hasDedicatedResources() { + return dedicatedResourcesBuilder_ != null || dedicatedResources_ != null; + } + /** + * + * + *
+     * The config of resources used by the Model during the batch prediction. If
+     * the Model [supports][google.cloud.aiplatform.v1.Model.supported_deployment_resources_types]
+     * DEDICATED_RESOURCES this config may be provided (and the job will use these
+     * resources), if the Model doesn't support AUTOMATIC_RESOURCES, this config
+     * must be provided.
+     * 
+ * + * .google.cloud.aiplatform.v1.BatchDedicatedResources dedicated_resources = 7; + * + * @return The dedicatedResources. + */ + public com.google.cloud.aiplatform.v1.BatchDedicatedResources getDedicatedResources() { + if (dedicatedResourcesBuilder_ == null) { + return dedicatedResources_ == null + ? com.google.cloud.aiplatform.v1.BatchDedicatedResources.getDefaultInstance() + : dedicatedResources_; + } else { + return dedicatedResourcesBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The config of resources used by the Model during the batch prediction. If
+     * the Model [supports][google.cloud.aiplatform.v1.Model.supported_deployment_resources_types]
+     * DEDICATED_RESOURCES this config may be provided (and the job will use these
+     * resources), if the Model doesn't support AUTOMATIC_RESOURCES, this config
+     * must be provided.
+     * 
+ * + * .google.cloud.aiplatform.v1.BatchDedicatedResources dedicated_resources = 7; + */ + public Builder setDedicatedResources( + com.google.cloud.aiplatform.v1.BatchDedicatedResources value) { + if (dedicatedResourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dedicatedResources_ = value; + onChanged(); + } else { + dedicatedResourcesBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The config of resources used by the Model during the batch prediction. If
+     * the Model [supports][google.cloud.aiplatform.v1.Model.supported_deployment_resources_types]
+     * DEDICATED_RESOURCES this config may be provided (and the job will use these
+     * resources), if the Model doesn't support AUTOMATIC_RESOURCES, this config
+     * must be provided.
+     * 
+ * + * .google.cloud.aiplatform.v1.BatchDedicatedResources dedicated_resources = 7; + */ + public Builder setDedicatedResources( + com.google.cloud.aiplatform.v1.BatchDedicatedResources.Builder builderForValue) { + if (dedicatedResourcesBuilder_ == null) { + dedicatedResources_ = builderForValue.build(); + onChanged(); + } else { + dedicatedResourcesBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The config of resources used by the Model during the batch prediction. If
+     * the Model [supports][google.cloud.aiplatform.v1.Model.supported_deployment_resources_types]
+     * DEDICATED_RESOURCES this config may be provided (and the job will use these
+     * resources), if the Model doesn't support AUTOMATIC_RESOURCES, this config
+     * must be provided.
+     * 
+ * + * .google.cloud.aiplatform.v1.BatchDedicatedResources dedicated_resources = 7; + */ + public Builder mergeDedicatedResources( + com.google.cloud.aiplatform.v1.BatchDedicatedResources value) { + if (dedicatedResourcesBuilder_ == null) { + if (dedicatedResources_ != null) { + dedicatedResources_ = + com.google.cloud.aiplatform.v1.BatchDedicatedResources.newBuilder(dedicatedResources_) + .mergeFrom(value) + .buildPartial(); + } else { + dedicatedResources_ = value; + } + onChanged(); + } else { + dedicatedResourcesBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The config of resources used by the Model during the batch prediction. If
+     * the Model [supports][google.cloud.aiplatform.v1.Model.supported_deployment_resources_types]
+     * DEDICATED_RESOURCES this config may be provided (and the job will use these
+     * resources), if the Model doesn't support AUTOMATIC_RESOURCES, this config
+     * must be provided.
+     * 
+ * + * .google.cloud.aiplatform.v1.BatchDedicatedResources dedicated_resources = 7; + */ + public Builder clearDedicatedResources() { + if (dedicatedResourcesBuilder_ == null) { + dedicatedResources_ = null; + onChanged(); + } else { + dedicatedResources_ = null; + dedicatedResourcesBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The config of resources used by the Model during the batch prediction. If
+     * the Model [supports][google.cloud.aiplatform.v1.Model.supported_deployment_resources_types]
+     * DEDICATED_RESOURCES this config may be provided (and the job will use these
+     * resources), if the Model doesn't support AUTOMATIC_RESOURCES, this config
+     * must be provided.
+     * 
+ * + * .google.cloud.aiplatform.v1.BatchDedicatedResources dedicated_resources = 7; + */ + public com.google.cloud.aiplatform.v1.BatchDedicatedResources.Builder + getDedicatedResourcesBuilder() { + + onChanged(); + return getDedicatedResourcesFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The config of resources used by the Model during the batch prediction. If
+     * the Model [supports][google.cloud.aiplatform.v1.Model.supported_deployment_resources_types]
+     * DEDICATED_RESOURCES this config may be provided (and the job will use these
+     * resources), if the Model doesn't support AUTOMATIC_RESOURCES, this config
+     * must be provided.
+     * 
+ * + * .google.cloud.aiplatform.v1.BatchDedicatedResources dedicated_resources = 7; + */ + public com.google.cloud.aiplatform.v1.BatchDedicatedResourcesOrBuilder + getDedicatedResourcesOrBuilder() { + if (dedicatedResourcesBuilder_ != null) { + return dedicatedResourcesBuilder_.getMessageOrBuilder(); + } else { + return dedicatedResources_ == null + ? com.google.cloud.aiplatform.v1.BatchDedicatedResources.getDefaultInstance() + : dedicatedResources_; + } + } + /** + * + * + *
+     * The config of resources used by the Model during the batch prediction. If
+     * the Model [supports][google.cloud.aiplatform.v1.Model.supported_deployment_resources_types]
+     * DEDICATED_RESOURCES this config may be provided (and the job will use these
+     * resources), if the Model doesn't support AUTOMATIC_RESOURCES, this config
+     * must be provided.
+     * 
+ * + * .google.cloud.aiplatform.v1.BatchDedicatedResources dedicated_resources = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.BatchDedicatedResources, + com.google.cloud.aiplatform.v1.BatchDedicatedResources.Builder, + com.google.cloud.aiplatform.v1.BatchDedicatedResourcesOrBuilder> + getDedicatedResourcesFieldBuilder() { + if (dedicatedResourcesBuilder_ == null) { + dedicatedResourcesBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.BatchDedicatedResources, + com.google.cloud.aiplatform.v1.BatchDedicatedResources.Builder, + com.google.cloud.aiplatform.v1.BatchDedicatedResourcesOrBuilder>( + getDedicatedResources(), getParentForChildren(), isClean()); + dedicatedResources_ = null; + } + return dedicatedResourcesBuilder_; + } + + private com.google.cloud.aiplatform.v1.ManualBatchTuningParameters manualBatchTuningParameters_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.ManualBatchTuningParameters, + com.google.cloud.aiplatform.v1.ManualBatchTuningParameters.Builder, + com.google.cloud.aiplatform.v1.ManualBatchTuningParametersOrBuilder> + manualBatchTuningParametersBuilder_; + /** + * + * + *
+     * Immutable. Parameters configuring the batch behavior. Currently only applicable when
+     * [dedicated_resources][google.cloud.aiplatform.v1.BatchPredictionJob.dedicated_resources] are used (in other cases AI Platform does
+     * the tuning itself).
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ManualBatchTuningParameters manual_batch_tuning_parameters = 8 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the manualBatchTuningParameters field is set. + */ + public boolean hasManualBatchTuningParameters() { + return manualBatchTuningParametersBuilder_ != null || manualBatchTuningParameters_ != null; + } + /** + * + * + *
+     * Immutable. Parameters configuring the batch behavior. Currently only applicable when
+     * [dedicated_resources][google.cloud.aiplatform.v1.BatchPredictionJob.dedicated_resources] are used (in other cases AI Platform does
+     * the tuning itself).
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ManualBatchTuningParameters manual_batch_tuning_parameters = 8 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The manualBatchTuningParameters. + */ + public com.google.cloud.aiplatform.v1.ManualBatchTuningParameters + getManualBatchTuningParameters() { + if (manualBatchTuningParametersBuilder_ == null) { + return manualBatchTuningParameters_ == null + ? com.google.cloud.aiplatform.v1.ManualBatchTuningParameters.getDefaultInstance() + : manualBatchTuningParameters_; + } else { + return manualBatchTuningParametersBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Immutable. Parameters configuring the batch behavior. Currently only applicable when
+     * [dedicated_resources][google.cloud.aiplatform.v1.BatchPredictionJob.dedicated_resources] are used (in other cases AI Platform does
+     * the tuning itself).
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ManualBatchTuningParameters manual_batch_tuning_parameters = 8 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder setManualBatchTuningParameters( + com.google.cloud.aiplatform.v1.ManualBatchTuningParameters value) { + if (manualBatchTuningParametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + manualBatchTuningParameters_ = value; + onChanged(); + } else { + manualBatchTuningParametersBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Immutable. Parameters configuring the batch behavior. Currently only applicable when
+     * [dedicated_resources][google.cloud.aiplatform.v1.BatchPredictionJob.dedicated_resources] are used (in other cases AI Platform does
+     * the tuning itself).
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ManualBatchTuningParameters manual_batch_tuning_parameters = 8 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder setManualBatchTuningParameters( + com.google.cloud.aiplatform.v1.ManualBatchTuningParameters.Builder builderForValue) { + if (manualBatchTuningParametersBuilder_ == null) { + manualBatchTuningParameters_ = builderForValue.build(); + onChanged(); + } else { + manualBatchTuningParametersBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Immutable. Parameters configuring the batch behavior. Currently only applicable when
+     * [dedicated_resources][google.cloud.aiplatform.v1.BatchPredictionJob.dedicated_resources] are used (in other cases AI Platform does
+     * the tuning itself).
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ManualBatchTuningParameters manual_batch_tuning_parameters = 8 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder mergeManualBatchTuningParameters( + com.google.cloud.aiplatform.v1.ManualBatchTuningParameters value) { + if (manualBatchTuningParametersBuilder_ == null) { + if (manualBatchTuningParameters_ != null) { + manualBatchTuningParameters_ = + com.google.cloud.aiplatform.v1.ManualBatchTuningParameters.newBuilder( + manualBatchTuningParameters_) + .mergeFrom(value) + .buildPartial(); + } else { + manualBatchTuningParameters_ = value; + } + onChanged(); + } else { + manualBatchTuningParametersBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Immutable. Parameters configuring the batch behavior. Currently only applicable when
+     * [dedicated_resources][google.cloud.aiplatform.v1.BatchPredictionJob.dedicated_resources] are used (in other cases AI Platform does
+     * the tuning itself).
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ManualBatchTuningParameters manual_batch_tuning_parameters = 8 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder clearManualBatchTuningParameters() { + if (manualBatchTuningParametersBuilder_ == null) { + manualBatchTuningParameters_ = null; + onChanged(); + } else { + manualBatchTuningParameters_ = null; + manualBatchTuningParametersBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Immutable. Parameters configuring the batch behavior. Currently only applicable when
+     * [dedicated_resources][google.cloud.aiplatform.v1.BatchPredictionJob.dedicated_resources] are used (in other cases AI Platform does
+     * the tuning itself).
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ManualBatchTuningParameters manual_batch_tuning_parameters = 8 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public com.google.cloud.aiplatform.v1.ManualBatchTuningParameters.Builder + getManualBatchTuningParametersBuilder() { + + onChanged(); + return getManualBatchTuningParametersFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Immutable. Parameters configuring the batch behavior. Currently only applicable when
+     * [dedicated_resources][google.cloud.aiplatform.v1.BatchPredictionJob.dedicated_resources] are used (in other cases AI Platform does
+     * the tuning itself).
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ManualBatchTuningParameters manual_batch_tuning_parameters = 8 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public com.google.cloud.aiplatform.v1.ManualBatchTuningParametersOrBuilder + getManualBatchTuningParametersOrBuilder() { + if (manualBatchTuningParametersBuilder_ != null) { + return manualBatchTuningParametersBuilder_.getMessageOrBuilder(); + } else { + return manualBatchTuningParameters_ == null + ? com.google.cloud.aiplatform.v1.ManualBatchTuningParameters.getDefaultInstance() + : manualBatchTuningParameters_; + } + } + /** + * + * + *
+     * Immutable. Parameters configuring the batch behavior. Currently only applicable when
+     * [dedicated_resources][google.cloud.aiplatform.v1.BatchPredictionJob.dedicated_resources] are used (in other cases AI Platform does
+     * the tuning itself).
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ManualBatchTuningParameters manual_batch_tuning_parameters = 8 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.ManualBatchTuningParameters, + com.google.cloud.aiplatform.v1.ManualBatchTuningParameters.Builder, + com.google.cloud.aiplatform.v1.ManualBatchTuningParametersOrBuilder> + getManualBatchTuningParametersFieldBuilder() { + if (manualBatchTuningParametersBuilder_ == null) { + manualBatchTuningParametersBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.ManualBatchTuningParameters, + com.google.cloud.aiplatform.v1.ManualBatchTuningParameters.Builder, + com.google.cloud.aiplatform.v1.ManualBatchTuningParametersOrBuilder>( + getManualBatchTuningParameters(), getParentForChildren(), isClean()); + manualBatchTuningParameters_ = null; + } + return manualBatchTuningParametersBuilder_; + } + + private com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfo outputInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfo, + com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfo.Builder, + com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfoOrBuilder> + outputInfoBuilder_; + /** + * + * + *
+     * Output only. Information further describing the output of this job.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfo output_info = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the outputInfo field is set. + */ + public boolean hasOutputInfo() { + return outputInfoBuilder_ != null || outputInfo_ != null; + } + /** + * + * + *
+     * Output only. Information further describing the output of this job.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfo output_info = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The outputInfo. + */ + public com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfo getOutputInfo() { + if (outputInfoBuilder_ == null) { + return outputInfo_ == null + ? com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfo.getDefaultInstance() + : outputInfo_; + } else { + return outputInfoBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Information further describing the output of this job.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfo output_info = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setOutputInfo( + com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfo value) { + if (outputInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + outputInfo_ = value; + onChanged(); + } else { + outputInfoBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Information further describing the output of this job.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfo output_info = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setOutputInfo( + com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfo.Builder builderForValue) { + if (outputInfoBuilder_ == null) { + outputInfo_ = builderForValue.build(); + onChanged(); + } else { + outputInfoBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Information further describing the output of this job.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfo output_info = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeOutputInfo( + com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfo value) { + if (outputInfoBuilder_ == null) { + if (outputInfo_ != null) { + outputInfo_ = + com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfo.newBuilder(outputInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + outputInfo_ = value; + } + onChanged(); + } else { + outputInfoBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Information further describing the output of this job.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfo output_info = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearOutputInfo() { + if (outputInfoBuilder_ == null) { + outputInfo_ = null; + onChanged(); + } else { + outputInfo_ = null; + outputInfoBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Information further describing the output of this job.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfo output_info = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfo.Builder + getOutputInfoBuilder() { + + onChanged(); + return getOutputInfoFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Information further describing the output of this job.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfo output_info = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfoOrBuilder + getOutputInfoOrBuilder() { + if (outputInfoBuilder_ != null) { + return outputInfoBuilder_.getMessageOrBuilder(); + } else { + return outputInfo_ == null + ? com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfo.getDefaultInstance() + : outputInfo_; + } + } + /** + * + * + *
+     * Output only. Information further describing the output of this job.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfo output_info = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfo, + com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfo.Builder, + com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfoOrBuilder> + getOutputInfoFieldBuilder() { + if (outputInfoBuilder_ == null) { + outputInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfo, + com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfo.Builder, + com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfoOrBuilder>( + getOutputInfo(), getParentForChildren(), isClean()); + outputInfo_ = null; + } + return outputInfoBuilder_; + } + + private int state_ = 0; + /** + * + * + *
+     * Output only. The detailed state of the job.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.JobState state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Output only. The detailed state of the job.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.JobState state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + + state_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The detailed state of the job.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.JobState state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.JobState getState() { + @SuppressWarnings("deprecation") + com.google.cloud.aiplatform.v1.JobState result = + com.google.cloud.aiplatform.v1.JobState.valueOf(state_); + return result == null ? com.google.cloud.aiplatform.v1.JobState.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Output only. The detailed state of the job.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.JobState state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.aiplatform.v1.JobState value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The detailed state of the job.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.JobState state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + + state_ = 0; + onChanged(); + return this; + } + + private com.google.rpc.Status error_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + errorBuilder_; + /** + * + * + *
+     * Output only. Only populated when the job's state is JOB_STATE_FAILED or
+     * JOB_STATE_CANCELLED.
+     * 
+ * + * .google.rpc.Status error = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the error field is set. + */ + public boolean hasError() { + return errorBuilder_ != null || error_ != null; + } + /** + * + * + *
+     * Output only. Only populated when the job's state is JOB_STATE_FAILED or
+     * JOB_STATE_CANCELLED.
+     * 
+ * + * .google.rpc.Status error = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The error. + */ + public com.google.rpc.Status getError() { + if (errorBuilder_ == null) { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } else { + return errorBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Only populated when the job's state is JOB_STATE_FAILED or
+     * JOB_STATE_CANCELLED.
+     * 
+ * + * .google.rpc.Status error = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + error_ = value; + onChanged(); + } else { + errorBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Only populated when the job's state is JOB_STATE_FAILED or
+     * JOB_STATE_CANCELLED.
+     * 
+ * + * .google.rpc.Status error = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setError(com.google.rpc.Status.Builder builderForValue) { + if (errorBuilder_ == null) { + error_ = builderForValue.build(); + onChanged(); + } else { + errorBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Only populated when the job's state is JOB_STATE_FAILED or
+     * JOB_STATE_CANCELLED.
+     * 
+ * + * .google.rpc.Status error = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (error_ != null) { + error_ = com.google.rpc.Status.newBuilder(error_).mergeFrom(value).buildPartial(); + } else { + error_ = value; + } + onChanged(); + } else { + errorBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Only populated when the job's state is JOB_STATE_FAILED or
+     * JOB_STATE_CANCELLED.
+     * 
+ * + * .google.rpc.Status error = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearError() { + if (errorBuilder_ == null) { + error_ = null; + onChanged(); + } else { + error_ = null; + errorBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Only populated when the job's state is JOB_STATE_FAILED or
+     * JOB_STATE_CANCELLED.
+     * 
+ * + * .google.rpc.Status error = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.rpc.Status.Builder getErrorBuilder() { + + onChanged(); + return getErrorFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Only populated when the job's state is JOB_STATE_FAILED or
+     * JOB_STATE_CANCELLED.
+     * 
+ * + * .google.rpc.Status error = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + if (errorBuilder_ != null) { + return errorBuilder_.getMessageOrBuilder(); + } else { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } + } + /** + * + * + *
+     * Output only. Only populated when the job's state is JOB_STATE_FAILED or
+     * JOB_STATE_CANCELLED.
+     * 
+ * + * .google.rpc.Status error = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getErrorFieldBuilder() { + if (errorBuilder_ == null) { + errorBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, + com.google.rpc.Status.Builder, + com.google.rpc.StatusOrBuilder>(getError(), getParentForChildren(), isClean()); + error_ = null; + } + return errorBuilder_; + } + + private java.util.List partialFailures_ = + java.util.Collections.emptyList(); + + private void ensurePartialFailuresIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + partialFailures_ = new java.util.ArrayList(partialFailures_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + partialFailuresBuilder_; + + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * For example, single files that can't be read.
+     * This field never exceeds 20 entries.
+     * Status details fields contain standard GCP error details.
+     * 
+ * + * + * repeated .google.rpc.Status partial_failures = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List getPartialFailuresList() { + if (partialFailuresBuilder_ == null) { + return java.util.Collections.unmodifiableList(partialFailures_); + } else { + return partialFailuresBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * For example, single files that can't be read.
+     * This field never exceeds 20 entries.
+     * Status details fields contain standard GCP error details.
+     * 
+ * + * + * repeated .google.rpc.Status partial_failures = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getPartialFailuresCount() { + if (partialFailuresBuilder_ == null) { + return partialFailures_.size(); + } else { + return partialFailuresBuilder_.getCount(); + } + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * For example, single files that can't be read.
+     * This field never exceeds 20 entries.
+     * Status details fields contain standard GCP error details.
+     * 
+ * + * + * repeated .google.rpc.Status partial_failures = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.rpc.Status getPartialFailures(int index) { + if (partialFailuresBuilder_ == null) { + return partialFailures_.get(index); + } else { + return partialFailuresBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * For example, single files that can't be read.
+     * This field never exceeds 20 entries.
+     * Status details fields contain standard GCP error details.
+     * 
+ * + * + * repeated .google.rpc.Status partial_failures = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setPartialFailures(int index, com.google.rpc.Status value) { + if (partialFailuresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartialFailuresIsMutable(); + partialFailures_.set(index, value); + onChanged(); + } else { + partialFailuresBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * For example, single files that can't be read.
+     * This field never exceeds 20 entries.
+     * Status details fields contain standard GCP error details.
+     * 
+ * + * + * repeated .google.rpc.Status partial_failures = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setPartialFailures(int index, com.google.rpc.Status.Builder builderForValue) { + if (partialFailuresBuilder_ == null) { + ensurePartialFailuresIsMutable(); + partialFailures_.set(index, builderForValue.build()); + onChanged(); + } else { + partialFailuresBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * For example, single files that can't be read.
+     * This field never exceeds 20 entries.
+     * Status details fields contain standard GCP error details.
+     * 
+ * + * + * repeated .google.rpc.Status partial_failures = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addPartialFailures(com.google.rpc.Status value) { + if (partialFailuresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartialFailuresIsMutable(); + partialFailures_.add(value); + onChanged(); + } else { + partialFailuresBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * For example, single files that can't be read.
+     * This field never exceeds 20 entries.
+     * Status details fields contain standard GCP error details.
+     * 
+ * + * + * repeated .google.rpc.Status partial_failures = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addPartialFailures(int index, com.google.rpc.Status value) { + if (partialFailuresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartialFailuresIsMutable(); + partialFailures_.add(index, value); + onChanged(); + } else { + partialFailuresBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * For example, single files that can't be read.
+     * This field never exceeds 20 entries.
+     * Status details fields contain standard GCP error details.
+     * 
+ * + * + * repeated .google.rpc.Status partial_failures = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addPartialFailures(com.google.rpc.Status.Builder builderForValue) { + if (partialFailuresBuilder_ == null) { + ensurePartialFailuresIsMutable(); + partialFailures_.add(builderForValue.build()); + onChanged(); + } else { + partialFailuresBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * For example, single files that can't be read.
+     * This field never exceeds 20 entries.
+     * Status details fields contain standard GCP error details.
+     * 
+ * + * + * repeated .google.rpc.Status partial_failures = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addPartialFailures(int index, com.google.rpc.Status.Builder builderForValue) { + if (partialFailuresBuilder_ == null) { + ensurePartialFailuresIsMutable(); + partialFailures_.add(index, builderForValue.build()); + onChanged(); + } else { + partialFailuresBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * For example, single files that can't be read.
+     * This field never exceeds 20 entries.
+     * Status details fields contain standard GCP error details.
+     * 
+ * + * + * repeated .google.rpc.Status partial_failures = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllPartialFailures( + java.lang.Iterable values) { + if (partialFailuresBuilder_ == null) { + ensurePartialFailuresIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, partialFailures_); + onChanged(); + } else { + partialFailuresBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * For example, single files that can't be read.
+     * This field never exceeds 20 entries.
+     * Status details fields contain standard GCP error details.
+     * 
+ * + * + * repeated .google.rpc.Status partial_failures = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearPartialFailures() { + if (partialFailuresBuilder_ == null) { + partialFailures_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + partialFailuresBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * For example, single files that can't be read.
+     * This field never exceeds 20 entries.
+     * Status details fields contain standard GCP error details.
+     * 
+ * + * + * repeated .google.rpc.Status partial_failures = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removePartialFailures(int index) { + if (partialFailuresBuilder_ == null) { + ensurePartialFailuresIsMutable(); + partialFailures_.remove(index); + onChanged(); + } else { + partialFailuresBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * For example, single files that can't be read.
+     * This field never exceeds 20 entries.
+     * Status details fields contain standard GCP error details.
+     * 
+ * + * + * repeated .google.rpc.Status partial_failures = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.rpc.Status.Builder getPartialFailuresBuilder(int index) { + return getPartialFailuresFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * For example, single files that can't be read.
+     * This field never exceeds 20 entries.
+     * Status details fields contain standard GCP error details.
+     * 
+ * + * + * repeated .google.rpc.Status partial_failures = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.rpc.StatusOrBuilder getPartialFailuresOrBuilder(int index) { + if (partialFailuresBuilder_ == null) { + return partialFailures_.get(index); + } else { + return partialFailuresBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * For example, single files that can't be read.
+     * This field never exceeds 20 entries.
+     * Status details fields contain standard GCP error details.
+     * 
+ * + * + * repeated .google.rpc.Status partial_failures = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getPartialFailuresOrBuilderList() { + if (partialFailuresBuilder_ != null) { + return partialFailuresBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(partialFailures_); + } + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * For example, single files that can't be read.
+     * This field never exceeds 20 entries.
+     * Status details fields contain standard GCP error details.
+     * 
+ * + * + * repeated .google.rpc.Status partial_failures = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.rpc.Status.Builder addPartialFailuresBuilder() { + return getPartialFailuresFieldBuilder() + .addBuilder(com.google.rpc.Status.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * For example, single files that can't be read.
+     * This field never exceeds 20 entries.
+     * Status details fields contain standard GCP error details.
+     * 
+ * + * + * repeated .google.rpc.Status partial_failures = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.rpc.Status.Builder addPartialFailuresBuilder(int index) { + return getPartialFailuresFieldBuilder() + .addBuilder(index, com.google.rpc.Status.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * For example, single files that can't be read.
+     * This field never exceeds 20 entries.
+     * Status details fields contain standard GCP error details.
+     * 
+ * + * + * repeated .google.rpc.Status partial_failures = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List getPartialFailuresBuilderList() { + return getPartialFailuresFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getPartialFailuresFieldBuilder() { + if (partialFailuresBuilder_ == null) { + partialFailuresBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.rpc.Status, + com.google.rpc.Status.Builder, + com.google.rpc.StatusOrBuilder>( + partialFailures_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + partialFailures_ = null; + } + return partialFailuresBuilder_; + } + + private com.google.cloud.aiplatform.v1.ResourcesConsumed resourcesConsumed_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.ResourcesConsumed, + com.google.cloud.aiplatform.v1.ResourcesConsumed.Builder, + com.google.cloud.aiplatform.v1.ResourcesConsumedOrBuilder> + resourcesConsumedBuilder_; + /** + * + * + *
+     * Output only. Information about resources that had been consumed by this job.
+     * Provided in real time at best effort basis, as well as a final value
+     * once the job completes.
+     * Note: This field currently may be not populated for batch predictions that
+     * use AutoML Models.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ResourcesConsumed resources_consumed = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the resourcesConsumed field is set. + */ + public boolean hasResourcesConsumed() { + return resourcesConsumedBuilder_ != null || resourcesConsumed_ != null; + } + /** + * + * + *
+     * Output only. Information about resources that had been consumed by this job.
+     * Provided in real time at best effort basis, as well as a final value
+     * once the job completes.
+     * Note: This field currently may be not populated for batch predictions that
+     * use AutoML Models.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ResourcesConsumed resources_consumed = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The resourcesConsumed. + */ + public com.google.cloud.aiplatform.v1.ResourcesConsumed getResourcesConsumed() { + if (resourcesConsumedBuilder_ == null) { + return resourcesConsumed_ == null + ? com.google.cloud.aiplatform.v1.ResourcesConsumed.getDefaultInstance() + : resourcesConsumed_; + } else { + return resourcesConsumedBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Information about resources that had been consumed by this job.
+     * Provided in real time at best effort basis, as well as a final value
+     * once the job completes.
+     * Note: This field currently may be not populated for batch predictions that
+     * use AutoML Models.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ResourcesConsumed resources_consumed = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setResourcesConsumed(com.google.cloud.aiplatform.v1.ResourcesConsumed value) { + if (resourcesConsumedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + resourcesConsumed_ = value; + onChanged(); + } else { + resourcesConsumedBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Information about resources that had been consumed by this job.
+     * Provided in real time at best effort basis, as well as a final value
+     * once the job completes.
+     * Note: This field currently may be not populated for batch predictions that
+     * use AutoML Models.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ResourcesConsumed resources_consumed = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setResourcesConsumed( + com.google.cloud.aiplatform.v1.ResourcesConsumed.Builder builderForValue) { + if (resourcesConsumedBuilder_ == null) { + resourcesConsumed_ = builderForValue.build(); + onChanged(); + } else { + resourcesConsumedBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Information about resources that had been consumed by this job.
+     * Provided in real time at best effort basis, as well as a final value
+     * once the job completes.
+     * Note: This field currently may be not populated for batch predictions that
+     * use AutoML Models.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ResourcesConsumed resources_consumed = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeResourcesConsumed(com.google.cloud.aiplatform.v1.ResourcesConsumed value) { + if (resourcesConsumedBuilder_ == null) { + if (resourcesConsumed_ != null) { + resourcesConsumed_ = + com.google.cloud.aiplatform.v1.ResourcesConsumed.newBuilder(resourcesConsumed_) + .mergeFrom(value) + .buildPartial(); + } else { + resourcesConsumed_ = value; + } + onChanged(); + } else { + resourcesConsumedBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Information about resources that had been consumed by this job.
+     * Provided in real time at best effort basis, as well as a final value
+     * once the job completes.
+     * Note: This field currently may be not populated for batch predictions that
+     * use AutoML Models.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ResourcesConsumed resources_consumed = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearResourcesConsumed() { + if (resourcesConsumedBuilder_ == null) { + resourcesConsumed_ = null; + onChanged(); + } else { + resourcesConsumed_ = null; + resourcesConsumedBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Information about resources that had been consumed by this job.
+     * Provided in real time at best effort basis, as well as a final value
+     * once the job completes.
+     * Note: This field currently may be not populated for batch predictions that
+     * use AutoML Models.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ResourcesConsumed resources_consumed = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.ResourcesConsumed.Builder getResourcesConsumedBuilder() { + + onChanged(); + return getResourcesConsumedFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Information about resources that had been consumed by this job.
+     * Provided in real time at best effort basis, as well as a final value
+     * once the job completes.
+     * Note: This field currently may be not populated for batch predictions that
+     * use AutoML Models.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ResourcesConsumed resources_consumed = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.ResourcesConsumedOrBuilder + getResourcesConsumedOrBuilder() { + if (resourcesConsumedBuilder_ != null) { + return resourcesConsumedBuilder_.getMessageOrBuilder(); + } else { + return resourcesConsumed_ == null + ? com.google.cloud.aiplatform.v1.ResourcesConsumed.getDefaultInstance() + : resourcesConsumed_; + } + } + /** + * + * + *
+     * Output only. Information about resources that had been consumed by this job.
+     * Provided in real time at best effort basis, as well as a final value
+     * once the job completes.
+     * Note: This field currently may be not populated for batch predictions that
+     * use AutoML Models.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ResourcesConsumed resources_consumed = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.ResourcesConsumed, + com.google.cloud.aiplatform.v1.ResourcesConsumed.Builder, + com.google.cloud.aiplatform.v1.ResourcesConsumedOrBuilder> + getResourcesConsumedFieldBuilder() { + if (resourcesConsumedBuilder_ == null) { + resourcesConsumedBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.ResourcesConsumed, + com.google.cloud.aiplatform.v1.ResourcesConsumed.Builder, + com.google.cloud.aiplatform.v1.ResourcesConsumedOrBuilder>( + getResourcesConsumed(), getParentForChildren(), isClean()); + resourcesConsumed_ = null; + } + return resourcesConsumedBuilder_; + } + + private com.google.cloud.aiplatform.v1.CompletionStats completionStats_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.CompletionStats, + com.google.cloud.aiplatform.v1.CompletionStats.Builder, + com.google.cloud.aiplatform.v1.CompletionStatsOrBuilder> + completionStatsBuilder_; + /** + * + * + *
+     * Output only. Statistics on completed and failed prediction instances.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.CompletionStats completion_stats = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the completionStats field is set. + */ + public boolean hasCompletionStats() { + return completionStatsBuilder_ != null || completionStats_ != null; + } + /** + * + * + *
+     * Output only. Statistics on completed and failed prediction instances.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.CompletionStats completion_stats = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The completionStats. + */ + public com.google.cloud.aiplatform.v1.CompletionStats getCompletionStats() { + if (completionStatsBuilder_ == null) { + return completionStats_ == null + ? com.google.cloud.aiplatform.v1.CompletionStats.getDefaultInstance() + : completionStats_; + } else { + return completionStatsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Statistics on completed and failed prediction instances.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.CompletionStats completion_stats = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCompletionStats(com.google.cloud.aiplatform.v1.CompletionStats value) { + if (completionStatsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + completionStats_ = value; + onChanged(); + } else { + completionStatsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Statistics on completed and failed prediction instances.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.CompletionStats completion_stats = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCompletionStats( + com.google.cloud.aiplatform.v1.CompletionStats.Builder builderForValue) { + if (completionStatsBuilder_ == null) { + completionStats_ = builderForValue.build(); + onChanged(); + } else { + completionStatsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Statistics on completed and failed prediction instances.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.CompletionStats completion_stats = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCompletionStats(com.google.cloud.aiplatform.v1.CompletionStats value) { + if (completionStatsBuilder_ == null) { + if (completionStats_ != null) { + completionStats_ = + com.google.cloud.aiplatform.v1.CompletionStats.newBuilder(completionStats_) + .mergeFrom(value) + .buildPartial(); + } else { + completionStats_ = value; + } + onChanged(); + } else { + completionStatsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Statistics on completed and failed prediction instances.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.CompletionStats completion_stats = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCompletionStats() { + if (completionStatsBuilder_ == null) { + completionStats_ = null; + onChanged(); + } else { + completionStats_ = null; + completionStatsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Statistics on completed and failed prediction instances.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.CompletionStats completion_stats = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.CompletionStats.Builder getCompletionStatsBuilder() { + + onChanged(); + return getCompletionStatsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Statistics on completed and failed prediction instances.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.CompletionStats completion_stats = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.CompletionStatsOrBuilder getCompletionStatsOrBuilder() { + if (completionStatsBuilder_ != null) { + return completionStatsBuilder_.getMessageOrBuilder(); + } else { + return completionStats_ == null + ? com.google.cloud.aiplatform.v1.CompletionStats.getDefaultInstance() + : completionStats_; + } + } + /** + * + * + *
+     * Output only. Statistics on completed and failed prediction instances.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.CompletionStats completion_stats = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.CompletionStats, + com.google.cloud.aiplatform.v1.CompletionStats.Builder, + com.google.cloud.aiplatform.v1.CompletionStatsOrBuilder> + getCompletionStatsFieldBuilder() { + if (completionStatsBuilder_ == null) { + completionStatsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.CompletionStats, + com.google.cloud.aiplatform.v1.CompletionStats.Builder, + com.google.cloud.aiplatform.v1.CompletionStatsOrBuilder>( + getCompletionStats(), getParentForChildren(), isClean()); + completionStats_ = null; + } + return completionStatsBuilder_; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. Time when the BatchPredictionJob was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * Output only. Time when the BatchPredictionJob was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time when the BatchPredictionJob was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the BatchPredictionJob was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the BatchPredictionJob was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the BatchPredictionJob was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the BatchPredictionJob was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time when the BatchPredictionJob was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. Time when the BatchPredictionJob was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + startTimeBuilder_; + /** + * + * + *
+     * Output only. Time when the BatchPredictionJob for the first time entered the
+     * `JOB_STATE_RUNNING` state.
+     * 
+ * + * + * .google.protobuf.Timestamp start_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return startTimeBuilder_ != null || startTime_ != null; + } + /** + * + * + *
+     * Output only. Time when the BatchPredictionJob for the first time entered the
+     * `JOB_STATE_RUNNING` state.
+     * 
+ * + * + * .google.protobuf.Timestamp start_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time when the BatchPredictionJob for the first time entered the
+     * `JOB_STATE_RUNNING` state.
+     * 
+ * + * + * .google.protobuf.Timestamp start_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + onChanged(); + } else { + startTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the BatchPredictionJob for the first time entered the
+     * `JOB_STATE_RUNNING` state.
+     * 
+ * + * + * .google.protobuf.Timestamp start_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + onChanged(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the BatchPredictionJob for the first time entered the
+     * `JOB_STATE_RUNNING` state.
+     * 
+ * + * + * .google.protobuf.Timestamp start_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (startTime_ != null) { + startTime_ = + com.google.protobuf.Timestamp.newBuilder(startTime_).mergeFrom(value).buildPartial(); + } else { + startTime_ = value; + } + onChanged(); + } else { + startTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the BatchPredictionJob for the first time entered the
+     * `JOB_STATE_RUNNING` state.
+     * 
+ * + * + * .google.protobuf.Timestamp start_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearStartTime() { + if (startTimeBuilder_ == null) { + startTime_ = null; + onChanged(); + } else { + startTime_ = null; + startTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the BatchPredictionJob for the first time entered the
+     * `JOB_STATE_RUNNING` state.
+     * 
+ * + * + * .google.protobuf.Timestamp start_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + + onChanged(); + return getStartTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time when the BatchPredictionJob for the first time entered the
+     * `JOB_STATE_RUNNING` state.
+     * 
+ * + * + * .google.protobuf.Timestamp start_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + } + /** + * + * + *
+     * Output only. Time when the BatchPredictionJob for the first time entered the
+     * `JOB_STATE_RUNNING` state.
+     * 
+ * + * + * .google.protobuf.Timestamp start_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getStartTime(), getParentForChildren(), isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + /** + * + * + *
+     * Output only. Time when the BatchPredictionJob entered any of the following states:
+     * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return endTimeBuilder_ != null || endTime_ != null; + } + /** + * + * + *
+     * Output only. Time when the BatchPredictionJob entered any of the following states:
+     * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time when the BatchPredictionJob entered any of the following states:
+     * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + onChanged(); + } else { + endTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the BatchPredictionJob entered any of the following states:
+     * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + onChanged(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the BatchPredictionJob entered any of the following states:
+     * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (endTime_ != null) { + endTime_ = + com.google.protobuf.Timestamp.newBuilder(endTime_).mergeFrom(value).buildPartial(); + } else { + endTime_ = value; + } + onChanged(); + } else { + endTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the BatchPredictionJob entered any of the following states:
+     * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearEndTime() { + if (endTimeBuilder_ == null) { + endTime_ = null; + onChanged(); + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the BatchPredictionJob entered any of the following states:
+     * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time when the BatchPredictionJob entered any of the following states:
+     * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + * + * + *
+     * Output only. Time when the BatchPredictionJob entered any of the following states:
+     * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. Time when the BatchPredictionJob was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + * + * + *
+     * Output only. Time when the BatchPredictionJob was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time when the BatchPredictionJob was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the BatchPredictionJob was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the BatchPredictionJob was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the BatchPredictionJob was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the BatchPredictionJob was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time when the BatchPredictionJob was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. Time when the BatchPredictionJob was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + onChanged(); + ; + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * The labels with user-defined metadata to organize BatchPredictionJobs.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 19; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * The labels with user-defined metadata to organize BatchPredictionJobs.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 19; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * The labels with user-defined metadata to organize BatchPredictionJobs.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 19; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * The labels with user-defined metadata to organize BatchPredictionJobs.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 19; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * The labels with user-defined metadata to organize BatchPredictionJobs.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 19; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * The labels with user-defined metadata to organize BatchPredictionJobs.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 19; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * The labels with user-defined metadata to organize BatchPredictionJobs.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 19; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + return this; + } + + private com.google.cloud.aiplatform.v1.EncryptionSpec encryptionSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.EncryptionSpec, + com.google.cloud.aiplatform.v1.EncryptionSpec.Builder, + com.google.cloud.aiplatform.v1.EncryptionSpecOrBuilder> + encryptionSpecBuilder_; + /** + * + * + *
+     * Customer-managed encryption key options for a BatchPredictionJob. If this
+     * is set, then all resources created by the BatchPredictionJob will be
+     * encrypted with the provided encryption key.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 24; + * + * @return Whether the encryptionSpec field is set. + */ + public boolean hasEncryptionSpec() { + return encryptionSpecBuilder_ != null || encryptionSpec_ != null; + } + /** + * + * + *
+     * Customer-managed encryption key options for a BatchPredictionJob. If this
+     * is set, then all resources created by the BatchPredictionJob will be
+     * encrypted with the provided encryption key.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 24; + * + * @return The encryptionSpec. + */ + public com.google.cloud.aiplatform.v1.EncryptionSpec getEncryptionSpec() { + if (encryptionSpecBuilder_ == null) { + return encryptionSpec_ == null + ? com.google.cloud.aiplatform.v1.EncryptionSpec.getDefaultInstance() + : encryptionSpec_; + } else { + return encryptionSpecBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Customer-managed encryption key options for a BatchPredictionJob. If this
+     * is set, then all resources created by the BatchPredictionJob will be
+     * encrypted with the provided encryption key.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 24; + */ + public Builder setEncryptionSpec(com.google.cloud.aiplatform.v1.EncryptionSpec value) { + if (encryptionSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + encryptionSpec_ = value; + onChanged(); + } else { + encryptionSpecBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Customer-managed encryption key options for a BatchPredictionJob. If this
+     * is set, then all resources created by the BatchPredictionJob will be
+     * encrypted with the provided encryption key.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 24; + */ + public Builder setEncryptionSpec( + com.google.cloud.aiplatform.v1.EncryptionSpec.Builder builderForValue) { + if (encryptionSpecBuilder_ == null) { + encryptionSpec_ = builderForValue.build(); + onChanged(); + } else { + encryptionSpecBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Customer-managed encryption key options for a BatchPredictionJob. If this
+     * is set, then all resources created by the BatchPredictionJob will be
+     * encrypted with the provided encryption key.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 24; + */ + public Builder mergeEncryptionSpec(com.google.cloud.aiplatform.v1.EncryptionSpec value) { + if (encryptionSpecBuilder_ == null) { + if (encryptionSpec_ != null) { + encryptionSpec_ = + com.google.cloud.aiplatform.v1.EncryptionSpec.newBuilder(encryptionSpec_) + .mergeFrom(value) + .buildPartial(); + } else { + encryptionSpec_ = value; + } + onChanged(); + } else { + encryptionSpecBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Customer-managed encryption key options for a BatchPredictionJob. If this
+     * is set, then all resources created by the BatchPredictionJob will be
+     * encrypted with the provided encryption key.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 24; + */ + public Builder clearEncryptionSpec() { + if (encryptionSpecBuilder_ == null) { + encryptionSpec_ = null; + onChanged(); + } else { + encryptionSpec_ = null; + encryptionSpecBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Customer-managed encryption key options for a BatchPredictionJob. If this
+     * is set, then all resources created by the BatchPredictionJob will be
+     * encrypted with the provided encryption key.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 24; + */ + public com.google.cloud.aiplatform.v1.EncryptionSpec.Builder getEncryptionSpecBuilder() { + + onChanged(); + return getEncryptionSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Customer-managed encryption key options for a BatchPredictionJob. If this
+     * is set, then all resources created by the BatchPredictionJob will be
+     * encrypted with the provided encryption key.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 24; + */ + public com.google.cloud.aiplatform.v1.EncryptionSpecOrBuilder getEncryptionSpecOrBuilder() { + if (encryptionSpecBuilder_ != null) { + return encryptionSpecBuilder_.getMessageOrBuilder(); + } else { + return encryptionSpec_ == null + ? com.google.cloud.aiplatform.v1.EncryptionSpec.getDefaultInstance() + : encryptionSpec_; + } + } + /** + * + * + *
+     * Customer-managed encryption key options for a BatchPredictionJob. If this
+     * is set, then all resources created by the BatchPredictionJob will be
+     * encrypted with the provided encryption key.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 24; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.EncryptionSpec, + com.google.cloud.aiplatform.v1.EncryptionSpec.Builder, + com.google.cloud.aiplatform.v1.EncryptionSpecOrBuilder> + getEncryptionSpecFieldBuilder() { + if (encryptionSpecBuilder_ == null) { + encryptionSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.EncryptionSpec, + com.google.cloud.aiplatform.v1.EncryptionSpec.Builder, + com.google.cloud.aiplatform.v1.EncryptionSpecOrBuilder>( + getEncryptionSpec(), getParentForChildren(), isClean()); + encryptionSpec_ = null; + } + return encryptionSpecBuilder_; + } + + @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.v1.BatchPredictionJob) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.BatchPredictionJob) + private static final com.google.cloud.aiplatform.v1.BatchPredictionJob DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.BatchPredictionJob(); + } + + public static com.google.cloud.aiplatform.v1.BatchPredictionJob getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchPredictionJob parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BatchPredictionJob(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.v1.BatchPredictionJob getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BatchPredictionJobName.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BatchPredictionJobName.java new file mode 100644 index 000000000..7d847f9fd --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BatchPredictionJobName.java @@ -0,0 +1,231 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class BatchPredictionJobName implements ResourceName { + 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; + } + + public String getLocation() { + return location; + } + + public String getBatchPredictionJob() { + return batchPredictionJob; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static BatchPredictionJobName of( + String project, String location, String batchPredictionJob) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setBatchPredictionJob(batchPredictionJob) + .build(); + } + + public static String format(String project, String location, String batchPredictionJob) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setBatchPredictionJob(batchPredictionJob) + .build() + .toString(); + } + + public static BatchPredictionJobName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + 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")); + } + + 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 (BatchPredictionJobName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String 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(); + 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(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_BATCH_PREDICTION_JOB.instantiate( + "project", project, "location", location, "batch_prediction_job", batchPredictionJob); + } + + @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; + } + + public String getLocation() { + return location; + } + + public String getBatchPredictionJob() { + return batchPredictionJob; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setBatchPredictionJob(String batchPredictionJob) { + this.batchPredictionJob = batchPredictionJob; + return this; + } + + private Builder(BatchPredictionJobName batchPredictionJobName) { + project = batchPredictionJobName.project; + location = batchPredictionJobName.location; + batchPredictionJob = batchPredictionJobName.batchPredictionJob; + } + + public BatchPredictionJobName build() { + return new BatchPredictionJobName(this); + } + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BatchPredictionJobOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BatchPredictionJobOrBuilder.java new file mode 100644 index 000000000..92db3a756 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BatchPredictionJobOrBuilder.java @@ -0,0 +1,916 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/batch_prediction_job.proto + +package com.google.cloud.aiplatform.v1; + +public interface BatchPredictionJobOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.BatchPredictionJob) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Resource name of the BatchPredictionJob.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. Resource name of the BatchPredictionJob.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The user-defined name of this BatchPredictionJob.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Required. The user-defined name of this BatchPredictionJob.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Required. The name of the Model that produces the predictions via this job,
+   * must share the same ancestor Location.
+   * Starting this job has no impact on any existing deployments of the Model
+   * and their resources.
+   * 
+ * + * + * string model = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The model. + */ + java.lang.String getModel(); + /** + * + * + *
+   * Required. The name of the Model that produces the predictions via this job,
+   * must share the same ancestor Location.
+   * Starting this job has no impact on any existing deployments of the Model
+   * and their resources.
+   * 
+ * + * + * string model = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for model. + */ + com.google.protobuf.ByteString getModelBytes(); + + /** + * + * + *
+   * Required. Input configuration of the instances on which predictions are performed.
+   * The schema of any single instance may be specified via
+   * the [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model]
+   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+   * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
+   * 
+ * + * + * .google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig input_config = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the inputConfig field is set. + */ + boolean hasInputConfig(); + /** + * + * + *
+   * Required. Input configuration of the instances on which predictions are performed.
+   * The schema of any single instance may be specified via
+   * the [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model]
+   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+   * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
+   * 
+ * + * + * .google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig input_config = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The inputConfig. + */ + com.google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig getInputConfig(); + /** + * + * + *
+   * Required. Input configuration of the instances on which predictions are performed.
+   * The schema of any single instance may be specified via
+   * the [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model]
+   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+   * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
+   * 
+ * + * + * .google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig input_config = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1.BatchPredictionJob.InputConfigOrBuilder getInputConfigOrBuilder(); + + /** + * + * + *
+   * The parameters that govern the predictions. The schema of the parameters
+   * may be specified via the [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model]
+   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+   * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
+   * 
+ * + * .google.protobuf.Value model_parameters = 5; + * + * @return Whether the modelParameters field is set. + */ + boolean hasModelParameters(); + /** + * + * + *
+   * The parameters that govern the predictions. The schema of the parameters
+   * may be specified via the [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model]
+   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+   * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
+   * 
+ * + * .google.protobuf.Value model_parameters = 5; + * + * @return The modelParameters. + */ + com.google.protobuf.Value getModelParameters(); + /** + * + * + *
+   * The parameters that govern the predictions. The schema of the parameters
+   * may be specified via the [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model]
+   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+   * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
+   * 
+ * + * .google.protobuf.Value model_parameters = 5; + */ + com.google.protobuf.ValueOrBuilder getModelParametersOrBuilder(); + + /** + * + * + *
+   * Required. The Configuration specifying where output predictions should
+   * be written.
+   * The schema of any single prediction may be specified as a concatenation
+   * of [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model]
+   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+   * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]
+   * and
+   * [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri].
+   * 
+ * + * + * .google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig output_config = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the outputConfig field is set. + */ + boolean hasOutputConfig(); + /** + * + * + *
+   * Required. The Configuration specifying where output predictions should
+   * be written.
+   * The schema of any single prediction may be specified as a concatenation
+   * of [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model]
+   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+   * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]
+   * and
+   * [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri].
+   * 
+ * + * + * .google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig output_config = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The outputConfig. + */ + com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig getOutputConfig(); + /** + * + * + *
+   * Required. The Configuration specifying where output predictions should
+   * be written.
+   * The schema of any single prediction may be specified as a concatenation
+   * of [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model]
+   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+   * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]
+   * and
+   * [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri].
+   * 
+ * + * + * .google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig output_config = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfigOrBuilder + getOutputConfigOrBuilder(); + + /** + * + * + *
+   * The config of resources used by the Model during the batch prediction. If
+   * the Model [supports][google.cloud.aiplatform.v1.Model.supported_deployment_resources_types]
+   * DEDICATED_RESOURCES this config may be provided (and the job will use these
+   * resources), if the Model doesn't support AUTOMATIC_RESOURCES, this config
+   * must be provided.
+   * 
+ * + * .google.cloud.aiplatform.v1.BatchDedicatedResources dedicated_resources = 7; + * + * @return Whether the dedicatedResources field is set. + */ + boolean hasDedicatedResources(); + /** + * + * + *
+   * The config of resources used by the Model during the batch prediction. If
+   * the Model [supports][google.cloud.aiplatform.v1.Model.supported_deployment_resources_types]
+   * DEDICATED_RESOURCES this config may be provided (and the job will use these
+   * resources), if the Model doesn't support AUTOMATIC_RESOURCES, this config
+   * must be provided.
+   * 
+ * + * .google.cloud.aiplatform.v1.BatchDedicatedResources dedicated_resources = 7; + * + * @return The dedicatedResources. + */ + com.google.cloud.aiplatform.v1.BatchDedicatedResources getDedicatedResources(); + /** + * + * + *
+   * The config of resources used by the Model during the batch prediction. If
+   * the Model [supports][google.cloud.aiplatform.v1.Model.supported_deployment_resources_types]
+   * DEDICATED_RESOURCES this config may be provided (and the job will use these
+   * resources), if the Model doesn't support AUTOMATIC_RESOURCES, this config
+   * must be provided.
+   * 
+ * + * .google.cloud.aiplatform.v1.BatchDedicatedResources dedicated_resources = 7; + */ + com.google.cloud.aiplatform.v1.BatchDedicatedResourcesOrBuilder getDedicatedResourcesOrBuilder(); + + /** + * + * + *
+   * Immutable. Parameters configuring the batch behavior. Currently only applicable when
+   * [dedicated_resources][google.cloud.aiplatform.v1.BatchPredictionJob.dedicated_resources] are used (in other cases AI Platform does
+   * the tuning itself).
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ManualBatchTuningParameters manual_batch_tuning_parameters = 8 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the manualBatchTuningParameters field is set. + */ + boolean hasManualBatchTuningParameters(); + /** + * + * + *
+   * Immutable. Parameters configuring the batch behavior. Currently only applicable when
+   * [dedicated_resources][google.cloud.aiplatform.v1.BatchPredictionJob.dedicated_resources] are used (in other cases AI Platform does
+   * the tuning itself).
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ManualBatchTuningParameters manual_batch_tuning_parameters = 8 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The manualBatchTuningParameters. + */ + com.google.cloud.aiplatform.v1.ManualBatchTuningParameters getManualBatchTuningParameters(); + /** + * + * + *
+   * Immutable. Parameters configuring the batch behavior. Currently only applicable when
+   * [dedicated_resources][google.cloud.aiplatform.v1.BatchPredictionJob.dedicated_resources] are used (in other cases AI Platform does
+   * the tuning itself).
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ManualBatchTuningParameters manual_batch_tuning_parameters = 8 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + com.google.cloud.aiplatform.v1.ManualBatchTuningParametersOrBuilder + getManualBatchTuningParametersOrBuilder(); + + /** + * + * + *
+   * Output only. Information further describing the output of this job.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfo output_info = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the outputInfo field is set. + */ + boolean hasOutputInfo(); + /** + * + * + *
+   * Output only. Information further describing the output of this job.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfo output_info = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The outputInfo. + */ + com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfo getOutputInfo(); + /** + * + * + *
+   * Output only. Information further describing the output of this job.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfo output_info = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfoOrBuilder getOutputInfoOrBuilder(); + + /** + * + * + *
+   * Output only. The detailed state of the job.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.JobState state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Output only. The detailed state of the job.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.JobState state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.aiplatform.v1.JobState getState(); + + /** + * + * + *
+   * Output only. Only populated when the job's state is JOB_STATE_FAILED or
+   * JOB_STATE_CANCELLED.
+   * 
+ * + * .google.rpc.Status error = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the error field is set. + */ + boolean hasError(); + /** + * + * + *
+   * Output only. Only populated when the job's state is JOB_STATE_FAILED or
+   * JOB_STATE_CANCELLED.
+   * 
+ * + * .google.rpc.Status error = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The error. + */ + com.google.rpc.Status getError(); + /** + * + * + *
+   * Output only. Only populated when the job's state is JOB_STATE_FAILED or
+   * JOB_STATE_CANCELLED.
+   * 
+ * + * .google.rpc.Status error = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.rpc.StatusOrBuilder getErrorOrBuilder(); + + /** + * + * + *
+   * Output only. Partial failures encountered.
+   * For example, single files that can't be read.
+   * This field never exceeds 20 entries.
+   * Status details fields contain standard GCP error details.
+   * 
+ * + * + * repeated .google.rpc.Status partial_failures = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getPartialFailuresList(); + /** + * + * + *
+   * Output only. Partial failures encountered.
+   * For example, single files that can't be read.
+   * This field never exceeds 20 entries.
+   * Status details fields contain standard GCP error details.
+   * 
+ * + * + * repeated .google.rpc.Status partial_failures = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.rpc.Status getPartialFailures(int index); + /** + * + * + *
+   * Output only. Partial failures encountered.
+   * For example, single files that can't be read.
+   * This field never exceeds 20 entries.
+   * Status details fields contain standard GCP error details.
+   * 
+ * + * + * repeated .google.rpc.Status partial_failures = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getPartialFailuresCount(); + /** + * + * + *
+   * Output only. Partial failures encountered.
+   * For example, single files that can't be read.
+   * This field never exceeds 20 entries.
+   * Status details fields contain standard GCP error details.
+   * 
+ * + * + * repeated .google.rpc.Status partial_failures = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getPartialFailuresOrBuilderList(); + /** + * + * + *
+   * Output only. Partial failures encountered.
+   * For example, single files that can't be read.
+   * This field never exceeds 20 entries.
+   * Status details fields contain standard GCP error details.
+   * 
+ * + * + * repeated .google.rpc.Status partial_failures = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.rpc.StatusOrBuilder getPartialFailuresOrBuilder(int index); + + /** + * + * + *
+   * Output only. Information about resources that had been consumed by this job.
+   * Provided in real time at best effort basis, as well as a final value
+   * once the job completes.
+   * Note: This field currently may be not populated for batch predictions that
+   * use AutoML Models.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ResourcesConsumed resources_consumed = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the resourcesConsumed field is set. + */ + boolean hasResourcesConsumed(); + /** + * + * + *
+   * Output only. Information about resources that had been consumed by this job.
+   * Provided in real time at best effort basis, as well as a final value
+   * once the job completes.
+   * Note: This field currently may be not populated for batch predictions that
+   * use AutoML Models.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ResourcesConsumed resources_consumed = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The resourcesConsumed. + */ + com.google.cloud.aiplatform.v1.ResourcesConsumed getResourcesConsumed(); + /** + * + * + *
+   * Output only. Information about resources that had been consumed by this job.
+   * Provided in real time at best effort basis, as well as a final value
+   * once the job completes.
+   * Note: This field currently may be not populated for batch predictions that
+   * use AutoML Models.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ResourcesConsumed resources_consumed = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1.ResourcesConsumedOrBuilder getResourcesConsumedOrBuilder(); + + /** + * + * + *
+   * Output only. Statistics on completed and failed prediction instances.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.CompletionStats completion_stats = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the completionStats field is set. + */ + boolean hasCompletionStats(); + /** + * + * + *
+   * Output only. Statistics on completed and failed prediction instances.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.CompletionStats completion_stats = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The completionStats. + */ + com.google.cloud.aiplatform.v1.CompletionStats getCompletionStats(); + /** + * + * + *
+   * Output only. Statistics on completed and failed prediction instances.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.CompletionStats completion_stats = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1.CompletionStatsOrBuilder getCompletionStatsOrBuilder(); + + /** + * + * + *
+   * Output only. Time when the BatchPredictionJob was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Time when the BatchPredictionJob was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Time when the BatchPredictionJob was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Time when the BatchPredictionJob for the first time entered the
+   * `JOB_STATE_RUNNING` state.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + /** + * + * + *
+   * Output only. Time when the BatchPredictionJob for the first time entered the
+   * `JOB_STATE_RUNNING` state.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + /** + * + * + *
+   * Output only. Time when the BatchPredictionJob for the first time entered the
+   * `JOB_STATE_RUNNING` state.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Time when the BatchPredictionJob entered any of the following states:
+   * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + * + * + *
+   * Output only. Time when the BatchPredictionJob entered any of the following states:
+   * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + * + * + *
+   * Output only. Time when the BatchPredictionJob entered any of the following states:
+   * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Time when the BatchPredictionJob was most recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. Time when the BatchPredictionJob was most recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. Time when the BatchPredictionJob was most recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * The labels with user-defined metadata to organize BatchPredictionJobs.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 19; + */ + int getLabelsCount(); + /** + * + * + *
+   * The labels with user-defined metadata to organize BatchPredictionJobs.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 19; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * The labels with user-defined metadata to organize BatchPredictionJobs.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 19; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * The labels with user-defined metadata to organize BatchPredictionJobs.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 19; + */ + java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * The labels with user-defined metadata to organize BatchPredictionJobs.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 19; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Customer-managed encryption key options for a BatchPredictionJob. If this
+   * is set, then all resources created by the BatchPredictionJob will be
+   * encrypted with the provided encryption key.
+   * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 24; + * + * @return Whether the encryptionSpec field is set. + */ + boolean hasEncryptionSpec(); + /** + * + * + *
+   * Customer-managed encryption key options for a BatchPredictionJob. If this
+   * is set, then all resources created by the BatchPredictionJob will be
+   * encrypted with the provided encryption key.
+   * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 24; + * + * @return The encryptionSpec. + */ + com.google.cloud.aiplatform.v1.EncryptionSpec getEncryptionSpec(); + /** + * + * + *
+   * Customer-managed encryption key options for a BatchPredictionJob. If this
+   * is set, then all resources created by the BatchPredictionJob will be
+   * encrypted with the provided encryption key.
+   * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 24; + */ + com.google.cloud.aiplatform.v1.EncryptionSpecOrBuilder getEncryptionSpecOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BatchPredictionJobProto.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BatchPredictionJobProto.java new file mode 100644 index 000000000..56a84330f --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BatchPredictionJobProto.java @@ -0,0 +1,234 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/batch_prediction_job.proto + +package com.google.cloud.aiplatform.v1; + +public final class BatchPredictionJobProto { + private BatchPredictionJobProto() {} + + 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_v1_BatchPredictionJob_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_BatchPredictionJob_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_BatchPredictionJob_InputConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_BatchPredictionJob_InputConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_BatchPredictionJob_OutputConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_BatchPredictionJob_OutputConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_BatchPredictionJob_OutputInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_BatchPredictionJob_OutputInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_BatchPredictionJob_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_BatchPredictionJob_LabelsEntry_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n5google/cloud/aiplatform/v1/batch_predi" + + "ction_job.proto\022\032google.cloud.aiplatform" + + ".v1\032\037google/api/field_behavior.proto\032\031go" + + "ogle/api/resource.proto\0321google/cloud/ai" + + "platform/v1/completion_stats.proto\0320goog" + + "le/cloud/aiplatform/v1/encryption_spec.p" + + "roto\032#google/cloud/aiplatform/v1/io.prot" + + "o\032*google/cloud/aiplatform/v1/job_state." + + "proto\0322google/cloud/aiplatform/v1/machin" + + "e_resources.proto\032?google/cloud/aiplatfo" + + "rm/v1/manual_batch_tuning_parameters.pro" + + "to\032\034google/protobuf/struct.proto\032\037google" + + "/protobuf/timestamp.proto\032\027google/rpc/st" + + "atus.proto\032\034google/api/annotations.proto" + + "\"\273\017\n\022BatchPredictionJob\022\021\n\004name\030\001 \001(\tB\003\340" + + "A\003\022\031\n\014display_name\030\002 \001(\tB\003\340A\002\0226\n\005model\030\003" + + " \001(\tB\'\340A\002\372A!\n\037aiplatform.googleapis.com/" + + "Model\022U\n\014input_config\030\004 \001(\0132:.google.clo" + + "ud.aiplatform.v1.BatchPredictionJob.Inpu" + + "tConfigB\003\340A\002\0220\n\020model_parameters\030\005 \001(\0132\026" + + ".google.protobuf.Value\022W\n\routput_config\030" + + "\006 \001(\0132;.google.cloud.aiplatform.v1.Batch" + + "PredictionJob.OutputConfigB\003\340A\002\022P\n\023dedic" + + "ated_resources\030\007 \001(\01323.google.cloud.aipl" + + "atform.v1.BatchDedicatedResources\022d\n\036man" + + "ual_batch_tuning_parameters\030\010 \001(\01327.goog" + + "le.cloud.aiplatform.v1.ManualBatchTuning" + + "ParametersB\003\340A\005\022S\n\013output_info\030\t \001(\01329.g" + + "oogle.cloud.aiplatform.v1.BatchPredictio" + + "nJob.OutputInfoB\003\340A\003\0228\n\005state\030\n \001(\0162$.go" + + "ogle.cloud.aiplatform.v1.JobStateB\003\340A\003\022&" + + "\n\005error\030\013 \001(\0132\022.google.rpc.StatusB\003\340A\003\0221" + + "\n\020partial_failures\030\014 \003(\0132\022.google.rpc.St" + + "atusB\003\340A\003\022N\n\022resources_consumed\030\r \001(\0132-." + + "google.cloud.aiplatform.v1.ResourcesCons" + + "umedB\003\340A\003\022J\n\020completion_stats\030\016 \001(\0132+.go" + + "ogle.cloud.aiplatform.v1.CompletionStats" + + "B\003\340A\003\0224\n\013create_time\030\017 \001(\0132\032.google.prot" + + "obuf.TimestampB\003\340A\003\0223\n\nstart_time\030\020 \001(\0132" + + "\032.google.protobuf.TimestampB\003\340A\003\0221\n\010end_" + + "time\030\021 \001(\0132\032.google.protobuf.TimestampB\003" + + "\340A\003\0224\n\013update_time\030\022 \001(\0132\032.google.protob" + + "uf.TimestampB\003\340A\003\022J\n\006labels\030\023 \003(\0132:.goog" + + "le.cloud.aiplatform.v1.BatchPredictionJo" + + "b.LabelsEntry\022C\n\017encryption_spec\030\030 \001(\0132*" + + ".google.cloud.aiplatform.v1.EncryptionSp" + + "ec\032\272\001\n\013InputConfig\022;\n\ngcs_source\030\002 \001(\0132%" + + ".google.cloud.aiplatform.v1.GcsSourceH\000\022" + + "E\n\017bigquery_source\030\003 \001(\0132*.google.cloud." + + "aiplatform.v1.BigQuerySourceH\000\022\035\n\020instan" + + "ces_format\030\001 \001(\tB\003\340A\002B\010\n\006source\032\326\001\n\014Outp" + + "utConfig\022E\n\017gcs_destination\030\002 \001(\0132*.goog" + + "le.cloud.aiplatform.v1.GcsDestinationH\000\022" + + "O\n\024bigquery_destination\030\003 \001(\0132/.google.c" + + "loud.aiplatform.v1.BigQueryDestinationH\000" + + "\022\037\n\022predictions_format\030\001 \001(\tB\003\340A\002B\r\n\013des" + + "tination\032l\n\nOutputInfo\022#\n\024gcs_output_dir" + + "ectory\030\001 \001(\tB\003\340A\003H\000\022&\n\027bigquery_output_d" + + "ataset\030\002 \001(\tB\003\340A\003H\000B\021\n\017output_location\032-" + + "\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(" + + "\t:\0028\001:\206\001\352A\202\001\n,aiplatform.googleapis.com/" + + "BatchPredictionJob\022Rprojects/{project}/l" + + "ocations/{location}/batchPredictionJobs/" + + "{batch_prediction_job}B\201\001\n\036com.google.cl" + + "oud.aiplatform.v1B\027BatchPredictionJobPro" + + "toP\001ZDgoogle.golang.org/genproto/googlea" + + "pis/cloud/aiplatform/v1;aiplatformb\006prot" + + "o3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.aiplatform.v1.CompletionStatsProto.getDescriptor(), + com.google.cloud.aiplatform.v1.EncryptionSpecProto.getDescriptor(), + com.google.cloud.aiplatform.v1.IoProto.getDescriptor(), + com.google.cloud.aiplatform.v1.JobStateProto.getDescriptor(), + com.google.cloud.aiplatform.v1.MachineResourcesProto.getDescriptor(), + com.google.cloud.aiplatform.v1.ManualBatchTuningParametersProto.getDescriptor(), + com.google.protobuf.StructProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.rpc.StatusProto.getDescriptor(), + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1_BatchPredictionJob_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_BatchPredictionJob_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_BatchPredictionJob_descriptor, + new java.lang.String[] { + "Name", + "DisplayName", + "Model", + "InputConfig", + "ModelParameters", + "OutputConfig", + "DedicatedResources", + "ManualBatchTuningParameters", + "OutputInfo", + "State", + "Error", + "PartialFailures", + "ResourcesConsumed", + "CompletionStats", + "CreateTime", + "StartTime", + "EndTime", + "UpdateTime", + "Labels", + "EncryptionSpec", + }); + internal_static_google_cloud_aiplatform_v1_BatchPredictionJob_InputConfig_descriptor = + internal_static_google_cloud_aiplatform_v1_BatchPredictionJob_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_aiplatform_v1_BatchPredictionJob_InputConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_BatchPredictionJob_InputConfig_descriptor, + new java.lang.String[] { + "GcsSource", "BigquerySource", "InstancesFormat", "Source", + }); + internal_static_google_cloud_aiplatform_v1_BatchPredictionJob_OutputConfig_descriptor = + internal_static_google_cloud_aiplatform_v1_BatchPredictionJob_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_aiplatform_v1_BatchPredictionJob_OutputConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_BatchPredictionJob_OutputConfig_descriptor, + new java.lang.String[] { + "GcsDestination", "BigqueryDestination", "PredictionsFormat", "Destination", + }); + internal_static_google_cloud_aiplatform_v1_BatchPredictionJob_OutputInfo_descriptor = + internal_static_google_cloud_aiplatform_v1_BatchPredictionJob_descriptor + .getNestedTypes() + .get(2); + internal_static_google_cloud_aiplatform_v1_BatchPredictionJob_OutputInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_BatchPredictionJob_OutputInfo_descriptor, + new java.lang.String[] { + "GcsOutputDirectory", "BigqueryOutputDataset", "OutputLocation", + }); + internal_static_google_cloud_aiplatform_v1_BatchPredictionJob_LabelsEntry_descriptor = + internal_static_google_cloud_aiplatform_v1_BatchPredictionJob_descriptor + .getNestedTypes() + .get(3); + internal_static_google_cloud_aiplatform_v1_BatchPredictionJob_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_BatchPredictionJob_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.aiplatform.v1.CompletionStatsProto.getDescriptor(); + com.google.cloud.aiplatform.v1.EncryptionSpecProto.getDescriptor(); + com.google.cloud.aiplatform.v1.IoProto.getDescriptor(); + com.google.cloud.aiplatform.v1.JobStateProto.getDescriptor(); + com.google.cloud.aiplatform.v1.MachineResourcesProto.getDescriptor(); + com.google.cloud.aiplatform.v1.ManualBatchTuningParametersProto.getDescriptor(); + com.google.protobuf.StructProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.rpc.StatusProto.getDescriptor(); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BigQueryDestination.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BigQueryDestination.java new file mode 100644 index 000000000..455250292 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BigQueryDestination.java @@ -0,0 +1,678 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/io.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * The BigQuery location for the output content.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.BigQueryDestination} + */ +public final class BigQueryDestination extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.BigQueryDestination) + BigQueryDestinationOrBuilder { + private static final long serialVersionUID = 0L; + // Use BigQueryDestination.newBuilder() to construct. + private BigQueryDestination(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BigQueryDestination() { + outputUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BigQueryDestination(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private BigQueryDestination( + 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(); + + outputUri_ = 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.v1.IoProto + .internal_static_google_cloud_aiplatform_v1_BigQueryDestination_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.IoProto + .internal_static_google_cloud_aiplatform_v1_BigQueryDestination_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.BigQueryDestination.class, + com.google.cloud.aiplatform.v1.BigQueryDestination.Builder.class); + } + + public static final int OUTPUT_URI_FIELD_NUMBER = 1; + private volatile java.lang.Object outputUri_; + /** + * + * + *
+   * Required. BigQuery URI to a project or table, up to 2000 characters long.
+   * When only the project is specified, the Dataset and Table are created.
+   * When the full table reference is specified, the Dataset must exist and table must
+   * not exist.
+   * Accepted forms:
+   * *  BigQuery path. For example:
+   * `bq://projectId` or `bq://projectId.bqDatasetId.bqTableId`.
+   * 
+ * + * string output_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The outputUri. + */ + @java.lang.Override + public java.lang.String getOutputUri() { + java.lang.Object ref = outputUri_; + 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(); + outputUri_ = s; + return s; + } + } + /** + * + * + *
+   * Required. BigQuery URI to a project or table, up to 2000 characters long.
+   * When only the project is specified, the Dataset and Table are created.
+   * When the full table reference is specified, the Dataset must exist and table must
+   * not exist.
+   * Accepted forms:
+   * *  BigQuery path. For example:
+   * `bq://projectId` or `bq://projectId.bqDatasetId.bqTableId`.
+   * 
+ * + * string output_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for outputUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOutputUriBytes() { + java.lang.Object ref = outputUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + outputUri_ = 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 (!getOutputUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, outputUri_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getOutputUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, outputUri_); + } + 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.v1.BigQueryDestination)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.BigQueryDestination other = + (com.google.cloud.aiplatform.v1.BigQueryDestination) obj; + + if (!getOutputUri().equals(other.getOutputUri())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + OUTPUT_URI_FIELD_NUMBER; + hash = (53 * hash) + getOutputUri().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.BigQueryDestination parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.BigQueryDestination 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.v1.BigQueryDestination parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.BigQueryDestination 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.v1.BigQueryDestination parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.BigQueryDestination parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.BigQueryDestination parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.BigQueryDestination 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.v1.BigQueryDestination parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.BigQueryDestination 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.v1.BigQueryDestination parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.BigQueryDestination 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.v1.BigQueryDestination 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 BigQuery location for the output content.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.BigQueryDestination} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.BigQueryDestination) + com.google.cloud.aiplatform.v1.BigQueryDestinationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.IoProto + .internal_static_google_cloud_aiplatform_v1_BigQueryDestination_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.IoProto + .internal_static_google_cloud_aiplatform_v1_BigQueryDestination_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.BigQueryDestination.class, + com.google.cloud.aiplatform.v1.BigQueryDestination.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.BigQueryDestination.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(); + outputUri_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.IoProto + .internal_static_google_cloud_aiplatform_v1_BigQueryDestination_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.BigQueryDestination getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.BigQueryDestination.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.BigQueryDestination build() { + com.google.cloud.aiplatform.v1.BigQueryDestination result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.BigQueryDestination buildPartial() { + com.google.cloud.aiplatform.v1.BigQueryDestination result = + new com.google.cloud.aiplatform.v1.BigQueryDestination(this); + result.outputUri_ = outputUri_; + 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.v1.BigQueryDestination) { + return mergeFrom((com.google.cloud.aiplatform.v1.BigQueryDestination) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.BigQueryDestination other) { + if (other == com.google.cloud.aiplatform.v1.BigQueryDestination.getDefaultInstance()) + return this; + if (!other.getOutputUri().isEmpty()) { + outputUri_ = other.outputUri_; + 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.v1.BigQueryDestination parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.BigQueryDestination) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object outputUri_ = ""; + /** + * + * + *
+     * Required. BigQuery URI to a project or table, up to 2000 characters long.
+     * When only the project is specified, the Dataset and Table are created.
+     * When the full table reference is specified, the Dataset must exist and table must
+     * not exist.
+     * Accepted forms:
+     * *  BigQuery path. For example:
+     * `bq://projectId` or `bq://projectId.bqDatasetId.bqTableId`.
+     * 
+ * + * string output_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The outputUri. + */ + public java.lang.String getOutputUri() { + java.lang.Object ref = outputUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + outputUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. BigQuery URI to a project or table, up to 2000 characters long.
+     * When only the project is specified, the Dataset and Table are created.
+     * When the full table reference is specified, the Dataset must exist and table must
+     * not exist.
+     * Accepted forms:
+     * *  BigQuery path. For example:
+     * `bq://projectId` or `bq://projectId.bqDatasetId.bqTableId`.
+     * 
+ * + * string output_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for outputUri. + */ + public com.google.protobuf.ByteString getOutputUriBytes() { + java.lang.Object ref = outputUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + outputUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. BigQuery URI to a project or table, up to 2000 characters long.
+     * When only the project is specified, the Dataset and Table are created.
+     * When the full table reference is specified, the Dataset must exist and table must
+     * not exist.
+     * Accepted forms:
+     * *  BigQuery path. For example:
+     * `bq://projectId` or `bq://projectId.bqDatasetId.bqTableId`.
+     * 
+ * + * string output_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The outputUri to set. + * @return This builder for chaining. + */ + public Builder setOutputUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + outputUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. BigQuery URI to a project or table, up to 2000 characters long.
+     * When only the project is specified, the Dataset and Table are created.
+     * When the full table reference is specified, the Dataset must exist and table must
+     * not exist.
+     * Accepted forms:
+     * *  BigQuery path. For example:
+     * `bq://projectId` or `bq://projectId.bqDatasetId.bqTableId`.
+     * 
+ * + * string output_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearOutputUri() { + + outputUri_ = getDefaultInstance().getOutputUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. BigQuery URI to a project or table, up to 2000 characters long.
+     * When only the project is specified, the Dataset and Table are created.
+     * When the full table reference is specified, the Dataset must exist and table must
+     * not exist.
+     * Accepted forms:
+     * *  BigQuery path. For example:
+     * `bq://projectId` or `bq://projectId.bqDatasetId.bqTableId`.
+     * 
+ * + * string output_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for outputUri to set. + * @return This builder for chaining. + */ + public Builder setOutputUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + outputUri_ = 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.v1.BigQueryDestination) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.BigQueryDestination) + private static final com.google.cloud.aiplatform.v1.BigQueryDestination DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.BigQueryDestination(); + } + + public static com.google.cloud.aiplatform.v1.BigQueryDestination getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BigQueryDestination parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BigQueryDestination(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.v1.BigQueryDestination getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BigQueryDestinationOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BigQueryDestinationOrBuilder.java new file mode 100644 index 000000000..156c5c142 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BigQueryDestinationOrBuilder.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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/io.proto + +package com.google.cloud.aiplatform.v1; + +public interface BigQueryDestinationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.BigQueryDestination) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. BigQuery URI to a project or table, up to 2000 characters long.
+   * When only the project is specified, the Dataset and Table are created.
+   * When the full table reference is specified, the Dataset must exist and table must
+   * not exist.
+   * Accepted forms:
+   * *  BigQuery path. For example:
+   * `bq://projectId` or `bq://projectId.bqDatasetId.bqTableId`.
+   * 
+ * + * string output_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The outputUri. + */ + java.lang.String getOutputUri(); + /** + * + * + *
+   * Required. BigQuery URI to a project or table, up to 2000 characters long.
+   * When only the project is specified, the Dataset and Table are created.
+   * When the full table reference is specified, the Dataset must exist and table must
+   * not exist.
+   * Accepted forms:
+   * *  BigQuery path. For example:
+   * `bq://projectId` or `bq://projectId.bqDatasetId.bqTableId`.
+   * 
+ * + * string output_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for outputUri. + */ + com.google.protobuf.ByteString getOutputUriBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BigQuerySource.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BigQuerySource.java new file mode 100644 index 000000000..3f3ff398a --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BigQuerySource.java @@ -0,0 +1,648 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/io.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * The BigQuery location for the input content.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.BigQuerySource} + */ +public final class BigQuerySource extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.BigQuerySource) + BigQuerySourceOrBuilder { + private static final long serialVersionUID = 0L; + // Use BigQuerySource.newBuilder() to construct. + private BigQuerySource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BigQuerySource() { + inputUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BigQuerySource(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private BigQuerySource( + 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(); + + inputUri_ = 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.v1.IoProto + .internal_static_google_cloud_aiplatform_v1_BigQuerySource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.IoProto + .internal_static_google_cloud_aiplatform_v1_BigQuerySource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.BigQuerySource.class, + com.google.cloud.aiplatform.v1.BigQuerySource.Builder.class); + } + + public static final int INPUT_URI_FIELD_NUMBER = 1; + private volatile java.lang.Object inputUri_; + /** + * + * + *
+   * Required. BigQuery URI to a table, up to 2000 characters long.
+   * Accepted forms:
+   * *  BigQuery path. For example: `bq://projectId.bqDatasetId.bqTableId`.
+   * 
+ * + * string input_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The inputUri. + */ + @java.lang.Override + public java.lang.String getInputUri() { + java.lang.Object ref = inputUri_; + 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(); + inputUri_ = s; + return s; + } + } + /** + * + * + *
+   * Required. BigQuery URI to a table, up to 2000 characters long.
+   * Accepted forms:
+   * *  BigQuery path. For example: `bq://projectId.bqDatasetId.bqTableId`.
+   * 
+ * + * string input_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for inputUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInputUriBytes() { + java.lang.Object ref = inputUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + inputUri_ = 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 (!getInputUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, inputUri_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getInputUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, inputUri_); + } + 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.v1.BigQuerySource)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.BigQuerySource other = + (com.google.cloud.aiplatform.v1.BigQuerySource) obj; + + if (!getInputUri().equals(other.getInputUri())) 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) + INPUT_URI_FIELD_NUMBER; + hash = (53 * hash) + getInputUri().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.BigQuerySource parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.BigQuerySource 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.v1.BigQuerySource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.BigQuerySource 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.v1.BigQuerySource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.BigQuerySource parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.BigQuerySource parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.BigQuerySource 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.v1.BigQuerySource parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.BigQuerySource 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.v1.BigQuerySource parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.BigQuerySource 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.v1.BigQuerySource 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 BigQuery location for the input content.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.BigQuerySource} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.BigQuerySource) + com.google.cloud.aiplatform.v1.BigQuerySourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.IoProto + .internal_static_google_cloud_aiplatform_v1_BigQuerySource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.IoProto + .internal_static_google_cloud_aiplatform_v1_BigQuerySource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.BigQuerySource.class, + com.google.cloud.aiplatform.v1.BigQuerySource.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.BigQuerySource.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(); + inputUri_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.IoProto + .internal_static_google_cloud_aiplatform_v1_BigQuerySource_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.BigQuerySource getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.BigQuerySource.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.BigQuerySource build() { + com.google.cloud.aiplatform.v1.BigQuerySource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.BigQuerySource buildPartial() { + com.google.cloud.aiplatform.v1.BigQuerySource result = + new com.google.cloud.aiplatform.v1.BigQuerySource(this); + result.inputUri_ = inputUri_; + 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.v1.BigQuerySource) { + return mergeFrom((com.google.cloud.aiplatform.v1.BigQuerySource) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.BigQuerySource other) { + if (other == com.google.cloud.aiplatform.v1.BigQuerySource.getDefaultInstance()) return this; + if (!other.getInputUri().isEmpty()) { + inputUri_ = other.inputUri_; + 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.v1.BigQuerySource parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.aiplatform.v1.BigQuerySource) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object inputUri_ = ""; + /** + * + * + *
+     * Required. BigQuery URI to a table, up to 2000 characters long.
+     * Accepted forms:
+     * *  BigQuery path. For example: `bq://projectId.bqDatasetId.bqTableId`.
+     * 
+ * + * string input_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The inputUri. + */ + public java.lang.String getInputUri() { + java.lang.Object ref = inputUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + inputUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. BigQuery URI to a table, up to 2000 characters long.
+     * Accepted forms:
+     * *  BigQuery path. For example: `bq://projectId.bqDatasetId.bqTableId`.
+     * 
+ * + * string input_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for inputUri. + */ + public com.google.protobuf.ByteString getInputUriBytes() { + java.lang.Object ref = inputUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + inputUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. BigQuery URI to a table, up to 2000 characters long.
+     * Accepted forms:
+     * *  BigQuery path. For example: `bq://projectId.bqDatasetId.bqTableId`.
+     * 
+ * + * string input_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The inputUri to set. + * @return This builder for chaining. + */ + public Builder setInputUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + inputUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. BigQuery URI to a table, up to 2000 characters long.
+     * Accepted forms:
+     * *  BigQuery path. For example: `bq://projectId.bqDatasetId.bqTableId`.
+     * 
+ * + * string input_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearInputUri() { + + inputUri_ = getDefaultInstance().getInputUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. BigQuery URI to a table, up to 2000 characters long.
+     * Accepted forms:
+     * *  BigQuery path. For example: `bq://projectId.bqDatasetId.bqTableId`.
+     * 
+ * + * string input_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for inputUri to set. + * @return This builder for chaining. + */ + public Builder setInputUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + inputUri_ = 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.v1.BigQuerySource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.BigQuerySource) + private static final com.google.cloud.aiplatform.v1.BigQuerySource DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.BigQuerySource(); + } + + public static com.google.cloud.aiplatform.v1.BigQuerySource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BigQuerySource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BigQuerySource(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.v1.BigQuerySource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BigQuerySourceOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BigQuerySourceOrBuilder.java new file mode 100644 index 000000000..eb914ab15 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BigQuerySourceOrBuilder.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/v1/io.proto + +package com.google.cloud.aiplatform.v1; + +public interface BigQuerySourceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.BigQuerySource) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. BigQuery URI to a table, up to 2000 characters long.
+   * Accepted forms:
+   * *  BigQuery path. For example: `bq://projectId.bqDatasetId.bqTableId`.
+   * 
+ * + * string input_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The inputUri. + */ + java.lang.String getInputUri(); + /** + * + * + *
+   * Required. BigQuery URI to a table, up to 2000 characters long.
+   * Accepted forms:
+   * *  BigQuery path. For example: `bq://projectId.bqDatasetId.bqTableId`.
+   * 
+ * + * string input_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for inputUri. + */ + com.google.protobuf.ByteString getInputUriBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CancelBatchPredictionJobRequest.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CancelBatchPredictionJobRequest.java new file mode 100644 index 000000000..633333991 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CancelBatchPredictionJobRequest.java @@ -0,0 +1,672 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/job_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for [JobService.CancelBatchPredictionJob][google.cloud.aiplatform.v1.JobService.CancelBatchPredictionJob].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CancelBatchPredictionJobRequest} + */ +public final class CancelBatchPredictionJobRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.CancelBatchPredictionJobRequest) + CancelBatchPredictionJobRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CancelBatchPredictionJobRequest.newBuilder() to construct. + private CancelBatchPredictionJobRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CancelBatchPredictionJobRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CancelBatchPredictionJobRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CancelBatchPredictionJobRequest( + 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(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_CancelBatchPredictionJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_CancelBatchPredictionJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CancelBatchPredictionJobRequest.class, + com.google.cloud.aiplatform.v1.CancelBatchPredictionJobRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the BatchPredictionJob to cancel.
+   * Format:
+   * `projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the BatchPredictionJob to cancel.
+   * Format:
+   * `projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.CancelBatchPredictionJobRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.CancelBatchPredictionJobRequest other = + (com.google.cloud.aiplatform.v1.CancelBatchPredictionJobRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.CancelBatchPredictionJobRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CancelBatchPredictionJobRequest 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.v1.CancelBatchPredictionJobRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CancelBatchPredictionJobRequest 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.v1.CancelBatchPredictionJobRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CancelBatchPredictionJobRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CancelBatchPredictionJobRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CancelBatchPredictionJobRequest 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.v1.CancelBatchPredictionJobRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CancelBatchPredictionJobRequest 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.v1.CancelBatchPredictionJobRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CancelBatchPredictionJobRequest 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.v1.CancelBatchPredictionJobRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [JobService.CancelBatchPredictionJob][google.cloud.aiplatform.v1.JobService.CancelBatchPredictionJob].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CancelBatchPredictionJobRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.CancelBatchPredictionJobRequest) + com.google.cloud.aiplatform.v1.CancelBatchPredictionJobRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_CancelBatchPredictionJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_CancelBatchPredictionJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CancelBatchPredictionJobRequest.class, + com.google.cloud.aiplatform.v1.CancelBatchPredictionJobRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.CancelBatchPredictionJobRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_CancelBatchPredictionJobRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CancelBatchPredictionJobRequest + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.CancelBatchPredictionJobRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CancelBatchPredictionJobRequest build() { + com.google.cloud.aiplatform.v1.CancelBatchPredictionJobRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CancelBatchPredictionJobRequest buildPartial() { + com.google.cloud.aiplatform.v1.CancelBatchPredictionJobRequest result = + new com.google.cloud.aiplatform.v1.CancelBatchPredictionJobRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.CancelBatchPredictionJobRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.CancelBatchPredictionJobRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.CancelBatchPredictionJobRequest other) { + if (other + == com.google.cloud.aiplatform.v1.CancelBatchPredictionJobRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.aiplatform.v1.CancelBatchPredictionJobRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.CancelBatchPredictionJobRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the BatchPredictionJob to cancel.
+     * Format:
+     * `projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the BatchPredictionJob to cancel.
+     * Format:
+     * `projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the BatchPredictionJob to cancel.
+     * Format:
+     * `projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the BatchPredictionJob to cancel.
+     * Format:
+     * `projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the BatchPredictionJob to cancel.
+     * Format:
+     * `projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.CancelBatchPredictionJobRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.CancelBatchPredictionJobRequest) + private static final com.google.cloud.aiplatform.v1.CancelBatchPredictionJobRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.CancelBatchPredictionJobRequest(); + } + + public static com.google.cloud.aiplatform.v1.CancelBatchPredictionJobRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CancelBatchPredictionJobRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CancelBatchPredictionJobRequest(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.v1.CancelBatchPredictionJobRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CancelBatchPredictionJobRequestOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CancelBatchPredictionJobRequestOrBuilder.java new file mode 100644 index 000000000..9bfe72083 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CancelBatchPredictionJobRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/job_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface CancelBatchPredictionJobRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.CancelBatchPredictionJobRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the BatchPredictionJob to cancel.
+   * Format:
+   * `projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the BatchPredictionJob to cancel.
+   * Format:
+   * `projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CancelCustomJobRequest.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CancelCustomJobRequest.java new file mode 100644 index 000000000..8fd0a2da9 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CancelCustomJobRequest.java @@ -0,0 +1,665 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/job_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for [JobService.CancelCustomJob][google.cloud.aiplatform.v1.JobService.CancelCustomJob].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CancelCustomJobRequest} + */ +public final class CancelCustomJobRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.CancelCustomJobRequest) + CancelCustomJobRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CancelCustomJobRequest.newBuilder() to construct. + private CancelCustomJobRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CancelCustomJobRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CancelCustomJobRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CancelCustomJobRequest( + 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(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_CancelCustomJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_CancelCustomJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CancelCustomJobRequest.class, + com.google.cloud.aiplatform.v1.CancelCustomJobRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the CustomJob to cancel.
+   * Format:
+   * `projects/{project}/locations/{location}/customJobs/{custom_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the CustomJob to cancel.
+   * Format:
+   * `projects/{project}/locations/{location}/customJobs/{custom_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.CancelCustomJobRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.CancelCustomJobRequest other = + (com.google.cloud.aiplatform.v1.CancelCustomJobRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.CancelCustomJobRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CancelCustomJobRequest 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.v1.CancelCustomJobRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CancelCustomJobRequest 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.v1.CancelCustomJobRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CancelCustomJobRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CancelCustomJobRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CancelCustomJobRequest 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.v1.CancelCustomJobRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CancelCustomJobRequest 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.v1.CancelCustomJobRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CancelCustomJobRequest 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.v1.CancelCustomJobRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [JobService.CancelCustomJob][google.cloud.aiplatform.v1.JobService.CancelCustomJob].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CancelCustomJobRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.CancelCustomJobRequest) + com.google.cloud.aiplatform.v1.CancelCustomJobRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_CancelCustomJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_CancelCustomJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CancelCustomJobRequest.class, + com.google.cloud.aiplatform.v1.CancelCustomJobRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.CancelCustomJobRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_CancelCustomJobRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CancelCustomJobRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.CancelCustomJobRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CancelCustomJobRequest build() { + com.google.cloud.aiplatform.v1.CancelCustomJobRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CancelCustomJobRequest buildPartial() { + com.google.cloud.aiplatform.v1.CancelCustomJobRequest result = + new com.google.cloud.aiplatform.v1.CancelCustomJobRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.CancelCustomJobRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.CancelCustomJobRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.CancelCustomJobRequest other) { + if (other == com.google.cloud.aiplatform.v1.CancelCustomJobRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.aiplatform.v1.CancelCustomJobRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.CancelCustomJobRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the CustomJob to cancel.
+     * Format:
+     * `projects/{project}/locations/{location}/customJobs/{custom_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the CustomJob to cancel.
+     * Format:
+     * `projects/{project}/locations/{location}/customJobs/{custom_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the CustomJob to cancel.
+     * Format:
+     * `projects/{project}/locations/{location}/customJobs/{custom_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the CustomJob to cancel.
+     * Format:
+     * `projects/{project}/locations/{location}/customJobs/{custom_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the CustomJob to cancel.
+     * Format:
+     * `projects/{project}/locations/{location}/customJobs/{custom_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.CancelCustomJobRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.CancelCustomJobRequest) + private static final com.google.cloud.aiplatform.v1.CancelCustomJobRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.CancelCustomJobRequest(); + } + + public static com.google.cloud.aiplatform.v1.CancelCustomJobRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CancelCustomJobRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CancelCustomJobRequest(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.v1.CancelCustomJobRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CancelCustomJobRequestOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CancelCustomJobRequestOrBuilder.java new file mode 100644 index 000000000..41ed6425a --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CancelCustomJobRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/job_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface CancelCustomJobRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.CancelCustomJobRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the CustomJob to cancel.
+   * Format:
+   * `projects/{project}/locations/{location}/customJobs/{custom_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the CustomJob to cancel.
+   * Format:
+   * `projects/{project}/locations/{location}/customJobs/{custom_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CancelDataLabelingJobRequest.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CancelDataLabelingJobRequest.java new file mode 100644 index 000000000..74ddc4270 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CancelDataLabelingJobRequest.java @@ -0,0 +1,665 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/job_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for [DataLabelingJobService.CancelDataLabelingJob][].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CancelDataLabelingJobRequest} + */ +public final class CancelDataLabelingJobRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.CancelDataLabelingJobRequest) + CancelDataLabelingJobRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CancelDataLabelingJobRequest.newBuilder() to construct. + private CancelDataLabelingJobRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CancelDataLabelingJobRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CancelDataLabelingJobRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CancelDataLabelingJobRequest( + 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(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_CancelDataLabelingJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_CancelDataLabelingJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CancelDataLabelingJobRequest.class, + com.google.cloud.aiplatform.v1.CancelDataLabelingJobRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the DataLabelingJob.
+   * Format:
+   * `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the DataLabelingJob.
+   * Format:
+   * `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.CancelDataLabelingJobRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.CancelDataLabelingJobRequest other = + (com.google.cloud.aiplatform.v1.CancelDataLabelingJobRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.CancelDataLabelingJobRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CancelDataLabelingJobRequest 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.v1.CancelDataLabelingJobRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CancelDataLabelingJobRequest 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.v1.CancelDataLabelingJobRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CancelDataLabelingJobRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CancelDataLabelingJobRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CancelDataLabelingJobRequest 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.v1.CancelDataLabelingJobRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CancelDataLabelingJobRequest 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.v1.CancelDataLabelingJobRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CancelDataLabelingJobRequest 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.v1.CancelDataLabelingJobRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [DataLabelingJobService.CancelDataLabelingJob][].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CancelDataLabelingJobRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.CancelDataLabelingJobRequest) + com.google.cloud.aiplatform.v1.CancelDataLabelingJobRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_CancelDataLabelingJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_CancelDataLabelingJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CancelDataLabelingJobRequest.class, + com.google.cloud.aiplatform.v1.CancelDataLabelingJobRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.CancelDataLabelingJobRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_CancelDataLabelingJobRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CancelDataLabelingJobRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.CancelDataLabelingJobRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CancelDataLabelingJobRequest build() { + com.google.cloud.aiplatform.v1.CancelDataLabelingJobRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CancelDataLabelingJobRequest buildPartial() { + com.google.cloud.aiplatform.v1.CancelDataLabelingJobRequest result = + new com.google.cloud.aiplatform.v1.CancelDataLabelingJobRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.CancelDataLabelingJobRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.CancelDataLabelingJobRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.CancelDataLabelingJobRequest other) { + if (other == com.google.cloud.aiplatform.v1.CancelDataLabelingJobRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.aiplatform.v1.CancelDataLabelingJobRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.CancelDataLabelingJobRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the DataLabelingJob.
+     * Format:
+     * `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the DataLabelingJob.
+     * Format:
+     * `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the DataLabelingJob.
+     * Format:
+     * `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the DataLabelingJob.
+     * Format:
+     * `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the DataLabelingJob.
+     * Format:
+     * `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.CancelDataLabelingJobRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.CancelDataLabelingJobRequest) + private static final com.google.cloud.aiplatform.v1.CancelDataLabelingJobRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.CancelDataLabelingJobRequest(); + } + + public static com.google.cloud.aiplatform.v1.CancelDataLabelingJobRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CancelDataLabelingJobRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CancelDataLabelingJobRequest(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.v1.CancelDataLabelingJobRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CancelDataLabelingJobRequestOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CancelDataLabelingJobRequestOrBuilder.java new file mode 100644 index 000000000..237b71b97 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CancelDataLabelingJobRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/job_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface CancelDataLabelingJobRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.CancelDataLabelingJobRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the DataLabelingJob.
+   * Format:
+   * `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the DataLabelingJob.
+   * Format:
+   * `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CancelHyperparameterTuningJobRequest.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CancelHyperparameterTuningJobRequest.java new file mode 100644 index 000000000..1f78f0ca0 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CancelHyperparameterTuningJobRequest.java @@ -0,0 +1,678 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/job_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for [JobService.CancelHyperparameterTuningJob][google.cloud.aiplatform.v1.JobService.CancelHyperparameterTuningJob].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CancelHyperparameterTuningJobRequest} + */ +public final class CancelHyperparameterTuningJobRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.CancelHyperparameterTuningJobRequest) + CancelHyperparameterTuningJobRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CancelHyperparameterTuningJobRequest.newBuilder() to construct. + private CancelHyperparameterTuningJobRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CancelHyperparameterTuningJobRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CancelHyperparameterTuningJobRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CancelHyperparameterTuningJobRequest( + 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(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_CancelHyperparameterTuningJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_CancelHyperparameterTuningJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CancelHyperparameterTuningJobRequest.class, + com.google.cloud.aiplatform.v1.CancelHyperparameterTuningJobRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the HyperparameterTuningJob to cancel.
+   * Format:
+   * `projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the HyperparameterTuningJob to cancel.
+   * Format:
+   * `projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.CancelHyperparameterTuningJobRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.CancelHyperparameterTuningJobRequest other = + (com.google.cloud.aiplatform.v1.CancelHyperparameterTuningJobRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.CancelHyperparameterTuningJobRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CancelHyperparameterTuningJobRequest 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.v1.CancelHyperparameterTuningJobRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CancelHyperparameterTuningJobRequest 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.v1.CancelHyperparameterTuningJobRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CancelHyperparameterTuningJobRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CancelHyperparameterTuningJobRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CancelHyperparameterTuningJobRequest 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.v1.CancelHyperparameterTuningJobRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CancelHyperparameterTuningJobRequest + 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.v1.CancelHyperparameterTuningJobRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CancelHyperparameterTuningJobRequest 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.v1.CancelHyperparameterTuningJobRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [JobService.CancelHyperparameterTuningJob][google.cloud.aiplatform.v1.JobService.CancelHyperparameterTuningJob].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CancelHyperparameterTuningJobRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.CancelHyperparameterTuningJobRequest) + com.google.cloud.aiplatform.v1.CancelHyperparameterTuningJobRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_CancelHyperparameterTuningJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_CancelHyperparameterTuningJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CancelHyperparameterTuningJobRequest.class, + com.google.cloud.aiplatform.v1.CancelHyperparameterTuningJobRequest.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.CancelHyperparameterTuningJobRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_CancelHyperparameterTuningJobRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CancelHyperparameterTuningJobRequest + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.CancelHyperparameterTuningJobRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CancelHyperparameterTuningJobRequest build() { + com.google.cloud.aiplatform.v1.CancelHyperparameterTuningJobRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CancelHyperparameterTuningJobRequest buildPartial() { + com.google.cloud.aiplatform.v1.CancelHyperparameterTuningJobRequest result = + new com.google.cloud.aiplatform.v1.CancelHyperparameterTuningJobRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.CancelHyperparameterTuningJobRequest) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.CancelHyperparameterTuningJobRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.CancelHyperparameterTuningJobRequest other) { + if (other + == com.google.cloud.aiplatform.v1.CancelHyperparameterTuningJobRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.aiplatform.v1.CancelHyperparameterTuningJobRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.CancelHyperparameterTuningJobRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the HyperparameterTuningJob to cancel.
+     * Format:
+     * `projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the HyperparameterTuningJob to cancel.
+     * Format:
+     * `projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the HyperparameterTuningJob to cancel.
+     * Format:
+     * `projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the HyperparameterTuningJob to cancel.
+     * Format:
+     * `projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the HyperparameterTuningJob to cancel.
+     * Format:
+     * `projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.CancelHyperparameterTuningJobRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.CancelHyperparameterTuningJobRequest) + private static final com.google.cloud.aiplatform.v1.CancelHyperparameterTuningJobRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.CancelHyperparameterTuningJobRequest(); + } + + public static com.google.cloud.aiplatform.v1.CancelHyperparameterTuningJobRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CancelHyperparameterTuningJobRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CancelHyperparameterTuningJobRequest(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.v1.CancelHyperparameterTuningJobRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CancelHyperparameterTuningJobRequestOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CancelHyperparameterTuningJobRequestOrBuilder.java new file mode 100644 index 000000000..958eb235c --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CancelHyperparameterTuningJobRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/job_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface CancelHyperparameterTuningJobRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.CancelHyperparameterTuningJobRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the HyperparameterTuningJob to cancel.
+   * Format:
+   * `projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the HyperparameterTuningJob to cancel.
+   * Format:
+   * `projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CancelTrainingPipelineRequest.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CancelTrainingPipelineRequest.java new file mode 100644 index 000000000..1306a94ab --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CancelTrainingPipelineRequest.java @@ -0,0 +1,668 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/pipeline_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for [PipelineService.CancelTrainingPipeline][google.cloud.aiplatform.v1.PipelineService.CancelTrainingPipeline].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CancelTrainingPipelineRequest} + */ +public final class CancelTrainingPipelineRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.CancelTrainingPipelineRequest) + CancelTrainingPipelineRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CancelTrainingPipelineRequest.newBuilder() to construct. + private CancelTrainingPipelineRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CancelTrainingPipelineRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CancelTrainingPipelineRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CancelTrainingPipelineRequest( + 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(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.PipelineServiceProto + .internal_static_google_cloud_aiplatform_v1_CancelTrainingPipelineRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.PipelineServiceProto + .internal_static_google_cloud_aiplatform_v1_CancelTrainingPipelineRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CancelTrainingPipelineRequest.class, + com.google.cloud.aiplatform.v1.CancelTrainingPipelineRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the TrainingPipeline to cancel.
+   * Format:
+   * `projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the TrainingPipeline to cancel.
+   * Format:
+   * `projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.CancelTrainingPipelineRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.CancelTrainingPipelineRequest other = + (com.google.cloud.aiplatform.v1.CancelTrainingPipelineRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.CancelTrainingPipelineRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CancelTrainingPipelineRequest 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.v1.CancelTrainingPipelineRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CancelTrainingPipelineRequest 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.v1.CancelTrainingPipelineRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CancelTrainingPipelineRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CancelTrainingPipelineRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CancelTrainingPipelineRequest 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.v1.CancelTrainingPipelineRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CancelTrainingPipelineRequest 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.v1.CancelTrainingPipelineRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CancelTrainingPipelineRequest 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.v1.CancelTrainingPipelineRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [PipelineService.CancelTrainingPipeline][google.cloud.aiplatform.v1.PipelineService.CancelTrainingPipeline].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CancelTrainingPipelineRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.CancelTrainingPipelineRequest) + com.google.cloud.aiplatform.v1.CancelTrainingPipelineRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.PipelineServiceProto + .internal_static_google_cloud_aiplatform_v1_CancelTrainingPipelineRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.PipelineServiceProto + .internal_static_google_cloud_aiplatform_v1_CancelTrainingPipelineRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CancelTrainingPipelineRequest.class, + com.google.cloud.aiplatform.v1.CancelTrainingPipelineRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.CancelTrainingPipelineRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.PipelineServiceProto + .internal_static_google_cloud_aiplatform_v1_CancelTrainingPipelineRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CancelTrainingPipelineRequest + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.CancelTrainingPipelineRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CancelTrainingPipelineRequest build() { + com.google.cloud.aiplatform.v1.CancelTrainingPipelineRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CancelTrainingPipelineRequest buildPartial() { + com.google.cloud.aiplatform.v1.CancelTrainingPipelineRequest result = + new com.google.cloud.aiplatform.v1.CancelTrainingPipelineRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.CancelTrainingPipelineRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.CancelTrainingPipelineRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.CancelTrainingPipelineRequest other) { + if (other + == com.google.cloud.aiplatform.v1.CancelTrainingPipelineRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.aiplatform.v1.CancelTrainingPipelineRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.CancelTrainingPipelineRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the TrainingPipeline to cancel.
+     * Format:
+     * `projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the TrainingPipeline to cancel.
+     * Format:
+     * `projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the TrainingPipeline to cancel.
+     * Format:
+     * `projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the TrainingPipeline to cancel.
+     * Format:
+     * `projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the TrainingPipeline to cancel.
+     * Format:
+     * `projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.CancelTrainingPipelineRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.CancelTrainingPipelineRequest) + private static final com.google.cloud.aiplatform.v1.CancelTrainingPipelineRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.CancelTrainingPipelineRequest(); + } + + public static com.google.cloud.aiplatform.v1.CancelTrainingPipelineRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CancelTrainingPipelineRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CancelTrainingPipelineRequest(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.v1.CancelTrainingPipelineRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CancelTrainingPipelineRequestOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CancelTrainingPipelineRequestOrBuilder.java new file mode 100644 index 000000000..be594483c --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CancelTrainingPipelineRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/pipeline_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface CancelTrainingPipelineRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.CancelTrainingPipelineRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the TrainingPipeline to cancel.
+   * Format:
+   * `projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the TrainingPipeline to cancel.
+   * Format:
+   * `projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CompletionStats.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CompletionStats.java new file mode 100644 index 000000000..482415e6a --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CompletionStats.java @@ -0,0 +1,742 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/completion_stats.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Success and error statistics of processing multiple entities
+ * (for example, DataItems or structured data rows) in batch.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CompletionStats} + */ +public final class CompletionStats extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.CompletionStats) + CompletionStatsOrBuilder { + private static final long serialVersionUID = 0L; + // Use CompletionStats.newBuilder() to construct. + private CompletionStats(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CompletionStats() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CompletionStats(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CompletionStats( + 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: + { + successfulCount_ = input.readInt64(); + break; + } + case 16: + { + failedCount_ = input.readInt64(); + break; + } + case 24: + { + incompleteCount_ = 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.v1.CompletionStatsProto + .internal_static_google_cloud_aiplatform_v1_CompletionStats_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.CompletionStatsProto + .internal_static_google_cloud_aiplatform_v1_CompletionStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CompletionStats.class, + com.google.cloud.aiplatform.v1.CompletionStats.Builder.class); + } + + public static final int SUCCESSFUL_COUNT_FIELD_NUMBER = 1; + private long successfulCount_; + /** + * + * + *
+   * Output only. The number of entities that had been processed successfully.
+   * 
+ * + * int64 successful_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The successfulCount. + */ + @java.lang.Override + public long getSuccessfulCount() { + return successfulCount_; + } + + public static final int FAILED_COUNT_FIELD_NUMBER = 2; + private long failedCount_; + /** + * + * + *
+   * Output only. The number of entities for which any error was encountered.
+   * 
+ * + * int64 failed_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The failedCount. + */ + @java.lang.Override + public long getFailedCount() { + return failedCount_; + } + + public static final int INCOMPLETE_COUNT_FIELD_NUMBER = 3; + private long incompleteCount_; + /** + * + * + *
+   * Output only. In cases when enough errors are encountered a job, pipeline, or operation
+   * may be failed as a whole. Below is the number of entities for which the
+   * processing had not been finished (either in successful or failed state).
+   * Set to -1 if the number is unknown (for example, the operation failed
+   * before the total entity number could be collected).
+   * 
+ * + * int64 incomplete_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The incompleteCount. + */ + @java.lang.Override + public long getIncompleteCount() { + return incompleteCount_; + } + + 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 (successfulCount_ != 0L) { + output.writeInt64(1, successfulCount_); + } + if (failedCount_ != 0L) { + output.writeInt64(2, failedCount_); + } + if (incompleteCount_ != 0L) { + output.writeInt64(3, incompleteCount_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (successfulCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, successfulCount_); + } + if (failedCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, failedCount_); + } + if (incompleteCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, incompleteCount_); + } + 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.v1.CompletionStats)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.CompletionStats other = + (com.google.cloud.aiplatform.v1.CompletionStats) obj; + + if (getSuccessfulCount() != other.getSuccessfulCount()) return false; + if (getFailedCount() != other.getFailedCount()) return false; + if (getIncompleteCount() != other.getIncompleteCount()) 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) + SUCCESSFUL_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getSuccessfulCount()); + hash = (37 * hash) + FAILED_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getFailedCount()); + hash = (37 * hash) + INCOMPLETE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getIncompleteCount()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.CompletionStats parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CompletionStats 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.v1.CompletionStats parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CompletionStats 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.v1.CompletionStats parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CompletionStats parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CompletionStats parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CompletionStats 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.v1.CompletionStats parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CompletionStats 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.v1.CompletionStats parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CompletionStats 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.v1.CompletionStats 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; + } + /** + * + * + *
+   * Success and error statistics of processing multiple entities
+   * (for example, DataItems or structured data rows) in batch.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CompletionStats} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.CompletionStats) + com.google.cloud.aiplatform.v1.CompletionStatsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.CompletionStatsProto + .internal_static_google_cloud_aiplatform_v1_CompletionStats_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.CompletionStatsProto + .internal_static_google_cloud_aiplatform_v1_CompletionStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CompletionStats.class, + com.google.cloud.aiplatform.v1.CompletionStats.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.CompletionStats.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(); + successfulCount_ = 0L; + + failedCount_ = 0L; + + incompleteCount_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.CompletionStatsProto + .internal_static_google_cloud_aiplatform_v1_CompletionStats_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CompletionStats getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.CompletionStats.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CompletionStats build() { + com.google.cloud.aiplatform.v1.CompletionStats result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CompletionStats buildPartial() { + com.google.cloud.aiplatform.v1.CompletionStats result = + new com.google.cloud.aiplatform.v1.CompletionStats(this); + result.successfulCount_ = successfulCount_; + result.failedCount_ = failedCount_; + result.incompleteCount_ = incompleteCount_; + 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.v1.CompletionStats) { + return mergeFrom((com.google.cloud.aiplatform.v1.CompletionStats) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.CompletionStats other) { + if (other == com.google.cloud.aiplatform.v1.CompletionStats.getDefaultInstance()) return this; + if (other.getSuccessfulCount() != 0L) { + setSuccessfulCount(other.getSuccessfulCount()); + } + if (other.getFailedCount() != 0L) { + setFailedCount(other.getFailedCount()); + } + if (other.getIncompleteCount() != 0L) { + setIncompleteCount(other.getIncompleteCount()); + } + 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.v1.CompletionStats parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.aiplatform.v1.CompletionStats) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private long successfulCount_; + /** + * + * + *
+     * Output only. The number of entities that had been processed successfully.
+     * 
+ * + * int64 successful_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The successfulCount. + */ + @java.lang.Override + public long getSuccessfulCount() { + return successfulCount_; + } + /** + * + * + *
+     * Output only. The number of entities that had been processed successfully.
+     * 
+ * + * int64 successful_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The successfulCount to set. + * @return This builder for chaining. + */ + public Builder setSuccessfulCount(long value) { + + successfulCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The number of entities that had been processed successfully.
+     * 
+ * + * int64 successful_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearSuccessfulCount() { + + successfulCount_ = 0L; + onChanged(); + return this; + } + + private long failedCount_; + /** + * + * + *
+     * Output only. The number of entities for which any error was encountered.
+     * 
+ * + * int64 failed_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The failedCount. + */ + @java.lang.Override + public long getFailedCount() { + return failedCount_; + } + /** + * + * + *
+     * Output only. The number of entities for which any error was encountered.
+     * 
+ * + * int64 failed_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The failedCount to set. + * @return This builder for chaining. + */ + public Builder setFailedCount(long value) { + + failedCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The number of entities for which any error was encountered.
+     * 
+ * + * int64 failed_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearFailedCount() { + + failedCount_ = 0L; + onChanged(); + return this; + } + + private long incompleteCount_; + /** + * + * + *
+     * Output only. In cases when enough errors are encountered a job, pipeline, or operation
+     * may be failed as a whole. Below is the number of entities for which the
+     * processing had not been finished (either in successful or failed state).
+     * Set to -1 if the number is unknown (for example, the operation failed
+     * before the total entity number could be collected).
+     * 
+ * + * int64 incomplete_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The incompleteCount. + */ + @java.lang.Override + public long getIncompleteCount() { + return incompleteCount_; + } + /** + * + * + *
+     * Output only. In cases when enough errors are encountered a job, pipeline, or operation
+     * may be failed as a whole. Below is the number of entities for which the
+     * processing had not been finished (either in successful or failed state).
+     * Set to -1 if the number is unknown (for example, the operation failed
+     * before the total entity number could be collected).
+     * 
+ * + * int64 incomplete_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The incompleteCount to set. + * @return This builder for chaining. + */ + public Builder setIncompleteCount(long value) { + + incompleteCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. In cases when enough errors are encountered a job, pipeline, or operation
+     * may be failed as a whole. Below is the number of entities for which the
+     * processing had not been finished (either in successful or failed state).
+     * Set to -1 if the number is unknown (for example, the operation failed
+     * before the total entity number could be collected).
+     * 
+ * + * int64 incomplete_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearIncompleteCount() { + + incompleteCount_ = 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.v1.CompletionStats) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.CompletionStats) + private static final com.google.cloud.aiplatform.v1.CompletionStats DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.CompletionStats(); + } + + public static com.google.cloud.aiplatform.v1.CompletionStats getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CompletionStats parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CompletionStats(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.v1.CompletionStats getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CompletionStatsOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CompletionStatsOrBuilder.java new file mode 100644 index 000000000..d6a941614 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CompletionStatsOrBuilder.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/v1/completion_stats.proto + +package com.google.cloud.aiplatform.v1; + +public interface CompletionStatsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.CompletionStats) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The number of entities that had been processed successfully.
+   * 
+ * + * int64 successful_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The successfulCount. + */ + long getSuccessfulCount(); + + /** + * + * + *
+   * Output only. The number of entities for which any error was encountered.
+   * 
+ * + * int64 failed_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The failedCount. + */ + long getFailedCount(); + + /** + * + * + *
+   * Output only. In cases when enough errors are encountered a job, pipeline, or operation
+   * may be failed as a whole. Below is the number of entities for which the
+   * processing had not been finished (either in successful or failed state).
+   * Set to -1 if the number is unknown (for example, the operation failed
+   * before the total entity number could be collected).
+   * 
+ * + * int64 incomplete_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The incompleteCount. + */ + long getIncompleteCount(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CompletionStatsProto.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CompletionStatsProto.java new file mode 100644 index 000000000..45279acf7 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CompletionStatsProto.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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/completion_stats.proto + +package com.google.cloud.aiplatform.v1; + +public final class CompletionStatsProto { + private CompletionStatsProto() {} + + 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_v1_CompletionStats_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_CompletionStats_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n1google/cloud/aiplatform/v1/completion_" + + "stats.proto\022\032google.cloud.aiplatform.v1\032" + + "\037google/api/field_behavior.proto\032\027google" + + "/rpc/status.proto\032\034google/api/annotation" + + "s.proto\"j\n\017CompletionStats\022\035\n\020successful" + + "_count\030\001 \001(\003B\003\340A\003\022\031\n\014failed_count\030\002 \001(\003B" + + "\003\340A\003\022\035\n\020incomplete_count\030\003 \001(\003B\003\340A\003B~\n\036c" + + "om.google.cloud.aiplatform.v1B\024Completio" + + "nStatsProtoP\001ZDgoogle.golang.org/genprot" + + "o/googleapis/cloud/aiplatform/v1;aiplatf" + + "ormb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.rpc.StatusProto.getDescriptor(), + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1_CompletionStats_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_CompletionStats_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_CompletionStats_descriptor, + new java.lang.String[] { + "SuccessfulCount", "FailedCount", "IncompleteCount", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.rpc.StatusProto.getDescriptor(); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ContainerRegistryDestination.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ContainerRegistryDestination.java new file mode 100644 index 000000000..f8abda767 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ContainerRegistryDestination.java @@ -0,0 +1,686 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/io.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * The Container Registry location for the container image.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ContainerRegistryDestination} + */ +public final class ContainerRegistryDestination extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ContainerRegistryDestination) + ContainerRegistryDestinationOrBuilder { + private static final long serialVersionUID = 0L; + // Use ContainerRegistryDestination.newBuilder() to construct. + private ContainerRegistryDestination(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ContainerRegistryDestination() { + outputUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ContainerRegistryDestination(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ContainerRegistryDestination( + 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(); + + outputUri_ = 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.v1.IoProto + .internal_static_google_cloud_aiplatform_v1_ContainerRegistryDestination_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.IoProto + .internal_static_google_cloud_aiplatform_v1_ContainerRegistryDestination_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ContainerRegistryDestination.class, + com.google.cloud.aiplatform.v1.ContainerRegistryDestination.Builder.class); + } + + public static final int OUTPUT_URI_FIELD_NUMBER = 1; + private volatile java.lang.Object outputUri_; + /** + * + * + *
+   * Required. Container Registry URI of a container image.
+   * Only Google Container Registry and Artifact Registry are supported now.
+   * Accepted forms:
+   * *  Google Container Registry path. For example:
+   *    `gcr.io/projectId/imageName:tag`.
+   * *  Artifact Registry path. For example:
+   *    `us-central1-docker.pkg.dev/projectId/repoName/imageName:tag`.
+   * If a tag is not specified, "latest" will be used as the default tag.
+   * 
+ * + * string output_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The outputUri. + */ + @java.lang.Override + public java.lang.String getOutputUri() { + java.lang.Object ref = outputUri_; + 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(); + outputUri_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Container Registry URI of a container image.
+   * Only Google Container Registry and Artifact Registry are supported now.
+   * Accepted forms:
+   * *  Google Container Registry path. For example:
+   *    `gcr.io/projectId/imageName:tag`.
+   * *  Artifact Registry path. For example:
+   *    `us-central1-docker.pkg.dev/projectId/repoName/imageName:tag`.
+   * If a tag is not specified, "latest" will be used as the default tag.
+   * 
+ * + * string output_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for outputUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOutputUriBytes() { + java.lang.Object ref = outputUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + outputUri_ = 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 (!getOutputUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, outputUri_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getOutputUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, outputUri_); + } + 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.v1.ContainerRegistryDestination)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ContainerRegistryDestination other = + (com.google.cloud.aiplatform.v1.ContainerRegistryDestination) obj; + + if (!getOutputUri().equals(other.getOutputUri())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + OUTPUT_URI_FIELD_NUMBER; + hash = (53 * hash) + getOutputUri().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.ContainerRegistryDestination parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ContainerRegistryDestination 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.v1.ContainerRegistryDestination parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ContainerRegistryDestination 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.v1.ContainerRegistryDestination parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ContainerRegistryDestination parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ContainerRegistryDestination parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ContainerRegistryDestination 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.v1.ContainerRegistryDestination parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ContainerRegistryDestination 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.v1.ContainerRegistryDestination parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ContainerRegistryDestination 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.v1.ContainerRegistryDestination 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 Container Registry location for the container image.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ContainerRegistryDestination} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ContainerRegistryDestination) + com.google.cloud.aiplatform.v1.ContainerRegistryDestinationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.IoProto + .internal_static_google_cloud_aiplatform_v1_ContainerRegistryDestination_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.IoProto + .internal_static_google_cloud_aiplatform_v1_ContainerRegistryDestination_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ContainerRegistryDestination.class, + com.google.cloud.aiplatform.v1.ContainerRegistryDestination.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ContainerRegistryDestination.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(); + outputUri_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.IoProto + .internal_static_google_cloud_aiplatform_v1_ContainerRegistryDestination_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ContainerRegistryDestination getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ContainerRegistryDestination.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ContainerRegistryDestination build() { + com.google.cloud.aiplatform.v1.ContainerRegistryDestination result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ContainerRegistryDestination buildPartial() { + com.google.cloud.aiplatform.v1.ContainerRegistryDestination result = + new com.google.cloud.aiplatform.v1.ContainerRegistryDestination(this); + result.outputUri_ = outputUri_; + 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.v1.ContainerRegistryDestination) { + return mergeFrom((com.google.cloud.aiplatform.v1.ContainerRegistryDestination) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.ContainerRegistryDestination other) { + if (other == com.google.cloud.aiplatform.v1.ContainerRegistryDestination.getDefaultInstance()) + return this; + if (!other.getOutputUri().isEmpty()) { + outputUri_ = other.outputUri_; + 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.v1.ContainerRegistryDestination parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.ContainerRegistryDestination) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object outputUri_ = ""; + /** + * + * + *
+     * Required. Container Registry URI of a container image.
+     * Only Google Container Registry and Artifact Registry are supported now.
+     * Accepted forms:
+     * *  Google Container Registry path. For example:
+     *    `gcr.io/projectId/imageName:tag`.
+     * *  Artifact Registry path. For example:
+     *    `us-central1-docker.pkg.dev/projectId/repoName/imageName:tag`.
+     * If a tag is not specified, "latest" will be used as the default tag.
+     * 
+ * + * string output_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The outputUri. + */ + public java.lang.String getOutputUri() { + java.lang.Object ref = outputUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + outputUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Container Registry URI of a container image.
+     * Only Google Container Registry and Artifact Registry are supported now.
+     * Accepted forms:
+     * *  Google Container Registry path. For example:
+     *    `gcr.io/projectId/imageName:tag`.
+     * *  Artifact Registry path. For example:
+     *    `us-central1-docker.pkg.dev/projectId/repoName/imageName:tag`.
+     * If a tag is not specified, "latest" will be used as the default tag.
+     * 
+ * + * string output_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for outputUri. + */ + public com.google.protobuf.ByteString getOutputUriBytes() { + java.lang.Object ref = outputUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + outputUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Container Registry URI of a container image.
+     * Only Google Container Registry and Artifact Registry are supported now.
+     * Accepted forms:
+     * *  Google Container Registry path. For example:
+     *    `gcr.io/projectId/imageName:tag`.
+     * *  Artifact Registry path. For example:
+     *    `us-central1-docker.pkg.dev/projectId/repoName/imageName:tag`.
+     * If a tag is not specified, "latest" will be used as the default tag.
+     * 
+ * + * string output_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The outputUri to set. + * @return This builder for chaining. + */ + public Builder setOutputUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + outputUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Container Registry URI of a container image.
+     * Only Google Container Registry and Artifact Registry are supported now.
+     * Accepted forms:
+     * *  Google Container Registry path. For example:
+     *    `gcr.io/projectId/imageName:tag`.
+     * *  Artifact Registry path. For example:
+     *    `us-central1-docker.pkg.dev/projectId/repoName/imageName:tag`.
+     * If a tag is not specified, "latest" will be used as the default tag.
+     * 
+ * + * string output_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearOutputUri() { + + outputUri_ = getDefaultInstance().getOutputUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Container Registry URI of a container image.
+     * Only Google Container Registry and Artifact Registry are supported now.
+     * Accepted forms:
+     * *  Google Container Registry path. For example:
+     *    `gcr.io/projectId/imageName:tag`.
+     * *  Artifact Registry path. For example:
+     *    `us-central1-docker.pkg.dev/projectId/repoName/imageName:tag`.
+     * If a tag is not specified, "latest" will be used as the default tag.
+     * 
+ * + * string output_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for outputUri to set. + * @return This builder for chaining. + */ + public Builder setOutputUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + outputUri_ = 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.v1.ContainerRegistryDestination) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ContainerRegistryDestination) + private static final com.google.cloud.aiplatform.v1.ContainerRegistryDestination DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ContainerRegistryDestination(); + } + + public static com.google.cloud.aiplatform.v1.ContainerRegistryDestination getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ContainerRegistryDestination parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ContainerRegistryDestination(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.v1.ContainerRegistryDestination getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ContainerRegistryDestinationOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ContainerRegistryDestinationOrBuilder.java new file mode 100644 index 000000000..1e2e31ded --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ContainerRegistryDestinationOrBuilder.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/v1/io.proto + +package com.google.cloud.aiplatform.v1; + +public interface ContainerRegistryDestinationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ContainerRegistryDestination) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Container Registry URI of a container image.
+   * Only Google Container Registry and Artifact Registry are supported now.
+   * Accepted forms:
+   * *  Google Container Registry path. For example:
+   *    `gcr.io/projectId/imageName:tag`.
+   * *  Artifact Registry path. For example:
+   *    `us-central1-docker.pkg.dev/projectId/repoName/imageName:tag`.
+   * If a tag is not specified, "latest" will be used as the default tag.
+   * 
+ * + * string output_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The outputUri. + */ + java.lang.String getOutputUri(); + /** + * + * + *
+   * Required. Container Registry URI of a container image.
+   * Only Google Container Registry and Artifact Registry are supported now.
+   * Accepted forms:
+   * *  Google Container Registry path. For example:
+   *    `gcr.io/projectId/imageName:tag`.
+   * *  Artifact Registry path. For example:
+   *    `us-central1-docker.pkg.dev/projectId/repoName/imageName:tag`.
+   * If a tag is not specified, "latest" will be used as the default tag.
+   * 
+ * + * string output_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for outputUri. + */ + com.google.protobuf.ByteString getOutputUriBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ContainerSpec.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ContainerSpec.java new file mode 100644 index 000000000..205efe7b5 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ContainerSpec.java @@ -0,0 +1,1697 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/custom_job.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * The spec of a Container.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ContainerSpec} + */ +public final class ContainerSpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ContainerSpec) + ContainerSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use ContainerSpec.newBuilder() to construct. + private ContainerSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ContainerSpec() { + imageUri_ = ""; + command_ = com.google.protobuf.LazyStringArrayList.EMPTY; + args_ = com.google.protobuf.LazyStringArrayList.EMPTY; + env_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ContainerSpec(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ContainerSpec( + 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(); + + imageUri_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + command_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + command_.add(s); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + args_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + args_.add(s); + break; + } + case 34: + { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + env_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + env_.add( + input.readMessage( + com.google.cloud.aiplatform.v1.EnvVar.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)) { + command_ = command_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + args_ = args_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + env_ = java.util.Collections.unmodifiableList(env_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.CustomJobProto + .internal_static_google_cloud_aiplatform_v1_ContainerSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.CustomJobProto + .internal_static_google_cloud_aiplatform_v1_ContainerSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ContainerSpec.class, + com.google.cloud.aiplatform.v1.ContainerSpec.Builder.class); + } + + public static final int IMAGE_URI_FIELD_NUMBER = 1; + private volatile java.lang.Object imageUri_; + /** + * + * + *
+   * Required. The URI of a container image in the Container Registry that is to be run on
+   * each worker replica.
+   * 
+ * + * string image_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The imageUri. + */ + @java.lang.Override + public java.lang.String getImageUri() { + java.lang.Object ref = imageUri_; + 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(); + imageUri_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The URI of a container image in the Container Registry that is to be run on
+   * each worker replica.
+   * 
+ * + * string image_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for imageUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getImageUriBytes() { + java.lang.Object ref = imageUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + imageUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int COMMAND_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList command_; + /** + * + * + *
+   * The command to be invoked when the container is started.
+   * It overrides the entrypoint instruction in Dockerfile when provided.
+   * 
+ * + * repeated string command = 2; + * + * @return A list containing the command. + */ + public com.google.protobuf.ProtocolStringList getCommandList() { + return command_; + } + /** + * + * + *
+   * The command to be invoked when the container is started.
+   * It overrides the entrypoint instruction in Dockerfile when provided.
+   * 
+ * + * repeated string command = 2; + * + * @return The count of command. + */ + public int getCommandCount() { + return command_.size(); + } + /** + * + * + *
+   * The command to be invoked when the container is started.
+   * It overrides the entrypoint instruction in Dockerfile when provided.
+   * 
+ * + * repeated string command = 2; + * + * @param index The index of the element to return. + * @return The command at the given index. + */ + public java.lang.String getCommand(int index) { + return command_.get(index); + } + /** + * + * + *
+   * The command to be invoked when the container is started.
+   * It overrides the entrypoint instruction in Dockerfile when provided.
+   * 
+ * + * repeated string command = 2; + * + * @param index The index of the value to return. + * @return The bytes of the command at the given index. + */ + public com.google.protobuf.ByteString getCommandBytes(int index) { + return command_.getByteString(index); + } + + public static final int ARGS_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList args_; + /** + * + * + *
+   * The arguments to be passed when starting the container.
+   * 
+ * + * repeated string args = 3; + * + * @return A list containing the args. + */ + public com.google.protobuf.ProtocolStringList getArgsList() { + return args_; + } + /** + * + * + *
+   * The arguments to be passed when starting the container.
+   * 
+ * + * repeated string args = 3; + * + * @return The count of args. + */ + public int getArgsCount() { + return args_.size(); + } + /** + * + * + *
+   * The arguments to be passed when starting the container.
+   * 
+ * + * repeated string args = 3; + * + * @param index The index of the element to return. + * @return The args at the given index. + */ + public java.lang.String getArgs(int index) { + return args_.get(index); + } + /** + * + * + *
+   * The arguments to be passed when starting the container.
+   * 
+ * + * repeated string args = 3; + * + * @param index The index of the value to return. + * @return The bytes of the args at the given index. + */ + public com.google.protobuf.ByteString getArgsBytes(int index) { + return args_.getByteString(index); + } + + public static final int ENV_FIELD_NUMBER = 4; + private java.util.List env_; + /** + * + * + *
+   * Environment variables to be passed to the container.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 4; + */ + @java.lang.Override + public java.util.List getEnvList() { + return env_; + } + /** + * + * + *
+   * Environment variables to be passed to the container.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 4; + */ + @java.lang.Override + public java.util.List + getEnvOrBuilderList() { + return env_; + } + /** + * + * + *
+   * Environment variables to be passed to the container.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 4; + */ + @java.lang.Override + public int getEnvCount() { + return env_.size(); + } + /** + * + * + *
+   * Environment variables to be passed to the container.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 4; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.EnvVar getEnv(int index) { + return env_.get(index); + } + /** + * + * + *
+   * Environment variables to be passed to the container.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 4; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.EnvVarOrBuilder getEnvOrBuilder(int index) { + return env_.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 (!getImageUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, imageUri_); + } + for (int i = 0; i < command_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, command_.getRaw(i)); + } + for (int i = 0; i < args_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, args_.getRaw(i)); + } + for (int i = 0; i < env_.size(); i++) { + output.writeMessage(4, env_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getImageUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, imageUri_); + } + { + int dataSize = 0; + for (int i = 0; i < command_.size(); i++) { + dataSize += computeStringSizeNoTag(command_.getRaw(i)); + } + size += dataSize; + size += 1 * getCommandList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < args_.size(); i++) { + dataSize += computeStringSizeNoTag(args_.getRaw(i)); + } + size += dataSize; + size += 1 * getArgsList().size(); + } + for (int i = 0; i < env_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, env_.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.v1.ContainerSpec)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ContainerSpec other = + (com.google.cloud.aiplatform.v1.ContainerSpec) obj; + + if (!getImageUri().equals(other.getImageUri())) return false; + if (!getCommandList().equals(other.getCommandList())) return false; + if (!getArgsList().equals(other.getArgsList())) return false; + if (!getEnvList().equals(other.getEnvList())) 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) + IMAGE_URI_FIELD_NUMBER; + hash = (53 * hash) + getImageUri().hashCode(); + if (getCommandCount() > 0) { + hash = (37 * hash) + COMMAND_FIELD_NUMBER; + hash = (53 * hash) + getCommandList().hashCode(); + } + if (getArgsCount() > 0) { + hash = (37 * hash) + ARGS_FIELD_NUMBER; + hash = (53 * hash) + getArgsList().hashCode(); + } + if (getEnvCount() > 0) { + hash = (37 * hash) + ENV_FIELD_NUMBER; + hash = (53 * hash) + getEnvList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.ContainerSpec parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ContainerSpec 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.v1.ContainerSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ContainerSpec 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.v1.ContainerSpec parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ContainerSpec parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ContainerSpec parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ContainerSpec 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.v1.ContainerSpec parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ContainerSpec 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.v1.ContainerSpec parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ContainerSpec 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.v1.ContainerSpec 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 spec of a Container.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ContainerSpec} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ContainerSpec) + com.google.cloud.aiplatform.v1.ContainerSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.CustomJobProto + .internal_static_google_cloud_aiplatform_v1_ContainerSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.CustomJobProto + .internal_static_google_cloud_aiplatform_v1_ContainerSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ContainerSpec.class, + com.google.cloud.aiplatform.v1.ContainerSpec.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ContainerSpec.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getEnvFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + imageUri_ = ""; + + command_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + args_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + if (envBuilder_ == null) { + env_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + envBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.CustomJobProto + .internal_static_google_cloud_aiplatform_v1_ContainerSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ContainerSpec getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ContainerSpec.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ContainerSpec build() { + com.google.cloud.aiplatform.v1.ContainerSpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ContainerSpec buildPartial() { + com.google.cloud.aiplatform.v1.ContainerSpec result = + new com.google.cloud.aiplatform.v1.ContainerSpec(this); + int from_bitField0_ = bitField0_; + result.imageUri_ = imageUri_; + if (((bitField0_ & 0x00000001) != 0)) { + command_ = command_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.command_ = command_; + if (((bitField0_ & 0x00000002) != 0)) { + args_ = args_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.args_ = args_; + if (envBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + env_ = java.util.Collections.unmodifiableList(env_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.env_ = env_; + } else { + result.env_ = envBuilder_.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.v1.ContainerSpec) { + return mergeFrom((com.google.cloud.aiplatform.v1.ContainerSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.ContainerSpec other) { + if (other == com.google.cloud.aiplatform.v1.ContainerSpec.getDefaultInstance()) return this; + if (!other.getImageUri().isEmpty()) { + imageUri_ = other.imageUri_; + onChanged(); + } + if (!other.command_.isEmpty()) { + if (command_.isEmpty()) { + command_ = other.command_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureCommandIsMutable(); + command_.addAll(other.command_); + } + onChanged(); + } + if (!other.args_.isEmpty()) { + if (args_.isEmpty()) { + args_ = other.args_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureArgsIsMutable(); + args_.addAll(other.args_); + } + onChanged(); + } + if (envBuilder_ == null) { + if (!other.env_.isEmpty()) { + if (env_.isEmpty()) { + env_ = other.env_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureEnvIsMutable(); + env_.addAll(other.env_); + } + onChanged(); + } + } else { + if (!other.env_.isEmpty()) { + if (envBuilder_.isEmpty()) { + envBuilder_.dispose(); + envBuilder_ = null; + env_ = other.env_; + bitField0_ = (bitField0_ & ~0x00000004); + envBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getEnvFieldBuilder() + : null; + } else { + envBuilder_.addAllMessages(other.env_); + } + } + } + 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.v1.ContainerSpec parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.aiplatform.v1.ContainerSpec) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object imageUri_ = ""; + /** + * + * + *
+     * Required. The URI of a container image in the Container Registry that is to be run on
+     * each worker replica.
+     * 
+ * + * string image_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The imageUri. + */ + public java.lang.String getImageUri() { + java.lang.Object ref = imageUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + imageUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The URI of a container image in the Container Registry that is to be run on
+     * each worker replica.
+     * 
+ * + * string image_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for imageUri. + */ + public com.google.protobuf.ByteString getImageUriBytes() { + java.lang.Object ref = imageUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + imageUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The URI of a container image in the Container Registry that is to be run on
+     * each worker replica.
+     * 
+ * + * string image_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The imageUri to set. + * @return This builder for chaining. + */ + public Builder setImageUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + imageUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The URI of a container image in the Container Registry that is to be run on
+     * each worker replica.
+     * 
+ * + * string image_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearImageUri() { + + imageUri_ = getDefaultInstance().getImageUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The URI of a container image in the Container Registry that is to be run on
+     * each worker replica.
+     * 
+ * + * string image_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for imageUri to set. + * @return This builder for chaining. + */ + public Builder setImageUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + imageUri_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList command_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureCommandIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + command_ = new com.google.protobuf.LazyStringArrayList(command_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * The command to be invoked when the container is started.
+     * It overrides the entrypoint instruction in Dockerfile when provided.
+     * 
+ * + * repeated string command = 2; + * + * @return A list containing the command. + */ + public com.google.protobuf.ProtocolStringList getCommandList() { + return command_.getUnmodifiableView(); + } + /** + * + * + *
+     * The command to be invoked when the container is started.
+     * It overrides the entrypoint instruction in Dockerfile when provided.
+     * 
+ * + * repeated string command = 2; + * + * @return The count of command. + */ + public int getCommandCount() { + return command_.size(); + } + /** + * + * + *
+     * The command to be invoked when the container is started.
+     * It overrides the entrypoint instruction in Dockerfile when provided.
+     * 
+ * + * repeated string command = 2; + * + * @param index The index of the element to return. + * @return The command at the given index. + */ + public java.lang.String getCommand(int index) { + return command_.get(index); + } + /** + * + * + *
+     * The command to be invoked when the container is started.
+     * It overrides the entrypoint instruction in Dockerfile when provided.
+     * 
+ * + * repeated string command = 2; + * + * @param index The index of the value to return. + * @return The bytes of the command at the given index. + */ + public com.google.protobuf.ByteString getCommandBytes(int index) { + return command_.getByteString(index); + } + /** + * + * + *
+     * The command to be invoked when the container is started.
+     * It overrides the entrypoint instruction in Dockerfile when provided.
+     * 
+ * + * repeated string command = 2; + * + * @param index The index to set the value at. + * @param value The command to set. + * @return This builder for chaining. + */ + public Builder setCommand(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureCommandIsMutable(); + command_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * The command to be invoked when the container is started.
+     * It overrides the entrypoint instruction in Dockerfile when provided.
+     * 
+ * + * repeated string command = 2; + * + * @param value The command to add. + * @return This builder for chaining. + */ + public Builder addCommand(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureCommandIsMutable(); + command_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * The command to be invoked when the container is started.
+     * It overrides the entrypoint instruction in Dockerfile when provided.
+     * 
+ * + * repeated string command = 2; + * + * @param values The command to add. + * @return This builder for chaining. + */ + public Builder addAllCommand(java.lang.Iterable values) { + ensureCommandIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, command_); + onChanged(); + return this; + } + /** + * + * + *
+     * The command to be invoked when the container is started.
+     * It overrides the entrypoint instruction in Dockerfile when provided.
+     * 
+ * + * repeated string command = 2; + * + * @return This builder for chaining. + */ + public Builder clearCommand() { + command_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The command to be invoked when the container is started.
+     * It overrides the entrypoint instruction in Dockerfile when provided.
+     * 
+ * + * repeated string command = 2; + * + * @param value The bytes of the command to add. + * @return This builder for chaining. + */ + public Builder addCommandBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureCommandIsMutable(); + command_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList args_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureArgsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + args_ = new com.google.protobuf.LazyStringArrayList(args_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+     * The arguments to be passed when starting the container.
+     * 
+ * + * repeated string args = 3; + * + * @return A list containing the args. + */ + public com.google.protobuf.ProtocolStringList getArgsList() { + return args_.getUnmodifiableView(); + } + /** + * + * + *
+     * The arguments to be passed when starting the container.
+     * 
+ * + * repeated string args = 3; + * + * @return The count of args. + */ + public int getArgsCount() { + return args_.size(); + } + /** + * + * + *
+     * The arguments to be passed when starting the container.
+     * 
+ * + * repeated string args = 3; + * + * @param index The index of the element to return. + * @return The args at the given index. + */ + public java.lang.String getArgs(int index) { + return args_.get(index); + } + /** + * + * + *
+     * The arguments to be passed when starting the container.
+     * 
+ * + * repeated string args = 3; + * + * @param index The index of the value to return. + * @return The bytes of the args at the given index. + */ + public com.google.protobuf.ByteString getArgsBytes(int index) { + return args_.getByteString(index); + } + /** + * + * + *
+     * The arguments to be passed when starting the container.
+     * 
+ * + * repeated string args = 3; + * + * @param index The index to set the value at. + * @param value The args to set. + * @return This builder for chaining. + */ + public Builder setArgs(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureArgsIsMutable(); + args_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * The arguments to be passed when starting the container.
+     * 
+ * + * repeated string args = 3; + * + * @param value The args to add. + * @return This builder for chaining. + */ + public Builder addArgs(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureArgsIsMutable(); + args_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * The arguments to be passed when starting the container.
+     * 
+ * + * repeated string args = 3; + * + * @param values The args to add. + * @return This builder for chaining. + */ + public Builder addAllArgs(java.lang.Iterable values) { + ensureArgsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, args_); + onChanged(); + return this; + } + /** + * + * + *
+     * The arguments to be passed when starting the container.
+     * 
+ * + * repeated string args = 3; + * + * @return This builder for chaining. + */ + public Builder clearArgs() { + args_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The arguments to be passed when starting the container.
+     * 
+ * + * repeated string args = 3; + * + * @param value The bytes of the args to add. + * @return This builder for chaining. + */ + public Builder addArgsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureArgsIsMutable(); + args_.add(value); + onChanged(); + return this; + } + + private java.util.List env_ = + java.util.Collections.emptyList(); + + private void ensureEnvIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + env_ = new java.util.ArrayList(env_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.EnvVar, + com.google.cloud.aiplatform.v1.EnvVar.Builder, + com.google.cloud.aiplatform.v1.EnvVarOrBuilder> + envBuilder_; + + /** + * + * + *
+     * Environment variables to be passed to the container.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 4; + */ + public java.util.List getEnvList() { + if (envBuilder_ == null) { + return java.util.Collections.unmodifiableList(env_); + } else { + return envBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Environment variables to be passed to the container.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 4; + */ + public int getEnvCount() { + if (envBuilder_ == null) { + return env_.size(); + } else { + return envBuilder_.getCount(); + } + } + /** + * + * + *
+     * Environment variables to be passed to the container.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 4; + */ + public com.google.cloud.aiplatform.v1.EnvVar getEnv(int index) { + if (envBuilder_ == null) { + return env_.get(index); + } else { + return envBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Environment variables to be passed to the container.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 4; + */ + public Builder setEnv(int index, com.google.cloud.aiplatform.v1.EnvVar value) { + if (envBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEnvIsMutable(); + env_.set(index, value); + onChanged(); + } else { + envBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Environment variables to be passed to the container.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 4; + */ + public Builder setEnv( + int index, com.google.cloud.aiplatform.v1.EnvVar.Builder builderForValue) { + if (envBuilder_ == null) { + ensureEnvIsMutable(); + env_.set(index, builderForValue.build()); + onChanged(); + } else { + envBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Environment variables to be passed to the container.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 4; + */ + public Builder addEnv(com.google.cloud.aiplatform.v1.EnvVar value) { + if (envBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEnvIsMutable(); + env_.add(value); + onChanged(); + } else { + envBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Environment variables to be passed to the container.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 4; + */ + public Builder addEnv(int index, com.google.cloud.aiplatform.v1.EnvVar value) { + if (envBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEnvIsMutable(); + env_.add(index, value); + onChanged(); + } else { + envBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Environment variables to be passed to the container.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 4; + */ + public Builder addEnv(com.google.cloud.aiplatform.v1.EnvVar.Builder builderForValue) { + if (envBuilder_ == null) { + ensureEnvIsMutable(); + env_.add(builderForValue.build()); + onChanged(); + } else { + envBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Environment variables to be passed to the container.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 4; + */ + public Builder addEnv( + int index, com.google.cloud.aiplatform.v1.EnvVar.Builder builderForValue) { + if (envBuilder_ == null) { + ensureEnvIsMutable(); + env_.add(index, builderForValue.build()); + onChanged(); + } else { + envBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Environment variables to be passed to the container.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 4; + */ + public Builder addAllEnv( + java.lang.Iterable values) { + if (envBuilder_ == null) { + ensureEnvIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, env_); + onChanged(); + } else { + envBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Environment variables to be passed to the container.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 4; + */ + public Builder clearEnv() { + if (envBuilder_ == null) { + env_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + envBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Environment variables to be passed to the container.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 4; + */ + public Builder removeEnv(int index) { + if (envBuilder_ == null) { + ensureEnvIsMutable(); + env_.remove(index); + onChanged(); + } else { + envBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Environment variables to be passed to the container.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 4; + */ + public com.google.cloud.aiplatform.v1.EnvVar.Builder getEnvBuilder(int index) { + return getEnvFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Environment variables to be passed to the container.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 4; + */ + public com.google.cloud.aiplatform.v1.EnvVarOrBuilder getEnvOrBuilder(int index) { + if (envBuilder_ == null) { + return env_.get(index); + } else { + return envBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Environment variables to be passed to the container.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 4; + */ + public java.util.List + getEnvOrBuilderList() { + if (envBuilder_ != null) { + return envBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(env_); + } + } + /** + * + * + *
+     * Environment variables to be passed to the container.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 4; + */ + public com.google.cloud.aiplatform.v1.EnvVar.Builder addEnvBuilder() { + return getEnvFieldBuilder() + .addBuilder(com.google.cloud.aiplatform.v1.EnvVar.getDefaultInstance()); + } + /** + * + * + *
+     * Environment variables to be passed to the container.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 4; + */ + public com.google.cloud.aiplatform.v1.EnvVar.Builder addEnvBuilder(int index) { + return getEnvFieldBuilder() + .addBuilder(index, com.google.cloud.aiplatform.v1.EnvVar.getDefaultInstance()); + } + /** + * + * + *
+     * Environment variables to be passed to the container.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 4; + */ + public java.util.List getEnvBuilderList() { + return getEnvFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.EnvVar, + com.google.cloud.aiplatform.v1.EnvVar.Builder, + com.google.cloud.aiplatform.v1.EnvVarOrBuilder> + getEnvFieldBuilder() { + if (envBuilder_ == null) { + envBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.EnvVar, + com.google.cloud.aiplatform.v1.EnvVar.Builder, + com.google.cloud.aiplatform.v1.EnvVarOrBuilder>( + env_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + env_ = null; + } + return envBuilder_; + } + + @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.v1.ContainerSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ContainerSpec) + private static final com.google.cloud.aiplatform.v1.ContainerSpec DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ContainerSpec(); + } + + public static com.google.cloud.aiplatform.v1.ContainerSpec getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ContainerSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ContainerSpec(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.v1.ContainerSpec getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ContainerSpecOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ContainerSpecOrBuilder.java new file mode 100644 index 000000000..4ce355e1b --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ContainerSpecOrBuilder.java @@ -0,0 +1,209 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/custom_job.proto + +package com.google.cloud.aiplatform.v1; + +public interface ContainerSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ContainerSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The URI of a container image in the Container Registry that is to be run on
+   * each worker replica.
+   * 
+ * + * string image_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The imageUri. + */ + java.lang.String getImageUri(); + /** + * + * + *
+   * Required. The URI of a container image in the Container Registry that is to be run on
+   * each worker replica.
+   * 
+ * + * string image_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for imageUri. + */ + com.google.protobuf.ByteString getImageUriBytes(); + + /** + * + * + *
+   * The command to be invoked when the container is started.
+   * It overrides the entrypoint instruction in Dockerfile when provided.
+   * 
+ * + * repeated string command = 2; + * + * @return A list containing the command. + */ + java.util.List getCommandList(); + /** + * + * + *
+   * The command to be invoked when the container is started.
+   * It overrides the entrypoint instruction in Dockerfile when provided.
+   * 
+ * + * repeated string command = 2; + * + * @return The count of command. + */ + int getCommandCount(); + /** + * + * + *
+   * The command to be invoked when the container is started.
+   * It overrides the entrypoint instruction in Dockerfile when provided.
+   * 
+ * + * repeated string command = 2; + * + * @param index The index of the element to return. + * @return The command at the given index. + */ + java.lang.String getCommand(int index); + /** + * + * + *
+   * The command to be invoked when the container is started.
+   * It overrides the entrypoint instruction in Dockerfile when provided.
+   * 
+ * + * repeated string command = 2; + * + * @param index The index of the value to return. + * @return The bytes of the command at the given index. + */ + com.google.protobuf.ByteString getCommandBytes(int index); + + /** + * + * + *
+   * The arguments to be passed when starting the container.
+   * 
+ * + * repeated string args = 3; + * + * @return A list containing the args. + */ + java.util.List getArgsList(); + /** + * + * + *
+   * The arguments to be passed when starting the container.
+   * 
+ * + * repeated string args = 3; + * + * @return The count of args. + */ + int getArgsCount(); + /** + * + * + *
+   * The arguments to be passed when starting the container.
+   * 
+ * + * repeated string args = 3; + * + * @param index The index of the element to return. + * @return The args at the given index. + */ + java.lang.String getArgs(int index); + /** + * + * + *
+   * The arguments to be passed when starting the container.
+   * 
+ * + * repeated string args = 3; + * + * @param index The index of the value to return. + * @return The bytes of the args at the given index. + */ + com.google.protobuf.ByteString getArgsBytes(int index); + + /** + * + * + *
+   * Environment variables to be passed to the container.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 4; + */ + java.util.List getEnvList(); + /** + * + * + *
+   * Environment variables to be passed to the container.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 4; + */ + com.google.cloud.aiplatform.v1.EnvVar getEnv(int index); + /** + * + * + *
+   * Environment variables to be passed to the container.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 4; + */ + int getEnvCount(); + /** + * + * + *
+   * Environment variables to be passed to the container.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 4; + */ + java.util.List getEnvOrBuilderList(); + /** + * + * + *
+   * Environment variables to be passed to the container.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 4; + */ + com.google.cloud.aiplatform.v1.EnvVarOrBuilder getEnvOrBuilder(int index); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateBatchPredictionJobRequest.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateBatchPredictionJobRequest.java new file mode 100644 index 000000000..e6c7cd160 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateBatchPredictionJobRequest.java @@ -0,0 +1,972 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/job_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for [JobService.CreateBatchPredictionJob][google.cloud.aiplatform.v1.JobService.CreateBatchPredictionJob].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CreateBatchPredictionJobRequest} + */ +public final class CreateBatchPredictionJobRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.CreateBatchPredictionJobRequest) + CreateBatchPredictionJobRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateBatchPredictionJobRequest.newBuilder() to construct. + private CreateBatchPredictionJobRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateBatchPredictionJobRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateBatchPredictionJobRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateBatchPredictionJobRequest( + 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(); + + parent_ = s; + break; + } + case 18: + { + com.google.cloud.aiplatform.v1.BatchPredictionJob.Builder subBuilder = null; + if (batchPredictionJob_ != null) { + subBuilder = batchPredictionJob_.toBuilder(); + } + batchPredictionJob_ = + input.readMessage( + com.google.cloud.aiplatform.v1.BatchPredictionJob.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(batchPredictionJob_); + batchPredictionJob_ = 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.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateBatchPredictionJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateBatchPredictionJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CreateBatchPredictionJobRequest.class, + com.google.cloud.aiplatform.v1.CreateBatchPredictionJobRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The resource name of the Location to create the BatchPredictionJob in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the Location to create the BatchPredictionJob in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BATCH_PREDICTION_JOB_FIELD_NUMBER = 2; + private com.google.cloud.aiplatform.v1.BatchPredictionJob batchPredictionJob_; + /** + * + * + *
+   * Required. The BatchPredictionJob to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.BatchPredictionJob batch_prediction_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the batchPredictionJob field is set. + */ + @java.lang.Override + public boolean hasBatchPredictionJob() { + return batchPredictionJob_ != null; + } + /** + * + * + *
+   * Required. The BatchPredictionJob to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.BatchPredictionJob batch_prediction_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The batchPredictionJob. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.BatchPredictionJob getBatchPredictionJob() { + return batchPredictionJob_ == null + ? com.google.cloud.aiplatform.v1.BatchPredictionJob.getDefaultInstance() + : batchPredictionJob_; + } + /** + * + * + *
+   * Required. The BatchPredictionJob to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.BatchPredictionJob batch_prediction_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.BatchPredictionJobOrBuilder + getBatchPredictionJobOrBuilder() { + return getBatchPredictionJob(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (batchPredictionJob_ != null) { + output.writeMessage(2, getBatchPredictionJob()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (batchPredictionJob_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getBatchPredictionJob()); + } + 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.v1.CreateBatchPredictionJobRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.CreateBatchPredictionJobRequest other = + (com.google.cloud.aiplatform.v1.CreateBatchPredictionJobRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasBatchPredictionJob() != other.hasBatchPredictionJob()) return false; + if (hasBatchPredictionJob()) { + if (!getBatchPredictionJob().equals(other.getBatchPredictionJob())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasBatchPredictionJob()) { + hash = (37 * hash) + BATCH_PREDICTION_JOB_FIELD_NUMBER; + hash = (53 * hash) + getBatchPredictionJob().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.CreateBatchPredictionJobRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CreateBatchPredictionJobRequest 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.v1.CreateBatchPredictionJobRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CreateBatchPredictionJobRequest 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.v1.CreateBatchPredictionJobRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CreateBatchPredictionJobRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreateBatchPredictionJobRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CreateBatchPredictionJobRequest 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.v1.CreateBatchPredictionJobRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CreateBatchPredictionJobRequest 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.v1.CreateBatchPredictionJobRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CreateBatchPredictionJobRequest 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.v1.CreateBatchPredictionJobRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [JobService.CreateBatchPredictionJob][google.cloud.aiplatform.v1.JobService.CreateBatchPredictionJob].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CreateBatchPredictionJobRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.CreateBatchPredictionJobRequest) + com.google.cloud.aiplatform.v1.CreateBatchPredictionJobRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateBatchPredictionJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateBatchPredictionJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CreateBatchPredictionJobRequest.class, + com.google.cloud.aiplatform.v1.CreateBatchPredictionJobRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.CreateBatchPredictionJobRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (batchPredictionJobBuilder_ == null) { + batchPredictionJob_ = null; + } else { + batchPredictionJob_ = null; + batchPredictionJobBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateBatchPredictionJobRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateBatchPredictionJobRequest + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.CreateBatchPredictionJobRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateBatchPredictionJobRequest build() { + com.google.cloud.aiplatform.v1.CreateBatchPredictionJobRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateBatchPredictionJobRequest buildPartial() { + com.google.cloud.aiplatform.v1.CreateBatchPredictionJobRequest result = + new com.google.cloud.aiplatform.v1.CreateBatchPredictionJobRequest(this); + result.parent_ = parent_; + if (batchPredictionJobBuilder_ == null) { + result.batchPredictionJob_ = batchPredictionJob_; + } else { + result.batchPredictionJob_ = batchPredictionJobBuilder_.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.v1.CreateBatchPredictionJobRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.CreateBatchPredictionJobRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.CreateBatchPredictionJobRequest other) { + if (other + == com.google.cloud.aiplatform.v1.CreateBatchPredictionJobRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasBatchPredictionJob()) { + mergeBatchPredictionJob(other.getBatchPredictionJob()); + } + 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.v1.CreateBatchPredictionJobRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.CreateBatchPredictionJobRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the Location to create the BatchPredictionJob in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Location to create the BatchPredictionJob in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Location to create the BatchPredictionJob in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Location to create the BatchPredictionJob in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Location to create the BatchPredictionJob in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.cloud.aiplatform.v1.BatchPredictionJob batchPredictionJob_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.BatchPredictionJob, + com.google.cloud.aiplatform.v1.BatchPredictionJob.Builder, + com.google.cloud.aiplatform.v1.BatchPredictionJobOrBuilder> + batchPredictionJobBuilder_; + /** + * + * + *
+     * Required. The BatchPredictionJob to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.BatchPredictionJob batch_prediction_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the batchPredictionJob field is set. + */ + public boolean hasBatchPredictionJob() { + return batchPredictionJobBuilder_ != null || batchPredictionJob_ != null; + } + /** + * + * + *
+     * Required. The BatchPredictionJob to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.BatchPredictionJob batch_prediction_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The batchPredictionJob. + */ + public com.google.cloud.aiplatform.v1.BatchPredictionJob getBatchPredictionJob() { + if (batchPredictionJobBuilder_ == null) { + return batchPredictionJob_ == null + ? com.google.cloud.aiplatform.v1.BatchPredictionJob.getDefaultInstance() + : batchPredictionJob_; + } else { + return batchPredictionJobBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The BatchPredictionJob to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.BatchPredictionJob batch_prediction_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setBatchPredictionJob(com.google.cloud.aiplatform.v1.BatchPredictionJob value) { + if (batchPredictionJobBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + batchPredictionJob_ = value; + onChanged(); + } else { + batchPredictionJobBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The BatchPredictionJob to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.BatchPredictionJob batch_prediction_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setBatchPredictionJob( + com.google.cloud.aiplatform.v1.BatchPredictionJob.Builder builderForValue) { + if (batchPredictionJobBuilder_ == null) { + batchPredictionJob_ = builderForValue.build(); + onChanged(); + } else { + batchPredictionJobBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The BatchPredictionJob to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.BatchPredictionJob batch_prediction_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeBatchPredictionJob( + com.google.cloud.aiplatform.v1.BatchPredictionJob value) { + if (batchPredictionJobBuilder_ == null) { + if (batchPredictionJob_ != null) { + batchPredictionJob_ = + com.google.cloud.aiplatform.v1.BatchPredictionJob.newBuilder(batchPredictionJob_) + .mergeFrom(value) + .buildPartial(); + } else { + batchPredictionJob_ = value; + } + onChanged(); + } else { + batchPredictionJobBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The BatchPredictionJob to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.BatchPredictionJob batch_prediction_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearBatchPredictionJob() { + if (batchPredictionJobBuilder_ == null) { + batchPredictionJob_ = null; + onChanged(); + } else { + batchPredictionJob_ = null; + batchPredictionJobBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The BatchPredictionJob to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.BatchPredictionJob batch_prediction_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.BatchPredictionJob.Builder + getBatchPredictionJobBuilder() { + + onChanged(); + return getBatchPredictionJobFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The BatchPredictionJob to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.BatchPredictionJob batch_prediction_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.BatchPredictionJobOrBuilder + getBatchPredictionJobOrBuilder() { + if (batchPredictionJobBuilder_ != null) { + return batchPredictionJobBuilder_.getMessageOrBuilder(); + } else { + return batchPredictionJob_ == null + ? com.google.cloud.aiplatform.v1.BatchPredictionJob.getDefaultInstance() + : batchPredictionJob_; + } + } + /** + * + * + *
+     * Required. The BatchPredictionJob to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.BatchPredictionJob batch_prediction_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.BatchPredictionJob, + com.google.cloud.aiplatform.v1.BatchPredictionJob.Builder, + com.google.cloud.aiplatform.v1.BatchPredictionJobOrBuilder> + getBatchPredictionJobFieldBuilder() { + if (batchPredictionJobBuilder_ == null) { + batchPredictionJobBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.BatchPredictionJob, + com.google.cloud.aiplatform.v1.BatchPredictionJob.Builder, + com.google.cloud.aiplatform.v1.BatchPredictionJobOrBuilder>( + getBatchPredictionJob(), getParentForChildren(), isClean()); + batchPredictionJob_ = null; + } + return batchPredictionJobBuilder_; + } + + @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.v1.CreateBatchPredictionJobRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.CreateBatchPredictionJobRequest) + private static final com.google.cloud.aiplatform.v1.CreateBatchPredictionJobRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.CreateBatchPredictionJobRequest(); + } + + public static com.google.cloud.aiplatform.v1.CreateBatchPredictionJobRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateBatchPredictionJobRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateBatchPredictionJobRequest(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.v1.CreateBatchPredictionJobRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateBatchPredictionJobRequestOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateBatchPredictionJobRequestOrBuilder.java new file mode 100644 index 000000000..736503f0c --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateBatchPredictionJobRequestOrBuilder.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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/job_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface CreateBatchPredictionJobRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.CreateBatchPredictionJobRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the Location to create the BatchPredictionJob in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of the Location to create the BatchPredictionJob in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The BatchPredictionJob to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.BatchPredictionJob batch_prediction_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the batchPredictionJob field is set. + */ + boolean hasBatchPredictionJob(); + /** + * + * + *
+   * Required. The BatchPredictionJob to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.BatchPredictionJob batch_prediction_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The batchPredictionJob. + */ + com.google.cloud.aiplatform.v1.BatchPredictionJob getBatchPredictionJob(); + /** + * + * + *
+   * Required. The BatchPredictionJob to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.BatchPredictionJob batch_prediction_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1.BatchPredictionJobOrBuilder getBatchPredictionJobOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateCustomJobRequest.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateCustomJobRequest.java new file mode 100644 index 000000000..912dfd170 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateCustomJobRequest.java @@ -0,0 +1,959 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/job_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for [JobService.CreateCustomJob][google.cloud.aiplatform.v1.JobService.CreateCustomJob].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CreateCustomJobRequest} + */ +public final class CreateCustomJobRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.CreateCustomJobRequest) + CreateCustomJobRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateCustomJobRequest.newBuilder() to construct. + private CreateCustomJobRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateCustomJobRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateCustomJobRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateCustomJobRequest( + 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(); + + parent_ = s; + break; + } + case 18: + { + com.google.cloud.aiplatform.v1.CustomJob.Builder subBuilder = null; + if (customJob_ != null) { + subBuilder = customJob_.toBuilder(); + } + customJob_ = + input.readMessage( + com.google.cloud.aiplatform.v1.CustomJob.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(customJob_); + customJob_ = 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.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateCustomJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateCustomJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CreateCustomJobRequest.class, + com.google.cloud.aiplatform.v1.CreateCustomJobRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The resource name of the Location to create the CustomJob in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the Location to create the CustomJob in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CUSTOM_JOB_FIELD_NUMBER = 2; + private com.google.cloud.aiplatform.v1.CustomJob customJob_; + /** + * + * + *
+   * Required. The CustomJob to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJob custom_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the customJob field is set. + */ + @java.lang.Override + public boolean hasCustomJob() { + return customJob_ != null; + } + /** + * + * + *
+   * Required. The CustomJob to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJob custom_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The customJob. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.CustomJob getCustomJob() { + return customJob_ == null + ? com.google.cloud.aiplatform.v1.CustomJob.getDefaultInstance() + : customJob_; + } + /** + * + * + *
+   * Required. The CustomJob to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJob custom_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.CustomJobOrBuilder getCustomJobOrBuilder() { + return getCustomJob(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (customJob_ != null) { + output.writeMessage(2, getCustomJob()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (customJob_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCustomJob()); + } + 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.v1.CreateCustomJobRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.CreateCustomJobRequest other = + (com.google.cloud.aiplatform.v1.CreateCustomJobRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasCustomJob() != other.hasCustomJob()) return false; + if (hasCustomJob()) { + if (!getCustomJob().equals(other.getCustomJob())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasCustomJob()) { + hash = (37 * hash) + CUSTOM_JOB_FIELD_NUMBER; + hash = (53 * hash) + getCustomJob().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.CreateCustomJobRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CreateCustomJobRequest 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.v1.CreateCustomJobRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CreateCustomJobRequest 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.v1.CreateCustomJobRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CreateCustomJobRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreateCustomJobRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CreateCustomJobRequest 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.v1.CreateCustomJobRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CreateCustomJobRequest 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.v1.CreateCustomJobRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CreateCustomJobRequest 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.v1.CreateCustomJobRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [JobService.CreateCustomJob][google.cloud.aiplatform.v1.JobService.CreateCustomJob].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CreateCustomJobRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.CreateCustomJobRequest) + com.google.cloud.aiplatform.v1.CreateCustomJobRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateCustomJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateCustomJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CreateCustomJobRequest.class, + com.google.cloud.aiplatform.v1.CreateCustomJobRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.CreateCustomJobRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (customJobBuilder_ == null) { + customJob_ = null; + } else { + customJob_ = null; + customJobBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateCustomJobRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateCustomJobRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.CreateCustomJobRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateCustomJobRequest build() { + com.google.cloud.aiplatform.v1.CreateCustomJobRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateCustomJobRequest buildPartial() { + com.google.cloud.aiplatform.v1.CreateCustomJobRequest result = + new com.google.cloud.aiplatform.v1.CreateCustomJobRequest(this); + result.parent_ = parent_; + if (customJobBuilder_ == null) { + result.customJob_ = customJob_; + } else { + result.customJob_ = customJobBuilder_.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.v1.CreateCustomJobRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.CreateCustomJobRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.CreateCustomJobRequest other) { + if (other == com.google.cloud.aiplatform.v1.CreateCustomJobRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasCustomJob()) { + mergeCustomJob(other.getCustomJob()); + } + 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.v1.CreateCustomJobRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.CreateCustomJobRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the Location to create the CustomJob in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Location to create the CustomJob in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Location to create the CustomJob in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Location to create the CustomJob in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Location to create the CustomJob in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.cloud.aiplatform.v1.CustomJob customJob_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.CustomJob, + com.google.cloud.aiplatform.v1.CustomJob.Builder, + com.google.cloud.aiplatform.v1.CustomJobOrBuilder> + customJobBuilder_; + /** + * + * + *
+     * Required. The CustomJob to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJob custom_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the customJob field is set. + */ + public boolean hasCustomJob() { + return customJobBuilder_ != null || customJob_ != null; + } + /** + * + * + *
+     * Required. The CustomJob to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJob custom_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The customJob. + */ + public com.google.cloud.aiplatform.v1.CustomJob getCustomJob() { + if (customJobBuilder_ == null) { + return customJob_ == null + ? com.google.cloud.aiplatform.v1.CustomJob.getDefaultInstance() + : customJob_; + } else { + return customJobBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The CustomJob to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJob custom_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setCustomJob(com.google.cloud.aiplatform.v1.CustomJob value) { + if (customJobBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + customJob_ = value; + onChanged(); + } else { + customJobBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The CustomJob to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJob custom_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setCustomJob(com.google.cloud.aiplatform.v1.CustomJob.Builder builderForValue) { + if (customJobBuilder_ == null) { + customJob_ = builderForValue.build(); + onChanged(); + } else { + customJobBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The CustomJob to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJob custom_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeCustomJob(com.google.cloud.aiplatform.v1.CustomJob value) { + if (customJobBuilder_ == null) { + if (customJob_ != null) { + customJob_ = + com.google.cloud.aiplatform.v1.CustomJob.newBuilder(customJob_) + .mergeFrom(value) + .buildPartial(); + } else { + customJob_ = value; + } + onChanged(); + } else { + customJobBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The CustomJob to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJob custom_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearCustomJob() { + if (customJobBuilder_ == null) { + customJob_ = null; + onChanged(); + } else { + customJob_ = null; + customJobBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The CustomJob to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJob custom_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.CustomJob.Builder getCustomJobBuilder() { + + onChanged(); + return getCustomJobFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The CustomJob to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJob custom_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.CustomJobOrBuilder getCustomJobOrBuilder() { + if (customJobBuilder_ != null) { + return customJobBuilder_.getMessageOrBuilder(); + } else { + return customJob_ == null + ? com.google.cloud.aiplatform.v1.CustomJob.getDefaultInstance() + : customJob_; + } + } + /** + * + * + *
+     * Required. The CustomJob to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJob custom_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.CustomJob, + com.google.cloud.aiplatform.v1.CustomJob.Builder, + com.google.cloud.aiplatform.v1.CustomJobOrBuilder> + getCustomJobFieldBuilder() { + if (customJobBuilder_ == null) { + customJobBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.CustomJob, + com.google.cloud.aiplatform.v1.CustomJob.Builder, + com.google.cloud.aiplatform.v1.CustomJobOrBuilder>( + getCustomJob(), getParentForChildren(), isClean()); + customJob_ = null; + } + return customJobBuilder_; + } + + @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.v1.CreateCustomJobRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.CreateCustomJobRequest) + private static final com.google.cloud.aiplatform.v1.CreateCustomJobRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.CreateCustomJobRequest(); + } + + public static com.google.cloud.aiplatform.v1.CreateCustomJobRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateCustomJobRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateCustomJobRequest(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.v1.CreateCustomJobRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateCustomJobRequestOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateCustomJobRequestOrBuilder.java new file mode 100644 index 000000000..83902011b --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateCustomJobRequestOrBuilder.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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/job_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface CreateCustomJobRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.CreateCustomJobRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the Location to create the CustomJob in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of the Location to create the CustomJob in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The CustomJob to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJob custom_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the customJob field is set. + */ + boolean hasCustomJob(); + /** + * + * + *
+   * Required. The CustomJob to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJob custom_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The customJob. + */ + com.google.cloud.aiplatform.v1.CustomJob getCustomJob(); + /** + * + * + *
+   * Required. The CustomJob to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJob custom_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1.CustomJobOrBuilder getCustomJobOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateDataLabelingJobRequest.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateDataLabelingJobRequest.java new file mode 100644 index 000000000..65ed7b4fa --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateDataLabelingJobRequest.java @@ -0,0 +1,960 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/job_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for [DataLabelingJobService.CreateDataLabelingJob][].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CreateDataLabelingJobRequest} + */ +public final class CreateDataLabelingJobRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.CreateDataLabelingJobRequest) + CreateDataLabelingJobRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateDataLabelingJobRequest.newBuilder() to construct. + private CreateDataLabelingJobRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateDataLabelingJobRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateDataLabelingJobRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateDataLabelingJobRequest( + 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(); + + parent_ = s; + break; + } + case 18: + { + com.google.cloud.aiplatform.v1.DataLabelingJob.Builder subBuilder = null; + if (dataLabelingJob_ != null) { + subBuilder = dataLabelingJob_.toBuilder(); + } + dataLabelingJob_ = + input.readMessage( + com.google.cloud.aiplatform.v1.DataLabelingJob.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(dataLabelingJob_); + dataLabelingJob_ = 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.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateDataLabelingJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateDataLabelingJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CreateDataLabelingJobRequest.class, + com.google.cloud.aiplatform.v1.CreateDataLabelingJobRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The parent of the DataLabelingJob.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent of the DataLabelingJob.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATA_LABELING_JOB_FIELD_NUMBER = 2; + private com.google.cloud.aiplatform.v1.DataLabelingJob dataLabelingJob_; + /** + * + * + *
+   * Required. The DataLabelingJob to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.DataLabelingJob data_labeling_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the dataLabelingJob field is set. + */ + @java.lang.Override + public boolean hasDataLabelingJob() { + return dataLabelingJob_ != null; + } + /** + * + * + *
+   * Required. The DataLabelingJob to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.DataLabelingJob data_labeling_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dataLabelingJob. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.DataLabelingJob getDataLabelingJob() { + return dataLabelingJob_ == null + ? com.google.cloud.aiplatform.v1.DataLabelingJob.getDefaultInstance() + : dataLabelingJob_; + } + /** + * + * + *
+   * Required. The DataLabelingJob to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.DataLabelingJob data_labeling_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.DataLabelingJobOrBuilder getDataLabelingJobOrBuilder() { + return getDataLabelingJob(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (dataLabelingJob_ != null) { + output.writeMessage(2, getDataLabelingJob()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (dataLabelingJob_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDataLabelingJob()); + } + 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.v1.CreateDataLabelingJobRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.CreateDataLabelingJobRequest other = + (com.google.cloud.aiplatform.v1.CreateDataLabelingJobRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasDataLabelingJob() != other.hasDataLabelingJob()) return false; + if (hasDataLabelingJob()) { + if (!getDataLabelingJob().equals(other.getDataLabelingJob())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasDataLabelingJob()) { + hash = (37 * hash) + DATA_LABELING_JOB_FIELD_NUMBER; + hash = (53 * hash) + getDataLabelingJob().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.CreateDataLabelingJobRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CreateDataLabelingJobRequest 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.v1.CreateDataLabelingJobRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CreateDataLabelingJobRequest 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.v1.CreateDataLabelingJobRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CreateDataLabelingJobRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreateDataLabelingJobRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CreateDataLabelingJobRequest 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.v1.CreateDataLabelingJobRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CreateDataLabelingJobRequest 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.v1.CreateDataLabelingJobRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CreateDataLabelingJobRequest 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.v1.CreateDataLabelingJobRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [DataLabelingJobService.CreateDataLabelingJob][].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CreateDataLabelingJobRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.CreateDataLabelingJobRequest) + com.google.cloud.aiplatform.v1.CreateDataLabelingJobRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateDataLabelingJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateDataLabelingJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CreateDataLabelingJobRequest.class, + com.google.cloud.aiplatform.v1.CreateDataLabelingJobRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.CreateDataLabelingJobRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (dataLabelingJobBuilder_ == null) { + dataLabelingJob_ = null; + } else { + dataLabelingJob_ = null; + dataLabelingJobBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateDataLabelingJobRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateDataLabelingJobRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.CreateDataLabelingJobRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateDataLabelingJobRequest build() { + com.google.cloud.aiplatform.v1.CreateDataLabelingJobRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateDataLabelingJobRequest buildPartial() { + com.google.cloud.aiplatform.v1.CreateDataLabelingJobRequest result = + new com.google.cloud.aiplatform.v1.CreateDataLabelingJobRequest(this); + result.parent_ = parent_; + if (dataLabelingJobBuilder_ == null) { + result.dataLabelingJob_ = dataLabelingJob_; + } else { + result.dataLabelingJob_ = dataLabelingJobBuilder_.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.v1.CreateDataLabelingJobRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.CreateDataLabelingJobRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.CreateDataLabelingJobRequest other) { + if (other == com.google.cloud.aiplatform.v1.CreateDataLabelingJobRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasDataLabelingJob()) { + mergeDataLabelingJob(other.getDataLabelingJob()); + } + 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.v1.CreateDataLabelingJobRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.CreateDataLabelingJobRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent of the DataLabelingJob.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent of the DataLabelingJob.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent of the DataLabelingJob.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent of the DataLabelingJob.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent of the DataLabelingJob.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.cloud.aiplatform.v1.DataLabelingJob dataLabelingJob_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.DataLabelingJob, + com.google.cloud.aiplatform.v1.DataLabelingJob.Builder, + com.google.cloud.aiplatform.v1.DataLabelingJobOrBuilder> + dataLabelingJobBuilder_; + /** + * + * + *
+     * Required. The DataLabelingJob to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.DataLabelingJob data_labeling_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the dataLabelingJob field is set. + */ + public boolean hasDataLabelingJob() { + return dataLabelingJobBuilder_ != null || dataLabelingJob_ != null; + } + /** + * + * + *
+     * Required. The DataLabelingJob to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.DataLabelingJob data_labeling_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dataLabelingJob. + */ + public com.google.cloud.aiplatform.v1.DataLabelingJob getDataLabelingJob() { + if (dataLabelingJobBuilder_ == null) { + return dataLabelingJob_ == null + ? com.google.cloud.aiplatform.v1.DataLabelingJob.getDefaultInstance() + : dataLabelingJob_; + } else { + return dataLabelingJobBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The DataLabelingJob to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.DataLabelingJob data_labeling_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDataLabelingJob(com.google.cloud.aiplatform.v1.DataLabelingJob value) { + if (dataLabelingJobBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dataLabelingJob_ = value; + onChanged(); + } else { + dataLabelingJobBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The DataLabelingJob to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.DataLabelingJob data_labeling_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDataLabelingJob( + com.google.cloud.aiplatform.v1.DataLabelingJob.Builder builderForValue) { + if (dataLabelingJobBuilder_ == null) { + dataLabelingJob_ = builderForValue.build(); + onChanged(); + } else { + dataLabelingJobBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The DataLabelingJob to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.DataLabelingJob data_labeling_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeDataLabelingJob(com.google.cloud.aiplatform.v1.DataLabelingJob value) { + if (dataLabelingJobBuilder_ == null) { + if (dataLabelingJob_ != null) { + dataLabelingJob_ = + com.google.cloud.aiplatform.v1.DataLabelingJob.newBuilder(dataLabelingJob_) + .mergeFrom(value) + .buildPartial(); + } else { + dataLabelingJob_ = value; + } + onChanged(); + } else { + dataLabelingJobBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The DataLabelingJob to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.DataLabelingJob data_labeling_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearDataLabelingJob() { + if (dataLabelingJobBuilder_ == null) { + dataLabelingJob_ = null; + onChanged(); + } else { + dataLabelingJob_ = null; + dataLabelingJobBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The DataLabelingJob to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.DataLabelingJob data_labeling_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.DataLabelingJob.Builder getDataLabelingJobBuilder() { + + onChanged(); + return getDataLabelingJobFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The DataLabelingJob to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.DataLabelingJob data_labeling_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.DataLabelingJobOrBuilder getDataLabelingJobOrBuilder() { + if (dataLabelingJobBuilder_ != null) { + return dataLabelingJobBuilder_.getMessageOrBuilder(); + } else { + return dataLabelingJob_ == null + ? com.google.cloud.aiplatform.v1.DataLabelingJob.getDefaultInstance() + : dataLabelingJob_; + } + } + /** + * + * + *
+     * Required. The DataLabelingJob to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.DataLabelingJob data_labeling_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.DataLabelingJob, + com.google.cloud.aiplatform.v1.DataLabelingJob.Builder, + com.google.cloud.aiplatform.v1.DataLabelingJobOrBuilder> + getDataLabelingJobFieldBuilder() { + if (dataLabelingJobBuilder_ == null) { + dataLabelingJobBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.DataLabelingJob, + com.google.cloud.aiplatform.v1.DataLabelingJob.Builder, + com.google.cloud.aiplatform.v1.DataLabelingJobOrBuilder>( + getDataLabelingJob(), getParentForChildren(), isClean()); + dataLabelingJob_ = null; + } + return dataLabelingJobBuilder_; + } + + @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.v1.CreateDataLabelingJobRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.CreateDataLabelingJobRequest) + private static final com.google.cloud.aiplatform.v1.CreateDataLabelingJobRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.CreateDataLabelingJobRequest(); + } + + public static com.google.cloud.aiplatform.v1.CreateDataLabelingJobRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateDataLabelingJobRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateDataLabelingJobRequest(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.v1.CreateDataLabelingJobRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateDataLabelingJobRequestOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateDataLabelingJobRequestOrBuilder.java new file mode 100644 index 000000000..38495929a --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateDataLabelingJobRequestOrBuilder.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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/job_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface CreateDataLabelingJobRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.CreateDataLabelingJobRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent of the DataLabelingJob.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent of the DataLabelingJob.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The DataLabelingJob to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.DataLabelingJob data_labeling_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the dataLabelingJob field is set. + */ + boolean hasDataLabelingJob(); + /** + * + * + *
+   * Required. The DataLabelingJob to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.DataLabelingJob data_labeling_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dataLabelingJob. + */ + com.google.cloud.aiplatform.v1.DataLabelingJob getDataLabelingJob(); + /** + * + * + *
+   * Required. The DataLabelingJob to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.DataLabelingJob data_labeling_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1.DataLabelingJobOrBuilder getDataLabelingJobOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateDatasetOperationMetadata.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateDatasetOperationMetadata.java new file mode 100644 index 000000000..a35142f1b --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateDatasetOperationMetadata.java @@ -0,0 +1,746 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/dataset_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Runtime operation information for [DatasetService.CreateDataset][google.cloud.aiplatform.v1.DatasetService.CreateDataset].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CreateDatasetOperationMetadata} + */ +public final class CreateDatasetOperationMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.CreateDatasetOperationMetadata) + CreateDatasetOperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateDatasetOperationMetadata.newBuilder() to construct. + private CreateDatasetOperationMetadata( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateDatasetOperationMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateDatasetOperationMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateDatasetOperationMetadata( + 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.v1.GenericOperationMetadata.Builder subBuilder = null; + if (genericMetadata_ != null) { + subBuilder = genericMetadata_.toBuilder(); + } + genericMetadata_ = + input.readMessage( + com.google.cloud.aiplatform.v1.GenericOperationMetadata.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(genericMetadata_); + genericMetadata_ = 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.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateDatasetOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateDatasetOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CreateDatasetOperationMetadata.class, + com.google.cloud.aiplatform.v1.CreateDatasetOperationMetadata.Builder.class); + } + + public static final int GENERIC_METADATA_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1.GenericOperationMetadata genericMetadata_; + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + @java.lang.Override + public boolean hasGenericMetadata() { + return genericMetadata_ != null; + } + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata() { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder() { + return getGenericMetadata(); + } + + 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 (genericMetadata_ != null) { + output.writeMessage(1, getGenericMetadata()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (genericMetadata_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getGenericMetadata()); + } + 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.v1.CreateDatasetOperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.CreateDatasetOperationMetadata other = + (com.google.cloud.aiplatform.v1.CreateDatasetOperationMetadata) obj; + + if (hasGenericMetadata() != other.hasGenericMetadata()) return false; + if (hasGenericMetadata()) { + if (!getGenericMetadata().equals(other.getGenericMetadata())) 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 (hasGenericMetadata()) { + hash = (37 * hash) + GENERIC_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getGenericMetadata().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.CreateDatasetOperationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CreateDatasetOperationMetadata 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.v1.CreateDatasetOperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CreateDatasetOperationMetadata 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.v1.CreateDatasetOperationMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CreateDatasetOperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreateDatasetOperationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CreateDatasetOperationMetadata 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.v1.CreateDatasetOperationMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CreateDatasetOperationMetadata 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.v1.CreateDatasetOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CreateDatasetOperationMetadata 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.v1.CreateDatasetOperationMetadata 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; + } + /** + * + * + *
+   * Runtime operation information for [DatasetService.CreateDataset][google.cloud.aiplatform.v1.DatasetService.CreateDataset].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CreateDatasetOperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.CreateDatasetOperationMetadata) + com.google.cloud.aiplatform.v1.CreateDatasetOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateDatasetOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateDatasetOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CreateDatasetOperationMetadata.class, + com.google.cloud.aiplatform.v1.CreateDatasetOperationMetadata.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.CreateDatasetOperationMetadata.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 (genericMetadataBuilder_ == null) { + genericMetadata_ = null; + } else { + genericMetadata_ = null; + genericMetadataBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateDatasetOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateDatasetOperationMetadata + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.CreateDatasetOperationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateDatasetOperationMetadata build() { + com.google.cloud.aiplatform.v1.CreateDatasetOperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateDatasetOperationMetadata buildPartial() { + com.google.cloud.aiplatform.v1.CreateDatasetOperationMetadata result = + new com.google.cloud.aiplatform.v1.CreateDatasetOperationMetadata(this); + if (genericMetadataBuilder_ == null) { + result.genericMetadata_ = genericMetadata_; + } else { + result.genericMetadata_ = genericMetadataBuilder_.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.v1.CreateDatasetOperationMetadata) { + return mergeFrom((com.google.cloud.aiplatform.v1.CreateDatasetOperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.CreateDatasetOperationMetadata other) { + if (other + == com.google.cloud.aiplatform.v1.CreateDatasetOperationMetadata.getDefaultInstance()) + return this; + if (other.hasGenericMetadata()) { + mergeGenericMetadata(other.getGenericMetadata()); + } + 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.v1.CreateDatasetOperationMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.CreateDatasetOperationMetadata) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.aiplatform.v1.GenericOperationMetadata genericMetadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder> + genericMetadataBuilder_; + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + public boolean hasGenericMetadata() { + return genericMetadataBuilder_ != null || genericMetadata_ != null; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata() { + if (genericMetadataBuilder_ == null) { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } else { + return genericMetadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder setGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata value) { + if (genericMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + genericMetadata_ = value; + onChanged(); + } else { + genericMetadataBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder setGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder builderForValue) { + if (genericMetadataBuilder_ == null) { + genericMetadata_ = builderForValue.build(); + onChanged(); + } else { + genericMetadataBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder mergeGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata value) { + if (genericMetadataBuilder_ == null) { + if (genericMetadata_ != null) { + genericMetadata_ = + com.google.cloud.aiplatform.v1.GenericOperationMetadata.newBuilder(genericMetadata_) + .mergeFrom(value) + .buildPartial(); + } else { + genericMetadata_ = value; + } + onChanged(); + } else { + genericMetadataBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder clearGenericMetadata() { + if (genericMetadataBuilder_ == null) { + genericMetadata_ = null; + onChanged(); + } else { + genericMetadata_ = null; + genericMetadataBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder + getGenericMetadataBuilder() { + + onChanged(); + return getGenericMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder() { + if (genericMetadataBuilder_ != null) { + return genericMetadataBuilder_.getMessageOrBuilder(); + } else { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder> + getGenericMetadataFieldBuilder() { + if (genericMetadataBuilder_ == null) { + genericMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder>( + getGenericMetadata(), getParentForChildren(), isClean()); + genericMetadata_ = null; + } + return genericMetadataBuilder_; + } + + @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.v1.CreateDatasetOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.CreateDatasetOperationMetadata) + private static final com.google.cloud.aiplatform.v1.CreateDatasetOperationMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.CreateDatasetOperationMetadata(); + } + + public static com.google.cloud.aiplatform.v1.CreateDatasetOperationMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateDatasetOperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateDatasetOperationMetadata(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.v1.CreateDatasetOperationMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateDatasetOperationMetadataOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateDatasetOperationMetadataOrBuilder.java new file mode 100644 index 000000000..502366c16 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateDatasetOperationMetadataOrBuilder.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/v1/dataset_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface CreateDatasetOperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.CreateDatasetOperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + boolean hasGenericMetadata(); + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata(); + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder getGenericMetadataOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateDatasetRequest.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateDatasetRequest.java new file mode 100644 index 000000000..a9b5c2d8f --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateDatasetRequest.java @@ -0,0 +1,958 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/dataset_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for [DatasetService.CreateDataset][google.cloud.aiplatform.v1.DatasetService.CreateDataset].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CreateDatasetRequest} + */ +public final class CreateDatasetRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.CreateDatasetRequest) + CreateDatasetRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateDatasetRequest.newBuilder() to construct. + private CreateDatasetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateDatasetRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateDatasetRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateDatasetRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + com.google.cloud.aiplatform.v1.Dataset.Builder subBuilder = null; + if (dataset_ != null) { + subBuilder = dataset_.toBuilder(); + } + dataset_ = + input.readMessage( + com.google.cloud.aiplatform.v1.Dataset.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(dataset_); + dataset_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateDatasetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateDatasetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CreateDatasetRequest.class, + com.google.cloud.aiplatform.v1.CreateDatasetRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The resource name of the Location to create the Dataset in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the Location to create the Dataset in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATASET_FIELD_NUMBER = 2; + private com.google.cloud.aiplatform.v1.Dataset dataset_; + /** + * + * + *
+   * Required. The Dataset to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.Dataset dataset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the dataset field is set. + */ + @java.lang.Override + public boolean hasDataset() { + return dataset_ != null; + } + /** + * + * + *
+   * Required. The Dataset to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.Dataset dataset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dataset. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.Dataset getDataset() { + return dataset_ == null + ? com.google.cloud.aiplatform.v1.Dataset.getDefaultInstance() + : dataset_; + } + /** + * + * + *
+   * Required. The Dataset to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.Dataset dataset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.DatasetOrBuilder getDatasetOrBuilder() { + return getDataset(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (dataset_ != null) { + output.writeMessage(2, getDataset()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (dataset_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDataset()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.CreateDatasetRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.CreateDatasetRequest other = + (com.google.cloud.aiplatform.v1.CreateDatasetRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasDataset() != other.hasDataset()) return false; + if (hasDataset()) { + if (!getDataset().equals(other.getDataset())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasDataset()) { + hash = (37 * hash) + DATASET_FIELD_NUMBER; + hash = (53 * hash) + getDataset().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.CreateDatasetRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CreateDatasetRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreateDatasetRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CreateDatasetRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreateDatasetRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CreateDatasetRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreateDatasetRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CreateDatasetRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreateDatasetRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CreateDatasetRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreateDatasetRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CreateDatasetRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1.CreateDatasetRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [DatasetService.CreateDataset][google.cloud.aiplatform.v1.DatasetService.CreateDataset].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CreateDatasetRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.CreateDatasetRequest) + com.google.cloud.aiplatform.v1.CreateDatasetRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateDatasetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateDatasetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CreateDatasetRequest.class, + com.google.cloud.aiplatform.v1.CreateDatasetRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.CreateDatasetRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (datasetBuilder_ == null) { + dataset_ = null; + } else { + dataset_ = null; + datasetBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateDatasetRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateDatasetRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.CreateDatasetRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateDatasetRequest build() { + com.google.cloud.aiplatform.v1.CreateDatasetRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateDatasetRequest buildPartial() { + com.google.cloud.aiplatform.v1.CreateDatasetRequest result = + new com.google.cloud.aiplatform.v1.CreateDatasetRequest(this); + result.parent_ = parent_; + if (datasetBuilder_ == null) { + result.dataset_ = dataset_; + } else { + result.dataset_ = datasetBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.CreateDatasetRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.CreateDatasetRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.CreateDatasetRequest other) { + if (other == com.google.cloud.aiplatform.v1.CreateDatasetRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasDataset()) { + mergeDataset(other.getDataset()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.aiplatform.v1.CreateDatasetRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.CreateDatasetRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the Location to create the Dataset in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Location to create the Dataset in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Location to create the Dataset in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Location to create the Dataset in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Location to create the Dataset in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.cloud.aiplatform.v1.Dataset dataset_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.Dataset, + com.google.cloud.aiplatform.v1.Dataset.Builder, + com.google.cloud.aiplatform.v1.DatasetOrBuilder> + datasetBuilder_; + /** + * + * + *
+     * Required. The Dataset to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Dataset dataset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the dataset field is set. + */ + public boolean hasDataset() { + return datasetBuilder_ != null || dataset_ != null; + } + /** + * + * + *
+     * Required. The Dataset to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Dataset dataset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dataset. + */ + public com.google.cloud.aiplatform.v1.Dataset getDataset() { + if (datasetBuilder_ == null) { + return dataset_ == null + ? com.google.cloud.aiplatform.v1.Dataset.getDefaultInstance() + : dataset_; + } else { + return datasetBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The Dataset to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Dataset dataset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDataset(com.google.cloud.aiplatform.v1.Dataset value) { + if (datasetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dataset_ = value; + onChanged(); + } else { + datasetBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The Dataset to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Dataset dataset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDataset(com.google.cloud.aiplatform.v1.Dataset.Builder builderForValue) { + if (datasetBuilder_ == null) { + dataset_ = builderForValue.build(); + onChanged(); + } else { + datasetBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The Dataset to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Dataset dataset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeDataset(com.google.cloud.aiplatform.v1.Dataset value) { + if (datasetBuilder_ == null) { + if (dataset_ != null) { + dataset_ = + com.google.cloud.aiplatform.v1.Dataset.newBuilder(dataset_) + .mergeFrom(value) + .buildPartial(); + } else { + dataset_ = value; + } + onChanged(); + } else { + datasetBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The Dataset to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Dataset dataset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearDataset() { + if (datasetBuilder_ == null) { + dataset_ = null; + onChanged(); + } else { + dataset_ = null; + datasetBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The Dataset to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Dataset dataset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.Dataset.Builder getDatasetBuilder() { + + onChanged(); + return getDatasetFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The Dataset to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Dataset dataset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.DatasetOrBuilder getDatasetOrBuilder() { + if (datasetBuilder_ != null) { + return datasetBuilder_.getMessageOrBuilder(); + } else { + return dataset_ == null + ? com.google.cloud.aiplatform.v1.Dataset.getDefaultInstance() + : dataset_; + } + } + /** + * + * + *
+     * Required. The Dataset to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Dataset dataset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.Dataset, + com.google.cloud.aiplatform.v1.Dataset.Builder, + com.google.cloud.aiplatform.v1.DatasetOrBuilder> + getDatasetFieldBuilder() { + if (datasetBuilder_ == null) { + datasetBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.Dataset, + com.google.cloud.aiplatform.v1.Dataset.Builder, + com.google.cloud.aiplatform.v1.DatasetOrBuilder>( + getDataset(), getParentForChildren(), isClean()); + dataset_ = null; + } + return datasetBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.CreateDatasetRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.CreateDatasetRequest) + private static final com.google.cloud.aiplatform.v1.CreateDatasetRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.CreateDatasetRequest(); + } + + public static com.google.cloud.aiplatform.v1.CreateDatasetRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateDatasetRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateDatasetRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateDatasetRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateDatasetRequestOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateDatasetRequestOrBuilder.java new file mode 100644 index 000000000..ef7f3e9b9 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateDatasetRequestOrBuilder.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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/dataset_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface CreateDatasetRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.CreateDatasetRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the Location to create the Dataset in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of the Location to create the Dataset in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The Dataset to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.Dataset dataset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the dataset field is set. + */ + boolean hasDataset(); + /** + * + * + *
+   * Required. The Dataset to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.Dataset dataset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dataset. + */ + com.google.cloud.aiplatform.v1.Dataset getDataset(); + /** + * + * + *
+   * Required. The Dataset to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.Dataset dataset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1.DatasetOrBuilder getDatasetOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateEndpointOperationMetadata.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateEndpointOperationMetadata.java new file mode 100644 index 000000000..902d38e20 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateEndpointOperationMetadata.java @@ -0,0 +1,748 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/endpoint_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Runtime operation information for [EndpointService.CreateEndpoint][google.cloud.aiplatform.v1.EndpointService.CreateEndpoint].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CreateEndpointOperationMetadata} + */ +public final class CreateEndpointOperationMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.CreateEndpointOperationMetadata) + CreateEndpointOperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateEndpointOperationMetadata.newBuilder() to construct. + private CreateEndpointOperationMetadata( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateEndpointOperationMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateEndpointOperationMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateEndpointOperationMetadata( + 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.v1.GenericOperationMetadata.Builder subBuilder = null; + if (genericMetadata_ != null) { + subBuilder = genericMetadata_.toBuilder(); + } + genericMetadata_ = + input.readMessage( + com.google.cloud.aiplatform.v1.GenericOperationMetadata.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(genericMetadata_); + genericMetadata_ = 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.v1.EndpointServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateEndpointOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.EndpointServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateEndpointOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CreateEndpointOperationMetadata.class, + com.google.cloud.aiplatform.v1.CreateEndpointOperationMetadata.Builder.class); + } + + public static final int GENERIC_METADATA_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1.GenericOperationMetadata genericMetadata_; + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + @java.lang.Override + public boolean hasGenericMetadata() { + return genericMetadata_ != null; + } + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata() { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder() { + return getGenericMetadata(); + } + + 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 (genericMetadata_ != null) { + output.writeMessage(1, getGenericMetadata()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (genericMetadata_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getGenericMetadata()); + } + 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.v1.CreateEndpointOperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.CreateEndpointOperationMetadata other = + (com.google.cloud.aiplatform.v1.CreateEndpointOperationMetadata) obj; + + if (hasGenericMetadata() != other.hasGenericMetadata()) return false; + if (hasGenericMetadata()) { + if (!getGenericMetadata().equals(other.getGenericMetadata())) 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 (hasGenericMetadata()) { + hash = (37 * hash) + GENERIC_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getGenericMetadata().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.CreateEndpointOperationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CreateEndpointOperationMetadata 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.v1.CreateEndpointOperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CreateEndpointOperationMetadata 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.v1.CreateEndpointOperationMetadata parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CreateEndpointOperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreateEndpointOperationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CreateEndpointOperationMetadata 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.v1.CreateEndpointOperationMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CreateEndpointOperationMetadata 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.v1.CreateEndpointOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CreateEndpointOperationMetadata 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.v1.CreateEndpointOperationMetadata 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; + } + /** + * + * + *
+   * Runtime operation information for [EndpointService.CreateEndpoint][google.cloud.aiplatform.v1.EndpointService.CreateEndpoint].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CreateEndpointOperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.CreateEndpointOperationMetadata) + com.google.cloud.aiplatform.v1.CreateEndpointOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.EndpointServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateEndpointOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.EndpointServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateEndpointOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CreateEndpointOperationMetadata.class, + com.google.cloud.aiplatform.v1.CreateEndpointOperationMetadata.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.CreateEndpointOperationMetadata.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 (genericMetadataBuilder_ == null) { + genericMetadata_ = null; + } else { + genericMetadata_ = null; + genericMetadataBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.EndpointServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateEndpointOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateEndpointOperationMetadata + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.CreateEndpointOperationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateEndpointOperationMetadata build() { + com.google.cloud.aiplatform.v1.CreateEndpointOperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateEndpointOperationMetadata buildPartial() { + com.google.cloud.aiplatform.v1.CreateEndpointOperationMetadata result = + new com.google.cloud.aiplatform.v1.CreateEndpointOperationMetadata(this); + if (genericMetadataBuilder_ == null) { + result.genericMetadata_ = genericMetadata_; + } else { + result.genericMetadata_ = genericMetadataBuilder_.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.v1.CreateEndpointOperationMetadata) { + return mergeFrom((com.google.cloud.aiplatform.v1.CreateEndpointOperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.CreateEndpointOperationMetadata other) { + if (other + == com.google.cloud.aiplatform.v1.CreateEndpointOperationMetadata.getDefaultInstance()) + return this; + if (other.hasGenericMetadata()) { + mergeGenericMetadata(other.getGenericMetadata()); + } + 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.v1.CreateEndpointOperationMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.CreateEndpointOperationMetadata) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.aiplatform.v1.GenericOperationMetadata genericMetadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder> + genericMetadataBuilder_; + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + public boolean hasGenericMetadata() { + return genericMetadataBuilder_ != null || genericMetadata_ != null; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata() { + if (genericMetadataBuilder_ == null) { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } else { + return genericMetadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder setGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata value) { + if (genericMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + genericMetadata_ = value; + onChanged(); + } else { + genericMetadataBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder setGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder builderForValue) { + if (genericMetadataBuilder_ == null) { + genericMetadata_ = builderForValue.build(); + onChanged(); + } else { + genericMetadataBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder mergeGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata value) { + if (genericMetadataBuilder_ == null) { + if (genericMetadata_ != null) { + genericMetadata_ = + com.google.cloud.aiplatform.v1.GenericOperationMetadata.newBuilder(genericMetadata_) + .mergeFrom(value) + .buildPartial(); + } else { + genericMetadata_ = value; + } + onChanged(); + } else { + genericMetadataBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder clearGenericMetadata() { + if (genericMetadataBuilder_ == null) { + genericMetadata_ = null; + onChanged(); + } else { + genericMetadata_ = null; + genericMetadataBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder + getGenericMetadataBuilder() { + + onChanged(); + return getGenericMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder() { + if (genericMetadataBuilder_ != null) { + return genericMetadataBuilder_.getMessageOrBuilder(); + } else { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder> + getGenericMetadataFieldBuilder() { + if (genericMetadataBuilder_ == null) { + genericMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder>( + getGenericMetadata(), getParentForChildren(), isClean()); + genericMetadata_ = null; + } + return genericMetadataBuilder_; + } + + @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.v1.CreateEndpointOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.CreateEndpointOperationMetadata) + private static final com.google.cloud.aiplatform.v1.CreateEndpointOperationMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.CreateEndpointOperationMetadata(); + } + + public static com.google.cloud.aiplatform.v1.CreateEndpointOperationMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateEndpointOperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateEndpointOperationMetadata(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.v1.CreateEndpointOperationMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateEndpointOperationMetadataOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateEndpointOperationMetadataOrBuilder.java new file mode 100644 index 000000000..00d17e795 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateEndpointOperationMetadataOrBuilder.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/v1/endpoint_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface CreateEndpointOperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.CreateEndpointOperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + boolean hasGenericMetadata(); + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata(); + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder getGenericMetadataOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateEndpointRequest.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateEndpointRequest.java new file mode 100644 index 000000000..06ee83db2 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateEndpointRequest.java @@ -0,0 +1,958 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/endpoint_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for [EndpointService.CreateEndpoint][google.cloud.aiplatform.v1.EndpointService.CreateEndpoint].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CreateEndpointRequest} + */ +public final class CreateEndpointRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.CreateEndpointRequest) + CreateEndpointRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateEndpointRequest.newBuilder() to construct. + private CreateEndpointRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateEndpointRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateEndpointRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateEndpointRequest( + 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(); + + parent_ = s; + break; + } + case 18: + { + com.google.cloud.aiplatform.v1.Endpoint.Builder subBuilder = null; + if (endpoint_ != null) { + subBuilder = endpoint_.toBuilder(); + } + endpoint_ = + input.readMessage( + com.google.cloud.aiplatform.v1.Endpoint.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(endpoint_); + endpoint_ = 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.v1.EndpointServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateEndpointRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.EndpointServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateEndpointRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CreateEndpointRequest.class, + com.google.cloud.aiplatform.v1.CreateEndpointRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The resource name of the Location to create the Endpoint in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the Location to create the Endpoint in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENDPOINT_FIELD_NUMBER = 2; + private com.google.cloud.aiplatform.v1.Endpoint endpoint_; + /** + * + * + *
+   * Required. The Endpoint to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.Endpoint endpoint = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the endpoint field is set. + */ + @java.lang.Override + public boolean hasEndpoint() { + return endpoint_ != null; + } + /** + * + * + *
+   * Required. The Endpoint to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.Endpoint endpoint = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The endpoint. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.Endpoint getEndpoint() { + return endpoint_ == null + ? com.google.cloud.aiplatform.v1.Endpoint.getDefaultInstance() + : endpoint_; + } + /** + * + * + *
+   * Required. The Endpoint to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.Endpoint endpoint = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.EndpointOrBuilder getEndpointOrBuilder() { + return getEndpoint(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (endpoint_ != null) { + output.writeMessage(2, getEndpoint()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (endpoint_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEndpoint()); + } + 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.v1.CreateEndpointRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.CreateEndpointRequest other = + (com.google.cloud.aiplatform.v1.CreateEndpointRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasEndpoint() != other.hasEndpoint()) return false; + if (hasEndpoint()) { + if (!getEndpoint().equals(other.getEndpoint())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasEndpoint()) { + hash = (37 * hash) + ENDPOINT_FIELD_NUMBER; + hash = (53 * hash) + getEndpoint().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.CreateEndpointRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CreateEndpointRequest 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.v1.CreateEndpointRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CreateEndpointRequest 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.v1.CreateEndpointRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CreateEndpointRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreateEndpointRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CreateEndpointRequest 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.v1.CreateEndpointRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CreateEndpointRequest 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.v1.CreateEndpointRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CreateEndpointRequest 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.v1.CreateEndpointRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [EndpointService.CreateEndpoint][google.cloud.aiplatform.v1.EndpointService.CreateEndpoint].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CreateEndpointRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.CreateEndpointRequest) + com.google.cloud.aiplatform.v1.CreateEndpointRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.EndpointServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateEndpointRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.EndpointServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateEndpointRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CreateEndpointRequest.class, + com.google.cloud.aiplatform.v1.CreateEndpointRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.CreateEndpointRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (endpointBuilder_ == null) { + endpoint_ = null; + } else { + endpoint_ = null; + endpointBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.EndpointServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateEndpointRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateEndpointRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.CreateEndpointRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateEndpointRequest build() { + com.google.cloud.aiplatform.v1.CreateEndpointRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateEndpointRequest buildPartial() { + com.google.cloud.aiplatform.v1.CreateEndpointRequest result = + new com.google.cloud.aiplatform.v1.CreateEndpointRequest(this); + result.parent_ = parent_; + if (endpointBuilder_ == null) { + result.endpoint_ = endpoint_; + } else { + result.endpoint_ = endpointBuilder_.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.v1.CreateEndpointRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.CreateEndpointRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.CreateEndpointRequest other) { + if (other == com.google.cloud.aiplatform.v1.CreateEndpointRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasEndpoint()) { + mergeEndpoint(other.getEndpoint()); + } + 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.v1.CreateEndpointRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.CreateEndpointRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the Location to create the Endpoint in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Location to create the Endpoint in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Location to create the Endpoint in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Location to create the Endpoint in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Location to create the Endpoint in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.cloud.aiplatform.v1.Endpoint endpoint_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.Endpoint, + com.google.cloud.aiplatform.v1.Endpoint.Builder, + com.google.cloud.aiplatform.v1.EndpointOrBuilder> + endpointBuilder_; + /** + * + * + *
+     * Required. The Endpoint to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Endpoint endpoint = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the endpoint field is set. + */ + public boolean hasEndpoint() { + return endpointBuilder_ != null || endpoint_ != null; + } + /** + * + * + *
+     * Required. The Endpoint to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Endpoint endpoint = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The endpoint. + */ + public com.google.cloud.aiplatform.v1.Endpoint getEndpoint() { + if (endpointBuilder_ == null) { + return endpoint_ == null + ? com.google.cloud.aiplatform.v1.Endpoint.getDefaultInstance() + : endpoint_; + } else { + return endpointBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The Endpoint to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Endpoint endpoint = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setEndpoint(com.google.cloud.aiplatform.v1.Endpoint value) { + if (endpointBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endpoint_ = value; + onChanged(); + } else { + endpointBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The Endpoint to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Endpoint endpoint = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setEndpoint(com.google.cloud.aiplatform.v1.Endpoint.Builder builderForValue) { + if (endpointBuilder_ == null) { + endpoint_ = builderForValue.build(); + onChanged(); + } else { + endpointBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The Endpoint to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Endpoint endpoint = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeEndpoint(com.google.cloud.aiplatform.v1.Endpoint value) { + if (endpointBuilder_ == null) { + if (endpoint_ != null) { + endpoint_ = + com.google.cloud.aiplatform.v1.Endpoint.newBuilder(endpoint_) + .mergeFrom(value) + .buildPartial(); + } else { + endpoint_ = value; + } + onChanged(); + } else { + endpointBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The Endpoint to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Endpoint endpoint = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearEndpoint() { + if (endpointBuilder_ == null) { + endpoint_ = null; + onChanged(); + } else { + endpoint_ = null; + endpointBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The Endpoint to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Endpoint endpoint = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.Endpoint.Builder getEndpointBuilder() { + + onChanged(); + return getEndpointFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The Endpoint to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Endpoint endpoint = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.EndpointOrBuilder getEndpointOrBuilder() { + if (endpointBuilder_ != null) { + return endpointBuilder_.getMessageOrBuilder(); + } else { + return endpoint_ == null + ? com.google.cloud.aiplatform.v1.Endpoint.getDefaultInstance() + : endpoint_; + } + } + /** + * + * + *
+     * Required. The Endpoint to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Endpoint endpoint = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.Endpoint, + com.google.cloud.aiplatform.v1.Endpoint.Builder, + com.google.cloud.aiplatform.v1.EndpointOrBuilder> + getEndpointFieldBuilder() { + if (endpointBuilder_ == null) { + endpointBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.Endpoint, + com.google.cloud.aiplatform.v1.Endpoint.Builder, + com.google.cloud.aiplatform.v1.EndpointOrBuilder>( + getEndpoint(), getParentForChildren(), isClean()); + endpoint_ = null; + } + return endpointBuilder_; + } + + @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.v1.CreateEndpointRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.CreateEndpointRequest) + private static final com.google.cloud.aiplatform.v1.CreateEndpointRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.CreateEndpointRequest(); + } + + public static com.google.cloud.aiplatform.v1.CreateEndpointRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateEndpointRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateEndpointRequest(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.v1.CreateEndpointRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateEndpointRequestOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateEndpointRequestOrBuilder.java new file mode 100644 index 000000000..04f234a9b --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateEndpointRequestOrBuilder.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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/endpoint_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface CreateEndpointRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.CreateEndpointRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the Location to create the Endpoint in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of the Location to create the Endpoint in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The Endpoint to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.Endpoint endpoint = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the endpoint field is set. + */ + boolean hasEndpoint(); + /** + * + * + *
+   * Required. The Endpoint to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.Endpoint endpoint = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The endpoint. + */ + com.google.cloud.aiplatform.v1.Endpoint getEndpoint(); + /** + * + * + *
+   * Required. The Endpoint to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.Endpoint endpoint = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1.EndpointOrBuilder getEndpointOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateHyperparameterTuningJobRequest.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateHyperparameterTuningJobRequest.java new file mode 100644 index 000000000..ff233daf2 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateHyperparameterTuningJobRequest.java @@ -0,0 +1,981 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/job_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for [JobService.CreateHyperparameterTuningJob][google.cloud.aiplatform.v1.JobService.CreateHyperparameterTuningJob].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CreateHyperparameterTuningJobRequest} + */ +public final class CreateHyperparameterTuningJobRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.CreateHyperparameterTuningJobRequest) + CreateHyperparameterTuningJobRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateHyperparameterTuningJobRequest.newBuilder() to construct. + private CreateHyperparameterTuningJobRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateHyperparameterTuningJobRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateHyperparameterTuningJobRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateHyperparameterTuningJobRequest( + 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(); + + parent_ = s; + break; + } + case 18: + { + com.google.cloud.aiplatform.v1.HyperparameterTuningJob.Builder subBuilder = null; + if (hyperparameterTuningJob_ != null) { + subBuilder = hyperparameterTuningJob_.toBuilder(); + } + hyperparameterTuningJob_ = + input.readMessage( + com.google.cloud.aiplatform.v1.HyperparameterTuningJob.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(hyperparameterTuningJob_); + hyperparameterTuningJob_ = 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.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateHyperparameterTuningJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateHyperparameterTuningJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CreateHyperparameterTuningJobRequest.class, + com.google.cloud.aiplatform.v1.CreateHyperparameterTuningJobRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The resource name of the Location to create the HyperparameterTuningJob in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the Location to create the HyperparameterTuningJob in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int HYPERPARAMETER_TUNING_JOB_FIELD_NUMBER = 2; + private com.google.cloud.aiplatform.v1.HyperparameterTuningJob hyperparameterTuningJob_; + /** + * + * + *
+   * Required. The HyperparameterTuningJob to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.HyperparameterTuningJob hyperparameter_tuning_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the hyperparameterTuningJob field is set. + */ + @java.lang.Override + public boolean hasHyperparameterTuningJob() { + return hyperparameterTuningJob_ != null; + } + /** + * + * + *
+   * Required. The HyperparameterTuningJob to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.HyperparameterTuningJob hyperparameter_tuning_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The hyperparameterTuningJob. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.HyperparameterTuningJob getHyperparameterTuningJob() { + return hyperparameterTuningJob_ == null + ? com.google.cloud.aiplatform.v1.HyperparameterTuningJob.getDefaultInstance() + : hyperparameterTuningJob_; + } + /** + * + * + *
+   * Required. The HyperparameterTuningJob to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.HyperparameterTuningJob hyperparameter_tuning_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.HyperparameterTuningJobOrBuilder + getHyperparameterTuningJobOrBuilder() { + return getHyperparameterTuningJob(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (hyperparameterTuningJob_ != null) { + output.writeMessage(2, getHyperparameterTuningJob()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (hyperparameterTuningJob_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, getHyperparameterTuningJob()); + } + 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.v1.CreateHyperparameterTuningJobRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.CreateHyperparameterTuningJobRequest other = + (com.google.cloud.aiplatform.v1.CreateHyperparameterTuningJobRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasHyperparameterTuningJob() != other.hasHyperparameterTuningJob()) return false; + if (hasHyperparameterTuningJob()) { + if (!getHyperparameterTuningJob().equals(other.getHyperparameterTuningJob())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasHyperparameterTuningJob()) { + hash = (37 * hash) + HYPERPARAMETER_TUNING_JOB_FIELD_NUMBER; + hash = (53 * hash) + getHyperparameterTuningJob().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.CreateHyperparameterTuningJobRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CreateHyperparameterTuningJobRequest 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.v1.CreateHyperparameterTuningJobRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CreateHyperparameterTuningJobRequest 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.v1.CreateHyperparameterTuningJobRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CreateHyperparameterTuningJobRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreateHyperparameterTuningJobRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CreateHyperparameterTuningJobRequest 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.v1.CreateHyperparameterTuningJobRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CreateHyperparameterTuningJobRequest + 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.v1.CreateHyperparameterTuningJobRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CreateHyperparameterTuningJobRequest 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.v1.CreateHyperparameterTuningJobRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [JobService.CreateHyperparameterTuningJob][google.cloud.aiplatform.v1.JobService.CreateHyperparameterTuningJob].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CreateHyperparameterTuningJobRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.CreateHyperparameterTuningJobRequest) + com.google.cloud.aiplatform.v1.CreateHyperparameterTuningJobRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateHyperparameterTuningJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateHyperparameterTuningJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CreateHyperparameterTuningJobRequest.class, + com.google.cloud.aiplatform.v1.CreateHyperparameterTuningJobRequest.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.CreateHyperparameterTuningJobRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (hyperparameterTuningJobBuilder_ == null) { + hyperparameterTuningJob_ = null; + } else { + hyperparameterTuningJob_ = null; + hyperparameterTuningJobBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateHyperparameterTuningJobRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateHyperparameterTuningJobRequest + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.CreateHyperparameterTuningJobRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateHyperparameterTuningJobRequest build() { + com.google.cloud.aiplatform.v1.CreateHyperparameterTuningJobRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateHyperparameterTuningJobRequest buildPartial() { + com.google.cloud.aiplatform.v1.CreateHyperparameterTuningJobRequest result = + new com.google.cloud.aiplatform.v1.CreateHyperparameterTuningJobRequest(this); + result.parent_ = parent_; + if (hyperparameterTuningJobBuilder_ == null) { + result.hyperparameterTuningJob_ = hyperparameterTuningJob_; + } else { + result.hyperparameterTuningJob_ = hyperparameterTuningJobBuilder_.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.v1.CreateHyperparameterTuningJobRequest) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.CreateHyperparameterTuningJobRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.CreateHyperparameterTuningJobRequest other) { + if (other + == com.google.cloud.aiplatform.v1.CreateHyperparameterTuningJobRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasHyperparameterTuningJob()) { + mergeHyperparameterTuningJob(other.getHyperparameterTuningJob()); + } + 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.v1.CreateHyperparameterTuningJobRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.CreateHyperparameterTuningJobRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the Location to create the HyperparameterTuningJob in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Location to create the HyperparameterTuningJob in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Location to create the HyperparameterTuningJob in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Location to create the HyperparameterTuningJob in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Location to create the HyperparameterTuningJob in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.cloud.aiplatform.v1.HyperparameterTuningJob hyperparameterTuningJob_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.HyperparameterTuningJob, + com.google.cloud.aiplatform.v1.HyperparameterTuningJob.Builder, + com.google.cloud.aiplatform.v1.HyperparameterTuningJobOrBuilder> + hyperparameterTuningJobBuilder_; + /** + * + * + *
+     * Required. The HyperparameterTuningJob to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.HyperparameterTuningJob hyperparameter_tuning_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the hyperparameterTuningJob field is set. + */ + public boolean hasHyperparameterTuningJob() { + return hyperparameterTuningJobBuilder_ != null || hyperparameterTuningJob_ != null; + } + /** + * + * + *
+     * Required. The HyperparameterTuningJob to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.HyperparameterTuningJob hyperparameter_tuning_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The hyperparameterTuningJob. + */ + public com.google.cloud.aiplatform.v1.HyperparameterTuningJob getHyperparameterTuningJob() { + if (hyperparameterTuningJobBuilder_ == null) { + return hyperparameterTuningJob_ == null + ? com.google.cloud.aiplatform.v1.HyperparameterTuningJob.getDefaultInstance() + : hyperparameterTuningJob_; + } else { + return hyperparameterTuningJobBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The HyperparameterTuningJob to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.HyperparameterTuningJob hyperparameter_tuning_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setHyperparameterTuningJob( + com.google.cloud.aiplatform.v1.HyperparameterTuningJob value) { + if (hyperparameterTuningJobBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + hyperparameterTuningJob_ = value; + onChanged(); + } else { + hyperparameterTuningJobBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The HyperparameterTuningJob to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.HyperparameterTuningJob hyperparameter_tuning_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setHyperparameterTuningJob( + com.google.cloud.aiplatform.v1.HyperparameterTuningJob.Builder builderForValue) { + if (hyperparameterTuningJobBuilder_ == null) { + hyperparameterTuningJob_ = builderForValue.build(); + onChanged(); + } else { + hyperparameterTuningJobBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The HyperparameterTuningJob to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.HyperparameterTuningJob hyperparameter_tuning_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeHyperparameterTuningJob( + com.google.cloud.aiplatform.v1.HyperparameterTuningJob value) { + if (hyperparameterTuningJobBuilder_ == null) { + if (hyperparameterTuningJob_ != null) { + hyperparameterTuningJob_ = + com.google.cloud.aiplatform.v1.HyperparameterTuningJob.newBuilder( + hyperparameterTuningJob_) + .mergeFrom(value) + .buildPartial(); + } else { + hyperparameterTuningJob_ = value; + } + onChanged(); + } else { + hyperparameterTuningJobBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The HyperparameterTuningJob to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.HyperparameterTuningJob hyperparameter_tuning_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearHyperparameterTuningJob() { + if (hyperparameterTuningJobBuilder_ == null) { + hyperparameterTuningJob_ = null; + onChanged(); + } else { + hyperparameterTuningJob_ = null; + hyperparameterTuningJobBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The HyperparameterTuningJob to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.HyperparameterTuningJob hyperparameter_tuning_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.HyperparameterTuningJob.Builder + getHyperparameterTuningJobBuilder() { + + onChanged(); + return getHyperparameterTuningJobFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The HyperparameterTuningJob to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.HyperparameterTuningJob hyperparameter_tuning_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.HyperparameterTuningJobOrBuilder + getHyperparameterTuningJobOrBuilder() { + if (hyperparameterTuningJobBuilder_ != null) { + return hyperparameterTuningJobBuilder_.getMessageOrBuilder(); + } else { + return hyperparameterTuningJob_ == null + ? com.google.cloud.aiplatform.v1.HyperparameterTuningJob.getDefaultInstance() + : hyperparameterTuningJob_; + } + } + /** + * + * + *
+     * Required. The HyperparameterTuningJob to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.HyperparameterTuningJob hyperparameter_tuning_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.HyperparameterTuningJob, + com.google.cloud.aiplatform.v1.HyperparameterTuningJob.Builder, + com.google.cloud.aiplatform.v1.HyperparameterTuningJobOrBuilder> + getHyperparameterTuningJobFieldBuilder() { + if (hyperparameterTuningJobBuilder_ == null) { + hyperparameterTuningJobBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.HyperparameterTuningJob, + com.google.cloud.aiplatform.v1.HyperparameterTuningJob.Builder, + com.google.cloud.aiplatform.v1.HyperparameterTuningJobOrBuilder>( + getHyperparameterTuningJob(), getParentForChildren(), isClean()); + hyperparameterTuningJob_ = null; + } + return hyperparameterTuningJobBuilder_; + } + + @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.v1.CreateHyperparameterTuningJobRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.CreateHyperparameterTuningJobRequest) + private static final com.google.cloud.aiplatform.v1.CreateHyperparameterTuningJobRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.CreateHyperparameterTuningJobRequest(); + } + + public static com.google.cloud.aiplatform.v1.CreateHyperparameterTuningJobRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateHyperparameterTuningJobRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateHyperparameterTuningJobRequest(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.v1.CreateHyperparameterTuningJobRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateHyperparameterTuningJobRequestOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateHyperparameterTuningJobRequestOrBuilder.java new file mode 100644 index 000000000..2185a863a --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateHyperparameterTuningJobRequestOrBuilder.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/v1/job_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface CreateHyperparameterTuningJobRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.CreateHyperparameterTuningJobRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the Location to create the HyperparameterTuningJob in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of the Location to create the HyperparameterTuningJob in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The HyperparameterTuningJob to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.HyperparameterTuningJob hyperparameter_tuning_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the hyperparameterTuningJob field is set. + */ + boolean hasHyperparameterTuningJob(); + /** + * + * + *
+   * Required. The HyperparameterTuningJob to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.HyperparameterTuningJob hyperparameter_tuning_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The hyperparameterTuningJob. + */ + com.google.cloud.aiplatform.v1.HyperparameterTuningJob getHyperparameterTuningJob(); + /** + * + * + *
+   * Required. The HyperparameterTuningJob to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.HyperparameterTuningJob hyperparameter_tuning_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1.HyperparameterTuningJobOrBuilder + getHyperparameterTuningJobOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateSpecialistPoolOperationMetadata.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateSpecialistPoolOperationMetadata.java new file mode 100644 index 000000000..f7ff501b6 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateSpecialistPoolOperationMetadata.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/v1/specialist_pool_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Runtime operation information for
+ * [SpecialistPoolService.CreateSpecialistPool][google.cloud.aiplatform.v1.SpecialistPoolService.CreateSpecialistPool].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CreateSpecialistPoolOperationMetadata} + */ +public final class CreateSpecialistPoolOperationMetadata + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.CreateSpecialistPoolOperationMetadata) + CreateSpecialistPoolOperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateSpecialistPoolOperationMetadata.newBuilder() to construct. + private CreateSpecialistPoolOperationMetadata( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateSpecialistPoolOperationMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateSpecialistPoolOperationMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateSpecialistPoolOperationMetadata( + 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.v1.GenericOperationMetadata.Builder subBuilder = null; + if (genericMetadata_ != null) { + subBuilder = genericMetadata_.toBuilder(); + } + genericMetadata_ = + input.readMessage( + com.google.cloud.aiplatform.v1.GenericOperationMetadata.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(genericMetadata_); + genericMetadata_ = 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.v1.SpecialistPoolServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateSpecialistPoolOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.SpecialistPoolServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateSpecialistPoolOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CreateSpecialistPoolOperationMetadata.class, + com.google.cloud.aiplatform.v1.CreateSpecialistPoolOperationMetadata.Builder.class); + } + + public static final int GENERIC_METADATA_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1.GenericOperationMetadata genericMetadata_; + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + @java.lang.Override + public boolean hasGenericMetadata() { + return genericMetadata_ != null; + } + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata() { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder() { + return getGenericMetadata(); + } + + 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 (genericMetadata_ != null) { + output.writeMessage(1, getGenericMetadata()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (genericMetadata_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getGenericMetadata()); + } + 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.v1.CreateSpecialistPoolOperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.CreateSpecialistPoolOperationMetadata other = + (com.google.cloud.aiplatform.v1.CreateSpecialistPoolOperationMetadata) obj; + + if (hasGenericMetadata() != other.hasGenericMetadata()) return false; + if (hasGenericMetadata()) { + if (!getGenericMetadata().equals(other.getGenericMetadata())) 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 (hasGenericMetadata()) { + hash = (37 * hash) + GENERIC_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getGenericMetadata().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.CreateSpecialistPoolOperationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CreateSpecialistPoolOperationMetadata 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.v1.CreateSpecialistPoolOperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CreateSpecialistPoolOperationMetadata 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.v1.CreateSpecialistPoolOperationMetadata parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CreateSpecialistPoolOperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreateSpecialistPoolOperationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CreateSpecialistPoolOperationMetadata 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.v1.CreateSpecialistPoolOperationMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CreateSpecialistPoolOperationMetadata + 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.v1.CreateSpecialistPoolOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CreateSpecialistPoolOperationMetadata 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.v1.CreateSpecialistPoolOperationMetadata 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; + } + /** + * + * + *
+   * Runtime operation information for
+   * [SpecialistPoolService.CreateSpecialistPool][google.cloud.aiplatform.v1.SpecialistPoolService.CreateSpecialistPool].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CreateSpecialistPoolOperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.CreateSpecialistPoolOperationMetadata) + com.google.cloud.aiplatform.v1.CreateSpecialistPoolOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.SpecialistPoolServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateSpecialistPoolOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.SpecialistPoolServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateSpecialistPoolOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CreateSpecialistPoolOperationMetadata.class, + com.google.cloud.aiplatform.v1.CreateSpecialistPoolOperationMetadata.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.CreateSpecialistPoolOperationMetadata.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 (genericMetadataBuilder_ == null) { + genericMetadata_ = null; + } else { + genericMetadata_ = null; + genericMetadataBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.SpecialistPoolServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateSpecialistPoolOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateSpecialistPoolOperationMetadata + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.CreateSpecialistPoolOperationMetadata + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateSpecialistPoolOperationMetadata build() { + com.google.cloud.aiplatform.v1.CreateSpecialistPoolOperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateSpecialistPoolOperationMetadata buildPartial() { + com.google.cloud.aiplatform.v1.CreateSpecialistPoolOperationMetadata result = + new com.google.cloud.aiplatform.v1.CreateSpecialistPoolOperationMetadata(this); + if (genericMetadataBuilder_ == null) { + result.genericMetadata_ = genericMetadata_; + } else { + result.genericMetadata_ = genericMetadataBuilder_.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.v1.CreateSpecialistPoolOperationMetadata) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.CreateSpecialistPoolOperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.CreateSpecialistPoolOperationMetadata other) { + if (other + == com.google.cloud.aiplatform.v1.CreateSpecialistPoolOperationMetadata + .getDefaultInstance()) return this; + if (other.hasGenericMetadata()) { + mergeGenericMetadata(other.getGenericMetadata()); + } + 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.v1.CreateSpecialistPoolOperationMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.CreateSpecialistPoolOperationMetadata) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.aiplatform.v1.GenericOperationMetadata genericMetadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder> + genericMetadataBuilder_; + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + public boolean hasGenericMetadata() { + return genericMetadataBuilder_ != null || genericMetadata_ != null; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata() { + if (genericMetadataBuilder_ == null) { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } else { + return genericMetadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder setGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata value) { + if (genericMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + genericMetadata_ = value; + onChanged(); + } else { + genericMetadataBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder setGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder builderForValue) { + if (genericMetadataBuilder_ == null) { + genericMetadata_ = builderForValue.build(); + onChanged(); + } else { + genericMetadataBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder mergeGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata value) { + if (genericMetadataBuilder_ == null) { + if (genericMetadata_ != null) { + genericMetadata_ = + com.google.cloud.aiplatform.v1.GenericOperationMetadata.newBuilder(genericMetadata_) + .mergeFrom(value) + .buildPartial(); + } else { + genericMetadata_ = value; + } + onChanged(); + } else { + genericMetadataBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder clearGenericMetadata() { + if (genericMetadataBuilder_ == null) { + genericMetadata_ = null; + onChanged(); + } else { + genericMetadata_ = null; + genericMetadataBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder + getGenericMetadataBuilder() { + + onChanged(); + return getGenericMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder() { + if (genericMetadataBuilder_ != null) { + return genericMetadataBuilder_.getMessageOrBuilder(); + } else { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder> + getGenericMetadataFieldBuilder() { + if (genericMetadataBuilder_ == null) { + genericMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder>( + getGenericMetadata(), getParentForChildren(), isClean()); + genericMetadata_ = null; + } + return genericMetadataBuilder_; + } + + @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.v1.CreateSpecialistPoolOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.CreateSpecialistPoolOperationMetadata) + private static final com.google.cloud.aiplatform.v1.CreateSpecialistPoolOperationMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.CreateSpecialistPoolOperationMetadata(); + } + + public static com.google.cloud.aiplatform.v1.CreateSpecialistPoolOperationMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateSpecialistPoolOperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateSpecialistPoolOperationMetadata(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.v1.CreateSpecialistPoolOperationMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateSpecialistPoolOperationMetadataOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateSpecialistPoolOperationMetadataOrBuilder.java new file mode 100644 index 000000000..e0e366176 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateSpecialistPoolOperationMetadataOrBuilder.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/v1/specialist_pool_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface CreateSpecialistPoolOperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.CreateSpecialistPoolOperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + boolean hasGenericMetadata(); + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata(); + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder getGenericMetadataOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateSpecialistPoolRequest.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateSpecialistPoolRequest.java new file mode 100644 index 000000000..024b44d19 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateSpecialistPoolRequest.java @@ -0,0 +1,960 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/specialist_pool_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for [SpecialistPoolService.CreateSpecialistPool][google.cloud.aiplatform.v1.SpecialistPoolService.CreateSpecialistPool].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CreateSpecialistPoolRequest} + */ +public final class CreateSpecialistPoolRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.CreateSpecialistPoolRequest) + CreateSpecialistPoolRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateSpecialistPoolRequest.newBuilder() to construct. + private CreateSpecialistPoolRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateSpecialistPoolRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateSpecialistPoolRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateSpecialistPoolRequest( + 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(); + + parent_ = s; + break; + } + case 18: + { + com.google.cloud.aiplatform.v1.SpecialistPool.Builder subBuilder = null; + if (specialistPool_ != null) { + subBuilder = specialistPool_.toBuilder(); + } + specialistPool_ = + input.readMessage( + com.google.cloud.aiplatform.v1.SpecialistPool.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(specialistPool_); + specialistPool_ = 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.v1.SpecialistPoolServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateSpecialistPoolRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.SpecialistPoolServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateSpecialistPoolRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CreateSpecialistPoolRequest.class, + com.google.cloud.aiplatform.v1.CreateSpecialistPoolRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The parent Project name for the new SpecialistPool.
+   * The form is `projects/{project}/locations/{location}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent Project name for the new SpecialistPool.
+   * The form is `projects/{project}/locations/{location}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SPECIALIST_POOL_FIELD_NUMBER = 2; + private com.google.cloud.aiplatform.v1.SpecialistPool specialistPool_; + /** + * + * + *
+   * Required. The SpecialistPool to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.SpecialistPool specialist_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the specialistPool field is set. + */ + @java.lang.Override + public boolean hasSpecialistPool() { + return specialistPool_ != null; + } + /** + * + * + *
+   * Required. The SpecialistPool to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.SpecialistPool specialist_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The specialistPool. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.SpecialistPool getSpecialistPool() { + return specialistPool_ == null + ? com.google.cloud.aiplatform.v1.SpecialistPool.getDefaultInstance() + : specialistPool_; + } + /** + * + * + *
+   * Required. The SpecialistPool to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.SpecialistPool specialist_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.SpecialistPoolOrBuilder getSpecialistPoolOrBuilder() { + return getSpecialistPool(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (specialistPool_ != null) { + output.writeMessage(2, getSpecialistPool()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (specialistPool_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getSpecialistPool()); + } + 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.v1.CreateSpecialistPoolRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.CreateSpecialistPoolRequest other = + (com.google.cloud.aiplatform.v1.CreateSpecialistPoolRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasSpecialistPool() != other.hasSpecialistPool()) return false; + if (hasSpecialistPool()) { + if (!getSpecialistPool().equals(other.getSpecialistPool())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasSpecialistPool()) { + hash = (37 * hash) + SPECIALIST_POOL_FIELD_NUMBER; + hash = (53 * hash) + getSpecialistPool().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.CreateSpecialistPoolRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CreateSpecialistPoolRequest 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.v1.CreateSpecialistPoolRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CreateSpecialistPoolRequest 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.v1.CreateSpecialistPoolRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CreateSpecialistPoolRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreateSpecialistPoolRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CreateSpecialistPoolRequest 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.v1.CreateSpecialistPoolRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CreateSpecialistPoolRequest 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.v1.CreateSpecialistPoolRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CreateSpecialistPoolRequest 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.v1.CreateSpecialistPoolRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [SpecialistPoolService.CreateSpecialistPool][google.cloud.aiplatform.v1.SpecialistPoolService.CreateSpecialistPool].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CreateSpecialistPoolRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.CreateSpecialistPoolRequest) + com.google.cloud.aiplatform.v1.CreateSpecialistPoolRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.SpecialistPoolServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateSpecialistPoolRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.SpecialistPoolServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateSpecialistPoolRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CreateSpecialistPoolRequest.class, + com.google.cloud.aiplatform.v1.CreateSpecialistPoolRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.CreateSpecialistPoolRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (specialistPoolBuilder_ == null) { + specialistPool_ = null; + } else { + specialistPool_ = null; + specialistPoolBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.SpecialistPoolServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateSpecialistPoolRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateSpecialistPoolRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.CreateSpecialistPoolRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateSpecialistPoolRequest build() { + com.google.cloud.aiplatform.v1.CreateSpecialistPoolRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateSpecialistPoolRequest buildPartial() { + com.google.cloud.aiplatform.v1.CreateSpecialistPoolRequest result = + new com.google.cloud.aiplatform.v1.CreateSpecialistPoolRequest(this); + result.parent_ = parent_; + if (specialistPoolBuilder_ == null) { + result.specialistPool_ = specialistPool_; + } else { + result.specialistPool_ = specialistPoolBuilder_.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.v1.CreateSpecialistPoolRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.CreateSpecialistPoolRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.CreateSpecialistPoolRequest other) { + if (other == com.google.cloud.aiplatform.v1.CreateSpecialistPoolRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasSpecialistPool()) { + mergeSpecialistPool(other.getSpecialistPool()); + } + 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.v1.CreateSpecialistPoolRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.CreateSpecialistPoolRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent Project name for the new SpecialistPool.
+     * The form is `projects/{project}/locations/{location}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent Project name for the new SpecialistPool.
+     * The form is `projects/{project}/locations/{location}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent Project name for the new SpecialistPool.
+     * The form is `projects/{project}/locations/{location}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent Project name for the new SpecialistPool.
+     * The form is `projects/{project}/locations/{location}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent Project name for the new SpecialistPool.
+     * The form is `projects/{project}/locations/{location}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.cloud.aiplatform.v1.SpecialistPool specialistPool_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.SpecialistPool, + com.google.cloud.aiplatform.v1.SpecialistPool.Builder, + com.google.cloud.aiplatform.v1.SpecialistPoolOrBuilder> + specialistPoolBuilder_; + /** + * + * + *
+     * Required. The SpecialistPool to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.SpecialistPool specialist_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the specialistPool field is set. + */ + public boolean hasSpecialistPool() { + return specialistPoolBuilder_ != null || specialistPool_ != null; + } + /** + * + * + *
+     * Required. The SpecialistPool to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.SpecialistPool specialist_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The specialistPool. + */ + public com.google.cloud.aiplatform.v1.SpecialistPool getSpecialistPool() { + if (specialistPoolBuilder_ == null) { + return specialistPool_ == null + ? com.google.cloud.aiplatform.v1.SpecialistPool.getDefaultInstance() + : specialistPool_; + } else { + return specialistPoolBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The SpecialistPool to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.SpecialistPool specialist_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSpecialistPool(com.google.cloud.aiplatform.v1.SpecialistPool value) { + if (specialistPoolBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + specialistPool_ = value; + onChanged(); + } else { + specialistPoolBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The SpecialistPool to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.SpecialistPool specialist_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSpecialistPool( + com.google.cloud.aiplatform.v1.SpecialistPool.Builder builderForValue) { + if (specialistPoolBuilder_ == null) { + specialistPool_ = builderForValue.build(); + onChanged(); + } else { + specialistPoolBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The SpecialistPool to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.SpecialistPool specialist_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeSpecialistPool(com.google.cloud.aiplatform.v1.SpecialistPool value) { + if (specialistPoolBuilder_ == null) { + if (specialistPool_ != null) { + specialistPool_ = + com.google.cloud.aiplatform.v1.SpecialistPool.newBuilder(specialistPool_) + .mergeFrom(value) + .buildPartial(); + } else { + specialistPool_ = value; + } + onChanged(); + } else { + specialistPoolBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The SpecialistPool to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.SpecialistPool specialist_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearSpecialistPool() { + if (specialistPoolBuilder_ == null) { + specialistPool_ = null; + onChanged(); + } else { + specialistPool_ = null; + specialistPoolBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The SpecialistPool to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.SpecialistPool specialist_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.SpecialistPool.Builder getSpecialistPoolBuilder() { + + onChanged(); + return getSpecialistPoolFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The SpecialistPool to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.SpecialistPool specialist_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.SpecialistPoolOrBuilder getSpecialistPoolOrBuilder() { + if (specialistPoolBuilder_ != null) { + return specialistPoolBuilder_.getMessageOrBuilder(); + } else { + return specialistPool_ == null + ? com.google.cloud.aiplatform.v1.SpecialistPool.getDefaultInstance() + : specialistPool_; + } + } + /** + * + * + *
+     * Required. The SpecialistPool to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.SpecialistPool specialist_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.SpecialistPool, + com.google.cloud.aiplatform.v1.SpecialistPool.Builder, + com.google.cloud.aiplatform.v1.SpecialistPoolOrBuilder> + getSpecialistPoolFieldBuilder() { + if (specialistPoolBuilder_ == null) { + specialistPoolBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.SpecialistPool, + com.google.cloud.aiplatform.v1.SpecialistPool.Builder, + com.google.cloud.aiplatform.v1.SpecialistPoolOrBuilder>( + getSpecialistPool(), getParentForChildren(), isClean()); + specialistPool_ = null; + } + return specialistPoolBuilder_; + } + + @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.v1.CreateSpecialistPoolRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.CreateSpecialistPoolRequest) + private static final com.google.cloud.aiplatform.v1.CreateSpecialistPoolRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.CreateSpecialistPoolRequest(); + } + + public static com.google.cloud.aiplatform.v1.CreateSpecialistPoolRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateSpecialistPoolRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateSpecialistPoolRequest(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.v1.CreateSpecialistPoolRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateSpecialistPoolRequestOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateSpecialistPoolRequestOrBuilder.java new file mode 100644 index 000000000..01d73fa4a --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateSpecialistPoolRequestOrBuilder.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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/specialist_pool_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface CreateSpecialistPoolRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.CreateSpecialistPoolRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent Project name for the new SpecialistPool.
+   * The form is `projects/{project}/locations/{location}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent Project name for the new SpecialistPool.
+   * The form is `projects/{project}/locations/{location}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The SpecialistPool to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.SpecialistPool specialist_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the specialistPool field is set. + */ + boolean hasSpecialistPool(); + /** + * + * + *
+   * Required. The SpecialistPool to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.SpecialistPool specialist_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The specialistPool. + */ + com.google.cloud.aiplatform.v1.SpecialistPool getSpecialistPool(); + /** + * + * + *
+   * Required. The SpecialistPool to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.SpecialistPool specialist_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1.SpecialistPoolOrBuilder getSpecialistPoolOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateTrainingPipelineRequest.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateTrainingPipelineRequest.java new file mode 100644 index 000000000..7255b7163 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateTrainingPipelineRequest.java @@ -0,0 +1,963 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/pipeline_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for [PipelineService.CreateTrainingPipeline][google.cloud.aiplatform.v1.PipelineService.CreateTrainingPipeline].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CreateTrainingPipelineRequest} + */ +public final class CreateTrainingPipelineRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.CreateTrainingPipelineRequest) + CreateTrainingPipelineRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateTrainingPipelineRequest.newBuilder() to construct. + private CreateTrainingPipelineRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateTrainingPipelineRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateTrainingPipelineRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateTrainingPipelineRequest( + 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(); + + parent_ = s; + break; + } + case 18: + { + com.google.cloud.aiplatform.v1.TrainingPipeline.Builder subBuilder = null; + if (trainingPipeline_ != null) { + subBuilder = trainingPipeline_.toBuilder(); + } + trainingPipeline_ = + input.readMessage( + com.google.cloud.aiplatform.v1.TrainingPipeline.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(trainingPipeline_); + trainingPipeline_ = 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.v1.PipelineServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateTrainingPipelineRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.PipelineServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateTrainingPipelineRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CreateTrainingPipelineRequest.class, + com.google.cloud.aiplatform.v1.CreateTrainingPipelineRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The resource name of the Location to create the TrainingPipeline in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the Location to create the TrainingPipeline in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TRAINING_PIPELINE_FIELD_NUMBER = 2; + private com.google.cloud.aiplatform.v1.TrainingPipeline trainingPipeline_; + /** + * + * + *
+   * Required. The TrainingPipeline to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.TrainingPipeline training_pipeline = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the trainingPipeline field is set. + */ + @java.lang.Override + public boolean hasTrainingPipeline() { + return trainingPipeline_ != null; + } + /** + * + * + *
+   * Required. The TrainingPipeline to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.TrainingPipeline training_pipeline = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The trainingPipeline. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.TrainingPipeline getTrainingPipeline() { + return trainingPipeline_ == null + ? com.google.cloud.aiplatform.v1.TrainingPipeline.getDefaultInstance() + : trainingPipeline_; + } + /** + * + * + *
+   * Required. The TrainingPipeline to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.TrainingPipeline training_pipeline = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.TrainingPipelineOrBuilder getTrainingPipelineOrBuilder() { + return getTrainingPipeline(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (trainingPipeline_ != null) { + output.writeMessage(2, getTrainingPipeline()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (trainingPipeline_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getTrainingPipeline()); + } + 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.v1.CreateTrainingPipelineRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.CreateTrainingPipelineRequest other = + (com.google.cloud.aiplatform.v1.CreateTrainingPipelineRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasTrainingPipeline() != other.hasTrainingPipeline()) return false; + if (hasTrainingPipeline()) { + if (!getTrainingPipeline().equals(other.getTrainingPipeline())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasTrainingPipeline()) { + hash = (37 * hash) + TRAINING_PIPELINE_FIELD_NUMBER; + hash = (53 * hash) + getTrainingPipeline().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.CreateTrainingPipelineRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CreateTrainingPipelineRequest 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.v1.CreateTrainingPipelineRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CreateTrainingPipelineRequest 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.v1.CreateTrainingPipelineRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CreateTrainingPipelineRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CreateTrainingPipelineRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CreateTrainingPipelineRequest 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.v1.CreateTrainingPipelineRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CreateTrainingPipelineRequest 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.v1.CreateTrainingPipelineRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CreateTrainingPipelineRequest 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.v1.CreateTrainingPipelineRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [PipelineService.CreateTrainingPipeline][google.cloud.aiplatform.v1.PipelineService.CreateTrainingPipeline].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CreateTrainingPipelineRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.CreateTrainingPipelineRequest) + com.google.cloud.aiplatform.v1.CreateTrainingPipelineRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.PipelineServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateTrainingPipelineRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.PipelineServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateTrainingPipelineRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CreateTrainingPipelineRequest.class, + com.google.cloud.aiplatform.v1.CreateTrainingPipelineRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.CreateTrainingPipelineRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (trainingPipelineBuilder_ == null) { + trainingPipeline_ = null; + } else { + trainingPipeline_ = null; + trainingPipelineBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.PipelineServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateTrainingPipelineRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateTrainingPipelineRequest + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.CreateTrainingPipelineRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateTrainingPipelineRequest build() { + com.google.cloud.aiplatform.v1.CreateTrainingPipelineRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateTrainingPipelineRequest buildPartial() { + com.google.cloud.aiplatform.v1.CreateTrainingPipelineRequest result = + new com.google.cloud.aiplatform.v1.CreateTrainingPipelineRequest(this); + result.parent_ = parent_; + if (trainingPipelineBuilder_ == null) { + result.trainingPipeline_ = trainingPipeline_; + } else { + result.trainingPipeline_ = trainingPipelineBuilder_.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.v1.CreateTrainingPipelineRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.CreateTrainingPipelineRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.CreateTrainingPipelineRequest other) { + if (other + == com.google.cloud.aiplatform.v1.CreateTrainingPipelineRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasTrainingPipeline()) { + mergeTrainingPipeline(other.getTrainingPipeline()); + } + 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.v1.CreateTrainingPipelineRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.CreateTrainingPipelineRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the Location to create the TrainingPipeline in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Location to create the TrainingPipeline in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Location to create the TrainingPipeline in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Location to create the TrainingPipeline in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Location to create the TrainingPipeline in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.cloud.aiplatform.v1.TrainingPipeline trainingPipeline_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.TrainingPipeline, + com.google.cloud.aiplatform.v1.TrainingPipeline.Builder, + com.google.cloud.aiplatform.v1.TrainingPipelineOrBuilder> + trainingPipelineBuilder_; + /** + * + * + *
+     * Required. The TrainingPipeline to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.TrainingPipeline training_pipeline = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the trainingPipeline field is set. + */ + public boolean hasTrainingPipeline() { + return trainingPipelineBuilder_ != null || trainingPipeline_ != null; + } + /** + * + * + *
+     * Required. The TrainingPipeline to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.TrainingPipeline training_pipeline = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The trainingPipeline. + */ + public com.google.cloud.aiplatform.v1.TrainingPipeline getTrainingPipeline() { + if (trainingPipelineBuilder_ == null) { + return trainingPipeline_ == null + ? com.google.cloud.aiplatform.v1.TrainingPipeline.getDefaultInstance() + : trainingPipeline_; + } else { + return trainingPipelineBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The TrainingPipeline to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.TrainingPipeline training_pipeline = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTrainingPipeline(com.google.cloud.aiplatform.v1.TrainingPipeline value) { + if (trainingPipelineBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + trainingPipeline_ = value; + onChanged(); + } else { + trainingPipelineBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The TrainingPipeline to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.TrainingPipeline training_pipeline = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTrainingPipeline( + com.google.cloud.aiplatform.v1.TrainingPipeline.Builder builderForValue) { + if (trainingPipelineBuilder_ == null) { + trainingPipeline_ = builderForValue.build(); + onChanged(); + } else { + trainingPipelineBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The TrainingPipeline to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.TrainingPipeline training_pipeline = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeTrainingPipeline(com.google.cloud.aiplatform.v1.TrainingPipeline value) { + if (trainingPipelineBuilder_ == null) { + if (trainingPipeline_ != null) { + trainingPipeline_ = + com.google.cloud.aiplatform.v1.TrainingPipeline.newBuilder(trainingPipeline_) + .mergeFrom(value) + .buildPartial(); + } else { + trainingPipeline_ = value; + } + onChanged(); + } else { + trainingPipelineBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The TrainingPipeline to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.TrainingPipeline training_pipeline = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearTrainingPipeline() { + if (trainingPipelineBuilder_ == null) { + trainingPipeline_ = null; + onChanged(); + } else { + trainingPipeline_ = null; + trainingPipelineBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The TrainingPipeline to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.TrainingPipeline training_pipeline = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.TrainingPipeline.Builder getTrainingPipelineBuilder() { + + onChanged(); + return getTrainingPipelineFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The TrainingPipeline to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.TrainingPipeline training_pipeline = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.TrainingPipelineOrBuilder getTrainingPipelineOrBuilder() { + if (trainingPipelineBuilder_ != null) { + return trainingPipelineBuilder_.getMessageOrBuilder(); + } else { + return trainingPipeline_ == null + ? com.google.cloud.aiplatform.v1.TrainingPipeline.getDefaultInstance() + : trainingPipeline_; + } + } + /** + * + * + *
+     * Required. The TrainingPipeline to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.TrainingPipeline training_pipeline = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.TrainingPipeline, + com.google.cloud.aiplatform.v1.TrainingPipeline.Builder, + com.google.cloud.aiplatform.v1.TrainingPipelineOrBuilder> + getTrainingPipelineFieldBuilder() { + if (trainingPipelineBuilder_ == null) { + trainingPipelineBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.TrainingPipeline, + com.google.cloud.aiplatform.v1.TrainingPipeline.Builder, + com.google.cloud.aiplatform.v1.TrainingPipelineOrBuilder>( + getTrainingPipeline(), getParentForChildren(), isClean()); + trainingPipeline_ = null; + } + return trainingPipelineBuilder_; + } + + @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.v1.CreateTrainingPipelineRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.CreateTrainingPipelineRequest) + private static final com.google.cloud.aiplatform.v1.CreateTrainingPipelineRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.CreateTrainingPipelineRequest(); + } + + public static com.google.cloud.aiplatform.v1.CreateTrainingPipelineRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateTrainingPipelineRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateTrainingPipelineRequest(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.v1.CreateTrainingPipelineRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateTrainingPipelineRequestOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateTrainingPipelineRequestOrBuilder.java new file mode 100644 index 000000000..890e1a2e1 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateTrainingPipelineRequestOrBuilder.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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/pipeline_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface CreateTrainingPipelineRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.CreateTrainingPipelineRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the Location to create the TrainingPipeline in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of the Location to create the TrainingPipeline in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The TrainingPipeline to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.TrainingPipeline training_pipeline = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the trainingPipeline field is set. + */ + boolean hasTrainingPipeline(); + /** + * + * + *
+   * Required. The TrainingPipeline to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.TrainingPipeline training_pipeline = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The trainingPipeline. + */ + com.google.cloud.aiplatform.v1.TrainingPipeline getTrainingPipeline(); + /** + * + * + *
+   * Required. The TrainingPipeline to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.TrainingPipeline training_pipeline = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1.TrainingPipelineOrBuilder getTrainingPipelineOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CustomJob.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CustomJob.java new file mode 100644 index 000000000..efe2bda01 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CustomJob.java @@ -0,0 +1,3411 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/custom_job.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Represents a job that runs custom workloads such as a Docker container or a
+ * Python package. A CustomJob can have multiple worker pools and each worker
+ * pool can have its own machine and input spec. A CustomJob will be cleaned up
+ * once the job enters terminal state (failed or succeeded).
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CustomJob} + */ +public final class CustomJob extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.CustomJob) + CustomJobOrBuilder { + private static final long serialVersionUID = 0L; + // Use CustomJob.newBuilder() to construct. + private CustomJob(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CustomJob() { + name_ = ""; + displayName_ = ""; + state_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CustomJob(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CustomJob( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 34: + { + com.google.cloud.aiplatform.v1.CustomJobSpec.Builder subBuilder = null; + if (jobSpec_ != null) { + subBuilder = jobSpec_.toBuilder(); + } + jobSpec_ = + input.readMessage( + com.google.cloud.aiplatform.v1.CustomJobSpec.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(jobSpec_); + jobSpec_ = subBuilder.buildPartial(); + } + + break; + } + case 40: + { + int rawValue = input.readEnum(); + + state_ = rawValue; + break; + } + case 50: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 58: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (startTime_ != null) { + subBuilder = startTime_.toBuilder(); + } + startTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(startTime_); + startTime_ = subBuilder.buildPartial(); + } + + break; + } + case 66: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (endTime_ != null) { + subBuilder = endTime_.toBuilder(); + } + endTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(endTime_); + endTime_ = subBuilder.buildPartial(); + } + + break; + } + case 74: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + case 82: + { + com.google.rpc.Status.Builder subBuilder = null; + if (error_ != null) { + subBuilder = error_.toBuilder(); + } + error_ = input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(error_); + error_ = subBuilder.buildPartial(); + } + + break; + } + case 90: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + labels_ = + com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); + break; + } + case 98: + { + com.google.cloud.aiplatform.v1.EncryptionSpec.Builder subBuilder = null; + if (encryptionSpec_ != null) { + subBuilder = encryptionSpec_.toBuilder(); + } + encryptionSpec_ = + input.readMessage( + com.google.cloud.aiplatform.v1.EncryptionSpec.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(encryptionSpec_); + encryptionSpec_ = 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.v1.CustomJobProto + .internal_static_google_cloud_aiplatform_v1_CustomJob_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 11: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.CustomJobProto + .internal_static_google_cloud_aiplatform_v1_CustomJob_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CustomJob.class, + com.google.cloud.aiplatform.v1.CustomJob.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Output only. Resource name of a CustomJob.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Resource name of a CustomJob.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * Required. The display name of the CustomJob.
+   * The name can be up to 128 characters long and can be consist of any UTF-8
+   * characters.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+   * Required. The display name of the CustomJob.
+   * The name can be up to 128 characters long and can be consist of any UTF-8
+   * characters.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 JOB_SPEC_FIELD_NUMBER = 4; + private com.google.cloud.aiplatform.v1.CustomJobSpec jobSpec_; + /** + * + * + *
+   * Required. Job spec.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJobSpec job_spec = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the jobSpec field is set. + */ + @java.lang.Override + public boolean hasJobSpec() { + return jobSpec_ != null; + } + /** + * + * + *
+   * Required. Job spec.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJobSpec job_spec = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The jobSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.CustomJobSpec getJobSpec() { + return jobSpec_ == null + ? com.google.cloud.aiplatform.v1.CustomJobSpec.getDefaultInstance() + : jobSpec_; + } + /** + * + * + *
+   * Required. Job spec.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJobSpec job_spec = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.CustomJobSpecOrBuilder getJobSpecOrBuilder() { + return getJobSpec(); + } + + public static final int STATE_FIELD_NUMBER = 5; + private int state_; + /** + * + * + *
+   * Output only. The detailed state of the job.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.JobState state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * Output only. The detailed state of the job.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.JobState state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.JobState getState() { + @SuppressWarnings("deprecation") + com.google.cloud.aiplatform.v1.JobState result = + com.google.cloud.aiplatform.v1.JobState.valueOf(state_); + return result == null ? com.google.cloud.aiplatform.v1.JobState.UNRECOGNIZED : result; + } + + public static final int CREATE_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. Time when the CustomJob was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. Time when the CustomJob was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. Time when the CustomJob was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int START_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp startTime_; + /** + * + * + *
+   * Output only. Time when the CustomJob for the first time entered the
+   * `JOB_STATE_RUNNING` state.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return startTime_ != null; + } + /** + * + * + *
+   * Output only. Time when the CustomJob for the first time entered the
+   * `JOB_STATE_RUNNING` state.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + /** + * + * + *
+   * Output only. Time when the CustomJob for the first time entered the
+   * `JOB_STATE_RUNNING` state.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return getStartTime(); + } + + public static final int END_TIME_FIELD_NUMBER = 8; + private com.google.protobuf.Timestamp endTime_; + /** + * + * + *
+   * Output only. Time when the CustomJob entered any of the following states:
+   * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + * + * + *
+   * Output only. Time when the CustomJob entered any of the following states:
+   * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + * + * + *
+   * Output only. Time when the CustomJob entered any of the following states:
+   * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return getEndTime(); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 9; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. Time when the CustomJob was most recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. Time when the CustomJob was most recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. Time when the CustomJob was most recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + public static final int ERROR_FIELD_NUMBER = 10; + private com.google.rpc.Status error_; + /** + * + * + *
+   * Output only. Only populated when job's state is `JOB_STATE_FAILED` or
+   * `JOB_STATE_CANCELLED`.
+   * 
+ * + * .google.rpc.Status error = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the error field is set. + */ + @java.lang.Override + public boolean hasError() { + return error_ != null; + } + /** + * + * + *
+   * Output only. Only populated when job's state is `JOB_STATE_FAILED` or
+   * `JOB_STATE_CANCELLED`.
+   * 
+ * + * .google.rpc.Status error = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The error. + */ + @java.lang.Override + public com.google.rpc.Status getError() { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } + /** + * + * + *
+   * Output only. Only populated when job's state is `JOB_STATE_FAILED` or
+   * `JOB_STATE_CANCELLED`.
+   * 
+ * + * .google.rpc.Status error = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + return getError(); + } + + public static final int LABELS_FIELD_NUMBER = 11; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.aiplatform.v1.CustomJobProto + .internal_static_google_cloud_aiplatform_v1_CustomJob_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * The labels with user-defined metadata to organize CustomJobs.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 11; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * The labels with user-defined metadata to organize CustomJobs.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 11; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * The labels with user-defined metadata to organize CustomJobs.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 11; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * The labels with user-defined metadata to organize CustomJobs.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 11; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int ENCRYPTION_SPEC_FIELD_NUMBER = 12; + private com.google.cloud.aiplatform.v1.EncryptionSpec encryptionSpec_; + /** + * + * + *
+   * Customer-managed encryption key options for a CustomJob. If this is set,
+   * then all resources created by the CustomJob will be encrypted with the
+   * provided encryption key.
+   * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 12; + * + * @return Whether the encryptionSpec field is set. + */ + @java.lang.Override + public boolean hasEncryptionSpec() { + return encryptionSpec_ != null; + } + /** + * + * + *
+   * Customer-managed encryption key options for a CustomJob. If this is set,
+   * then all resources created by the CustomJob will be encrypted with the
+   * provided encryption key.
+   * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 12; + * + * @return The encryptionSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.EncryptionSpec getEncryptionSpec() { + return encryptionSpec_ == null + ? com.google.cloud.aiplatform.v1.EncryptionSpec.getDefaultInstance() + : encryptionSpec_; + } + /** + * + * + *
+   * Customer-managed encryption key options for a CustomJob. If this is set,
+   * then all resources created by the CustomJob will be encrypted with the
+   * provided encryption key.
+   * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 12; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.EncryptionSpecOrBuilder getEncryptionSpecOrBuilder() { + return getEncryptionSpec(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + if (jobSpec_ != null) { + output.writeMessage(4, getJobSpec()); + } + if (state_ != com.google.cloud.aiplatform.v1.JobState.JOB_STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(5, state_); + } + if (createTime_ != null) { + output.writeMessage(6, getCreateTime()); + } + if (startTime_ != null) { + output.writeMessage(7, getStartTime()); + } + if (endTime_ != null) { + output.writeMessage(8, getEndTime()); + } + if (updateTime_ != null) { + output.writeMessage(9, getUpdateTime()); + } + if (error_ != null) { + output.writeMessage(10, getError()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 11); + if (encryptionSpec_ != null) { + output.writeMessage(12, getEncryptionSpec()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + if (jobSpec_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getJobSpec()); + } + if (state_ != com.google.cloud.aiplatform.v1.JobState.JOB_STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, state_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getCreateTime()); + } + if (startTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getStartTime()); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getEndTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getUpdateTime()); + } + if (error_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getError()); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, labels__); + } + if (encryptionSpec_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getEncryptionSpec()); + } + 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.v1.CustomJob)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.CustomJob other = (com.google.cloud.aiplatform.v1.CustomJob) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (hasJobSpec() != other.hasJobSpec()) return false; + if (hasJobSpec()) { + if (!getJobSpec().equals(other.getJobSpec())) return false; + } + if (state_ != other.state_) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime().equals(other.getStartTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (hasError() != other.hasError()) return false; + if (hasError()) { + if (!getError().equals(other.getError())) return false; + } + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (hasEncryptionSpec() != other.hasEncryptionSpec()) return false; + if (hasEncryptionSpec()) { + if (!getEncryptionSpec().equals(other.getEncryptionSpec())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + if (hasJobSpec()) { + hash = (37 * hash) + JOB_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getJobSpec().hashCode(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (hasError()) { + hash = (37 * hash) + ERROR_FIELD_NUMBER; + hash = (53 * hash) + getError().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + if (hasEncryptionSpec()) { + hash = (37 * hash) + ENCRYPTION_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getEncryptionSpec().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.CustomJob parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CustomJob 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.v1.CustomJob parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CustomJob 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.v1.CustomJob parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CustomJob parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CustomJob parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CustomJob 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.v1.CustomJob parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CustomJob 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.v1.CustomJob parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CustomJob 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.v1.CustomJob 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 job that runs custom workloads such as a Docker container or a
+   * Python package. A CustomJob can have multiple worker pools and each worker
+   * pool can have its own machine and input spec. A CustomJob will be cleaned up
+   * once the job enters terminal state (failed or succeeded).
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CustomJob} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.CustomJob) + com.google.cloud.aiplatform.v1.CustomJobOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.CustomJobProto + .internal_static_google_cloud_aiplatform_v1_CustomJob_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 11: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 11: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.CustomJobProto + .internal_static_google_cloud_aiplatform_v1_CustomJob_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CustomJob.class, + com.google.cloud.aiplatform.v1.CustomJob.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.CustomJob.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + displayName_ = ""; + + if (jobSpecBuilder_ == null) { + jobSpec_ = null; + } else { + jobSpec_ = null; + jobSpecBuilder_ = null; + } + state_ = 0; + + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (startTimeBuilder_ == null) { + startTime_ = null; + } else { + startTime_ = null; + startTimeBuilder_ = null; + } + if (endTimeBuilder_ == null) { + endTime_ = null; + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + if (errorBuilder_ == null) { + error_ = null; + } else { + error_ = null; + errorBuilder_ = null; + } + internalGetMutableLabels().clear(); + if (encryptionSpecBuilder_ == null) { + encryptionSpec_ = null; + } else { + encryptionSpec_ = null; + encryptionSpecBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.CustomJobProto + .internal_static_google_cloud_aiplatform_v1_CustomJob_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CustomJob getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.CustomJob.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CustomJob build() { + com.google.cloud.aiplatform.v1.CustomJob result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CustomJob buildPartial() { + com.google.cloud.aiplatform.v1.CustomJob result = + new com.google.cloud.aiplatform.v1.CustomJob(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.displayName_ = displayName_; + if (jobSpecBuilder_ == null) { + result.jobSpec_ = jobSpec_; + } else { + result.jobSpec_ = jobSpecBuilder_.build(); + } + result.state_ = state_; + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (startTimeBuilder_ == null) { + result.startTime_ = startTime_; + } else { + result.startTime_ = startTimeBuilder_.build(); + } + if (endTimeBuilder_ == null) { + result.endTime_ = endTime_; + } else { + result.endTime_ = endTimeBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + if (errorBuilder_ == null) { + result.error_ = error_; + } else { + result.error_ = errorBuilder_.build(); + } + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + if (encryptionSpecBuilder_ == null) { + result.encryptionSpec_ = encryptionSpec_; + } else { + result.encryptionSpec_ = encryptionSpecBuilder_.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.v1.CustomJob) { + return mergeFrom((com.google.cloud.aiplatform.v1.CustomJob) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.CustomJob other) { + if (other == com.google.cloud.aiplatform.v1.CustomJob.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (other.hasJobSpec()) { + mergeJobSpec(other.getJobSpec()); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.hasError()) { + mergeError(other.getError()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + if (other.hasEncryptionSpec()) { + mergeEncryptionSpec(other.getEncryptionSpec()); + } + 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.v1.CustomJob parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.aiplatform.v1.CustomJob) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. Resource name of a CustomJob.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Resource name of a CustomJob.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Resource name of a CustomJob.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Resource name of a CustomJob.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Resource name of a CustomJob.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Required. The display name of the CustomJob.
+     * The name can be up to 128 characters long and can be consist of any UTF-8
+     * characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+     * Required. The display name of the CustomJob.
+     * The name can be up to 128 characters long and can be consist of any UTF-8
+     * characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+     * Required. The display name of the CustomJob.
+     * The name can be up to 128 characters long and can be consist of any UTF-8
+     * characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + /** + * + * + *
+     * Required. The display name of the CustomJob.
+     * The name can be up to 128 characters long and can be consist of any UTF-8
+     * characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The display name of the CustomJob.
+     * The name can be up to 128 characters long and can be consist of any UTF-8
+     * characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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.cloud.aiplatform.v1.CustomJobSpec jobSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.CustomJobSpec, + com.google.cloud.aiplatform.v1.CustomJobSpec.Builder, + com.google.cloud.aiplatform.v1.CustomJobSpecOrBuilder> + jobSpecBuilder_; + /** + * + * + *
+     * Required. Job spec.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJobSpec job_spec = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the jobSpec field is set. + */ + public boolean hasJobSpec() { + return jobSpecBuilder_ != null || jobSpec_ != null; + } + /** + * + * + *
+     * Required. Job spec.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJobSpec job_spec = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The jobSpec. + */ + public com.google.cloud.aiplatform.v1.CustomJobSpec getJobSpec() { + if (jobSpecBuilder_ == null) { + return jobSpec_ == null + ? com.google.cloud.aiplatform.v1.CustomJobSpec.getDefaultInstance() + : jobSpec_; + } else { + return jobSpecBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Job spec.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJobSpec job_spec = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setJobSpec(com.google.cloud.aiplatform.v1.CustomJobSpec value) { + if (jobSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + jobSpec_ = value; + onChanged(); + } else { + jobSpecBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. Job spec.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJobSpec job_spec = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setJobSpec( + com.google.cloud.aiplatform.v1.CustomJobSpec.Builder builderForValue) { + if (jobSpecBuilder_ == null) { + jobSpec_ = builderForValue.build(); + onChanged(); + } else { + jobSpecBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. Job spec.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJobSpec job_spec = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeJobSpec(com.google.cloud.aiplatform.v1.CustomJobSpec value) { + if (jobSpecBuilder_ == null) { + if (jobSpec_ != null) { + jobSpec_ = + com.google.cloud.aiplatform.v1.CustomJobSpec.newBuilder(jobSpec_) + .mergeFrom(value) + .buildPartial(); + } else { + jobSpec_ = value; + } + onChanged(); + } else { + jobSpecBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. Job spec.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJobSpec job_spec = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearJobSpec() { + if (jobSpecBuilder_ == null) { + jobSpec_ = null; + onChanged(); + } else { + jobSpec_ = null; + jobSpecBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. Job spec.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJobSpec job_spec = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.CustomJobSpec.Builder getJobSpecBuilder() { + + onChanged(); + return getJobSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Job spec.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJobSpec job_spec = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.CustomJobSpecOrBuilder getJobSpecOrBuilder() { + if (jobSpecBuilder_ != null) { + return jobSpecBuilder_.getMessageOrBuilder(); + } else { + return jobSpec_ == null + ? com.google.cloud.aiplatform.v1.CustomJobSpec.getDefaultInstance() + : jobSpec_; + } + } + /** + * + * + *
+     * Required. Job spec.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJobSpec job_spec = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.CustomJobSpec, + com.google.cloud.aiplatform.v1.CustomJobSpec.Builder, + com.google.cloud.aiplatform.v1.CustomJobSpecOrBuilder> + getJobSpecFieldBuilder() { + if (jobSpecBuilder_ == null) { + jobSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.CustomJobSpec, + com.google.cloud.aiplatform.v1.CustomJobSpec.Builder, + com.google.cloud.aiplatform.v1.CustomJobSpecOrBuilder>( + getJobSpec(), getParentForChildren(), isClean()); + jobSpec_ = null; + } + return jobSpecBuilder_; + } + + private int state_ = 0; + /** + * + * + *
+     * Output only. The detailed state of the job.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.JobState state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Output only. The detailed state of the job.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.JobState state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + + state_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The detailed state of the job.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.JobState state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.JobState getState() { + @SuppressWarnings("deprecation") + com.google.cloud.aiplatform.v1.JobState result = + com.google.cloud.aiplatform.v1.JobState.valueOf(state_); + return result == null ? com.google.cloud.aiplatform.v1.JobState.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Output only. The detailed state of the job.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.JobState state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.aiplatform.v1.JobState value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The detailed state of the job.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.JobState state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + + state_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. Time when the CustomJob was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * Output only. Time when the CustomJob was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time when the CustomJob was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the CustomJob was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the CustomJob was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the CustomJob was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the CustomJob was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time when the CustomJob was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. Time when the CustomJob was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + startTimeBuilder_; + /** + * + * + *
+     * Output only. Time when the CustomJob for the first time entered the
+     * `JOB_STATE_RUNNING` state.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return startTimeBuilder_ != null || startTime_ != null; + } + /** + * + * + *
+     * Output only. Time when the CustomJob for the first time entered the
+     * `JOB_STATE_RUNNING` state.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time when the CustomJob for the first time entered the
+     * `JOB_STATE_RUNNING` state.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + onChanged(); + } else { + startTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the CustomJob for the first time entered the
+     * `JOB_STATE_RUNNING` state.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + onChanged(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the CustomJob for the first time entered the
+     * `JOB_STATE_RUNNING` state.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (startTime_ != null) { + startTime_ = + com.google.protobuf.Timestamp.newBuilder(startTime_).mergeFrom(value).buildPartial(); + } else { + startTime_ = value; + } + onChanged(); + } else { + startTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the CustomJob for the first time entered the
+     * `JOB_STATE_RUNNING` state.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearStartTime() { + if (startTimeBuilder_ == null) { + startTime_ = null; + onChanged(); + } else { + startTime_ = null; + startTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the CustomJob for the first time entered the
+     * `JOB_STATE_RUNNING` state.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + + onChanged(); + return getStartTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time when the CustomJob for the first time entered the
+     * `JOB_STATE_RUNNING` state.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + } + /** + * + * + *
+     * Output only. Time when the CustomJob for the first time entered the
+     * `JOB_STATE_RUNNING` state.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getStartTime(), getParentForChildren(), isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + /** + * + * + *
+     * Output only. Time when the CustomJob entered any of the following states:
+     * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return endTimeBuilder_ != null || endTime_ != null; + } + /** + * + * + *
+     * Output only. Time when the CustomJob entered any of the following states:
+     * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time when the CustomJob entered any of the following states:
+     * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + onChanged(); + } else { + endTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the CustomJob entered any of the following states:
+     * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + onChanged(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the CustomJob entered any of the following states:
+     * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (endTime_ != null) { + endTime_ = + com.google.protobuf.Timestamp.newBuilder(endTime_).mergeFrom(value).buildPartial(); + } else { + endTime_ = value; + } + onChanged(); + } else { + endTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the CustomJob entered any of the following states:
+     * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearEndTime() { + if (endTimeBuilder_ == null) { + endTime_ = null; + onChanged(); + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the CustomJob entered any of the following states:
+     * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time when the CustomJob entered any of the following states:
+     * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + * + * + *
+     * Output only. Time when the CustomJob entered any of the following states:
+     * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. Time when the CustomJob was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + * + * + *
+     * Output only. Time when the CustomJob was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time when the CustomJob was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the CustomJob was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the CustomJob was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the CustomJob was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the CustomJob was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time when the CustomJob was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. Time when the CustomJob was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.rpc.Status error_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + errorBuilder_; + /** + * + * + *
+     * Output only. Only populated when job's state is `JOB_STATE_FAILED` or
+     * `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.rpc.Status error = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the error field is set. + */ + public boolean hasError() { + return errorBuilder_ != null || error_ != null; + } + /** + * + * + *
+     * Output only. Only populated when job's state is `JOB_STATE_FAILED` or
+     * `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.rpc.Status error = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The error. + */ + public com.google.rpc.Status getError() { + if (errorBuilder_ == null) { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } else { + return errorBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Only populated when job's state is `JOB_STATE_FAILED` or
+     * `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.rpc.Status error = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + error_ = value; + onChanged(); + } else { + errorBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Only populated when job's state is `JOB_STATE_FAILED` or
+     * `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.rpc.Status error = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setError(com.google.rpc.Status.Builder builderForValue) { + if (errorBuilder_ == null) { + error_ = builderForValue.build(); + onChanged(); + } else { + errorBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Only populated when job's state is `JOB_STATE_FAILED` or
+     * `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.rpc.Status error = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (error_ != null) { + error_ = com.google.rpc.Status.newBuilder(error_).mergeFrom(value).buildPartial(); + } else { + error_ = value; + } + onChanged(); + } else { + errorBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Only populated when job's state is `JOB_STATE_FAILED` or
+     * `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.rpc.Status error = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearError() { + if (errorBuilder_ == null) { + error_ = null; + onChanged(); + } else { + error_ = null; + errorBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Only populated when job's state is `JOB_STATE_FAILED` or
+     * `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.rpc.Status error = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.rpc.Status.Builder getErrorBuilder() { + + onChanged(); + return getErrorFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Only populated when job's state is `JOB_STATE_FAILED` or
+     * `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.rpc.Status error = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + if (errorBuilder_ != null) { + return errorBuilder_.getMessageOrBuilder(); + } else { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } + } + /** + * + * + *
+     * Output only. Only populated when job's state is `JOB_STATE_FAILED` or
+     * `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.rpc.Status error = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getErrorFieldBuilder() { + if (errorBuilder_ == null) { + errorBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, + com.google.rpc.Status.Builder, + com.google.rpc.StatusOrBuilder>(getError(), getParentForChildren(), isClean()); + error_ = null; + } + return errorBuilder_; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + onChanged(); + ; + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * The labels with user-defined metadata to organize CustomJobs.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 11; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * The labels with user-defined metadata to organize CustomJobs.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 11; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * The labels with user-defined metadata to organize CustomJobs.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 11; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * The labels with user-defined metadata to organize CustomJobs.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 11; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * The labels with user-defined metadata to organize CustomJobs.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 11; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * The labels with user-defined metadata to organize CustomJobs.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 11; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * The labels with user-defined metadata to organize CustomJobs.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 11; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + return this; + } + + private com.google.cloud.aiplatform.v1.EncryptionSpec encryptionSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.EncryptionSpec, + com.google.cloud.aiplatform.v1.EncryptionSpec.Builder, + com.google.cloud.aiplatform.v1.EncryptionSpecOrBuilder> + encryptionSpecBuilder_; + /** + * + * + *
+     * Customer-managed encryption key options for a CustomJob. If this is set,
+     * then all resources created by the CustomJob will be encrypted with the
+     * provided encryption key.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 12; + * + * @return Whether the encryptionSpec field is set. + */ + public boolean hasEncryptionSpec() { + return encryptionSpecBuilder_ != null || encryptionSpec_ != null; + } + /** + * + * + *
+     * Customer-managed encryption key options for a CustomJob. If this is set,
+     * then all resources created by the CustomJob will be encrypted with the
+     * provided encryption key.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 12; + * + * @return The encryptionSpec. + */ + public com.google.cloud.aiplatform.v1.EncryptionSpec getEncryptionSpec() { + if (encryptionSpecBuilder_ == null) { + return encryptionSpec_ == null + ? com.google.cloud.aiplatform.v1.EncryptionSpec.getDefaultInstance() + : encryptionSpec_; + } else { + return encryptionSpecBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Customer-managed encryption key options for a CustomJob. If this is set,
+     * then all resources created by the CustomJob will be encrypted with the
+     * provided encryption key.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 12; + */ + public Builder setEncryptionSpec(com.google.cloud.aiplatform.v1.EncryptionSpec value) { + if (encryptionSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + encryptionSpec_ = value; + onChanged(); + } else { + encryptionSpecBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Customer-managed encryption key options for a CustomJob. If this is set,
+     * then all resources created by the CustomJob will be encrypted with the
+     * provided encryption key.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 12; + */ + public Builder setEncryptionSpec( + com.google.cloud.aiplatform.v1.EncryptionSpec.Builder builderForValue) { + if (encryptionSpecBuilder_ == null) { + encryptionSpec_ = builderForValue.build(); + onChanged(); + } else { + encryptionSpecBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Customer-managed encryption key options for a CustomJob. If this is set,
+     * then all resources created by the CustomJob will be encrypted with the
+     * provided encryption key.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 12; + */ + public Builder mergeEncryptionSpec(com.google.cloud.aiplatform.v1.EncryptionSpec value) { + if (encryptionSpecBuilder_ == null) { + if (encryptionSpec_ != null) { + encryptionSpec_ = + com.google.cloud.aiplatform.v1.EncryptionSpec.newBuilder(encryptionSpec_) + .mergeFrom(value) + .buildPartial(); + } else { + encryptionSpec_ = value; + } + onChanged(); + } else { + encryptionSpecBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Customer-managed encryption key options for a CustomJob. If this is set,
+     * then all resources created by the CustomJob will be encrypted with the
+     * provided encryption key.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 12; + */ + public Builder clearEncryptionSpec() { + if (encryptionSpecBuilder_ == null) { + encryptionSpec_ = null; + onChanged(); + } else { + encryptionSpec_ = null; + encryptionSpecBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Customer-managed encryption key options for a CustomJob. If this is set,
+     * then all resources created by the CustomJob will be encrypted with the
+     * provided encryption key.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 12; + */ + public com.google.cloud.aiplatform.v1.EncryptionSpec.Builder getEncryptionSpecBuilder() { + + onChanged(); + return getEncryptionSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Customer-managed encryption key options for a CustomJob. If this is set,
+     * then all resources created by the CustomJob will be encrypted with the
+     * provided encryption key.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 12; + */ + public com.google.cloud.aiplatform.v1.EncryptionSpecOrBuilder getEncryptionSpecOrBuilder() { + if (encryptionSpecBuilder_ != null) { + return encryptionSpecBuilder_.getMessageOrBuilder(); + } else { + return encryptionSpec_ == null + ? com.google.cloud.aiplatform.v1.EncryptionSpec.getDefaultInstance() + : encryptionSpec_; + } + } + /** + * + * + *
+     * Customer-managed encryption key options for a CustomJob. If this is set,
+     * then all resources created by the CustomJob will be encrypted with the
+     * provided encryption key.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 12; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.EncryptionSpec, + com.google.cloud.aiplatform.v1.EncryptionSpec.Builder, + com.google.cloud.aiplatform.v1.EncryptionSpecOrBuilder> + getEncryptionSpecFieldBuilder() { + if (encryptionSpecBuilder_ == null) { + encryptionSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.EncryptionSpec, + com.google.cloud.aiplatform.v1.EncryptionSpec.Builder, + com.google.cloud.aiplatform.v1.EncryptionSpecOrBuilder>( + getEncryptionSpec(), getParentForChildren(), isClean()); + encryptionSpec_ = null; + } + return encryptionSpecBuilder_; + } + + @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.v1.CustomJob) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.CustomJob) + private static final com.google.cloud.aiplatform.v1.CustomJob DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.CustomJob(); + } + + public static com.google.cloud.aiplatform.v1.CustomJob getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CustomJob parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CustomJob(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.v1.CustomJob getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CustomJobName.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CustomJobName.java new file mode 100644 index 000000000..3a80e0bde --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CustomJobName.java @@ -0,0 +1,223 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class CustomJobName implements ResourceName { + 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; + } + + public String getLocation() { + return location; + } + + public String getCustomJob() { + return customJob; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static CustomJobName of(String project, String location, String customJob) { + return newBuilder().setProject(project).setLocation(location).setCustomJob(customJob).build(); + } + + public static String format(String project, String location, String customJob) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setCustomJob(customJob) + .build() + .toString(); + } + + public static CustomJobName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + 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")); + } + + 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 (CustomJobName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String 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(); + 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(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_CUSTOM_JOB.instantiate( + "project", project, "location", location, "custom_job", customJob); + } + + @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; + } + + public String getLocation() { + return location; + } + + public String getCustomJob() { + return customJob; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setCustomJob(String customJob) { + this.customJob = customJob; + return this; + } + + private Builder(CustomJobName customJobName) { + project = customJobName.project; + location = customJobName.location; + customJob = customJobName.customJob; + } + + public CustomJobName build() { + return new CustomJobName(this); + } + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CustomJobOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CustomJobOrBuilder.java new file mode 100644 index 000000000..bf8a3dadd --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CustomJobOrBuilder.java @@ -0,0 +1,460 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/custom_job.proto + +package com.google.cloud.aiplatform.v1; + +public interface CustomJobOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.CustomJob) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Resource name of a CustomJob.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. Resource name of a CustomJob.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The display name of the CustomJob.
+   * The name can be up to 128 characters long and can be consist of any UTF-8
+   * characters.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Required. The display name of the CustomJob.
+   * The name can be up to 128 characters long and can be consist of any UTF-8
+   * characters.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Required. Job spec.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJobSpec job_spec = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the jobSpec field is set. + */ + boolean hasJobSpec(); + /** + * + * + *
+   * Required. Job spec.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJobSpec job_spec = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The jobSpec. + */ + com.google.cloud.aiplatform.v1.CustomJobSpec getJobSpec(); + /** + * + * + *
+   * Required. Job spec.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJobSpec job_spec = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1.CustomJobSpecOrBuilder getJobSpecOrBuilder(); + + /** + * + * + *
+   * Output only. The detailed state of the job.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.JobState state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Output only. The detailed state of the job.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.JobState state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.aiplatform.v1.JobState getState(); + + /** + * + * + *
+   * Output only. Time when the CustomJob was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Time when the CustomJob was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Time when the CustomJob was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Time when the CustomJob for the first time entered the
+   * `JOB_STATE_RUNNING` state.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + /** + * + * + *
+   * Output only. Time when the CustomJob for the first time entered the
+   * `JOB_STATE_RUNNING` state.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + /** + * + * + *
+   * Output only. Time when the CustomJob for the first time entered the
+   * `JOB_STATE_RUNNING` state.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Time when the CustomJob entered any of the following states:
+   * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + * + * + *
+   * Output only. Time when the CustomJob entered any of the following states:
+   * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + * + * + *
+   * Output only. Time when the CustomJob entered any of the following states:
+   * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Time when the CustomJob was most recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. Time when the CustomJob was most recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. Time when the CustomJob was most recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Only populated when job's state is `JOB_STATE_FAILED` or
+   * `JOB_STATE_CANCELLED`.
+   * 
+ * + * .google.rpc.Status error = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the error field is set. + */ + boolean hasError(); + /** + * + * + *
+   * Output only. Only populated when job's state is `JOB_STATE_FAILED` or
+   * `JOB_STATE_CANCELLED`.
+   * 
+ * + * .google.rpc.Status error = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The error. + */ + com.google.rpc.Status getError(); + /** + * + * + *
+   * Output only. Only populated when job's state is `JOB_STATE_FAILED` or
+   * `JOB_STATE_CANCELLED`.
+   * 
+ * + * .google.rpc.Status error = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.rpc.StatusOrBuilder getErrorOrBuilder(); + + /** + * + * + *
+   * The labels with user-defined metadata to organize CustomJobs.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 11; + */ + int getLabelsCount(); + /** + * + * + *
+   * The labels with user-defined metadata to organize CustomJobs.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 11; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * The labels with user-defined metadata to organize CustomJobs.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 11; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * The labels with user-defined metadata to organize CustomJobs.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 11; + */ + java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * The labels with user-defined metadata to organize CustomJobs.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 11; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Customer-managed encryption key options for a CustomJob. If this is set,
+   * then all resources created by the CustomJob will be encrypted with the
+   * provided encryption key.
+   * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 12; + * + * @return Whether the encryptionSpec field is set. + */ + boolean hasEncryptionSpec(); + /** + * + * + *
+   * Customer-managed encryption key options for a CustomJob. If this is set,
+   * then all resources created by the CustomJob will be encrypted with the
+   * provided encryption key.
+   * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 12; + * + * @return The encryptionSpec. + */ + com.google.cloud.aiplatform.v1.EncryptionSpec getEncryptionSpec(); + /** + * + * + *
+   * Customer-managed encryption key options for a CustomJob. If this is set,
+   * then all resources created by the CustomJob will be encrypted with the
+   * provided encryption key.
+   * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 12; + */ + com.google.cloud.aiplatform.v1.EncryptionSpecOrBuilder getEncryptionSpecOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CustomJobProto.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CustomJobProto.java new file mode 100644 index 000000000..f1b25c467 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CustomJobProto.java @@ -0,0 +1,234 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/custom_job.proto + +package com.google.cloud.aiplatform.v1; + +public final class CustomJobProto { + private CustomJobProto() {} + + 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_v1_CustomJob_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_CustomJob_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_CustomJob_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_CustomJob_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_CustomJobSpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_CustomJobSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_WorkerPoolSpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_WorkerPoolSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ContainerSpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ContainerSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_PythonPackageSpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_PythonPackageSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_Scheduling_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_Scheduling_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/v1/custom_job." + + "proto\022\032google.cloud.aiplatform.v1\032\037googl" + + "e/api/field_behavior.proto\032\031google/api/r" + + "esource.proto\0320google/cloud/aiplatform/v" + + "1/encryption_spec.proto\032(google/cloud/ai" + + "platform/v1/env_var.proto\032#google/cloud/" + + "aiplatform/v1/io.proto\032*google/cloud/aip" + + "latform/v1/job_state.proto\0322google/cloud" + + "/aiplatform/v1/machine_resources.proto\032\036" + + "google/protobuf/duration.proto\032\037google/p" + + "rotobuf/timestamp.proto\032\027google/rpc/stat" + + "us.proto\032\034google/api/annotations.proto\"\323" + + "\005\n\tCustomJob\022\021\n\004name\030\001 \001(\tB\003\340A\003\022\031\n\014displ" + + "ay_name\030\002 \001(\tB\003\340A\002\022@\n\010job_spec\030\004 \001(\0132).g" + + "oogle.cloud.aiplatform.v1.CustomJobSpecB" + + "\003\340A\002\0228\n\005state\030\005 \001(\0162$.google.cloud.aipla" + + "tform.v1.JobStateB\003\340A\003\0224\n\013create_time\030\006 " + + "\001(\0132\032.google.protobuf.TimestampB\003\340A\003\0223\n\n" + + "start_time\030\007 \001(\0132\032.google.protobuf.Times" + + "tampB\003\340A\003\0221\n\010end_time\030\010 \001(\0132\032.google.pro" + + "tobuf.TimestampB\003\340A\003\0224\n\013update_time\030\t \001(" + + "\0132\032.google.protobuf.TimestampB\003\340A\003\022&\n\005er" + + "ror\030\n \001(\0132\022.google.rpc.StatusB\003\340A\003\022A\n\006la" + + "bels\030\013 \003(\01321.google.cloud.aiplatform.v1." + + "CustomJob.LabelsEntry\022C\n\017encryption_spec" + + "\030\014 \001(\0132*.google.cloud.aiplatform.v1.Encr" + + "yptionSpec\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r" + + "\n\005value\030\002 \001(\t:\0028\001:i\352Af\n#aiplatform.googl" + + "eapis.com/CustomJob\022?projects/{project}/" + + "locations/{location}/customJobs/{custom_" + + "job}\"\214\002\n\rCustomJobSpec\022J\n\021worker_pool_sp" + + "ecs\030\001 \003(\0132*.google.cloud.aiplatform.v1.W" + + "orkerPoolSpecB\003\340A\002\022:\n\nscheduling\030\003 \001(\0132&" + + ".google.cloud.aiplatform.v1.Scheduling\022\027" + + "\n\017service_account\030\004 \001(\t\022\017\n\007network\030\005 \001(\t" + + "\022I\n\025base_output_directory\030\006 \001(\0132*.google" + + ".cloud.aiplatform.v1.GcsDestination\"\307\002\n\016" + + "WorkerPoolSpec\022C\n\016container_spec\030\006 \001(\0132)" + + ".google.cloud.aiplatform.v1.ContainerSpe" + + "cH\000\022L\n\023python_package_spec\030\007 \001(\0132-.googl" + + "e.cloud.aiplatform.v1.PythonPackageSpecH" + + "\000\022E\n\014machine_spec\030\001 \001(\0132\'.google.cloud.a" + + "iplatform.v1.MachineSpecB\006\340A\001\340A\005\022\032\n\rrepl" + + "ica_count\030\002 \001(\003B\003\340A\001\0227\n\tdisk_spec\030\005 \001(\0132" + + "$.google.cloud.aiplatform.v1.DiskSpecB\006\n" + + "\004task\"w\n\rContainerSpec\022\026\n\timage_uri\030\001 \001(" + + "\tB\003\340A\002\022\017\n\007command\030\002 \003(\t\022\014\n\004args\030\003 \003(\t\022/\n" + + "\003env\030\004 \003(\0132\".google.cloud.aiplatform.v1." + + "EnvVar\"\252\001\n\021PythonPackageSpec\022\037\n\022executor" + + "_image_uri\030\001 \001(\tB\003\340A\002\022\031\n\014package_uris\030\002 " + + "\003(\tB\003\340A\002\022\032\n\rpython_module\030\003 \001(\tB\003\340A\002\022\014\n\004" + + "args\030\004 \003(\t\022/\n\003env\030\005 \003(\0132\".google.cloud.a" + + "iplatform.v1.EnvVar\"_\n\nScheduling\022*\n\007tim" + + "eout\030\001 \001(\0132\031.google.protobuf.Duration\022%\n" + + "\035restart_job_on_worker_restart\030\003 \001(\010Bx\n\036" + + "com.google.cloud.aiplatform.v1B\016CustomJo" + + "bProtoP\001ZDgoogle.golang.org/genproto/goo" + + "gleapis/cloud/aiplatform/v1;aiplatformb\006" + + "proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.aiplatform.v1.EncryptionSpecProto.getDescriptor(), + com.google.cloud.aiplatform.v1.EnvVarProto.getDescriptor(), + com.google.cloud.aiplatform.v1.IoProto.getDescriptor(), + com.google.cloud.aiplatform.v1.JobStateProto.getDescriptor(), + com.google.cloud.aiplatform.v1.MachineResourcesProto.getDescriptor(), + com.google.protobuf.DurationProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.rpc.StatusProto.getDescriptor(), + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1_CustomJob_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_CustomJob_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_CustomJob_descriptor, + new java.lang.String[] { + "Name", + "DisplayName", + "JobSpec", + "State", + "CreateTime", + "StartTime", + "EndTime", + "UpdateTime", + "Error", + "Labels", + "EncryptionSpec", + }); + internal_static_google_cloud_aiplatform_v1_CustomJob_LabelsEntry_descriptor = + internal_static_google_cloud_aiplatform_v1_CustomJob_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_aiplatform_v1_CustomJob_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_CustomJob_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_aiplatform_v1_CustomJobSpec_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_aiplatform_v1_CustomJobSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_CustomJobSpec_descriptor, + new java.lang.String[] { + "WorkerPoolSpecs", "Scheduling", "ServiceAccount", "Network", "BaseOutputDirectory", + }); + internal_static_google_cloud_aiplatform_v1_WorkerPoolSpec_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_aiplatform_v1_WorkerPoolSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_WorkerPoolSpec_descriptor, + new java.lang.String[] { + "ContainerSpec", + "PythonPackageSpec", + "MachineSpec", + "ReplicaCount", + "DiskSpec", + "Task", + }); + internal_static_google_cloud_aiplatform_v1_ContainerSpec_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_aiplatform_v1_ContainerSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ContainerSpec_descriptor, + new java.lang.String[] { + "ImageUri", "Command", "Args", "Env", + }); + internal_static_google_cloud_aiplatform_v1_PythonPackageSpec_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_aiplatform_v1_PythonPackageSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_PythonPackageSpec_descriptor, + new java.lang.String[] { + "ExecutorImageUri", "PackageUris", "PythonModule", "Args", "Env", + }); + internal_static_google_cloud_aiplatform_v1_Scheduling_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_aiplatform_v1_Scheduling_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_Scheduling_descriptor, + new java.lang.String[] { + "Timeout", "RestartJobOnWorkerRestart", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.aiplatform.v1.EncryptionSpecProto.getDescriptor(); + com.google.cloud.aiplatform.v1.EnvVarProto.getDescriptor(); + com.google.cloud.aiplatform.v1.IoProto.getDescriptor(); + com.google.cloud.aiplatform.v1.JobStateProto.getDescriptor(); + com.google.cloud.aiplatform.v1.MachineResourcesProto.getDescriptor(); + com.google.protobuf.DurationProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.rpc.StatusProto.getDescriptor(); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CustomJobSpec.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CustomJobSpec.java new file mode 100644 index 000000000..b75b82606 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CustomJobSpec.java @@ -0,0 +1,2178 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/custom_job.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Represents the spec of a CustomJob.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CustomJobSpec} + */ +public final class CustomJobSpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.CustomJobSpec) + CustomJobSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use CustomJobSpec.newBuilder() to construct. + private CustomJobSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CustomJobSpec() { + workerPoolSpecs_ = java.util.Collections.emptyList(); + serviceAccount_ = ""; + network_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CustomJobSpec(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CustomJobSpec( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + workerPoolSpecs_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + workerPoolSpecs_.add( + input.readMessage( + com.google.cloud.aiplatform.v1.WorkerPoolSpec.parser(), extensionRegistry)); + break; + } + case 26: + { + com.google.cloud.aiplatform.v1.Scheduling.Builder subBuilder = null; + if (scheduling_ != null) { + subBuilder = scheduling_.toBuilder(); + } + scheduling_ = + input.readMessage( + com.google.cloud.aiplatform.v1.Scheduling.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(scheduling_); + scheduling_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + serviceAccount_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + network_ = s; + break; + } + case 50: + { + com.google.cloud.aiplatform.v1.GcsDestination.Builder subBuilder = null; + if (baseOutputDirectory_ != null) { + subBuilder = baseOutputDirectory_.toBuilder(); + } + baseOutputDirectory_ = + input.readMessage( + com.google.cloud.aiplatform.v1.GcsDestination.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(baseOutputDirectory_); + baseOutputDirectory_ = 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)) { + workerPoolSpecs_ = java.util.Collections.unmodifiableList(workerPoolSpecs_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.CustomJobProto + .internal_static_google_cloud_aiplatform_v1_CustomJobSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.CustomJobProto + .internal_static_google_cloud_aiplatform_v1_CustomJobSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CustomJobSpec.class, + com.google.cloud.aiplatform.v1.CustomJobSpec.Builder.class); + } + + public static final int WORKER_POOL_SPECS_FIELD_NUMBER = 1; + private java.util.List workerPoolSpecs_; + /** + * + * + *
+   * Required. The spec of the worker pools including machine type and Docker image.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.WorkerPoolSpec worker_pool_specs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List getWorkerPoolSpecsList() { + return workerPoolSpecs_; + } + /** + * + * + *
+   * Required. The spec of the worker pools including machine type and Docker image.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.WorkerPoolSpec worker_pool_specs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getWorkerPoolSpecsOrBuilderList() { + return workerPoolSpecs_; + } + /** + * + * + *
+   * Required. The spec of the worker pools including machine type and Docker image.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.WorkerPoolSpec worker_pool_specs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getWorkerPoolSpecsCount() { + return workerPoolSpecs_.size(); + } + /** + * + * + *
+   * Required. The spec of the worker pools including machine type and Docker image.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.WorkerPoolSpec worker_pool_specs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.WorkerPoolSpec getWorkerPoolSpecs(int index) { + return workerPoolSpecs_.get(index); + } + /** + * + * + *
+   * Required. The spec of the worker pools including machine type and Docker image.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.WorkerPoolSpec worker_pool_specs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.WorkerPoolSpecOrBuilder getWorkerPoolSpecsOrBuilder( + int index) { + return workerPoolSpecs_.get(index); + } + + public static final int SCHEDULING_FIELD_NUMBER = 3; + private com.google.cloud.aiplatform.v1.Scheduling scheduling_; + /** + * + * + *
+   * Scheduling options for a CustomJob.
+   * 
+ * + * .google.cloud.aiplatform.v1.Scheduling scheduling = 3; + * + * @return Whether the scheduling field is set. + */ + @java.lang.Override + public boolean hasScheduling() { + return scheduling_ != null; + } + /** + * + * + *
+   * Scheduling options for a CustomJob.
+   * 
+ * + * .google.cloud.aiplatform.v1.Scheduling scheduling = 3; + * + * @return The scheduling. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.Scheduling getScheduling() { + return scheduling_ == null + ? com.google.cloud.aiplatform.v1.Scheduling.getDefaultInstance() + : scheduling_; + } + /** + * + * + *
+   * Scheduling options for a CustomJob.
+   * 
+ * + * .google.cloud.aiplatform.v1.Scheduling scheduling = 3; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.SchedulingOrBuilder getSchedulingOrBuilder() { + return getScheduling(); + } + + public static final int SERVICE_ACCOUNT_FIELD_NUMBER = 4; + private volatile java.lang.Object serviceAccount_; + /** + * + * + *
+   * Specifies the service account for workload run-as account.
+   * Users submitting jobs must have act-as permission on this run-as account.
+   * If unspecified, the AI Platform Custom Code Service Agent for the
+   * CustomJob's project is used.
+   * 
+ * + * string service_account = 4; + * + * @return The serviceAccount. + */ + @java.lang.Override + public java.lang.String getServiceAccount() { + java.lang.Object ref = serviceAccount_; + 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(); + serviceAccount_ = s; + return s; + } + } + /** + * + * + *
+   * Specifies the service account for workload run-as account.
+   * Users submitting jobs must have act-as permission on this run-as account.
+   * If unspecified, the AI Platform Custom Code Service Agent for the
+   * CustomJob's project is used.
+   * 
+ * + * string service_account = 4; + * + * @return The bytes for serviceAccount. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServiceAccountBytes() { + java.lang.Object ref = serviceAccount_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceAccount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NETWORK_FIELD_NUMBER = 5; + private volatile java.lang.Object network_; + /** + * + * + *
+   * The full name of the Compute Engine
+   * [network](/compute/docs/networks-and-firewalls#networks) to which the Job
+   * should be peered. For example, `projects/12345/global/networks/myVPC`.
+   * [Format](/compute/docs/reference/rest/v1/networks/insert)
+   * is of the form `projects/{project}/global/networks/{network}`.
+   * Where {project} is a project number, as in `12345`, and {network} is a
+   * network name.
+   * Private services access must already be configured for the network. If left
+   * unspecified, the job is not peered with any network.
+   * 
+ * + * string network = 5; + * + * @return The network. + */ + @java.lang.Override + public java.lang.String getNetwork() { + java.lang.Object ref = network_; + 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(); + network_ = s; + return s; + } + } + /** + * + * + *
+   * The full name of the Compute Engine
+   * [network](/compute/docs/networks-and-firewalls#networks) to which the Job
+   * should be peered. For example, `projects/12345/global/networks/myVPC`.
+   * [Format](/compute/docs/reference/rest/v1/networks/insert)
+   * is of the form `projects/{project}/global/networks/{network}`.
+   * Where {project} is a project number, as in `12345`, and {network} is a
+   * network name.
+   * Private services access must already be configured for the network. If left
+   * unspecified, the job is not peered with any network.
+   * 
+ * + * string network = 5; + * + * @return The bytes for network. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNetworkBytes() { + java.lang.Object ref = network_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + network_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BASE_OUTPUT_DIRECTORY_FIELD_NUMBER = 6; + private com.google.cloud.aiplatform.v1.GcsDestination baseOutputDirectory_; + /** + * + * + *
+   * The Cloud Storage location to store the output of this CustomJob or
+   * HyperparameterTuningJob. For HyperparameterTuningJob,
+   * the baseOutputDirectory of
+   * each child CustomJob backing a Trial is set to a subdirectory of name
+   * [id][google.cloud.aiplatform.v1.Trial.id] under its parent HyperparameterTuningJob's
+   * baseOutputDirectory.
+   * The following AI Platform environment variables will be passed to
+   * containers or python modules when this field is set:
+   *   For CustomJob:
+   *   * AIP_MODEL_DIR = `<base_output_directory>/model/`
+   *   * AIP_CHECKPOINT_DIR = `<base_output_directory>/checkpoints/`
+   *   * AIP_TENSORBOARD_LOG_DIR = `<base_output_directory>/logs/`
+   *   For CustomJob backing a Trial of HyperparameterTuningJob:
+   *   * AIP_MODEL_DIR = `<base_output_directory>/<trial_id>/model/`
+   *   * AIP_CHECKPOINT_DIR = `<base_output_directory>/<trial_id>/checkpoints/`
+   *   * AIP_TENSORBOARD_LOG_DIR = `<base_output_directory>/<trial_id>/logs/`
+   * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination base_output_directory = 6; + * + * @return Whether the baseOutputDirectory field is set. + */ + @java.lang.Override + public boolean hasBaseOutputDirectory() { + return baseOutputDirectory_ != null; + } + /** + * + * + *
+   * The Cloud Storage location to store the output of this CustomJob or
+   * HyperparameterTuningJob. For HyperparameterTuningJob,
+   * the baseOutputDirectory of
+   * each child CustomJob backing a Trial is set to a subdirectory of name
+   * [id][google.cloud.aiplatform.v1.Trial.id] under its parent HyperparameterTuningJob's
+   * baseOutputDirectory.
+   * The following AI Platform environment variables will be passed to
+   * containers or python modules when this field is set:
+   *   For CustomJob:
+   *   * AIP_MODEL_DIR = `<base_output_directory>/model/`
+   *   * AIP_CHECKPOINT_DIR = `<base_output_directory>/checkpoints/`
+   *   * AIP_TENSORBOARD_LOG_DIR = `<base_output_directory>/logs/`
+   *   For CustomJob backing a Trial of HyperparameterTuningJob:
+   *   * AIP_MODEL_DIR = `<base_output_directory>/<trial_id>/model/`
+   *   * AIP_CHECKPOINT_DIR = `<base_output_directory>/<trial_id>/checkpoints/`
+   *   * AIP_TENSORBOARD_LOG_DIR = `<base_output_directory>/<trial_id>/logs/`
+   * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination base_output_directory = 6; + * + * @return The baseOutputDirectory. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GcsDestination getBaseOutputDirectory() { + return baseOutputDirectory_ == null + ? com.google.cloud.aiplatform.v1.GcsDestination.getDefaultInstance() + : baseOutputDirectory_; + } + /** + * + * + *
+   * The Cloud Storage location to store the output of this CustomJob or
+   * HyperparameterTuningJob. For HyperparameterTuningJob,
+   * the baseOutputDirectory of
+   * each child CustomJob backing a Trial is set to a subdirectory of name
+   * [id][google.cloud.aiplatform.v1.Trial.id] under its parent HyperparameterTuningJob's
+   * baseOutputDirectory.
+   * The following AI Platform environment variables will be passed to
+   * containers or python modules when this field is set:
+   *   For CustomJob:
+   *   * AIP_MODEL_DIR = `<base_output_directory>/model/`
+   *   * AIP_CHECKPOINT_DIR = `<base_output_directory>/checkpoints/`
+   *   * AIP_TENSORBOARD_LOG_DIR = `<base_output_directory>/logs/`
+   *   For CustomJob backing a Trial of HyperparameterTuningJob:
+   *   * AIP_MODEL_DIR = `<base_output_directory>/<trial_id>/model/`
+   *   * AIP_CHECKPOINT_DIR = `<base_output_directory>/<trial_id>/checkpoints/`
+   *   * AIP_TENSORBOARD_LOG_DIR = `<base_output_directory>/<trial_id>/logs/`
+   * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination base_output_directory = 6; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GcsDestinationOrBuilder getBaseOutputDirectoryOrBuilder() { + return getBaseOutputDirectory(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < workerPoolSpecs_.size(); i++) { + output.writeMessage(1, workerPoolSpecs_.get(i)); + } + if (scheduling_ != null) { + output.writeMessage(3, getScheduling()); + } + if (!getServiceAccountBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, serviceAccount_); + } + if (!getNetworkBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, network_); + } + if (baseOutputDirectory_ != null) { + output.writeMessage(6, getBaseOutputDirectory()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < workerPoolSpecs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, workerPoolSpecs_.get(i)); + } + if (scheduling_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getScheduling()); + } + if (!getServiceAccountBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, serviceAccount_); + } + if (!getNetworkBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, network_); + } + if (baseOutputDirectory_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getBaseOutputDirectory()); + } + 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.v1.CustomJobSpec)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.CustomJobSpec other = + (com.google.cloud.aiplatform.v1.CustomJobSpec) obj; + + if (!getWorkerPoolSpecsList().equals(other.getWorkerPoolSpecsList())) return false; + if (hasScheduling() != other.hasScheduling()) return false; + if (hasScheduling()) { + if (!getScheduling().equals(other.getScheduling())) return false; + } + if (!getServiceAccount().equals(other.getServiceAccount())) return false; + if (!getNetwork().equals(other.getNetwork())) return false; + if (hasBaseOutputDirectory() != other.hasBaseOutputDirectory()) return false; + if (hasBaseOutputDirectory()) { + if (!getBaseOutputDirectory().equals(other.getBaseOutputDirectory())) 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 (getWorkerPoolSpecsCount() > 0) { + hash = (37 * hash) + WORKER_POOL_SPECS_FIELD_NUMBER; + hash = (53 * hash) + getWorkerPoolSpecsList().hashCode(); + } + if (hasScheduling()) { + hash = (37 * hash) + SCHEDULING_FIELD_NUMBER; + hash = (53 * hash) + getScheduling().hashCode(); + } + hash = (37 * hash) + SERVICE_ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getServiceAccount().hashCode(); + hash = (37 * hash) + NETWORK_FIELD_NUMBER; + hash = (53 * hash) + getNetwork().hashCode(); + if (hasBaseOutputDirectory()) { + hash = (37 * hash) + BASE_OUTPUT_DIRECTORY_FIELD_NUMBER; + hash = (53 * hash) + getBaseOutputDirectory().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.CustomJobSpec parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CustomJobSpec 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.v1.CustomJobSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CustomJobSpec 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.v1.CustomJobSpec parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CustomJobSpec parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.CustomJobSpec parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CustomJobSpec 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.v1.CustomJobSpec parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CustomJobSpec 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.v1.CustomJobSpec parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CustomJobSpec 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.v1.CustomJobSpec 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 the spec of a CustomJob.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CustomJobSpec} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.CustomJobSpec) + com.google.cloud.aiplatform.v1.CustomJobSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.CustomJobProto + .internal_static_google_cloud_aiplatform_v1_CustomJobSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.CustomJobProto + .internal_static_google_cloud_aiplatform_v1_CustomJobSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CustomJobSpec.class, + com.google.cloud.aiplatform.v1.CustomJobSpec.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.CustomJobSpec.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getWorkerPoolSpecsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (workerPoolSpecsBuilder_ == null) { + workerPoolSpecs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + workerPoolSpecsBuilder_.clear(); + } + if (schedulingBuilder_ == null) { + scheduling_ = null; + } else { + scheduling_ = null; + schedulingBuilder_ = null; + } + serviceAccount_ = ""; + + network_ = ""; + + if (baseOutputDirectoryBuilder_ == null) { + baseOutputDirectory_ = null; + } else { + baseOutputDirectory_ = null; + baseOutputDirectoryBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.CustomJobProto + .internal_static_google_cloud_aiplatform_v1_CustomJobSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CustomJobSpec getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.CustomJobSpec.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CustomJobSpec build() { + com.google.cloud.aiplatform.v1.CustomJobSpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CustomJobSpec buildPartial() { + com.google.cloud.aiplatform.v1.CustomJobSpec result = + new com.google.cloud.aiplatform.v1.CustomJobSpec(this); + int from_bitField0_ = bitField0_; + if (workerPoolSpecsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + workerPoolSpecs_ = java.util.Collections.unmodifiableList(workerPoolSpecs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.workerPoolSpecs_ = workerPoolSpecs_; + } else { + result.workerPoolSpecs_ = workerPoolSpecsBuilder_.build(); + } + if (schedulingBuilder_ == null) { + result.scheduling_ = scheduling_; + } else { + result.scheduling_ = schedulingBuilder_.build(); + } + result.serviceAccount_ = serviceAccount_; + result.network_ = network_; + if (baseOutputDirectoryBuilder_ == null) { + result.baseOutputDirectory_ = baseOutputDirectory_; + } else { + result.baseOutputDirectory_ = baseOutputDirectoryBuilder_.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.v1.CustomJobSpec) { + return mergeFrom((com.google.cloud.aiplatform.v1.CustomJobSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.CustomJobSpec other) { + if (other == com.google.cloud.aiplatform.v1.CustomJobSpec.getDefaultInstance()) return this; + if (workerPoolSpecsBuilder_ == null) { + if (!other.workerPoolSpecs_.isEmpty()) { + if (workerPoolSpecs_.isEmpty()) { + workerPoolSpecs_ = other.workerPoolSpecs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureWorkerPoolSpecsIsMutable(); + workerPoolSpecs_.addAll(other.workerPoolSpecs_); + } + onChanged(); + } + } else { + if (!other.workerPoolSpecs_.isEmpty()) { + if (workerPoolSpecsBuilder_.isEmpty()) { + workerPoolSpecsBuilder_.dispose(); + workerPoolSpecsBuilder_ = null; + workerPoolSpecs_ = other.workerPoolSpecs_; + bitField0_ = (bitField0_ & ~0x00000001); + workerPoolSpecsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getWorkerPoolSpecsFieldBuilder() + : null; + } else { + workerPoolSpecsBuilder_.addAllMessages(other.workerPoolSpecs_); + } + } + } + if (other.hasScheduling()) { + mergeScheduling(other.getScheduling()); + } + if (!other.getServiceAccount().isEmpty()) { + serviceAccount_ = other.serviceAccount_; + onChanged(); + } + if (!other.getNetwork().isEmpty()) { + network_ = other.network_; + onChanged(); + } + if (other.hasBaseOutputDirectory()) { + mergeBaseOutputDirectory(other.getBaseOutputDirectory()); + } + 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.v1.CustomJobSpec parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.aiplatform.v1.CustomJobSpec) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List workerPoolSpecs_ = + java.util.Collections.emptyList(); + + private void ensureWorkerPoolSpecsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + workerPoolSpecs_ = + new java.util.ArrayList( + workerPoolSpecs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.WorkerPoolSpec, + com.google.cloud.aiplatform.v1.WorkerPoolSpec.Builder, + com.google.cloud.aiplatform.v1.WorkerPoolSpecOrBuilder> + workerPoolSpecsBuilder_; + + /** + * + * + *
+     * Required. The spec of the worker pools including machine type and Docker image.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.WorkerPoolSpec worker_pool_specs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List getWorkerPoolSpecsList() { + if (workerPoolSpecsBuilder_ == null) { + return java.util.Collections.unmodifiableList(workerPoolSpecs_); + } else { + return workerPoolSpecsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Required. The spec of the worker pools including machine type and Docker image.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.WorkerPoolSpec worker_pool_specs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getWorkerPoolSpecsCount() { + if (workerPoolSpecsBuilder_ == null) { + return workerPoolSpecs_.size(); + } else { + return workerPoolSpecsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Required. The spec of the worker pools including machine type and Docker image.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.WorkerPoolSpec worker_pool_specs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.WorkerPoolSpec getWorkerPoolSpecs(int index) { + if (workerPoolSpecsBuilder_ == null) { + return workerPoolSpecs_.get(index); + } else { + return workerPoolSpecsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Required. The spec of the worker pools including machine type and Docker image.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.WorkerPoolSpec worker_pool_specs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setWorkerPoolSpecs( + int index, com.google.cloud.aiplatform.v1.WorkerPoolSpec value) { + if (workerPoolSpecsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWorkerPoolSpecsIsMutable(); + workerPoolSpecs_.set(index, value); + onChanged(); + } else { + workerPoolSpecsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. The spec of the worker pools including machine type and Docker image.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.WorkerPoolSpec worker_pool_specs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setWorkerPoolSpecs( + int index, com.google.cloud.aiplatform.v1.WorkerPoolSpec.Builder builderForValue) { + if (workerPoolSpecsBuilder_ == null) { + ensureWorkerPoolSpecsIsMutable(); + workerPoolSpecs_.set(index, builderForValue.build()); + onChanged(); + } else { + workerPoolSpecsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The spec of the worker pools including machine type and Docker image.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.WorkerPoolSpec worker_pool_specs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addWorkerPoolSpecs(com.google.cloud.aiplatform.v1.WorkerPoolSpec value) { + if (workerPoolSpecsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWorkerPoolSpecsIsMutable(); + workerPoolSpecs_.add(value); + onChanged(); + } else { + workerPoolSpecsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Required. The spec of the worker pools including machine type and Docker image.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.WorkerPoolSpec worker_pool_specs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addWorkerPoolSpecs( + int index, com.google.cloud.aiplatform.v1.WorkerPoolSpec value) { + if (workerPoolSpecsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWorkerPoolSpecsIsMutable(); + workerPoolSpecs_.add(index, value); + onChanged(); + } else { + workerPoolSpecsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. The spec of the worker pools including machine type and Docker image.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.WorkerPoolSpec worker_pool_specs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addWorkerPoolSpecs( + com.google.cloud.aiplatform.v1.WorkerPoolSpec.Builder builderForValue) { + if (workerPoolSpecsBuilder_ == null) { + ensureWorkerPoolSpecsIsMutable(); + workerPoolSpecs_.add(builderForValue.build()); + onChanged(); + } else { + workerPoolSpecsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The spec of the worker pools including machine type and Docker image.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.WorkerPoolSpec worker_pool_specs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addWorkerPoolSpecs( + int index, com.google.cloud.aiplatform.v1.WorkerPoolSpec.Builder builderForValue) { + if (workerPoolSpecsBuilder_ == null) { + ensureWorkerPoolSpecsIsMutable(); + workerPoolSpecs_.add(index, builderForValue.build()); + onChanged(); + } else { + workerPoolSpecsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The spec of the worker pools including machine type and Docker image.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.WorkerPoolSpec worker_pool_specs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllWorkerPoolSpecs( + java.lang.Iterable values) { + if (workerPoolSpecsBuilder_ == null) { + ensureWorkerPoolSpecsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, workerPoolSpecs_); + onChanged(); + } else { + workerPoolSpecsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Required. The spec of the worker pools including machine type and Docker image.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.WorkerPoolSpec worker_pool_specs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearWorkerPoolSpecs() { + if (workerPoolSpecsBuilder_ == null) { + workerPoolSpecs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + workerPoolSpecsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Required. The spec of the worker pools including machine type and Docker image.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.WorkerPoolSpec worker_pool_specs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeWorkerPoolSpecs(int index) { + if (workerPoolSpecsBuilder_ == null) { + ensureWorkerPoolSpecsIsMutable(); + workerPoolSpecs_.remove(index); + onChanged(); + } else { + workerPoolSpecsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Required. The spec of the worker pools including machine type and Docker image.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.WorkerPoolSpec worker_pool_specs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.WorkerPoolSpec.Builder getWorkerPoolSpecsBuilder( + int index) { + return getWorkerPoolSpecsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Required. The spec of the worker pools including machine type and Docker image.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.WorkerPoolSpec worker_pool_specs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.WorkerPoolSpecOrBuilder getWorkerPoolSpecsOrBuilder( + int index) { + if (workerPoolSpecsBuilder_ == null) { + return workerPoolSpecs_.get(index); + } else { + return workerPoolSpecsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Required. The spec of the worker pools including machine type and Docker image.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.WorkerPoolSpec worker_pool_specs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getWorkerPoolSpecsOrBuilderList() { + if (workerPoolSpecsBuilder_ != null) { + return workerPoolSpecsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(workerPoolSpecs_); + } + } + /** + * + * + *
+     * Required. The spec of the worker pools including machine type and Docker image.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.WorkerPoolSpec worker_pool_specs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.WorkerPoolSpec.Builder addWorkerPoolSpecsBuilder() { + return getWorkerPoolSpecsFieldBuilder() + .addBuilder(com.google.cloud.aiplatform.v1.WorkerPoolSpec.getDefaultInstance()); + } + /** + * + * + *
+     * Required. The spec of the worker pools including machine type and Docker image.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.WorkerPoolSpec worker_pool_specs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.WorkerPoolSpec.Builder addWorkerPoolSpecsBuilder( + int index) { + return getWorkerPoolSpecsFieldBuilder() + .addBuilder(index, com.google.cloud.aiplatform.v1.WorkerPoolSpec.getDefaultInstance()); + } + /** + * + * + *
+     * Required. The spec of the worker pools including machine type and Docker image.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.WorkerPoolSpec worker_pool_specs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getWorkerPoolSpecsBuilderList() { + return getWorkerPoolSpecsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.WorkerPoolSpec, + com.google.cloud.aiplatform.v1.WorkerPoolSpec.Builder, + com.google.cloud.aiplatform.v1.WorkerPoolSpecOrBuilder> + getWorkerPoolSpecsFieldBuilder() { + if (workerPoolSpecsBuilder_ == null) { + workerPoolSpecsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.WorkerPoolSpec, + com.google.cloud.aiplatform.v1.WorkerPoolSpec.Builder, + com.google.cloud.aiplatform.v1.WorkerPoolSpecOrBuilder>( + workerPoolSpecs_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + workerPoolSpecs_ = null; + } + return workerPoolSpecsBuilder_; + } + + private com.google.cloud.aiplatform.v1.Scheduling scheduling_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.Scheduling, + com.google.cloud.aiplatform.v1.Scheduling.Builder, + com.google.cloud.aiplatform.v1.SchedulingOrBuilder> + schedulingBuilder_; + /** + * + * + *
+     * Scheduling options for a CustomJob.
+     * 
+ * + * .google.cloud.aiplatform.v1.Scheduling scheduling = 3; + * + * @return Whether the scheduling field is set. + */ + public boolean hasScheduling() { + return schedulingBuilder_ != null || scheduling_ != null; + } + /** + * + * + *
+     * Scheduling options for a CustomJob.
+     * 
+ * + * .google.cloud.aiplatform.v1.Scheduling scheduling = 3; + * + * @return The scheduling. + */ + public com.google.cloud.aiplatform.v1.Scheduling getScheduling() { + if (schedulingBuilder_ == null) { + return scheduling_ == null + ? com.google.cloud.aiplatform.v1.Scheduling.getDefaultInstance() + : scheduling_; + } else { + return schedulingBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Scheduling options for a CustomJob.
+     * 
+ * + * .google.cloud.aiplatform.v1.Scheduling scheduling = 3; + */ + public Builder setScheduling(com.google.cloud.aiplatform.v1.Scheduling value) { + if (schedulingBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + scheduling_ = value; + onChanged(); + } else { + schedulingBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Scheduling options for a CustomJob.
+     * 
+ * + * .google.cloud.aiplatform.v1.Scheduling scheduling = 3; + */ + public Builder setScheduling( + com.google.cloud.aiplatform.v1.Scheduling.Builder builderForValue) { + if (schedulingBuilder_ == null) { + scheduling_ = builderForValue.build(); + onChanged(); + } else { + schedulingBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Scheduling options for a CustomJob.
+     * 
+ * + * .google.cloud.aiplatform.v1.Scheduling scheduling = 3; + */ + public Builder mergeScheduling(com.google.cloud.aiplatform.v1.Scheduling value) { + if (schedulingBuilder_ == null) { + if (scheduling_ != null) { + scheduling_ = + com.google.cloud.aiplatform.v1.Scheduling.newBuilder(scheduling_) + .mergeFrom(value) + .buildPartial(); + } else { + scheduling_ = value; + } + onChanged(); + } else { + schedulingBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Scheduling options for a CustomJob.
+     * 
+ * + * .google.cloud.aiplatform.v1.Scheduling scheduling = 3; + */ + public Builder clearScheduling() { + if (schedulingBuilder_ == null) { + scheduling_ = null; + onChanged(); + } else { + scheduling_ = null; + schedulingBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Scheduling options for a CustomJob.
+     * 
+ * + * .google.cloud.aiplatform.v1.Scheduling scheduling = 3; + */ + public com.google.cloud.aiplatform.v1.Scheduling.Builder getSchedulingBuilder() { + + onChanged(); + return getSchedulingFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Scheduling options for a CustomJob.
+     * 
+ * + * .google.cloud.aiplatform.v1.Scheduling scheduling = 3; + */ + public com.google.cloud.aiplatform.v1.SchedulingOrBuilder getSchedulingOrBuilder() { + if (schedulingBuilder_ != null) { + return schedulingBuilder_.getMessageOrBuilder(); + } else { + return scheduling_ == null + ? com.google.cloud.aiplatform.v1.Scheduling.getDefaultInstance() + : scheduling_; + } + } + /** + * + * + *
+     * Scheduling options for a CustomJob.
+     * 
+ * + * .google.cloud.aiplatform.v1.Scheduling scheduling = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.Scheduling, + com.google.cloud.aiplatform.v1.Scheduling.Builder, + com.google.cloud.aiplatform.v1.SchedulingOrBuilder> + getSchedulingFieldBuilder() { + if (schedulingBuilder_ == null) { + schedulingBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.Scheduling, + com.google.cloud.aiplatform.v1.Scheduling.Builder, + com.google.cloud.aiplatform.v1.SchedulingOrBuilder>( + getScheduling(), getParentForChildren(), isClean()); + scheduling_ = null; + } + return schedulingBuilder_; + } + + private java.lang.Object serviceAccount_ = ""; + /** + * + * + *
+     * Specifies the service account for workload run-as account.
+     * Users submitting jobs must have act-as permission on this run-as account.
+     * If unspecified, the AI Platform Custom Code Service Agent for the
+     * CustomJob's project is used.
+     * 
+ * + * string service_account = 4; + * + * @return The serviceAccount. + */ + public java.lang.String getServiceAccount() { + java.lang.Object ref = serviceAccount_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceAccount_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Specifies the service account for workload run-as account.
+     * Users submitting jobs must have act-as permission on this run-as account.
+     * If unspecified, the AI Platform Custom Code Service Agent for the
+     * CustomJob's project is used.
+     * 
+ * + * string service_account = 4; + * + * @return The bytes for serviceAccount. + */ + public com.google.protobuf.ByteString getServiceAccountBytes() { + java.lang.Object ref = serviceAccount_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceAccount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Specifies the service account for workload run-as account.
+     * Users submitting jobs must have act-as permission on this run-as account.
+     * If unspecified, the AI Platform Custom Code Service Agent for the
+     * CustomJob's project is used.
+     * 
+ * + * string service_account = 4; + * + * @param value The serviceAccount to set. + * @return This builder for chaining. + */ + public Builder setServiceAccount(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + serviceAccount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies the service account for workload run-as account.
+     * Users submitting jobs must have act-as permission on this run-as account.
+     * If unspecified, the AI Platform Custom Code Service Agent for the
+     * CustomJob's project is used.
+     * 
+ * + * string service_account = 4; + * + * @return This builder for chaining. + */ + public Builder clearServiceAccount() { + + serviceAccount_ = getDefaultInstance().getServiceAccount(); + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies the service account for workload run-as account.
+     * Users submitting jobs must have act-as permission on this run-as account.
+     * If unspecified, the AI Platform Custom Code Service Agent for the
+     * CustomJob's project is used.
+     * 
+ * + * string service_account = 4; + * + * @param value The bytes for serviceAccount to set. + * @return This builder for chaining. + */ + public Builder setServiceAccountBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + serviceAccount_ = value; + onChanged(); + return this; + } + + private java.lang.Object network_ = ""; + /** + * + * + *
+     * The full name of the Compute Engine
+     * [network](/compute/docs/networks-and-firewalls#networks) to which the Job
+     * should be peered. For example, `projects/12345/global/networks/myVPC`.
+     * [Format](/compute/docs/reference/rest/v1/networks/insert)
+     * is of the form `projects/{project}/global/networks/{network}`.
+     * Where {project} is a project number, as in `12345`, and {network} is a
+     * network name.
+     * Private services access must already be configured for the network. If left
+     * unspecified, the job is not peered with any network.
+     * 
+ * + * string network = 5; + * + * @return The network. + */ + public java.lang.String getNetwork() { + java.lang.Object ref = network_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + network_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The full name of the Compute Engine
+     * [network](/compute/docs/networks-and-firewalls#networks) to which the Job
+     * should be peered. For example, `projects/12345/global/networks/myVPC`.
+     * [Format](/compute/docs/reference/rest/v1/networks/insert)
+     * is of the form `projects/{project}/global/networks/{network}`.
+     * Where {project} is a project number, as in `12345`, and {network} is a
+     * network name.
+     * Private services access must already be configured for the network. If left
+     * unspecified, the job is not peered with any network.
+     * 
+ * + * string network = 5; + * + * @return The bytes for network. + */ + public com.google.protobuf.ByteString getNetworkBytes() { + java.lang.Object ref = network_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + network_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The full name of the Compute Engine
+     * [network](/compute/docs/networks-and-firewalls#networks) to which the Job
+     * should be peered. For example, `projects/12345/global/networks/myVPC`.
+     * [Format](/compute/docs/reference/rest/v1/networks/insert)
+     * is of the form `projects/{project}/global/networks/{network}`.
+     * Where {project} is a project number, as in `12345`, and {network} is a
+     * network name.
+     * Private services access must already be configured for the network. If left
+     * unspecified, the job is not peered with any network.
+     * 
+ * + * string network = 5; + * + * @param value The network to set. + * @return This builder for chaining. + */ + public Builder setNetwork(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + network_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The full name of the Compute Engine
+     * [network](/compute/docs/networks-and-firewalls#networks) to which the Job
+     * should be peered. For example, `projects/12345/global/networks/myVPC`.
+     * [Format](/compute/docs/reference/rest/v1/networks/insert)
+     * is of the form `projects/{project}/global/networks/{network}`.
+     * Where {project} is a project number, as in `12345`, and {network} is a
+     * network name.
+     * Private services access must already be configured for the network. If left
+     * unspecified, the job is not peered with any network.
+     * 
+ * + * string network = 5; + * + * @return This builder for chaining. + */ + public Builder clearNetwork() { + + network_ = getDefaultInstance().getNetwork(); + onChanged(); + return this; + } + /** + * + * + *
+     * The full name of the Compute Engine
+     * [network](/compute/docs/networks-and-firewalls#networks) to which the Job
+     * should be peered. For example, `projects/12345/global/networks/myVPC`.
+     * [Format](/compute/docs/reference/rest/v1/networks/insert)
+     * is of the form `projects/{project}/global/networks/{network}`.
+     * Where {project} is a project number, as in `12345`, and {network} is a
+     * network name.
+     * Private services access must already be configured for the network. If left
+     * unspecified, the job is not peered with any network.
+     * 
+ * + * string network = 5; + * + * @param value The bytes for network to set. + * @return This builder for chaining. + */ + public Builder setNetworkBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + network_ = value; + onChanged(); + return this; + } + + private com.google.cloud.aiplatform.v1.GcsDestination baseOutputDirectory_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GcsDestination, + com.google.cloud.aiplatform.v1.GcsDestination.Builder, + com.google.cloud.aiplatform.v1.GcsDestinationOrBuilder> + baseOutputDirectoryBuilder_; + /** + * + * + *
+     * The Cloud Storage location to store the output of this CustomJob or
+     * HyperparameterTuningJob. For HyperparameterTuningJob,
+     * the baseOutputDirectory of
+     * each child CustomJob backing a Trial is set to a subdirectory of name
+     * [id][google.cloud.aiplatform.v1.Trial.id] under its parent HyperparameterTuningJob's
+     * baseOutputDirectory.
+     * The following AI Platform environment variables will be passed to
+     * containers or python modules when this field is set:
+     *   For CustomJob:
+     *   * AIP_MODEL_DIR = `<base_output_directory>/model/`
+     *   * AIP_CHECKPOINT_DIR = `<base_output_directory>/checkpoints/`
+     *   * AIP_TENSORBOARD_LOG_DIR = `<base_output_directory>/logs/`
+     *   For CustomJob backing a Trial of HyperparameterTuningJob:
+     *   * AIP_MODEL_DIR = `<base_output_directory>/<trial_id>/model/`
+     *   * AIP_CHECKPOINT_DIR = `<base_output_directory>/<trial_id>/checkpoints/`
+     *   * AIP_TENSORBOARD_LOG_DIR = `<base_output_directory>/<trial_id>/logs/`
+     * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination base_output_directory = 6; + * + * @return Whether the baseOutputDirectory field is set. + */ + public boolean hasBaseOutputDirectory() { + return baseOutputDirectoryBuilder_ != null || baseOutputDirectory_ != null; + } + /** + * + * + *
+     * The Cloud Storage location to store the output of this CustomJob or
+     * HyperparameterTuningJob. For HyperparameterTuningJob,
+     * the baseOutputDirectory of
+     * each child CustomJob backing a Trial is set to a subdirectory of name
+     * [id][google.cloud.aiplatform.v1.Trial.id] under its parent HyperparameterTuningJob's
+     * baseOutputDirectory.
+     * The following AI Platform environment variables will be passed to
+     * containers or python modules when this field is set:
+     *   For CustomJob:
+     *   * AIP_MODEL_DIR = `<base_output_directory>/model/`
+     *   * AIP_CHECKPOINT_DIR = `<base_output_directory>/checkpoints/`
+     *   * AIP_TENSORBOARD_LOG_DIR = `<base_output_directory>/logs/`
+     *   For CustomJob backing a Trial of HyperparameterTuningJob:
+     *   * AIP_MODEL_DIR = `<base_output_directory>/<trial_id>/model/`
+     *   * AIP_CHECKPOINT_DIR = `<base_output_directory>/<trial_id>/checkpoints/`
+     *   * AIP_TENSORBOARD_LOG_DIR = `<base_output_directory>/<trial_id>/logs/`
+     * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination base_output_directory = 6; + * + * @return The baseOutputDirectory. + */ + public com.google.cloud.aiplatform.v1.GcsDestination getBaseOutputDirectory() { + if (baseOutputDirectoryBuilder_ == null) { + return baseOutputDirectory_ == null + ? com.google.cloud.aiplatform.v1.GcsDestination.getDefaultInstance() + : baseOutputDirectory_; + } else { + return baseOutputDirectoryBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The Cloud Storage location to store the output of this CustomJob or
+     * HyperparameterTuningJob. For HyperparameterTuningJob,
+     * the baseOutputDirectory of
+     * each child CustomJob backing a Trial is set to a subdirectory of name
+     * [id][google.cloud.aiplatform.v1.Trial.id] under its parent HyperparameterTuningJob's
+     * baseOutputDirectory.
+     * The following AI Platform environment variables will be passed to
+     * containers or python modules when this field is set:
+     *   For CustomJob:
+     *   * AIP_MODEL_DIR = `<base_output_directory>/model/`
+     *   * AIP_CHECKPOINT_DIR = `<base_output_directory>/checkpoints/`
+     *   * AIP_TENSORBOARD_LOG_DIR = `<base_output_directory>/logs/`
+     *   For CustomJob backing a Trial of HyperparameterTuningJob:
+     *   * AIP_MODEL_DIR = `<base_output_directory>/<trial_id>/model/`
+     *   * AIP_CHECKPOINT_DIR = `<base_output_directory>/<trial_id>/checkpoints/`
+     *   * AIP_TENSORBOARD_LOG_DIR = `<base_output_directory>/<trial_id>/logs/`
+     * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination base_output_directory = 6; + */ + public Builder setBaseOutputDirectory(com.google.cloud.aiplatform.v1.GcsDestination value) { + if (baseOutputDirectoryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + baseOutputDirectory_ = value; + onChanged(); + } else { + baseOutputDirectoryBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The Cloud Storage location to store the output of this CustomJob or
+     * HyperparameterTuningJob. For HyperparameterTuningJob,
+     * the baseOutputDirectory of
+     * each child CustomJob backing a Trial is set to a subdirectory of name
+     * [id][google.cloud.aiplatform.v1.Trial.id] under its parent HyperparameterTuningJob's
+     * baseOutputDirectory.
+     * The following AI Platform environment variables will be passed to
+     * containers or python modules when this field is set:
+     *   For CustomJob:
+     *   * AIP_MODEL_DIR = `<base_output_directory>/model/`
+     *   * AIP_CHECKPOINT_DIR = `<base_output_directory>/checkpoints/`
+     *   * AIP_TENSORBOARD_LOG_DIR = `<base_output_directory>/logs/`
+     *   For CustomJob backing a Trial of HyperparameterTuningJob:
+     *   * AIP_MODEL_DIR = `<base_output_directory>/<trial_id>/model/`
+     *   * AIP_CHECKPOINT_DIR = `<base_output_directory>/<trial_id>/checkpoints/`
+     *   * AIP_TENSORBOARD_LOG_DIR = `<base_output_directory>/<trial_id>/logs/`
+     * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination base_output_directory = 6; + */ + public Builder setBaseOutputDirectory( + com.google.cloud.aiplatform.v1.GcsDestination.Builder builderForValue) { + if (baseOutputDirectoryBuilder_ == null) { + baseOutputDirectory_ = builderForValue.build(); + onChanged(); + } else { + baseOutputDirectoryBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The Cloud Storage location to store the output of this CustomJob or
+     * HyperparameterTuningJob. For HyperparameterTuningJob,
+     * the baseOutputDirectory of
+     * each child CustomJob backing a Trial is set to a subdirectory of name
+     * [id][google.cloud.aiplatform.v1.Trial.id] under its parent HyperparameterTuningJob's
+     * baseOutputDirectory.
+     * The following AI Platform environment variables will be passed to
+     * containers or python modules when this field is set:
+     *   For CustomJob:
+     *   * AIP_MODEL_DIR = `<base_output_directory>/model/`
+     *   * AIP_CHECKPOINT_DIR = `<base_output_directory>/checkpoints/`
+     *   * AIP_TENSORBOARD_LOG_DIR = `<base_output_directory>/logs/`
+     *   For CustomJob backing a Trial of HyperparameterTuningJob:
+     *   * AIP_MODEL_DIR = `<base_output_directory>/<trial_id>/model/`
+     *   * AIP_CHECKPOINT_DIR = `<base_output_directory>/<trial_id>/checkpoints/`
+     *   * AIP_TENSORBOARD_LOG_DIR = `<base_output_directory>/<trial_id>/logs/`
+     * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination base_output_directory = 6; + */ + public Builder mergeBaseOutputDirectory(com.google.cloud.aiplatform.v1.GcsDestination value) { + if (baseOutputDirectoryBuilder_ == null) { + if (baseOutputDirectory_ != null) { + baseOutputDirectory_ = + com.google.cloud.aiplatform.v1.GcsDestination.newBuilder(baseOutputDirectory_) + .mergeFrom(value) + .buildPartial(); + } else { + baseOutputDirectory_ = value; + } + onChanged(); + } else { + baseOutputDirectoryBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The Cloud Storage location to store the output of this CustomJob or
+     * HyperparameterTuningJob. For HyperparameterTuningJob,
+     * the baseOutputDirectory of
+     * each child CustomJob backing a Trial is set to a subdirectory of name
+     * [id][google.cloud.aiplatform.v1.Trial.id] under its parent HyperparameterTuningJob's
+     * baseOutputDirectory.
+     * The following AI Platform environment variables will be passed to
+     * containers or python modules when this field is set:
+     *   For CustomJob:
+     *   * AIP_MODEL_DIR = `<base_output_directory>/model/`
+     *   * AIP_CHECKPOINT_DIR = `<base_output_directory>/checkpoints/`
+     *   * AIP_TENSORBOARD_LOG_DIR = `<base_output_directory>/logs/`
+     *   For CustomJob backing a Trial of HyperparameterTuningJob:
+     *   * AIP_MODEL_DIR = `<base_output_directory>/<trial_id>/model/`
+     *   * AIP_CHECKPOINT_DIR = `<base_output_directory>/<trial_id>/checkpoints/`
+     *   * AIP_TENSORBOARD_LOG_DIR = `<base_output_directory>/<trial_id>/logs/`
+     * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination base_output_directory = 6; + */ + public Builder clearBaseOutputDirectory() { + if (baseOutputDirectoryBuilder_ == null) { + baseOutputDirectory_ = null; + onChanged(); + } else { + baseOutputDirectory_ = null; + baseOutputDirectoryBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The Cloud Storage location to store the output of this CustomJob or
+     * HyperparameterTuningJob. For HyperparameterTuningJob,
+     * the baseOutputDirectory of
+     * each child CustomJob backing a Trial is set to a subdirectory of name
+     * [id][google.cloud.aiplatform.v1.Trial.id] under its parent HyperparameterTuningJob's
+     * baseOutputDirectory.
+     * The following AI Platform environment variables will be passed to
+     * containers or python modules when this field is set:
+     *   For CustomJob:
+     *   * AIP_MODEL_DIR = `<base_output_directory>/model/`
+     *   * AIP_CHECKPOINT_DIR = `<base_output_directory>/checkpoints/`
+     *   * AIP_TENSORBOARD_LOG_DIR = `<base_output_directory>/logs/`
+     *   For CustomJob backing a Trial of HyperparameterTuningJob:
+     *   * AIP_MODEL_DIR = `<base_output_directory>/<trial_id>/model/`
+     *   * AIP_CHECKPOINT_DIR = `<base_output_directory>/<trial_id>/checkpoints/`
+     *   * AIP_TENSORBOARD_LOG_DIR = `<base_output_directory>/<trial_id>/logs/`
+     * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination base_output_directory = 6; + */ + public com.google.cloud.aiplatform.v1.GcsDestination.Builder getBaseOutputDirectoryBuilder() { + + onChanged(); + return getBaseOutputDirectoryFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The Cloud Storage location to store the output of this CustomJob or
+     * HyperparameterTuningJob. For HyperparameterTuningJob,
+     * the baseOutputDirectory of
+     * each child CustomJob backing a Trial is set to a subdirectory of name
+     * [id][google.cloud.aiplatform.v1.Trial.id] under its parent HyperparameterTuningJob's
+     * baseOutputDirectory.
+     * The following AI Platform environment variables will be passed to
+     * containers or python modules when this field is set:
+     *   For CustomJob:
+     *   * AIP_MODEL_DIR = `<base_output_directory>/model/`
+     *   * AIP_CHECKPOINT_DIR = `<base_output_directory>/checkpoints/`
+     *   * AIP_TENSORBOARD_LOG_DIR = `<base_output_directory>/logs/`
+     *   For CustomJob backing a Trial of HyperparameterTuningJob:
+     *   * AIP_MODEL_DIR = `<base_output_directory>/<trial_id>/model/`
+     *   * AIP_CHECKPOINT_DIR = `<base_output_directory>/<trial_id>/checkpoints/`
+     *   * AIP_TENSORBOARD_LOG_DIR = `<base_output_directory>/<trial_id>/logs/`
+     * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination base_output_directory = 6; + */ + public com.google.cloud.aiplatform.v1.GcsDestinationOrBuilder + getBaseOutputDirectoryOrBuilder() { + if (baseOutputDirectoryBuilder_ != null) { + return baseOutputDirectoryBuilder_.getMessageOrBuilder(); + } else { + return baseOutputDirectory_ == null + ? com.google.cloud.aiplatform.v1.GcsDestination.getDefaultInstance() + : baseOutputDirectory_; + } + } + /** + * + * + *
+     * The Cloud Storage location to store the output of this CustomJob or
+     * HyperparameterTuningJob. For HyperparameterTuningJob,
+     * the baseOutputDirectory of
+     * each child CustomJob backing a Trial is set to a subdirectory of name
+     * [id][google.cloud.aiplatform.v1.Trial.id] under its parent HyperparameterTuningJob's
+     * baseOutputDirectory.
+     * The following AI Platform environment variables will be passed to
+     * containers or python modules when this field is set:
+     *   For CustomJob:
+     *   * AIP_MODEL_DIR = `<base_output_directory>/model/`
+     *   * AIP_CHECKPOINT_DIR = `<base_output_directory>/checkpoints/`
+     *   * AIP_TENSORBOARD_LOG_DIR = `<base_output_directory>/logs/`
+     *   For CustomJob backing a Trial of HyperparameterTuningJob:
+     *   * AIP_MODEL_DIR = `<base_output_directory>/<trial_id>/model/`
+     *   * AIP_CHECKPOINT_DIR = `<base_output_directory>/<trial_id>/checkpoints/`
+     *   * AIP_TENSORBOARD_LOG_DIR = `<base_output_directory>/<trial_id>/logs/`
+     * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination base_output_directory = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GcsDestination, + com.google.cloud.aiplatform.v1.GcsDestination.Builder, + com.google.cloud.aiplatform.v1.GcsDestinationOrBuilder> + getBaseOutputDirectoryFieldBuilder() { + if (baseOutputDirectoryBuilder_ == null) { + baseOutputDirectoryBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GcsDestination, + com.google.cloud.aiplatform.v1.GcsDestination.Builder, + com.google.cloud.aiplatform.v1.GcsDestinationOrBuilder>( + getBaseOutputDirectory(), getParentForChildren(), isClean()); + baseOutputDirectory_ = null; + } + return baseOutputDirectoryBuilder_; + } + + @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.v1.CustomJobSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.CustomJobSpec) + private static final com.google.cloud.aiplatform.v1.CustomJobSpec DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.CustomJobSpec(); + } + + public static com.google.cloud.aiplatform.v1.CustomJobSpec getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CustomJobSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CustomJobSpec(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.v1.CustomJobSpec getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CustomJobSpecOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CustomJobSpecOrBuilder.java new file mode 100644 index 000000000..759ecc43a --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CustomJobSpecOrBuilder.java @@ -0,0 +1,274 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/custom_job.proto + +package com.google.cloud.aiplatform.v1; + +public interface CustomJobSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.CustomJobSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The spec of the worker pools including machine type and Docker image.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.WorkerPoolSpec worker_pool_specs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List getWorkerPoolSpecsList(); + /** + * + * + *
+   * Required. The spec of the worker pools including machine type and Docker image.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.WorkerPoolSpec worker_pool_specs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1.WorkerPoolSpec getWorkerPoolSpecs(int index); + /** + * + * + *
+   * Required. The spec of the worker pools including machine type and Docker image.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.WorkerPoolSpec worker_pool_specs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getWorkerPoolSpecsCount(); + /** + * + * + *
+   * Required. The spec of the worker pools including machine type and Docker image.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.WorkerPoolSpec worker_pool_specs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getWorkerPoolSpecsOrBuilderList(); + /** + * + * + *
+   * Required. The spec of the worker pools including machine type and Docker image.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.WorkerPoolSpec worker_pool_specs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1.WorkerPoolSpecOrBuilder getWorkerPoolSpecsOrBuilder(int index); + + /** + * + * + *
+   * Scheduling options for a CustomJob.
+   * 
+ * + * .google.cloud.aiplatform.v1.Scheduling scheduling = 3; + * + * @return Whether the scheduling field is set. + */ + boolean hasScheduling(); + /** + * + * + *
+   * Scheduling options for a CustomJob.
+   * 
+ * + * .google.cloud.aiplatform.v1.Scheduling scheduling = 3; + * + * @return The scheduling. + */ + com.google.cloud.aiplatform.v1.Scheduling getScheduling(); + /** + * + * + *
+   * Scheduling options for a CustomJob.
+   * 
+ * + * .google.cloud.aiplatform.v1.Scheduling scheduling = 3; + */ + com.google.cloud.aiplatform.v1.SchedulingOrBuilder getSchedulingOrBuilder(); + + /** + * + * + *
+   * Specifies the service account for workload run-as account.
+   * Users submitting jobs must have act-as permission on this run-as account.
+   * If unspecified, the AI Platform Custom Code Service Agent for the
+   * CustomJob's project is used.
+   * 
+ * + * string service_account = 4; + * + * @return The serviceAccount. + */ + java.lang.String getServiceAccount(); + /** + * + * + *
+   * Specifies the service account for workload run-as account.
+   * Users submitting jobs must have act-as permission on this run-as account.
+   * If unspecified, the AI Platform Custom Code Service Agent for the
+   * CustomJob's project is used.
+   * 
+ * + * string service_account = 4; + * + * @return The bytes for serviceAccount. + */ + com.google.protobuf.ByteString getServiceAccountBytes(); + + /** + * + * + *
+   * The full name of the Compute Engine
+   * [network](/compute/docs/networks-and-firewalls#networks) to which the Job
+   * should be peered. For example, `projects/12345/global/networks/myVPC`.
+   * [Format](/compute/docs/reference/rest/v1/networks/insert)
+   * is of the form `projects/{project}/global/networks/{network}`.
+   * Where {project} is a project number, as in `12345`, and {network} is a
+   * network name.
+   * Private services access must already be configured for the network. If left
+   * unspecified, the job is not peered with any network.
+   * 
+ * + * string network = 5; + * + * @return The network. + */ + java.lang.String getNetwork(); + /** + * + * + *
+   * The full name of the Compute Engine
+   * [network](/compute/docs/networks-and-firewalls#networks) to which the Job
+   * should be peered. For example, `projects/12345/global/networks/myVPC`.
+   * [Format](/compute/docs/reference/rest/v1/networks/insert)
+   * is of the form `projects/{project}/global/networks/{network}`.
+   * Where {project} is a project number, as in `12345`, and {network} is a
+   * network name.
+   * Private services access must already be configured for the network. If left
+   * unspecified, the job is not peered with any network.
+   * 
+ * + * string network = 5; + * + * @return The bytes for network. + */ + com.google.protobuf.ByteString getNetworkBytes(); + + /** + * + * + *
+   * The Cloud Storage location to store the output of this CustomJob or
+   * HyperparameterTuningJob. For HyperparameterTuningJob,
+   * the baseOutputDirectory of
+   * each child CustomJob backing a Trial is set to a subdirectory of name
+   * [id][google.cloud.aiplatform.v1.Trial.id] under its parent HyperparameterTuningJob's
+   * baseOutputDirectory.
+   * The following AI Platform environment variables will be passed to
+   * containers or python modules when this field is set:
+   *   For CustomJob:
+   *   * AIP_MODEL_DIR = `<base_output_directory>/model/`
+   *   * AIP_CHECKPOINT_DIR = `<base_output_directory>/checkpoints/`
+   *   * AIP_TENSORBOARD_LOG_DIR = `<base_output_directory>/logs/`
+   *   For CustomJob backing a Trial of HyperparameterTuningJob:
+   *   * AIP_MODEL_DIR = `<base_output_directory>/<trial_id>/model/`
+   *   * AIP_CHECKPOINT_DIR = `<base_output_directory>/<trial_id>/checkpoints/`
+   *   * AIP_TENSORBOARD_LOG_DIR = `<base_output_directory>/<trial_id>/logs/`
+   * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination base_output_directory = 6; + * + * @return Whether the baseOutputDirectory field is set. + */ + boolean hasBaseOutputDirectory(); + /** + * + * + *
+   * The Cloud Storage location to store the output of this CustomJob or
+   * HyperparameterTuningJob. For HyperparameterTuningJob,
+   * the baseOutputDirectory of
+   * each child CustomJob backing a Trial is set to a subdirectory of name
+   * [id][google.cloud.aiplatform.v1.Trial.id] under its parent HyperparameterTuningJob's
+   * baseOutputDirectory.
+   * The following AI Platform environment variables will be passed to
+   * containers or python modules when this field is set:
+   *   For CustomJob:
+   *   * AIP_MODEL_DIR = `<base_output_directory>/model/`
+   *   * AIP_CHECKPOINT_DIR = `<base_output_directory>/checkpoints/`
+   *   * AIP_TENSORBOARD_LOG_DIR = `<base_output_directory>/logs/`
+   *   For CustomJob backing a Trial of HyperparameterTuningJob:
+   *   * AIP_MODEL_DIR = `<base_output_directory>/<trial_id>/model/`
+   *   * AIP_CHECKPOINT_DIR = `<base_output_directory>/<trial_id>/checkpoints/`
+   *   * AIP_TENSORBOARD_LOG_DIR = `<base_output_directory>/<trial_id>/logs/`
+   * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination base_output_directory = 6; + * + * @return The baseOutputDirectory. + */ + com.google.cloud.aiplatform.v1.GcsDestination getBaseOutputDirectory(); + /** + * + * + *
+   * The Cloud Storage location to store the output of this CustomJob or
+   * HyperparameterTuningJob. For HyperparameterTuningJob,
+   * the baseOutputDirectory of
+   * each child CustomJob backing a Trial is set to a subdirectory of name
+   * [id][google.cloud.aiplatform.v1.Trial.id] under its parent HyperparameterTuningJob's
+   * baseOutputDirectory.
+   * The following AI Platform environment variables will be passed to
+   * containers or python modules when this field is set:
+   *   For CustomJob:
+   *   * AIP_MODEL_DIR = `<base_output_directory>/model/`
+   *   * AIP_CHECKPOINT_DIR = `<base_output_directory>/checkpoints/`
+   *   * AIP_TENSORBOARD_LOG_DIR = `<base_output_directory>/logs/`
+   *   For CustomJob backing a Trial of HyperparameterTuningJob:
+   *   * AIP_MODEL_DIR = `<base_output_directory>/<trial_id>/model/`
+   *   * AIP_CHECKPOINT_DIR = `<base_output_directory>/<trial_id>/checkpoints/`
+   *   * AIP_TENSORBOARD_LOG_DIR = `<base_output_directory>/<trial_id>/logs/`
+   * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination base_output_directory = 6; + */ + com.google.cloud.aiplatform.v1.GcsDestinationOrBuilder getBaseOutputDirectoryOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DataItem.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DataItem.java new file mode 100644 index 000000000..ec6eae316 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DataItem.java @@ -0,0 +1,2109 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/data_item.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * A piece of data in a Dataset. Could be an image, a video, a document or plain
+ * text.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.DataItem} + */ +public final class DataItem extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.DataItem) + DataItemOrBuilder { + private static final long serialVersionUID = 0L; + // Use DataItem.newBuilder() to construct. + private DataItem(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DataItem() { + name_ = ""; + etag_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DataItem(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DataItem( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + labels_ = + com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); + break; + } + case 34: + { + com.google.protobuf.Value.Builder subBuilder = null; + if (payload_ != null) { + subBuilder = payload_.toBuilder(); + } + payload_ = input.readMessage(com.google.protobuf.Value.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(payload_); + payload_ = subBuilder.buildPartial(); + } + + break; + } + case 50: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + + etag_ = 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.v1.DataItemProto + .internal_static_google_cloud_aiplatform_v1_DataItem_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 3: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.DataItemProto + .internal_static_google_cloud_aiplatform_v1_DataItem_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.DataItem.class, + com.google.cloud.aiplatform.v1.DataItem.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Output only. The resource name of the DataItem.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The resource name of the DataItem.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. Timestamp when this DataItem was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. Timestamp when this DataItem was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. Timestamp when this DataItem was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. Timestamp when this DataItem was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. Timestamp when this DataItem was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. Timestamp when this DataItem was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + public static final int LABELS_FIELD_NUMBER = 3; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.aiplatform.v1.DataItemProto + .internal_static_google_cloud_aiplatform_v1_DataItem_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize your DataItems.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one DataItem(System
+   * labels are excluded).
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+   * and are immutable.
+   * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize your DataItems.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one DataItem(System
+   * labels are excluded).
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+   * and are immutable.
+   * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize your DataItems.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one DataItem(System
+   * labels are excluded).
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+   * and are immutable.
+   * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize your DataItems.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one DataItem(System
+   * labels are excluded).
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+   * and are immutable.
+   * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int PAYLOAD_FIELD_NUMBER = 4; + private com.google.protobuf.Value payload_; + /** + * + * + *
+   * Required. The data that the DataItem represents (for example, an image or a text
+   * snippet). The schema of the payload is stored in the parent Dataset's
+   * [metadata schema's][google.cloud.aiplatform.v1.Dataset.metadata_schema_uri] dataItemSchemaUri field.
+   * 
+ * + * .google.protobuf.Value payload = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the payload field is set. + */ + @java.lang.Override + public boolean hasPayload() { + return payload_ != null; + } + /** + * + * + *
+   * Required. The data that the DataItem represents (for example, an image or a text
+   * snippet). The schema of the payload is stored in the parent Dataset's
+   * [metadata schema's][google.cloud.aiplatform.v1.Dataset.metadata_schema_uri] dataItemSchemaUri field.
+   * 
+ * + * .google.protobuf.Value payload = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The payload. + */ + @java.lang.Override + public com.google.protobuf.Value getPayload() { + return payload_ == null ? com.google.protobuf.Value.getDefaultInstance() : payload_; + } + /** + * + * + *
+   * Required. The data that the DataItem represents (for example, an image or a text
+   * snippet). The schema of the payload is stored in the parent Dataset's
+   * [metadata schema's][google.cloud.aiplatform.v1.Dataset.metadata_schema_uri] dataItemSchemaUri field.
+   * 
+ * + * .google.protobuf.Value payload = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.protobuf.ValueOrBuilder getPayloadOrBuilder() { + return getPayload(); + } + + public static final int ETAG_FIELD_NUMBER = 7; + private volatile java.lang.Object etag_; + /** + * + * + *
+   * Optional. Used to perform consistent read-modify-write updates. If not set, a blind
+   * "overwrite" update happens.
+   * 
+ * + * string etag = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Used to perform consistent read-modify-write updates. If not set, a blind
+   * "overwrite" update happens.
+   * 
+ * + * string etag = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (createTime_ != null) { + output.writeMessage(2, getCreateTime()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 3); + if (payload_ != null) { + output.writeMessage(4, getPayload()); + } + if (updateTime_ != null) { + output.writeMessage(6, getUpdateTime()); + } + if (!getEtagBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, etag_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime()); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, labels__); + } + if (payload_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getPayload()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getUpdateTime()); + } + if (!getEtagBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, etag_); + } + 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.v1.DataItem)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.DataItem other = (com.google.cloud.aiplatform.v1.DataItem) obj; + + if (!getName().equals(other.getName())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (hasPayload() != other.hasPayload()) return false; + if (hasPayload()) { + if (!getPayload().equals(other.getPayload())) return false; + } + if (!getEtag().equals(other.getEtag())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + if (hasPayload()) { + hash = (37 * hash) + PAYLOAD_FIELD_NUMBER; + hash = (53 * hash) + getPayload().hashCode(); + } + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.DataItem parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DataItem 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.v1.DataItem parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DataItem 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.v1.DataItem parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DataItem parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.DataItem parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DataItem 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.v1.DataItem parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DataItem 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.v1.DataItem parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DataItem 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.v1.DataItem 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 piece of data in a Dataset. Could be an image, a video, a document or plain
+   * text.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.DataItem} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.DataItem) + com.google.cloud.aiplatform.v1.DataItemOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.DataItemProto + .internal_static_google_cloud_aiplatform_v1_DataItem_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 3: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 3: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.DataItemProto + .internal_static_google_cloud_aiplatform_v1_DataItem_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.DataItem.class, + com.google.cloud.aiplatform.v1.DataItem.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.DataItem.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + internalGetMutableLabels().clear(); + if (payloadBuilder_ == null) { + payload_ = null; + } else { + payload_ = null; + payloadBuilder_ = null; + } + etag_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.DataItemProto + .internal_static_google_cloud_aiplatform_v1_DataItem_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DataItem getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.DataItem.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DataItem build() { + com.google.cloud.aiplatform.v1.DataItem result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DataItem buildPartial() { + com.google.cloud.aiplatform.v1.DataItem result = + new com.google.cloud.aiplatform.v1.DataItem(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + if (payloadBuilder_ == null) { + result.payload_ = payload_; + } else { + result.payload_ = payloadBuilder_.build(); + } + result.etag_ = etag_; + 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.v1.DataItem) { + return mergeFrom((com.google.cloud.aiplatform.v1.DataItem) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.DataItem other) { + if (other == com.google.cloud.aiplatform.v1.DataItem.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + if (other.hasPayload()) { + mergePayload(other.getPayload()); + } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + 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.v1.DataItem parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.aiplatform.v1.DataItem) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. The resource name of the DataItem.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The resource name of the DataItem.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The resource name of the DataItem.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource name of the DataItem.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource name of the DataItem.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. Timestamp when this DataItem was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * Output only. Timestamp when this DataItem was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Timestamp when this DataItem was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this DataItem was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this DataItem was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this DataItem was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this DataItem was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Timestamp when this DataItem was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. Timestamp when this DataItem was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. Timestamp when this DataItem was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + * + * + *
+     * Output only. Timestamp when this DataItem was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Timestamp when this DataItem was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this DataItem was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this DataItem was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this DataItem was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this DataItem was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Timestamp when this DataItem was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. Timestamp when this DataItem was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + onChanged(); + ; + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Optional. The labels with user-defined metadata to organize your DataItems.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * No more than 64 user labels can be associated with one DataItem(System
+     * labels are excluded).
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+     * and are immutable.
+     * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * Optional. The labels with user-defined metadata to organize your DataItems.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * No more than 64 user labels can be associated with one DataItem(System
+     * labels are excluded).
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+     * and are immutable.
+     * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Optional. The labels with user-defined metadata to organize your DataItems.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * No more than 64 user labels can be associated with one DataItem(System
+     * labels are excluded).
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+     * and are immutable.
+     * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Optional. The labels with user-defined metadata to organize your DataItems.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * No more than 64 user labels can be associated with one DataItem(System
+     * labels are excluded).
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+     * and are immutable.
+     * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Optional. The labels with user-defined metadata to organize your DataItems.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * No more than 64 user labels can be associated with one DataItem(System
+     * labels are excluded).
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+     * and are immutable.
+     * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Optional. The labels with user-defined metadata to organize your DataItems.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * No more than 64 user labels can be associated with one DataItem(System
+     * labels are excluded).
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+     * and are immutable.
+     * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Optional. The labels with user-defined metadata to organize your DataItems.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * No more than 64 user labels can be associated with one DataItem(System
+     * labels are excluded).
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+     * and are immutable.
+     * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + return this; + } + + private com.google.protobuf.Value payload_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Value, + com.google.protobuf.Value.Builder, + com.google.protobuf.ValueOrBuilder> + payloadBuilder_; + /** + * + * + *
+     * Required. The data that the DataItem represents (for example, an image or a text
+     * snippet). The schema of the payload is stored in the parent Dataset's
+     * [metadata schema's][google.cloud.aiplatform.v1.Dataset.metadata_schema_uri] dataItemSchemaUri field.
+     * 
+ * + * .google.protobuf.Value payload = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the payload field is set. + */ + public boolean hasPayload() { + return payloadBuilder_ != null || payload_ != null; + } + /** + * + * + *
+     * Required. The data that the DataItem represents (for example, an image or a text
+     * snippet). The schema of the payload is stored in the parent Dataset's
+     * [metadata schema's][google.cloud.aiplatform.v1.Dataset.metadata_schema_uri] dataItemSchemaUri field.
+     * 
+ * + * .google.protobuf.Value payload = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The payload. + */ + public com.google.protobuf.Value getPayload() { + if (payloadBuilder_ == null) { + return payload_ == null ? com.google.protobuf.Value.getDefaultInstance() : payload_; + } else { + return payloadBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The data that the DataItem represents (for example, an image or a text
+     * snippet). The schema of the payload is stored in the parent Dataset's
+     * [metadata schema's][google.cloud.aiplatform.v1.Dataset.metadata_schema_uri] dataItemSchemaUri field.
+     * 
+ * + * .google.protobuf.Value payload = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setPayload(com.google.protobuf.Value value) { + if (payloadBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + payloadBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The data that the DataItem represents (for example, an image or a text
+     * snippet). The schema of the payload is stored in the parent Dataset's
+     * [metadata schema's][google.cloud.aiplatform.v1.Dataset.metadata_schema_uri] dataItemSchemaUri field.
+     * 
+ * + * .google.protobuf.Value payload = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setPayload(com.google.protobuf.Value.Builder builderForValue) { + if (payloadBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + payloadBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The data that the DataItem represents (for example, an image or a text
+     * snippet). The schema of the payload is stored in the parent Dataset's
+     * [metadata schema's][google.cloud.aiplatform.v1.Dataset.metadata_schema_uri] dataItemSchemaUri field.
+     * 
+ * + * .google.protobuf.Value payload = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergePayload(com.google.protobuf.Value value) { + if (payloadBuilder_ == null) { + if (payload_ != null) { + payload_ = com.google.protobuf.Value.newBuilder(payload_).mergeFrom(value).buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + payloadBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The data that the DataItem represents (for example, an image or a text
+     * snippet). The schema of the payload is stored in the parent Dataset's
+     * [metadata schema's][google.cloud.aiplatform.v1.Dataset.metadata_schema_uri] dataItemSchemaUri field.
+     * 
+ * + * .google.protobuf.Value payload = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearPayload() { + if (payloadBuilder_ == null) { + payload_ = null; + onChanged(); + } else { + payload_ = null; + payloadBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The data that the DataItem represents (for example, an image or a text
+     * snippet). The schema of the payload is stored in the parent Dataset's
+     * [metadata schema's][google.cloud.aiplatform.v1.Dataset.metadata_schema_uri] dataItemSchemaUri field.
+     * 
+ * + * .google.protobuf.Value payload = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.protobuf.Value.Builder getPayloadBuilder() { + + onChanged(); + return getPayloadFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The data that the DataItem represents (for example, an image or a text
+     * snippet). The schema of the payload is stored in the parent Dataset's
+     * [metadata schema's][google.cloud.aiplatform.v1.Dataset.metadata_schema_uri] dataItemSchemaUri field.
+     * 
+ * + * .google.protobuf.Value payload = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.protobuf.ValueOrBuilder getPayloadOrBuilder() { + if (payloadBuilder_ != null) { + return payloadBuilder_.getMessageOrBuilder(); + } else { + return payload_ == null ? com.google.protobuf.Value.getDefaultInstance() : payload_; + } + } + /** + * + * + *
+     * Required. The data that the DataItem represents (for example, an image or a text
+     * snippet). The schema of the payload is stored in the parent Dataset's
+     * [metadata schema's][google.cloud.aiplatform.v1.Dataset.metadata_schema_uri] dataItemSchemaUri field.
+     * 
+ * + * .google.protobuf.Value payload = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Value, + com.google.protobuf.Value.Builder, + com.google.protobuf.ValueOrBuilder> + getPayloadFieldBuilder() { + if (payloadBuilder_ == null) { + payloadBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Value, + com.google.protobuf.Value.Builder, + com.google.protobuf.ValueOrBuilder>( + getPayload(), getParentForChildren(), isClean()); + payload_ = null; + } + return payloadBuilder_; + } + + private java.lang.Object etag_ = ""; + /** + * + * + *
+     * Optional. Used to perform consistent read-modify-write updates. If not set, a blind
+     * "overwrite" update happens.
+     * 
+ * + * string etag = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Used to perform consistent read-modify-write updates. If not set, a blind
+     * "overwrite" update happens.
+     * 
+ * + * string etag = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Used to perform consistent read-modify-write updates. If not set, a blind
+     * "overwrite" update happens.
+     * 
+ * + * string etag = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + etag_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Used to perform consistent read-modify-write updates. If not set, a blind
+     * "overwrite" update happens.
+     * 
+ * + * string etag = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + + etag_ = getDefaultInstance().getEtag(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Used to perform consistent read-modify-write updates. If not set, a blind
+     * "overwrite" update happens.
+     * 
+ * + * string etag = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + etag_ = 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.v1.DataItem) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.DataItem) + private static final com.google.cloud.aiplatform.v1.DataItem DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.DataItem(); + } + + public static com.google.cloud.aiplatform.v1.DataItem getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DataItem parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DataItem(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.v1.DataItem getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DataItemName.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DataItemName.java new file mode 100644 index 000000000..c8c437f91 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DataItemName.java @@ -0,0 +1,259 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class DataItemName implements ResourceName { + 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; + } + + public String getLocation() { + return location; + } + + public String getDataset() { + return dataset; + } + + public String getDataItem() { + return dataItem; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static DataItemName of(String project, String location, String dataset, String dataItem) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setDataset(dataset) + .setDataItem(dataItem) + .build(); + } + + public static String format(String project, String location, String dataset, String dataItem) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setDataset(dataset) + .setDataItem(dataItem) + .build() + .toString(); + } + + public static DataItemName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_DATASET_DATA_ITEM.validatedMatch( + formattedString, "DataItemName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("dataset"), + matchMap.get("data_item")); + } + + 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 (DataItemName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String 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(); + 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(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_DATASET_DATA_ITEM.instantiate( + "project", project, "location", location, "dataset", dataset, "data_item", dataItem); + } + + @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; + } + + public String getLocation() { + return location; + } + + public String getDataset() { + return dataset; + } + + public String getDataItem() { + return dataItem; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setDataset(String dataset) { + this.dataset = dataset; + return this; + } + + public Builder setDataItem(String dataItem) { + this.dataItem = dataItem; + return this; + } + + private Builder(DataItemName dataItemName) { + project = dataItemName.project; + location = dataItemName.location; + dataset = dataItemName.dataset; + dataItem = dataItemName.dataItem; + } + + public DataItemName build() { + return new DataItemName(this); + } + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DataItemOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DataItemOrBuilder.java new file mode 100644 index 000000000..56c09fa08 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DataItemOrBuilder.java @@ -0,0 +1,288 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/data_item.proto + +package com.google.cloud.aiplatform.v1; + +public interface DataItemOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.DataItem) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The resource name of the DataItem.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. The resource name of the DataItem.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. Timestamp when this DataItem was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Timestamp when this DataItem was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Timestamp when this DataItem was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Timestamp when this DataItem was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. Timestamp when this DataItem was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. Timestamp when this DataItem was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize your DataItems.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one DataItem(System
+   * labels are excluded).
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+   * and are immutable.
+   * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + int getLabelsCount(); + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize your DataItems.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one DataItem(System
+   * labels are excluded).
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+   * and are immutable.
+   * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize your DataItems.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one DataItem(System
+   * labels are excluded).
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+   * and are immutable.
+   * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize your DataItems.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one DataItem(System
+   * labels are excluded).
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+   * and are immutable.
+   * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize your DataItems.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one DataItem(System
+   * labels are excluded).
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+   * and are immutable.
+   * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Required. The data that the DataItem represents (for example, an image or a text
+   * snippet). The schema of the payload is stored in the parent Dataset's
+   * [metadata schema's][google.cloud.aiplatform.v1.Dataset.metadata_schema_uri] dataItemSchemaUri field.
+   * 
+ * + * .google.protobuf.Value payload = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the payload field is set. + */ + boolean hasPayload(); + /** + * + * + *
+   * Required. The data that the DataItem represents (for example, an image or a text
+   * snippet). The schema of the payload is stored in the parent Dataset's
+   * [metadata schema's][google.cloud.aiplatform.v1.Dataset.metadata_schema_uri] dataItemSchemaUri field.
+   * 
+ * + * .google.protobuf.Value payload = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The payload. + */ + com.google.protobuf.Value getPayload(); + /** + * + * + *
+   * Required. The data that the DataItem represents (for example, an image or a text
+   * snippet). The schema of the payload is stored in the parent Dataset's
+   * [metadata schema's][google.cloud.aiplatform.v1.Dataset.metadata_schema_uri] dataItemSchemaUri field.
+   * 
+ * + * .google.protobuf.Value payload = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.protobuf.ValueOrBuilder getPayloadOrBuilder(); + + /** + * + * + *
+   * Optional. Used to perform consistent read-modify-write updates. If not set, a blind
+   * "overwrite" update happens.
+   * 
+ * + * string etag = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + java.lang.String getEtag(); + /** + * + * + *
+   * Optional. Used to perform consistent read-modify-write updates. If not set, a blind
+   * "overwrite" update happens.
+   * 
+ * + * string etag = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DataItemProto.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DataItemProto.java new file mode 100644 index 000000000..83c0574b1 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DataItemProto.java @@ -0,0 +1,108 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/data_item.proto + +package com.google.cloud.aiplatform.v1; + +public final class DataItemProto { + private DataItemProto() {} + + 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_v1_DataItem_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_DataItem_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_DataItem_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_DataItem_LabelsEntry_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n*google/cloud/aiplatform/v1/data_item.p" + + "roto\022\032google.cloud.aiplatform.v1\032\037google" + + "/api/field_behavior.proto\032\031google/api/re" + + "source.proto\032\034google/protobuf/struct.pro" + + "to\032\037google/protobuf/timestamp.proto\032\034goo" + + "gle/api/annotations.proto\"\273\003\n\010DataItem\022\021" + + "\n\004name\030\001 \001(\tB\003\340A\003\0224\n\013create_time\030\002 \001(\0132\032" + + ".google.protobuf.TimestampB\003\340A\003\0224\n\013updat" + + "e_time\030\006 \001(\0132\032.google.protobuf.Timestamp" + + "B\003\340A\003\022E\n\006labels\030\003 \003(\01320.google.cloud.aip" + + "latform.v1.DataItem.LabelsEntryB\003\340A\001\022,\n\007" + + "payload\030\004 \001(\0132\026.google.protobuf.ValueB\003\340" + + "A\002\022\021\n\004etag\030\007 \001(\tB\003\340A\001\032-\n\013LabelsEntry\022\013\n\003" + + "key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:y\352Av\n\"aipla" + + "tform.googleapis.com/DataItem\022Pprojects/" + + "{project}/locations/{location}/datasets/" + + "{dataset}/dataItems/{data_item}Bw\n\036com.g" + + "oogle.cloud.aiplatform.v1B\rDataItemProto" + + "P\001ZDgoogle.golang.org/genproto/googleapi" + + "s/cloud/aiplatform/v1;aiplatformb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.protobuf.StructProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1_DataItem_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_DataItem_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_DataItem_descriptor, + new java.lang.String[] { + "Name", "CreateTime", "UpdateTime", "Labels", "Payload", "Etag", + }); + internal_static_google_cloud_aiplatform_v1_DataItem_LabelsEntry_descriptor = + internal_static_google_cloud_aiplatform_v1_DataItem_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_aiplatform_v1_DataItem_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_DataItem_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.StructProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DataLabelingJob.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DataLabelingJob.java new file mode 100644 index 000000000..60a3c7ff3 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DataLabelingJob.java @@ -0,0 +1,5022 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/data_labeling_job.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * DataLabelingJob is used to trigger a human labeling job on unlabeled data
+ * from the following Dataset:
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.DataLabelingJob} + */ +public final class DataLabelingJob extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.DataLabelingJob) + DataLabelingJobOrBuilder { + private static final long serialVersionUID = 0L; + // Use DataLabelingJob.newBuilder() to construct. + private DataLabelingJob(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DataLabelingJob() { + name_ = ""; + displayName_ = ""; + datasets_ = com.google.protobuf.LazyStringArrayList.EMPTY; + instructionUri_ = ""; + inputsSchemaUri_ = ""; + state_ = 0; + specialistPools_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DataLabelingJob(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DataLabelingJob( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + datasets_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + datasets_.add(s); + break; + } + case 32: + { + labelerCount_ = input.readInt32(); + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + instructionUri_ = s; + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + inputsSchemaUri_ = s; + break; + } + case 58: + { + com.google.protobuf.Value.Builder subBuilder = null; + if (inputs_ != null) { + subBuilder = inputs_.toBuilder(); + } + inputs_ = input.readMessage(com.google.protobuf.Value.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(inputs_); + inputs_ = subBuilder.buildPartial(); + } + + break; + } + case 64: + { + int rawValue = input.readEnum(); + + state_ = rawValue; + break; + } + case 74: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 82: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + case 90: + { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + labels_ = + com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000004; + } + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); + break; + } + case 98: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + annotationLabels_ = + com.google.protobuf.MapField.newMapField( + AnnotationLabelsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000002; + } + com.google.protobuf.MapEntry annotationLabels__ = + input.readMessage( + AnnotationLabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + annotationLabels_ + .getMutableMap() + .put(annotationLabels__.getKey(), annotationLabels__.getValue()); + break; + } + case 104: + { + labelingProgress_ = input.readInt32(); + break; + } + case 114: + { + com.google.type.Money.Builder subBuilder = null; + if (currentSpend_ != null) { + subBuilder = currentSpend_.toBuilder(); + } + currentSpend_ = input.readMessage(com.google.type.Money.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(currentSpend_); + currentSpend_ = subBuilder.buildPartial(); + } + + break; + } + case 130: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000008) != 0)) { + specialistPools_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000008; + } + specialistPools_.add(s); + break; + } + case 162: + { + com.google.cloud.aiplatform.v1.EncryptionSpec.Builder subBuilder = null; + if (encryptionSpec_ != null) { + subBuilder = encryptionSpec_.toBuilder(); + } + encryptionSpec_ = + input.readMessage( + com.google.cloud.aiplatform.v1.EncryptionSpec.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(encryptionSpec_); + encryptionSpec_ = subBuilder.buildPartial(); + } + + break; + } + case 170: + { + com.google.cloud.aiplatform.v1.ActiveLearningConfig.Builder subBuilder = null; + if (activeLearningConfig_ != null) { + subBuilder = activeLearningConfig_.toBuilder(); + } + activeLearningConfig_ = + input.readMessage( + com.google.cloud.aiplatform.v1.ActiveLearningConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(activeLearningConfig_); + activeLearningConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 178: + { + com.google.rpc.Status.Builder subBuilder = null; + if (error_ != null) { + subBuilder = error_.toBuilder(); + } + error_ = input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(error_); + error_ = 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)) { + datasets_ = datasets_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000008) != 0)) { + specialistPools_ = specialistPools_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.DataLabelingJobProto + .internal_static_google_cloud_aiplatform_v1_DataLabelingJob_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 12: + return internalGetAnnotationLabels(); + case 11: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.DataLabelingJobProto + .internal_static_google_cloud_aiplatform_v1_DataLabelingJob_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.DataLabelingJob.class, + com.google.cloud.aiplatform.v1.DataLabelingJob.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Output only. Resource name of the DataLabelingJob.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Resource name of the DataLabelingJob.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * Required. The user-defined name of the DataLabelingJob.
+   * The name can be up to 128 characters long and can be consist of any UTF-8
+   * characters.
+   * Display name of a DataLabelingJob.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+   * Required. The user-defined name of the DataLabelingJob.
+   * The name can be up to 128 characters long and can be consist of any UTF-8
+   * characters.
+   * Display name of a DataLabelingJob.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 DATASETS_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList datasets_; + /** + * + * + *
+   * Required. Dataset resource names. Right now we only support labeling from a single
+   * Dataset.
+   * Format:
+   * `projects/{project}/locations/{location}/datasets/{dataset}`
+   * 
+ * + * + * repeated string datasets = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the datasets. + */ + public com.google.protobuf.ProtocolStringList getDatasetsList() { + return datasets_; + } + /** + * + * + *
+   * Required. Dataset resource names. Right now we only support labeling from a single
+   * Dataset.
+   * Format:
+   * `projects/{project}/locations/{location}/datasets/{dataset}`
+   * 
+ * + * + * repeated string datasets = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The count of datasets. + */ + public int getDatasetsCount() { + return datasets_.size(); + } + /** + * + * + *
+   * Required. Dataset resource names. Right now we only support labeling from a single
+   * Dataset.
+   * Format:
+   * `projects/{project}/locations/{location}/datasets/{dataset}`
+   * 
+ * + * + * repeated string datasets = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The datasets at the given index. + */ + public java.lang.String getDatasets(int index) { + return datasets_.get(index); + } + /** + * + * + *
+   * Required. Dataset resource names. Right now we only support labeling from a single
+   * Dataset.
+   * Format:
+   * `projects/{project}/locations/{location}/datasets/{dataset}`
+   * 
+ * + * + * repeated string datasets = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the datasets at the given index. + */ + public com.google.protobuf.ByteString getDatasetsBytes(int index) { + return datasets_.getByteString(index); + } + + public static final int ANNOTATION_LABELS_FIELD_NUMBER = 12; + + private static final class AnnotationLabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.aiplatform.v1.DataLabelingJobProto + .internal_static_google_cloud_aiplatform_v1_DataLabelingJob_AnnotationLabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField annotationLabels_; + + private com.google.protobuf.MapField + internalGetAnnotationLabels() { + if (annotationLabels_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AnnotationLabelsDefaultEntryHolder.defaultEntry); + } + return annotationLabels_; + } + + public int getAnnotationLabelsCount() { + return internalGetAnnotationLabels().getMap().size(); + } + /** + * + * + *
+   * Labels to assign to annotations generated by this DataLabelingJob.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+   * and are immutable.
+   * 
+ * + * map<string, string> annotation_labels = 12; + */ + @java.lang.Override + public boolean containsAnnotationLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetAnnotationLabels().getMap().containsKey(key); + } + /** Use {@link #getAnnotationLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAnnotationLabels() { + return getAnnotationLabelsMap(); + } + /** + * + * + *
+   * Labels to assign to annotations generated by this DataLabelingJob.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+   * and are immutable.
+   * 
+ * + * map<string, string> annotation_labels = 12; + */ + @java.lang.Override + public java.util.Map getAnnotationLabelsMap() { + return internalGetAnnotationLabels().getMap(); + } + /** + * + * + *
+   * Labels to assign to annotations generated by this DataLabelingJob.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+   * and are immutable.
+   * 
+ * + * map<string, string> annotation_labels = 12; + */ + @java.lang.Override + public java.lang.String getAnnotationLabelsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetAnnotationLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Labels to assign to annotations generated by this DataLabelingJob.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+   * and are immutable.
+   * 
+ * + * map<string, string> annotation_labels = 12; + */ + @java.lang.Override + public java.lang.String getAnnotationLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetAnnotationLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int LABELER_COUNT_FIELD_NUMBER = 4; + private int labelerCount_; + /** + * + * + *
+   * Required. Number of labelers to work on each DataItem.
+   * 
+ * + * int32 labeler_count = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The labelerCount. + */ + @java.lang.Override + public int getLabelerCount() { + return labelerCount_; + } + + public static final int INSTRUCTION_URI_FIELD_NUMBER = 5; + private volatile java.lang.Object instructionUri_; + /** + * + * + *
+   * Required. The Google Cloud Storage location of the instruction pdf. This pdf is
+   * shared with labelers, and provides detailed description on how to label
+   * DataItems in Datasets.
+   * 
+ * + * string instruction_uri = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The instructionUri. + */ + @java.lang.Override + public java.lang.String getInstructionUri() { + java.lang.Object ref = instructionUri_; + 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(); + instructionUri_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The Google Cloud Storage location of the instruction pdf. This pdf is
+   * shared with labelers, and provides detailed description on how to label
+   * DataItems in Datasets.
+   * 
+ * + * string instruction_uri = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for instructionUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInstructionUriBytes() { + java.lang.Object ref = instructionUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instructionUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INPUTS_SCHEMA_URI_FIELD_NUMBER = 6; + private volatile java.lang.Object inputsSchemaUri_; + /** + * + * + *
+   * Required. Points to a YAML file stored on Google Cloud Storage describing the
+   * config for a specific type of DataLabelingJob.
+   * The schema files that can be used here are found in the
+   * https://storage.googleapis.com/google-cloud-aiplatform bucket in the
+   * /schema/datalabelingjob/inputs/ folder.
+   * 
+ * + * string inputs_schema_uri = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The inputsSchemaUri. + */ + @java.lang.Override + public java.lang.String getInputsSchemaUri() { + java.lang.Object ref = inputsSchemaUri_; + 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(); + inputsSchemaUri_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Points to a YAML file stored on Google Cloud Storage describing the
+   * config for a specific type of DataLabelingJob.
+   * The schema files that can be used here are found in the
+   * https://storage.googleapis.com/google-cloud-aiplatform bucket in the
+   * /schema/datalabelingjob/inputs/ folder.
+   * 
+ * + * string inputs_schema_uri = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for inputsSchemaUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInputsSchemaUriBytes() { + java.lang.Object ref = inputsSchemaUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + inputsSchemaUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INPUTS_FIELD_NUMBER = 7; + private com.google.protobuf.Value inputs_; + /** + * + * + *
+   * Required. Input config parameters for the DataLabelingJob.
+   * 
+ * + * .google.protobuf.Value inputs = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the inputs field is set. + */ + @java.lang.Override + public boolean hasInputs() { + return inputs_ != null; + } + /** + * + * + *
+   * Required. Input config parameters for the DataLabelingJob.
+   * 
+ * + * .google.protobuf.Value inputs = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The inputs. + */ + @java.lang.Override + public com.google.protobuf.Value getInputs() { + return inputs_ == null ? com.google.protobuf.Value.getDefaultInstance() : inputs_; + } + /** + * + * + *
+   * Required. Input config parameters for the DataLabelingJob.
+   * 
+ * + * .google.protobuf.Value inputs = 7 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.protobuf.ValueOrBuilder getInputsOrBuilder() { + return getInputs(); + } + + public static final int STATE_FIELD_NUMBER = 8; + private int state_; + /** + * + * + *
+   * Output only. The detailed state of the job.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.JobState state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * Output only. The detailed state of the job.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.JobState state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.JobState getState() { + @SuppressWarnings("deprecation") + com.google.cloud.aiplatform.v1.JobState result = + com.google.cloud.aiplatform.v1.JobState.valueOf(state_); + return result == null ? com.google.cloud.aiplatform.v1.JobState.UNRECOGNIZED : result; + } + + public static final int LABELING_PROGRESS_FIELD_NUMBER = 13; + private int labelingProgress_; + /** + * + * + *
+   * Output only. Current labeling job progress percentage scaled in interval [0, 100],
+   * indicating the percentage of DataItems that has been finished.
+   * 
+ * + * int32 labeling_progress = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The labelingProgress. + */ + @java.lang.Override + public int getLabelingProgress() { + return labelingProgress_; + } + + public static final int CURRENT_SPEND_FIELD_NUMBER = 14; + private com.google.type.Money currentSpend_; + /** + * + * + *
+   * Output only. Estimated cost(in US dollars) that the DataLabelingJob has incurred to
+   * date.
+   * 
+ * + * .google.type.Money current_spend = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the currentSpend field is set. + */ + @java.lang.Override + public boolean hasCurrentSpend() { + return currentSpend_ != null; + } + /** + * + * + *
+   * Output only. Estimated cost(in US dollars) that the DataLabelingJob has incurred to
+   * date.
+   * 
+ * + * .google.type.Money current_spend = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The currentSpend. + */ + @java.lang.Override + public com.google.type.Money getCurrentSpend() { + return currentSpend_ == null ? com.google.type.Money.getDefaultInstance() : currentSpend_; + } + /** + * + * + *
+   * Output only. Estimated cost(in US dollars) that the DataLabelingJob has incurred to
+   * date.
+   * 
+ * + * .google.type.Money current_spend = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.type.MoneyOrBuilder getCurrentSpendOrBuilder() { + return getCurrentSpend(); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 9; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. Timestamp when this DataLabelingJob was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. Timestamp when this DataLabelingJob was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. Timestamp when this DataLabelingJob was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 10; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. Timestamp when this DataLabelingJob was updated most recently.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. Timestamp when this DataLabelingJob was updated most recently.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. Timestamp when this DataLabelingJob was updated most recently.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + public static final int ERROR_FIELD_NUMBER = 22; + private com.google.rpc.Status error_; + /** + * + * + *
+   * Output only. DataLabelingJob errors. It is only populated when job's state is
+   * `JOB_STATE_FAILED` or `JOB_STATE_CANCELLED`.
+   * 
+ * + * .google.rpc.Status error = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the error field is set. + */ + @java.lang.Override + public boolean hasError() { + return error_ != null; + } + /** + * + * + *
+   * Output only. DataLabelingJob errors. It is only populated when job's state is
+   * `JOB_STATE_FAILED` or `JOB_STATE_CANCELLED`.
+   * 
+ * + * .google.rpc.Status error = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The error. + */ + @java.lang.Override + public com.google.rpc.Status getError() { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } + /** + * + * + *
+   * Output only. DataLabelingJob errors. It is only populated when job's state is
+   * `JOB_STATE_FAILED` or `JOB_STATE_CANCELLED`.
+   * 
+ * + * .google.rpc.Status error = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + return getError(); + } + + public static final int LABELS_FIELD_NUMBER = 11; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.aiplatform.v1.DataLabelingJobProto + .internal_static_google_cloud_aiplatform_v1_DataLabelingJob_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * The labels with user-defined metadata to organize your DataLabelingJobs.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+   * and are immutable. Following system labels exist for each DataLabelingJob:
+   * * "aiplatform.googleapis.com/schema": output only, its value is the
+   *   [inputs_schema][google.cloud.aiplatform.v1.DataLabelingJob.inputs_schema_uri]'s title.
+   * 
+ * + * map<string, string> labels = 11; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * The labels with user-defined metadata to organize your DataLabelingJobs.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+   * and are immutable. Following system labels exist for each DataLabelingJob:
+   * * "aiplatform.googleapis.com/schema": output only, its value is the
+   *   [inputs_schema][google.cloud.aiplatform.v1.DataLabelingJob.inputs_schema_uri]'s title.
+   * 
+ * + * map<string, string> labels = 11; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * The labels with user-defined metadata to organize your DataLabelingJobs.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+   * and are immutable. Following system labels exist for each DataLabelingJob:
+   * * "aiplatform.googleapis.com/schema": output only, its value is the
+   *   [inputs_schema][google.cloud.aiplatform.v1.DataLabelingJob.inputs_schema_uri]'s title.
+   * 
+ * + * map<string, string> labels = 11; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * The labels with user-defined metadata to organize your DataLabelingJobs.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+   * and are immutable. Following system labels exist for each DataLabelingJob:
+   * * "aiplatform.googleapis.com/schema": output only, its value is the
+   *   [inputs_schema][google.cloud.aiplatform.v1.DataLabelingJob.inputs_schema_uri]'s title.
+   * 
+ * + * map<string, string> labels = 11; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int SPECIALIST_POOLS_FIELD_NUMBER = 16; + private com.google.protobuf.LazyStringList specialistPools_; + /** + * + * + *
+   * The SpecialistPools' resource names associated with this job.
+   * 
+ * + * repeated string specialist_pools = 16; + * + * @return A list containing the specialistPools. + */ + public com.google.protobuf.ProtocolStringList getSpecialistPoolsList() { + return specialistPools_; + } + /** + * + * + *
+   * The SpecialistPools' resource names associated with this job.
+   * 
+ * + * repeated string specialist_pools = 16; + * + * @return The count of specialistPools. + */ + public int getSpecialistPoolsCount() { + return specialistPools_.size(); + } + /** + * + * + *
+   * The SpecialistPools' resource names associated with this job.
+   * 
+ * + * repeated string specialist_pools = 16; + * + * @param index The index of the element to return. + * @return The specialistPools at the given index. + */ + public java.lang.String getSpecialistPools(int index) { + return specialistPools_.get(index); + } + /** + * + * + *
+   * The SpecialistPools' resource names associated with this job.
+   * 
+ * + * repeated string specialist_pools = 16; + * + * @param index The index of the value to return. + * @return The bytes of the specialistPools at the given index. + */ + public com.google.protobuf.ByteString getSpecialistPoolsBytes(int index) { + return specialistPools_.getByteString(index); + } + + public static final int ENCRYPTION_SPEC_FIELD_NUMBER = 20; + private com.google.cloud.aiplatform.v1.EncryptionSpec encryptionSpec_; + /** + * + * + *
+   * Customer-managed encryption key spec for a DataLabelingJob. If set, this
+   * DataLabelingJob will be secured by this key.
+   * Note: Annotations created in the DataLabelingJob are associated with
+   * the EncryptionSpec of the Dataset they are exported to.
+   * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 20; + * + * @return Whether the encryptionSpec field is set. + */ + @java.lang.Override + public boolean hasEncryptionSpec() { + return encryptionSpec_ != null; + } + /** + * + * + *
+   * Customer-managed encryption key spec for a DataLabelingJob. If set, this
+   * DataLabelingJob will be secured by this key.
+   * Note: Annotations created in the DataLabelingJob are associated with
+   * the EncryptionSpec of the Dataset they are exported to.
+   * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 20; + * + * @return The encryptionSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.EncryptionSpec getEncryptionSpec() { + return encryptionSpec_ == null + ? com.google.cloud.aiplatform.v1.EncryptionSpec.getDefaultInstance() + : encryptionSpec_; + } + /** + * + * + *
+   * Customer-managed encryption key spec for a DataLabelingJob. If set, this
+   * DataLabelingJob will be secured by this key.
+   * Note: Annotations created in the DataLabelingJob are associated with
+   * the EncryptionSpec of the Dataset they are exported to.
+   * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 20; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.EncryptionSpecOrBuilder getEncryptionSpecOrBuilder() { + return getEncryptionSpec(); + } + + public static final int ACTIVE_LEARNING_CONFIG_FIELD_NUMBER = 21; + private com.google.cloud.aiplatform.v1.ActiveLearningConfig activeLearningConfig_; + /** + * + * + *
+   * Parameters that configure the active learning pipeline. Active learning will
+   * label the data incrementally via several iterations. For every iteration,
+   * it will select a batch of data based on the sampling strategy.
+   * 
+ * + * .google.cloud.aiplatform.v1.ActiveLearningConfig active_learning_config = 21; + * + * @return Whether the activeLearningConfig field is set. + */ + @java.lang.Override + public boolean hasActiveLearningConfig() { + return activeLearningConfig_ != null; + } + /** + * + * + *
+   * Parameters that configure the active learning pipeline. Active learning will
+   * label the data incrementally via several iterations. For every iteration,
+   * it will select a batch of data based on the sampling strategy.
+   * 
+ * + * .google.cloud.aiplatform.v1.ActiveLearningConfig active_learning_config = 21; + * + * @return The activeLearningConfig. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ActiveLearningConfig getActiveLearningConfig() { + return activeLearningConfig_ == null + ? com.google.cloud.aiplatform.v1.ActiveLearningConfig.getDefaultInstance() + : activeLearningConfig_; + } + /** + * + * + *
+   * Parameters that configure the active learning pipeline. Active learning will
+   * label the data incrementally via several iterations. For every iteration,
+   * it will select a batch of data based on the sampling strategy.
+   * 
+ * + * .google.cloud.aiplatform.v1.ActiveLearningConfig active_learning_config = 21; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ActiveLearningConfigOrBuilder + getActiveLearningConfigOrBuilder() { + return getActiveLearningConfig(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + for (int i = 0; i < datasets_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, datasets_.getRaw(i)); + } + if (labelerCount_ != 0) { + output.writeInt32(4, labelerCount_); + } + if (!getInstructionUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, instructionUri_); + } + if (!getInputsSchemaUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, inputsSchemaUri_); + } + if (inputs_ != null) { + output.writeMessage(7, getInputs()); + } + if (state_ != com.google.cloud.aiplatform.v1.JobState.JOB_STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(8, state_); + } + if (createTime_ != null) { + output.writeMessage(9, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(10, getUpdateTime()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 11); + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetAnnotationLabels(), AnnotationLabelsDefaultEntryHolder.defaultEntry, 12); + if (labelingProgress_ != 0) { + output.writeInt32(13, labelingProgress_); + } + if (currentSpend_ != null) { + output.writeMessage(14, getCurrentSpend()); + } + for (int i = 0; i < specialistPools_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 16, specialistPools_.getRaw(i)); + } + if (encryptionSpec_ != null) { + output.writeMessage(20, getEncryptionSpec()); + } + if (activeLearningConfig_ != null) { + output.writeMessage(21, getActiveLearningConfig()); + } + if (error_ != null) { + output.writeMessage(22, getError()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + { + int dataSize = 0; + for (int i = 0; i < datasets_.size(); i++) { + dataSize += computeStringSizeNoTag(datasets_.getRaw(i)); + } + size += dataSize; + size += 1 * getDatasetsList().size(); + } + if (labelerCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, labelerCount_); + } + if (!getInstructionUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, instructionUri_); + } + if (!getInputsSchemaUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, inputsSchemaUri_); + } + if (inputs_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getInputs()); + } + if (state_ != com.google.cloud.aiplatform.v1.JobState.JOB_STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(8, state_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getUpdateTime()); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, labels__); + } + for (java.util.Map.Entry entry : + internalGetAnnotationLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry annotationLabels__ = + AnnotationLabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, annotationLabels__); + } + if (labelingProgress_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(13, labelingProgress_); + } + if (currentSpend_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, getCurrentSpend()); + } + { + int dataSize = 0; + for (int i = 0; i < specialistPools_.size(); i++) { + dataSize += computeStringSizeNoTag(specialistPools_.getRaw(i)); + } + size += dataSize; + size += 2 * getSpecialistPoolsList().size(); + } + if (encryptionSpec_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(20, getEncryptionSpec()); + } + if (activeLearningConfig_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(21, getActiveLearningConfig()); + } + if (error_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(22, getError()); + } + 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.v1.DataLabelingJob)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.DataLabelingJob other = + (com.google.cloud.aiplatform.v1.DataLabelingJob) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDatasetsList().equals(other.getDatasetsList())) return false; + if (!internalGetAnnotationLabels().equals(other.internalGetAnnotationLabels())) return false; + if (getLabelerCount() != other.getLabelerCount()) return false; + if (!getInstructionUri().equals(other.getInstructionUri())) return false; + if (!getInputsSchemaUri().equals(other.getInputsSchemaUri())) return false; + if (hasInputs() != other.hasInputs()) return false; + if (hasInputs()) { + if (!getInputs().equals(other.getInputs())) return false; + } + if (state_ != other.state_) return false; + if (getLabelingProgress() != other.getLabelingProgress()) return false; + if (hasCurrentSpend() != other.hasCurrentSpend()) return false; + if (hasCurrentSpend()) { + if (!getCurrentSpend().equals(other.getCurrentSpend())) return false; + } + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (hasError() != other.hasError()) return false; + if (hasError()) { + if (!getError().equals(other.getError())) return false; + } + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!getSpecialistPoolsList().equals(other.getSpecialistPoolsList())) return false; + if (hasEncryptionSpec() != other.hasEncryptionSpec()) return false; + if (hasEncryptionSpec()) { + if (!getEncryptionSpec().equals(other.getEncryptionSpec())) return false; + } + if (hasActiveLearningConfig() != other.hasActiveLearningConfig()) return false; + if (hasActiveLearningConfig()) { + if (!getActiveLearningConfig().equals(other.getActiveLearningConfig())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + if (getDatasetsCount() > 0) { + hash = (37 * hash) + DATASETS_FIELD_NUMBER; + hash = (53 * hash) + getDatasetsList().hashCode(); + } + if (!internalGetAnnotationLabels().getMap().isEmpty()) { + hash = (37 * hash) + ANNOTATION_LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetAnnotationLabels().hashCode(); + } + hash = (37 * hash) + LABELER_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getLabelerCount(); + hash = (37 * hash) + INSTRUCTION_URI_FIELD_NUMBER; + hash = (53 * hash) + getInstructionUri().hashCode(); + hash = (37 * hash) + INPUTS_SCHEMA_URI_FIELD_NUMBER; + hash = (53 * hash) + getInputsSchemaUri().hashCode(); + if (hasInputs()) { + hash = (37 * hash) + INPUTS_FIELD_NUMBER; + hash = (53 * hash) + getInputs().hashCode(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + LABELING_PROGRESS_FIELD_NUMBER; + hash = (53 * hash) + getLabelingProgress(); + if (hasCurrentSpend()) { + hash = (37 * hash) + CURRENT_SPEND_FIELD_NUMBER; + hash = (53 * hash) + getCurrentSpend().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (hasError()) { + hash = (37 * hash) + ERROR_FIELD_NUMBER; + hash = (53 * hash) + getError().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + if (getSpecialistPoolsCount() > 0) { + hash = (37 * hash) + SPECIALIST_POOLS_FIELD_NUMBER; + hash = (53 * hash) + getSpecialistPoolsList().hashCode(); + } + if (hasEncryptionSpec()) { + hash = (37 * hash) + ENCRYPTION_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getEncryptionSpec().hashCode(); + } + if (hasActiveLearningConfig()) { + hash = (37 * hash) + ACTIVE_LEARNING_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getActiveLearningConfig().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.DataLabelingJob parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DataLabelingJob 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.v1.DataLabelingJob parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DataLabelingJob 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.v1.DataLabelingJob parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DataLabelingJob parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.DataLabelingJob parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DataLabelingJob 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.v1.DataLabelingJob parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DataLabelingJob 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.v1.DataLabelingJob parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DataLabelingJob 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.v1.DataLabelingJob 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; + } + /** + * + * + *
+   * DataLabelingJob is used to trigger a human labeling job on unlabeled data
+   * from the following Dataset:
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.DataLabelingJob} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.DataLabelingJob) + com.google.cloud.aiplatform.v1.DataLabelingJobOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.DataLabelingJobProto + .internal_static_google_cloud_aiplatform_v1_DataLabelingJob_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 12: + return internalGetAnnotationLabels(); + case 11: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 12: + return internalGetMutableAnnotationLabels(); + case 11: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.DataLabelingJobProto + .internal_static_google_cloud_aiplatform_v1_DataLabelingJob_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.DataLabelingJob.class, + com.google.cloud.aiplatform.v1.DataLabelingJob.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.DataLabelingJob.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + displayName_ = ""; + + datasets_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + internalGetMutableAnnotationLabels().clear(); + labelerCount_ = 0; + + instructionUri_ = ""; + + inputsSchemaUri_ = ""; + + if (inputsBuilder_ == null) { + inputs_ = null; + } else { + inputs_ = null; + inputsBuilder_ = null; + } + state_ = 0; + + labelingProgress_ = 0; + + if (currentSpendBuilder_ == null) { + currentSpend_ = null; + } else { + currentSpend_ = null; + currentSpendBuilder_ = null; + } + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + if (errorBuilder_ == null) { + error_ = null; + } else { + error_ = null; + errorBuilder_ = null; + } + internalGetMutableLabels().clear(); + specialistPools_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000008); + if (encryptionSpecBuilder_ == null) { + encryptionSpec_ = null; + } else { + encryptionSpec_ = null; + encryptionSpecBuilder_ = null; + } + if (activeLearningConfigBuilder_ == null) { + activeLearningConfig_ = null; + } else { + activeLearningConfig_ = null; + activeLearningConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.DataLabelingJobProto + .internal_static_google_cloud_aiplatform_v1_DataLabelingJob_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DataLabelingJob getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.DataLabelingJob.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DataLabelingJob build() { + com.google.cloud.aiplatform.v1.DataLabelingJob result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DataLabelingJob buildPartial() { + com.google.cloud.aiplatform.v1.DataLabelingJob result = + new com.google.cloud.aiplatform.v1.DataLabelingJob(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.displayName_ = displayName_; + if (((bitField0_ & 0x00000001) != 0)) { + datasets_ = datasets_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.datasets_ = datasets_; + result.annotationLabels_ = internalGetAnnotationLabels(); + result.annotationLabels_.makeImmutable(); + result.labelerCount_ = labelerCount_; + result.instructionUri_ = instructionUri_; + result.inputsSchemaUri_ = inputsSchemaUri_; + if (inputsBuilder_ == null) { + result.inputs_ = inputs_; + } else { + result.inputs_ = inputsBuilder_.build(); + } + result.state_ = state_; + result.labelingProgress_ = labelingProgress_; + if (currentSpendBuilder_ == null) { + result.currentSpend_ = currentSpend_; + } else { + result.currentSpend_ = currentSpendBuilder_.build(); + } + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + if (errorBuilder_ == null) { + result.error_ = error_; + } else { + result.error_ = errorBuilder_.build(); + } + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + if (((bitField0_ & 0x00000008) != 0)) { + specialistPools_ = specialistPools_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.specialistPools_ = specialistPools_; + if (encryptionSpecBuilder_ == null) { + result.encryptionSpec_ = encryptionSpec_; + } else { + result.encryptionSpec_ = encryptionSpecBuilder_.build(); + } + if (activeLearningConfigBuilder_ == null) { + result.activeLearningConfig_ = activeLearningConfig_; + } else { + result.activeLearningConfig_ = activeLearningConfigBuilder_.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.v1.DataLabelingJob) { + return mergeFrom((com.google.cloud.aiplatform.v1.DataLabelingJob) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.DataLabelingJob other) { + if (other == com.google.cloud.aiplatform.v1.DataLabelingJob.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (!other.datasets_.isEmpty()) { + if (datasets_.isEmpty()) { + datasets_ = other.datasets_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDatasetsIsMutable(); + datasets_.addAll(other.datasets_); + } + onChanged(); + } + internalGetMutableAnnotationLabels().mergeFrom(other.internalGetAnnotationLabels()); + if (other.getLabelerCount() != 0) { + setLabelerCount(other.getLabelerCount()); + } + if (!other.getInstructionUri().isEmpty()) { + instructionUri_ = other.instructionUri_; + onChanged(); + } + if (!other.getInputsSchemaUri().isEmpty()) { + inputsSchemaUri_ = other.inputsSchemaUri_; + onChanged(); + } + if (other.hasInputs()) { + mergeInputs(other.getInputs()); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.getLabelingProgress() != 0) { + setLabelingProgress(other.getLabelingProgress()); + } + if (other.hasCurrentSpend()) { + mergeCurrentSpend(other.getCurrentSpend()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.hasError()) { + mergeError(other.getError()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + if (!other.specialistPools_.isEmpty()) { + if (specialistPools_.isEmpty()) { + specialistPools_ = other.specialistPools_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureSpecialistPoolsIsMutable(); + specialistPools_.addAll(other.specialistPools_); + } + onChanged(); + } + if (other.hasEncryptionSpec()) { + mergeEncryptionSpec(other.getEncryptionSpec()); + } + if (other.hasActiveLearningConfig()) { + mergeActiveLearningConfig(other.getActiveLearningConfig()); + } + 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.v1.DataLabelingJob parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.aiplatform.v1.DataLabelingJob) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. Resource name of the DataLabelingJob.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Resource name of the DataLabelingJob.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Resource name of the DataLabelingJob.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Resource name of the DataLabelingJob.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Resource name of the DataLabelingJob.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Required. The user-defined name of the DataLabelingJob.
+     * The name can be up to 128 characters long and can be consist of any UTF-8
+     * characters.
+     * Display name of a DataLabelingJob.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+     * Required. The user-defined name of the DataLabelingJob.
+     * The name can be up to 128 characters long and can be consist of any UTF-8
+     * characters.
+     * Display name of a DataLabelingJob.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+     * Required. The user-defined name of the DataLabelingJob.
+     * The name can be up to 128 characters long and can be consist of any UTF-8
+     * characters.
+     * Display name of a DataLabelingJob.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + /** + * + * + *
+     * Required. The user-defined name of the DataLabelingJob.
+     * The name can be up to 128 characters long and can be consist of any UTF-8
+     * characters.
+     * Display name of a DataLabelingJob.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The user-defined name of the DataLabelingJob.
+     * The name can be up to 128 characters long and can be consist of any UTF-8
+     * characters.
+     * Display name of a DataLabelingJob.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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.LazyStringList datasets_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureDatasetsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + datasets_ = new com.google.protobuf.LazyStringArrayList(datasets_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * Required. Dataset resource names. Right now we only support labeling from a single
+     * Dataset.
+     * Format:
+     * `projects/{project}/locations/{location}/datasets/{dataset}`
+     * 
+ * + * + * repeated string datasets = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the datasets. + */ + public com.google.protobuf.ProtocolStringList getDatasetsList() { + return datasets_.getUnmodifiableView(); + } + /** + * + * + *
+     * Required. Dataset resource names. Right now we only support labeling from a single
+     * Dataset.
+     * Format:
+     * `projects/{project}/locations/{location}/datasets/{dataset}`
+     * 
+ * + * + * repeated string datasets = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The count of datasets. + */ + public int getDatasetsCount() { + return datasets_.size(); + } + /** + * + * + *
+     * Required. Dataset resource names. Right now we only support labeling from a single
+     * Dataset.
+     * Format:
+     * `projects/{project}/locations/{location}/datasets/{dataset}`
+     * 
+ * + * + * repeated string datasets = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The datasets at the given index. + */ + public java.lang.String getDatasets(int index) { + return datasets_.get(index); + } + /** + * + * + *
+     * Required. Dataset resource names. Right now we only support labeling from a single
+     * Dataset.
+     * Format:
+     * `projects/{project}/locations/{location}/datasets/{dataset}`
+     * 
+ * + * + * repeated string datasets = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the datasets at the given index. + */ + public com.google.protobuf.ByteString getDatasetsBytes(int index) { + return datasets_.getByteString(index); + } + /** + * + * + *
+     * Required. Dataset resource names. Right now we only support labeling from a single
+     * Dataset.
+     * Format:
+     * `projects/{project}/locations/{location}/datasets/{dataset}`
+     * 
+ * + * + * repeated string datasets = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index to set the value at. + * @param value The datasets to set. + * @return This builder for chaining. + */ + public Builder setDatasets(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDatasetsIsMutable(); + datasets_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Dataset resource names. Right now we only support labeling from a single
+     * Dataset.
+     * Format:
+     * `projects/{project}/locations/{location}/datasets/{dataset}`
+     * 
+ * + * + * repeated string datasets = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The datasets to add. + * @return This builder for chaining. + */ + public Builder addDatasets(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDatasetsIsMutable(); + datasets_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Dataset resource names. Right now we only support labeling from a single
+     * Dataset.
+     * Format:
+     * `projects/{project}/locations/{location}/datasets/{dataset}`
+     * 
+ * + * + * repeated string datasets = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param values The datasets to add. + * @return This builder for chaining. + */ + public Builder addAllDatasets(java.lang.Iterable values) { + ensureDatasetsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, datasets_); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Dataset resource names. Right now we only support labeling from a single
+     * Dataset.
+     * Format:
+     * `projects/{project}/locations/{location}/datasets/{dataset}`
+     * 
+ * + * + * repeated string datasets = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearDatasets() { + datasets_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Dataset resource names. Right now we only support labeling from a single
+     * Dataset.
+     * Format:
+     * `projects/{project}/locations/{location}/datasets/{dataset}`
+     * 
+ * + * + * repeated string datasets = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes of the datasets to add. + * @return This builder for chaining. + */ + public Builder addDatasetsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureDatasetsIsMutable(); + datasets_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.MapField annotationLabels_; + + private com.google.protobuf.MapField + internalGetAnnotationLabels() { + if (annotationLabels_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AnnotationLabelsDefaultEntryHolder.defaultEntry); + } + return annotationLabels_; + } + + private com.google.protobuf.MapField + internalGetMutableAnnotationLabels() { + onChanged(); + ; + if (annotationLabels_ == null) { + annotationLabels_ = + com.google.protobuf.MapField.newMapField( + AnnotationLabelsDefaultEntryHolder.defaultEntry); + } + if (!annotationLabels_.isMutable()) { + annotationLabels_ = annotationLabels_.copy(); + } + return annotationLabels_; + } + + public int getAnnotationLabelsCount() { + return internalGetAnnotationLabels().getMap().size(); + } + /** + * + * + *
+     * Labels to assign to annotations generated by this DataLabelingJob.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+     * and are immutable.
+     * 
+ * + * map<string, string> annotation_labels = 12; + */ + @java.lang.Override + public boolean containsAnnotationLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetAnnotationLabels().getMap().containsKey(key); + } + /** Use {@link #getAnnotationLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAnnotationLabels() { + return getAnnotationLabelsMap(); + } + /** + * + * + *
+     * Labels to assign to annotations generated by this DataLabelingJob.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+     * and are immutable.
+     * 
+ * + * map<string, string> annotation_labels = 12; + */ + @java.lang.Override + public java.util.Map getAnnotationLabelsMap() { + return internalGetAnnotationLabels().getMap(); + } + /** + * + * + *
+     * Labels to assign to annotations generated by this DataLabelingJob.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+     * and are immutable.
+     * 
+ * + * map<string, string> annotation_labels = 12; + */ + @java.lang.Override + public java.lang.String getAnnotationLabelsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = + internalGetAnnotationLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Labels to assign to annotations generated by this DataLabelingJob.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+     * and are immutable.
+     * 
+ * + * map<string, string> annotation_labels = 12; + */ + @java.lang.Override + public java.lang.String getAnnotationLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = + internalGetAnnotationLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearAnnotationLabels() { + internalGetMutableAnnotationLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Labels to assign to annotations generated by this DataLabelingJob.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+     * and are immutable.
+     * 
+ * + * map<string, string> annotation_labels = 12; + */ + public Builder removeAnnotationLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableAnnotationLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableAnnotationLabels() { + return internalGetMutableAnnotationLabels().getMutableMap(); + } + /** + * + * + *
+     * Labels to assign to annotations generated by this DataLabelingJob.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+     * and are immutable.
+     * 
+ * + * map<string, string> annotation_labels = 12; + */ + public Builder putAnnotationLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableAnnotationLabels().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Labels to assign to annotations generated by this DataLabelingJob.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+     * and are immutable.
+     * 
+ * + * map<string, string> annotation_labels = 12; + */ + public Builder putAllAnnotationLabels( + java.util.Map values) { + internalGetMutableAnnotationLabels().getMutableMap().putAll(values); + return this; + } + + private int labelerCount_; + /** + * + * + *
+     * Required. Number of labelers to work on each DataItem.
+     * 
+ * + * int32 labeler_count = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The labelerCount. + */ + @java.lang.Override + public int getLabelerCount() { + return labelerCount_; + } + /** + * + * + *
+     * Required. Number of labelers to work on each DataItem.
+     * 
+ * + * int32 labeler_count = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The labelerCount to set. + * @return This builder for chaining. + */ + public Builder setLabelerCount(int value) { + + labelerCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Number of labelers to work on each DataItem.
+     * 
+ * + * int32 labeler_count = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearLabelerCount() { + + labelerCount_ = 0; + onChanged(); + return this; + } + + private java.lang.Object instructionUri_ = ""; + /** + * + * + *
+     * Required. The Google Cloud Storage location of the instruction pdf. This pdf is
+     * shared with labelers, and provides detailed description on how to label
+     * DataItems in Datasets.
+     * 
+ * + * string instruction_uri = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The instructionUri. + */ + public java.lang.String getInstructionUri() { + java.lang.Object ref = instructionUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instructionUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The Google Cloud Storage location of the instruction pdf. This pdf is
+     * shared with labelers, and provides detailed description on how to label
+     * DataItems in Datasets.
+     * 
+ * + * string instruction_uri = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for instructionUri. + */ + public com.google.protobuf.ByteString getInstructionUriBytes() { + java.lang.Object ref = instructionUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instructionUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The Google Cloud Storage location of the instruction pdf. This pdf is
+     * shared with labelers, and provides detailed description on how to label
+     * DataItems in Datasets.
+     * 
+ * + * string instruction_uri = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The instructionUri to set. + * @return This builder for chaining. + */ + public Builder setInstructionUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + instructionUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Google Cloud Storage location of the instruction pdf. This pdf is
+     * shared with labelers, and provides detailed description on how to label
+     * DataItems in Datasets.
+     * 
+ * + * string instruction_uri = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearInstructionUri() { + + instructionUri_ = getDefaultInstance().getInstructionUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Google Cloud Storage location of the instruction pdf. This pdf is
+     * shared with labelers, and provides detailed description on how to label
+     * DataItems in Datasets.
+     * 
+ * + * string instruction_uri = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for instructionUri to set. + * @return This builder for chaining. + */ + public Builder setInstructionUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + instructionUri_ = value; + onChanged(); + return this; + } + + private java.lang.Object inputsSchemaUri_ = ""; + /** + * + * + *
+     * Required. Points to a YAML file stored on Google Cloud Storage describing the
+     * config for a specific type of DataLabelingJob.
+     * The schema files that can be used here are found in the
+     * https://storage.googleapis.com/google-cloud-aiplatform bucket in the
+     * /schema/datalabelingjob/inputs/ folder.
+     * 
+ * + * string inputs_schema_uri = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The inputsSchemaUri. + */ + public java.lang.String getInputsSchemaUri() { + java.lang.Object ref = inputsSchemaUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + inputsSchemaUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Points to a YAML file stored on Google Cloud Storage describing the
+     * config for a specific type of DataLabelingJob.
+     * The schema files that can be used here are found in the
+     * https://storage.googleapis.com/google-cloud-aiplatform bucket in the
+     * /schema/datalabelingjob/inputs/ folder.
+     * 
+ * + * string inputs_schema_uri = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for inputsSchemaUri. + */ + public com.google.protobuf.ByteString getInputsSchemaUriBytes() { + java.lang.Object ref = inputsSchemaUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + inputsSchemaUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Points to a YAML file stored on Google Cloud Storage describing the
+     * config for a specific type of DataLabelingJob.
+     * The schema files that can be used here are found in the
+     * https://storage.googleapis.com/google-cloud-aiplatform bucket in the
+     * /schema/datalabelingjob/inputs/ folder.
+     * 
+ * + * string inputs_schema_uri = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The inputsSchemaUri to set. + * @return This builder for chaining. + */ + public Builder setInputsSchemaUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + inputsSchemaUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Points to a YAML file stored on Google Cloud Storage describing the
+     * config for a specific type of DataLabelingJob.
+     * The schema files that can be used here are found in the
+     * https://storage.googleapis.com/google-cloud-aiplatform bucket in the
+     * /schema/datalabelingjob/inputs/ folder.
+     * 
+ * + * string inputs_schema_uri = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearInputsSchemaUri() { + + inputsSchemaUri_ = getDefaultInstance().getInputsSchemaUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Points to a YAML file stored on Google Cloud Storage describing the
+     * config for a specific type of DataLabelingJob.
+     * The schema files that can be used here are found in the
+     * https://storage.googleapis.com/google-cloud-aiplatform bucket in the
+     * /schema/datalabelingjob/inputs/ folder.
+     * 
+ * + * string inputs_schema_uri = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for inputsSchemaUri to set. + * @return This builder for chaining. + */ + public Builder setInputsSchemaUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + inputsSchemaUri_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Value inputs_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Value, + com.google.protobuf.Value.Builder, + com.google.protobuf.ValueOrBuilder> + inputsBuilder_; + /** + * + * + *
+     * Required. Input config parameters for the DataLabelingJob.
+     * 
+ * + * .google.protobuf.Value inputs = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the inputs field is set. + */ + public boolean hasInputs() { + return inputsBuilder_ != null || inputs_ != null; + } + /** + * + * + *
+     * Required. Input config parameters for the DataLabelingJob.
+     * 
+ * + * .google.protobuf.Value inputs = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The inputs. + */ + public com.google.protobuf.Value getInputs() { + if (inputsBuilder_ == null) { + return inputs_ == null ? com.google.protobuf.Value.getDefaultInstance() : inputs_; + } else { + return inputsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Input config parameters for the DataLabelingJob.
+     * 
+ * + * .google.protobuf.Value inputs = 7 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setInputs(com.google.protobuf.Value value) { + if (inputsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + inputs_ = value; + onChanged(); + } else { + inputsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. Input config parameters for the DataLabelingJob.
+     * 
+ * + * .google.protobuf.Value inputs = 7 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setInputs(com.google.protobuf.Value.Builder builderForValue) { + if (inputsBuilder_ == null) { + inputs_ = builderForValue.build(); + onChanged(); + } else { + inputsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. Input config parameters for the DataLabelingJob.
+     * 
+ * + * .google.protobuf.Value inputs = 7 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeInputs(com.google.protobuf.Value value) { + if (inputsBuilder_ == null) { + if (inputs_ != null) { + inputs_ = com.google.protobuf.Value.newBuilder(inputs_).mergeFrom(value).buildPartial(); + } else { + inputs_ = value; + } + onChanged(); + } else { + inputsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. Input config parameters for the DataLabelingJob.
+     * 
+ * + * .google.protobuf.Value inputs = 7 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearInputs() { + if (inputsBuilder_ == null) { + inputs_ = null; + onChanged(); + } else { + inputs_ = null; + inputsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. Input config parameters for the DataLabelingJob.
+     * 
+ * + * .google.protobuf.Value inputs = 7 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.protobuf.Value.Builder getInputsBuilder() { + + onChanged(); + return getInputsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Input config parameters for the DataLabelingJob.
+     * 
+ * + * .google.protobuf.Value inputs = 7 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.protobuf.ValueOrBuilder getInputsOrBuilder() { + if (inputsBuilder_ != null) { + return inputsBuilder_.getMessageOrBuilder(); + } else { + return inputs_ == null ? com.google.protobuf.Value.getDefaultInstance() : inputs_; + } + } + /** + * + * + *
+     * Required. Input config parameters for the DataLabelingJob.
+     * 
+ * + * .google.protobuf.Value inputs = 7 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Value, + com.google.protobuf.Value.Builder, + com.google.protobuf.ValueOrBuilder> + getInputsFieldBuilder() { + if (inputsBuilder_ == null) { + inputsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Value, + com.google.protobuf.Value.Builder, + com.google.protobuf.ValueOrBuilder>(getInputs(), getParentForChildren(), isClean()); + inputs_ = null; + } + return inputsBuilder_; + } + + private int state_ = 0; + /** + * + * + *
+     * Output only. The detailed state of the job.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.JobState state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Output only. The detailed state of the job.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.JobState state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + + state_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The detailed state of the job.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.JobState state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.JobState getState() { + @SuppressWarnings("deprecation") + com.google.cloud.aiplatform.v1.JobState result = + com.google.cloud.aiplatform.v1.JobState.valueOf(state_); + return result == null ? com.google.cloud.aiplatform.v1.JobState.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Output only. The detailed state of the job.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.JobState state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.aiplatform.v1.JobState value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The detailed state of the job.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.JobState state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + + state_ = 0; + onChanged(); + return this; + } + + private int labelingProgress_; + /** + * + * + *
+     * Output only. Current labeling job progress percentage scaled in interval [0, 100],
+     * indicating the percentage of DataItems that has been finished.
+     * 
+ * + * int32 labeling_progress = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The labelingProgress. + */ + @java.lang.Override + public int getLabelingProgress() { + return labelingProgress_; + } + /** + * + * + *
+     * Output only. Current labeling job progress percentage scaled in interval [0, 100],
+     * indicating the percentage of DataItems that has been finished.
+     * 
+ * + * int32 labeling_progress = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The labelingProgress to set. + * @return This builder for chaining. + */ + public Builder setLabelingProgress(int value) { + + labelingProgress_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Current labeling job progress percentage scaled in interval [0, 100],
+     * indicating the percentage of DataItems that has been finished.
+     * 
+ * + * int32 labeling_progress = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearLabelingProgress() { + + labelingProgress_ = 0; + onChanged(); + return this; + } + + private com.google.type.Money currentSpend_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Money, com.google.type.Money.Builder, com.google.type.MoneyOrBuilder> + currentSpendBuilder_; + /** + * + * + *
+     * Output only. Estimated cost(in US dollars) that the DataLabelingJob has incurred to
+     * date.
+     * 
+ * + * .google.type.Money current_spend = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the currentSpend field is set. + */ + public boolean hasCurrentSpend() { + return currentSpendBuilder_ != null || currentSpend_ != null; + } + /** + * + * + *
+     * Output only. Estimated cost(in US dollars) that the DataLabelingJob has incurred to
+     * date.
+     * 
+ * + * .google.type.Money current_spend = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The currentSpend. + */ + public com.google.type.Money getCurrentSpend() { + if (currentSpendBuilder_ == null) { + return currentSpend_ == null ? com.google.type.Money.getDefaultInstance() : currentSpend_; + } else { + return currentSpendBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Estimated cost(in US dollars) that the DataLabelingJob has incurred to
+     * date.
+     * 
+ * + * .google.type.Money current_spend = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCurrentSpend(com.google.type.Money value) { + if (currentSpendBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + currentSpend_ = value; + onChanged(); + } else { + currentSpendBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Estimated cost(in US dollars) that the DataLabelingJob has incurred to
+     * date.
+     * 
+ * + * .google.type.Money current_spend = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCurrentSpend(com.google.type.Money.Builder builderForValue) { + if (currentSpendBuilder_ == null) { + currentSpend_ = builderForValue.build(); + onChanged(); + } else { + currentSpendBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Estimated cost(in US dollars) that the DataLabelingJob has incurred to
+     * date.
+     * 
+ * + * .google.type.Money current_spend = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCurrentSpend(com.google.type.Money value) { + if (currentSpendBuilder_ == null) { + if (currentSpend_ != null) { + currentSpend_ = + com.google.type.Money.newBuilder(currentSpend_).mergeFrom(value).buildPartial(); + } else { + currentSpend_ = value; + } + onChanged(); + } else { + currentSpendBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Estimated cost(in US dollars) that the DataLabelingJob has incurred to
+     * date.
+     * 
+ * + * .google.type.Money current_spend = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCurrentSpend() { + if (currentSpendBuilder_ == null) { + currentSpend_ = null; + onChanged(); + } else { + currentSpend_ = null; + currentSpendBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Estimated cost(in US dollars) that the DataLabelingJob has incurred to
+     * date.
+     * 
+ * + * .google.type.Money current_spend = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.type.Money.Builder getCurrentSpendBuilder() { + + onChanged(); + return getCurrentSpendFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Estimated cost(in US dollars) that the DataLabelingJob has incurred to
+     * date.
+     * 
+ * + * .google.type.Money current_spend = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.type.MoneyOrBuilder getCurrentSpendOrBuilder() { + if (currentSpendBuilder_ != null) { + return currentSpendBuilder_.getMessageOrBuilder(); + } else { + return currentSpend_ == null ? com.google.type.Money.getDefaultInstance() : currentSpend_; + } + } + /** + * + * + *
+     * Output only. Estimated cost(in US dollars) that the DataLabelingJob has incurred to
+     * date.
+     * 
+ * + * .google.type.Money current_spend = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Money, com.google.type.Money.Builder, com.google.type.MoneyOrBuilder> + getCurrentSpendFieldBuilder() { + if (currentSpendBuilder_ == null) { + currentSpendBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Money, + com.google.type.Money.Builder, + com.google.type.MoneyOrBuilder>( + getCurrentSpend(), getParentForChildren(), isClean()); + currentSpend_ = null; + } + return currentSpendBuilder_; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. Timestamp when this DataLabelingJob was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * Output only. Timestamp when this DataLabelingJob was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Timestamp when this DataLabelingJob was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this DataLabelingJob was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this DataLabelingJob was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this DataLabelingJob was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this DataLabelingJob was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Timestamp when this DataLabelingJob was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. Timestamp when this DataLabelingJob was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. Timestamp when this DataLabelingJob was updated most recently.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + * + * + *
+     * Output only. Timestamp when this DataLabelingJob was updated most recently.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Timestamp when this DataLabelingJob was updated most recently.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this DataLabelingJob was updated most recently.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this DataLabelingJob was updated most recently.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this DataLabelingJob was updated most recently.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this DataLabelingJob was updated most recently.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Timestamp when this DataLabelingJob was updated most recently.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. Timestamp when this DataLabelingJob was updated most recently.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.rpc.Status error_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + errorBuilder_; + /** + * + * + *
+     * Output only. DataLabelingJob errors. It is only populated when job's state is
+     * `JOB_STATE_FAILED` or `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.rpc.Status error = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the error field is set. + */ + public boolean hasError() { + return errorBuilder_ != null || error_ != null; + } + /** + * + * + *
+     * Output only. DataLabelingJob errors. It is only populated when job's state is
+     * `JOB_STATE_FAILED` or `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.rpc.Status error = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The error. + */ + public com.google.rpc.Status getError() { + if (errorBuilder_ == null) { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } else { + return errorBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. DataLabelingJob errors. It is only populated when job's state is
+     * `JOB_STATE_FAILED` or `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.rpc.Status error = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + error_ = value; + onChanged(); + } else { + errorBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. DataLabelingJob errors. It is only populated when job's state is
+     * `JOB_STATE_FAILED` or `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.rpc.Status error = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setError(com.google.rpc.Status.Builder builderForValue) { + if (errorBuilder_ == null) { + error_ = builderForValue.build(); + onChanged(); + } else { + errorBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. DataLabelingJob errors. It is only populated when job's state is
+     * `JOB_STATE_FAILED` or `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.rpc.Status error = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (error_ != null) { + error_ = com.google.rpc.Status.newBuilder(error_).mergeFrom(value).buildPartial(); + } else { + error_ = value; + } + onChanged(); + } else { + errorBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. DataLabelingJob errors. It is only populated when job's state is
+     * `JOB_STATE_FAILED` or `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.rpc.Status error = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearError() { + if (errorBuilder_ == null) { + error_ = null; + onChanged(); + } else { + error_ = null; + errorBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. DataLabelingJob errors. It is only populated when job's state is
+     * `JOB_STATE_FAILED` or `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.rpc.Status error = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.rpc.Status.Builder getErrorBuilder() { + + onChanged(); + return getErrorFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. DataLabelingJob errors. It is only populated when job's state is
+     * `JOB_STATE_FAILED` or `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.rpc.Status error = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + if (errorBuilder_ != null) { + return errorBuilder_.getMessageOrBuilder(); + } else { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } + } + /** + * + * + *
+     * Output only. DataLabelingJob errors. It is only populated when job's state is
+     * `JOB_STATE_FAILED` or `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.rpc.Status error = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getErrorFieldBuilder() { + if (errorBuilder_ == null) { + errorBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, + com.google.rpc.Status.Builder, + com.google.rpc.StatusOrBuilder>(getError(), getParentForChildren(), isClean()); + error_ = null; + } + return errorBuilder_; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + onChanged(); + ; + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * The labels with user-defined metadata to organize your DataLabelingJobs.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+     * and are immutable. Following system labels exist for each DataLabelingJob:
+     * * "aiplatform.googleapis.com/schema": output only, its value is the
+     *   [inputs_schema][google.cloud.aiplatform.v1.DataLabelingJob.inputs_schema_uri]'s title.
+     * 
+ * + * map<string, string> labels = 11; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * The labels with user-defined metadata to organize your DataLabelingJobs.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+     * and are immutable. Following system labels exist for each DataLabelingJob:
+     * * "aiplatform.googleapis.com/schema": output only, its value is the
+     *   [inputs_schema][google.cloud.aiplatform.v1.DataLabelingJob.inputs_schema_uri]'s title.
+     * 
+ * + * map<string, string> labels = 11; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * The labels with user-defined metadata to organize your DataLabelingJobs.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+     * and are immutable. Following system labels exist for each DataLabelingJob:
+     * * "aiplatform.googleapis.com/schema": output only, its value is the
+     *   [inputs_schema][google.cloud.aiplatform.v1.DataLabelingJob.inputs_schema_uri]'s title.
+     * 
+ * + * map<string, string> labels = 11; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * The labels with user-defined metadata to organize your DataLabelingJobs.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+     * and are immutable. Following system labels exist for each DataLabelingJob:
+     * * "aiplatform.googleapis.com/schema": output only, its value is the
+     *   [inputs_schema][google.cloud.aiplatform.v1.DataLabelingJob.inputs_schema_uri]'s title.
+     * 
+ * + * map<string, string> labels = 11; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * The labels with user-defined metadata to organize your DataLabelingJobs.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+     * and are immutable. Following system labels exist for each DataLabelingJob:
+     * * "aiplatform.googleapis.com/schema": output only, its value is the
+     *   [inputs_schema][google.cloud.aiplatform.v1.DataLabelingJob.inputs_schema_uri]'s title.
+     * 
+ * + * map<string, string> labels = 11; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * The labels with user-defined metadata to organize your DataLabelingJobs.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+     * and are immutable. Following system labels exist for each DataLabelingJob:
+     * * "aiplatform.googleapis.com/schema": output only, its value is the
+     *   [inputs_schema][google.cloud.aiplatform.v1.DataLabelingJob.inputs_schema_uri]'s title.
+     * 
+ * + * map<string, string> labels = 11; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * The labels with user-defined metadata to organize your DataLabelingJobs.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+     * and are immutable. Following system labels exist for each DataLabelingJob:
+     * * "aiplatform.googleapis.com/schema": output only, its value is the
+     *   [inputs_schema][google.cloud.aiplatform.v1.DataLabelingJob.inputs_schema_uri]'s title.
+     * 
+ * + * map<string, string> labels = 11; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + return this; + } + + private com.google.protobuf.LazyStringList specialistPools_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureSpecialistPoolsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + specialistPools_ = new com.google.protobuf.LazyStringArrayList(specialistPools_); + bitField0_ |= 0x00000008; + } + } + /** + * + * + *
+     * The SpecialistPools' resource names associated with this job.
+     * 
+ * + * repeated string specialist_pools = 16; + * + * @return A list containing the specialistPools. + */ + public com.google.protobuf.ProtocolStringList getSpecialistPoolsList() { + return specialistPools_.getUnmodifiableView(); + } + /** + * + * + *
+     * The SpecialistPools' resource names associated with this job.
+     * 
+ * + * repeated string specialist_pools = 16; + * + * @return The count of specialistPools. + */ + public int getSpecialistPoolsCount() { + return specialistPools_.size(); + } + /** + * + * + *
+     * The SpecialistPools' resource names associated with this job.
+     * 
+ * + * repeated string specialist_pools = 16; + * + * @param index The index of the element to return. + * @return The specialistPools at the given index. + */ + public java.lang.String getSpecialistPools(int index) { + return specialistPools_.get(index); + } + /** + * + * + *
+     * The SpecialistPools' resource names associated with this job.
+     * 
+ * + * repeated string specialist_pools = 16; + * + * @param index The index of the value to return. + * @return The bytes of the specialistPools at the given index. + */ + public com.google.protobuf.ByteString getSpecialistPoolsBytes(int index) { + return specialistPools_.getByteString(index); + } + /** + * + * + *
+     * The SpecialistPools' resource names associated with this job.
+     * 
+ * + * repeated string specialist_pools = 16; + * + * @param index The index to set the value at. + * @param value The specialistPools to set. + * @return This builder for chaining. + */ + public Builder setSpecialistPools(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSpecialistPoolsIsMutable(); + specialistPools_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * The SpecialistPools' resource names associated with this job.
+     * 
+ * + * repeated string specialist_pools = 16; + * + * @param value The specialistPools to add. + * @return This builder for chaining. + */ + public Builder addSpecialistPools(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSpecialistPoolsIsMutable(); + specialistPools_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * The SpecialistPools' resource names associated with this job.
+     * 
+ * + * repeated string specialist_pools = 16; + * + * @param values The specialistPools to add. + * @return This builder for chaining. + */ + public Builder addAllSpecialistPools(java.lang.Iterable values) { + ensureSpecialistPoolsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, specialistPools_); + onChanged(); + return this; + } + /** + * + * + *
+     * The SpecialistPools' resource names associated with this job.
+     * 
+ * + * repeated string specialist_pools = 16; + * + * @return This builder for chaining. + */ + public Builder clearSpecialistPools() { + specialistPools_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * The SpecialistPools' resource names associated with this job.
+     * 
+ * + * repeated string specialist_pools = 16; + * + * @param value The bytes of the specialistPools to add. + * @return This builder for chaining. + */ + public Builder addSpecialistPoolsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureSpecialistPoolsIsMutable(); + specialistPools_.add(value); + onChanged(); + return this; + } + + private com.google.cloud.aiplatform.v1.EncryptionSpec encryptionSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.EncryptionSpec, + com.google.cloud.aiplatform.v1.EncryptionSpec.Builder, + com.google.cloud.aiplatform.v1.EncryptionSpecOrBuilder> + encryptionSpecBuilder_; + /** + * + * + *
+     * Customer-managed encryption key spec for a DataLabelingJob. If set, this
+     * DataLabelingJob will be secured by this key.
+     * Note: Annotations created in the DataLabelingJob are associated with
+     * the EncryptionSpec of the Dataset they are exported to.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 20; + * + * @return Whether the encryptionSpec field is set. + */ + public boolean hasEncryptionSpec() { + return encryptionSpecBuilder_ != null || encryptionSpec_ != null; + } + /** + * + * + *
+     * Customer-managed encryption key spec for a DataLabelingJob. If set, this
+     * DataLabelingJob will be secured by this key.
+     * Note: Annotations created in the DataLabelingJob are associated with
+     * the EncryptionSpec of the Dataset they are exported to.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 20; + * + * @return The encryptionSpec. + */ + public com.google.cloud.aiplatform.v1.EncryptionSpec getEncryptionSpec() { + if (encryptionSpecBuilder_ == null) { + return encryptionSpec_ == null + ? com.google.cloud.aiplatform.v1.EncryptionSpec.getDefaultInstance() + : encryptionSpec_; + } else { + return encryptionSpecBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Customer-managed encryption key spec for a DataLabelingJob. If set, this
+     * DataLabelingJob will be secured by this key.
+     * Note: Annotations created in the DataLabelingJob are associated with
+     * the EncryptionSpec of the Dataset they are exported to.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 20; + */ + public Builder setEncryptionSpec(com.google.cloud.aiplatform.v1.EncryptionSpec value) { + if (encryptionSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + encryptionSpec_ = value; + onChanged(); + } else { + encryptionSpecBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Customer-managed encryption key spec for a DataLabelingJob. If set, this
+     * DataLabelingJob will be secured by this key.
+     * Note: Annotations created in the DataLabelingJob are associated with
+     * the EncryptionSpec of the Dataset they are exported to.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 20; + */ + public Builder setEncryptionSpec( + com.google.cloud.aiplatform.v1.EncryptionSpec.Builder builderForValue) { + if (encryptionSpecBuilder_ == null) { + encryptionSpec_ = builderForValue.build(); + onChanged(); + } else { + encryptionSpecBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Customer-managed encryption key spec for a DataLabelingJob. If set, this
+     * DataLabelingJob will be secured by this key.
+     * Note: Annotations created in the DataLabelingJob are associated with
+     * the EncryptionSpec of the Dataset they are exported to.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 20; + */ + public Builder mergeEncryptionSpec(com.google.cloud.aiplatform.v1.EncryptionSpec value) { + if (encryptionSpecBuilder_ == null) { + if (encryptionSpec_ != null) { + encryptionSpec_ = + com.google.cloud.aiplatform.v1.EncryptionSpec.newBuilder(encryptionSpec_) + .mergeFrom(value) + .buildPartial(); + } else { + encryptionSpec_ = value; + } + onChanged(); + } else { + encryptionSpecBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Customer-managed encryption key spec for a DataLabelingJob. If set, this
+     * DataLabelingJob will be secured by this key.
+     * Note: Annotations created in the DataLabelingJob are associated with
+     * the EncryptionSpec of the Dataset they are exported to.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 20; + */ + public Builder clearEncryptionSpec() { + if (encryptionSpecBuilder_ == null) { + encryptionSpec_ = null; + onChanged(); + } else { + encryptionSpec_ = null; + encryptionSpecBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Customer-managed encryption key spec for a DataLabelingJob. If set, this
+     * DataLabelingJob will be secured by this key.
+     * Note: Annotations created in the DataLabelingJob are associated with
+     * the EncryptionSpec of the Dataset they are exported to.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 20; + */ + public com.google.cloud.aiplatform.v1.EncryptionSpec.Builder getEncryptionSpecBuilder() { + + onChanged(); + return getEncryptionSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Customer-managed encryption key spec for a DataLabelingJob. If set, this
+     * DataLabelingJob will be secured by this key.
+     * Note: Annotations created in the DataLabelingJob are associated with
+     * the EncryptionSpec of the Dataset they are exported to.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 20; + */ + public com.google.cloud.aiplatform.v1.EncryptionSpecOrBuilder getEncryptionSpecOrBuilder() { + if (encryptionSpecBuilder_ != null) { + return encryptionSpecBuilder_.getMessageOrBuilder(); + } else { + return encryptionSpec_ == null + ? com.google.cloud.aiplatform.v1.EncryptionSpec.getDefaultInstance() + : encryptionSpec_; + } + } + /** + * + * + *
+     * Customer-managed encryption key spec for a DataLabelingJob. If set, this
+     * DataLabelingJob will be secured by this key.
+     * Note: Annotations created in the DataLabelingJob are associated with
+     * the EncryptionSpec of the Dataset they are exported to.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 20; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.EncryptionSpec, + com.google.cloud.aiplatform.v1.EncryptionSpec.Builder, + com.google.cloud.aiplatform.v1.EncryptionSpecOrBuilder> + getEncryptionSpecFieldBuilder() { + if (encryptionSpecBuilder_ == null) { + encryptionSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.EncryptionSpec, + com.google.cloud.aiplatform.v1.EncryptionSpec.Builder, + com.google.cloud.aiplatform.v1.EncryptionSpecOrBuilder>( + getEncryptionSpec(), getParentForChildren(), isClean()); + encryptionSpec_ = null; + } + return encryptionSpecBuilder_; + } + + private com.google.cloud.aiplatform.v1.ActiveLearningConfig activeLearningConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.ActiveLearningConfig, + com.google.cloud.aiplatform.v1.ActiveLearningConfig.Builder, + com.google.cloud.aiplatform.v1.ActiveLearningConfigOrBuilder> + activeLearningConfigBuilder_; + /** + * + * + *
+     * Parameters that configure the active learning pipeline. Active learning will
+     * label the data incrementally via several iterations. For every iteration,
+     * it will select a batch of data based on the sampling strategy.
+     * 
+ * + * .google.cloud.aiplatform.v1.ActiveLearningConfig active_learning_config = 21; + * + * @return Whether the activeLearningConfig field is set. + */ + public boolean hasActiveLearningConfig() { + return activeLearningConfigBuilder_ != null || activeLearningConfig_ != null; + } + /** + * + * + *
+     * Parameters that configure the active learning pipeline. Active learning will
+     * label the data incrementally via several iterations. For every iteration,
+     * it will select a batch of data based on the sampling strategy.
+     * 
+ * + * .google.cloud.aiplatform.v1.ActiveLearningConfig active_learning_config = 21; + * + * @return The activeLearningConfig. + */ + public com.google.cloud.aiplatform.v1.ActiveLearningConfig getActiveLearningConfig() { + if (activeLearningConfigBuilder_ == null) { + return activeLearningConfig_ == null + ? com.google.cloud.aiplatform.v1.ActiveLearningConfig.getDefaultInstance() + : activeLearningConfig_; + } else { + return activeLearningConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Parameters that configure the active learning pipeline. Active learning will
+     * label the data incrementally via several iterations. For every iteration,
+     * it will select a batch of data based on the sampling strategy.
+     * 
+ * + * .google.cloud.aiplatform.v1.ActiveLearningConfig active_learning_config = 21; + */ + public Builder setActiveLearningConfig( + com.google.cloud.aiplatform.v1.ActiveLearningConfig value) { + if (activeLearningConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + activeLearningConfig_ = value; + onChanged(); + } else { + activeLearningConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Parameters that configure the active learning pipeline. Active learning will
+     * label the data incrementally via several iterations. For every iteration,
+     * it will select a batch of data based on the sampling strategy.
+     * 
+ * + * .google.cloud.aiplatform.v1.ActiveLearningConfig active_learning_config = 21; + */ + public Builder setActiveLearningConfig( + com.google.cloud.aiplatform.v1.ActiveLearningConfig.Builder builderForValue) { + if (activeLearningConfigBuilder_ == null) { + activeLearningConfig_ = builderForValue.build(); + onChanged(); + } else { + activeLearningConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Parameters that configure the active learning pipeline. Active learning will
+     * label the data incrementally via several iterations. For every iteration,
+     * it will select a batch of data based on the sampling strategy.
+     * 
+ * + * .google.cloud.aiplatform.v1.ActiveLearningConfig active_learning_config = 21; + */ + public Builder mergeActiveLearningConfig( + com.google.cloud.aiplatform.v1.ActiveLearningConfig value) { + if (activeLearningConfigBuilder_ == null) { + if (activeLearningConfig_ != null) { + activeLearningConfig_ = + com.google.cloud.aiplatform.v1.ActiveLearningConfig.newBuilder(activeLearningConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + activeLearningConfig_ = value; + } + onChanged(); + } else { + activeLearningConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Parameters that configure the active learning pipeline. Active learning will
+     * label the data incrementally via several iterations. For every iteration,
+     * it will select a batch of data based on the sampling strategy.
+     * 
+ * + * .google.cloud.aiplatform.v1.ActiveLearningConfig active_learning_config = 21; + */ + public Builder clearActiveLearningConfig() { + if (activeLearningConfigBuilder_ == null) { + activeLearningConfig_ = null; + onChanged(); + } else { + activeLearningConfig_ = null; + activeLearningConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Parameters that configure the active learning pipeline. Active learning will
+     * label the data incrementally via several iterations. For every iteration,
+     * it will select a batch of data based on the sampling strategy.
+     * 
+ * + * .google.cloud.aiplatform.v1.ActiveLearningConfig active_learning_config = 21; + */ + public com.google.cloud.aiplatform.v1.ActiveLearningConfig.Builder + getActiveLearningConfigBuilder() { + + onChanged(); + return getActiveLearningConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Parameters that configure the active learning pipeline. Active learning will
+     * label the data incrementally via several iterations. For every iteration,
+     * it will select a batch of data based on the sampling strategy.
+     * 
+ * + * .google.cloud.aiplatform.v1.ActiveLearningConfig active_learning_config = 21; + */ + public com.google.cloud.aiplatform.v1.ActiveLearningConfigOrBuilder + getActiveLearningConfigOrBuilder() { + if (activeLearningConfigBuilder_ != null) { + return activeLearningConfigBuilder_.getMessageOrBuilder(); + } else { + return activeLearningConfig_ == null + ? com.google.cloud.aiplatform.v1.ActiveLearningConfig.getDefaultInstance() + : activeLearningConfig_; + } + } + /** + * + * + *
+     * Parameters that configure the active learning pipeline. Active learning will
+     * label the data incrementally via several iterations. For every iteration,
+     * it will select a batch of data based on the sampling strategy.
+     * 
+ * + * .google.cloud.aiplatform.v1.ActiveLearningConfig active_learning_config = 21; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.ActiveLearningConfig, + com.google.cloud.aiplatform.v1.ActiveLearningConfig.Builder, + com.google.cloud.aiplatform.v1.ActiveLearningConfigOrBuilder> + getActiveLearningConfigFieldBuilder() { + if (activeLearningConfigBuilder_ == null) { + activeLearningConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.ActiveLearningConfig, + com.google.cloud.aiplatform.v1.ActiveLearningConfig.Builder, + com.google.cloud.aiplatform.v1.ActiveLearningConfigOrBuilder>( + getActiveLearningConfig(), getParentForChildren(), isClean()); + activeLearningConfig_ = null; + } + return activeLearningConfigBuilder_; + } + + @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.v1.DataLabelingJob) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.DataLabelingJob) + private static final com.google.cloud.aiplatform.v1.DataLabelingJob DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.DataLabelingJob(); + } + + public static com.google.cloud.aiplatform.v1.DataLabelingJob getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DataLabelingJob parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DataLabelingJob(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.v1.DataLabelingJob getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DataLabelingJobName.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DataLabelingJobName.java new file mode 100644 index 000000000..079c32a7f --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DataLabelingJobName.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.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class DataLabelingJobName implements ResourceName { + 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; + } + + public String getLocation() { + return location; + } + + public String getDataLabelingJob() { + return dataLabelingJob; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static DataLabelingJobName of(String project, String location, String dataLabelingJob) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setDataLabelingJob(dataLabelingJob) + .build(); + } + + public static String format(String project, String location, String dataLabelingJob) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setDataLabelingJob(dataLabelingJob) + .build() + .toString(); + } + + public static DataLabelingJobName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + 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")); + } + + 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 (DataLabelingJobName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String 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(); + 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(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_DATA_LABELING_JOB.instantiate( + "project", project, "location", location, "data_labeling_job", dataLabelingJob); + } + + @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; + } + + public String getLocation() { + return location; + } + + public String getDataLabelingJob() { + return dataLabelingJob; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setDataLabelingJob(String dataLabelingJob) { + this.dataLabelingJob = dataLabelingJob; + return this; + } + + private Builder(DataLabelingJobName dataLabelingJobName) { + project = dataLabelingJobName.project; + location = dataLabelingJobName.location; + dataLabelingJob = dataLabelingJobName.dataLabelingJob; + } + + public DataLabelingJobName build() { + return new DataLabelingJobName(this); + } + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DataLabelingJobOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DataLabelingJobOrBuilder.java new file mode 100644 index 000000000..71960ba4f --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DataLabelingJobOrBuilder.java @@ -0,0 +1,775 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/data_labeling_job.proto + +package com.google.cloud.aiplatform.v1; + +public interface DataLabelingJobOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.DataLabelingJob) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Resource name of the DataLabelingJob.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. Resource name of the DataLabelingJob.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The user-defined name of the DataLabelingJob.
+   * The name can be up to 128 characters long and can be consist of any UTF-8
+   * characters.
+   * Display name of a DataLabelingJob.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Required. The user-defined name of the DataLabelingJob.
+   * The name can be up to 128 characters long and can be consist of any UTF-8
+   * characters.
+   * Display name of a DataLabelingJob.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Required. Dataset resource names. Right now we only support labeling from a single
+   * Dataset.
+   * Format:
+   * `projects/{project}/locations/{location}/datasets/{dataset}`
+   * 
+ * + * + * repeated string datasets = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the datasets. + */ + java.util.List getDatasetsList(); + /** + * + * + *
+   * Required. Dataset resource names. Right now we only support labeling from a single
+   * Dataset.
+   * Format:
+   * `projects/{project}/locations/{location}/datasets/{dataset}`
+   * 
+ * + * + * repeated string datasets = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The count of datasets. + */ + int getDatasetsCount(); + /** + * + * + *
+   * Required. Dataset resource names. Right now we only support labeling from a single
+   * Dataset.
+   * Format:
+   * `projects/{project}/locations/{location}/datasets/{dataset}`
+   * 
+ * + * + * repeated string datasets = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The datasets at the given index. + */ + java.lang.String getDatasets(int index); + /** + * + * + *
+   * Required. Dataset resource names. Right now we only support labeling from a single
+   * Dataset.
+   * Format:
+   * `projects/{project}/locations/{location}/datasets/{dataset}`
+   * 
+ * + * + * repeated string datasets = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the datasets at the given index. + */ + com.google.protobuf.ByteString getDatasetsBytes(int index); + + /** + * + * + *
+   * Labels to assign to annotations generated by this DataLabelingJob.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+   * and are immutable.
+   * 
+ * + * map<string, string> annotation_labels = 12; + */ + int getAnnotationLabelsCount(); + /** + * + * + *
+   * Labels to assign to annotations generated by this DataLabelingJob.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+   * and are immutable.
+   * 
+ * + * map<string, string> annotation_labels = 12; + */ + boolean containsAnnotationLabels(java.lang.String key); + /** Use {@link #getAnnotationLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getAnnotationLabels(); + /** + * + * + *
+   * Labels to assign to annotations generated by this DataLabelingJob.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+   * and are immutable.
+   * 
+ * + * map<string, string> annotation_labels = 12; + */ + java.util.Map getAnnotationLabelsMap(); + /** + * + * + *
+   * Labels to assign to annotations generated by this DataLabelingJob.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+   * and are immutable.
+   * 
+ * + * map<string, string> annotation_labels = 12; + */ + java.lang.String getAnnotationLabelsOrDefault( + java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * Labels to assign to annotations generated by this DataLabelingJob.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+   * and are immutable.
+   * 
+ * + * map<string, string> annotation_labels = 12; + */ + java.lang.String getAnnotationLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Required. Number of labelers to work on each DataItem.
+   * 
+ * + * int32 labeler_count = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The labelerCount. + */ + int getLabelerCount(); + + /** + * + * + *
+   * Required. The Google Cloud Storage location of the instruction pdf. This pdf is
+   * shared with labelers, and provides detailed description on how to label
+   * DataItems in Datasets.
+   * 
+ * + * string instruction_uri = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The instructionUri. + */ + java.lang.String getInstructionUri(); + /** + * + * + *
+   * Required. The Google Cloud Storage location of the instruction pdf. This pdf is
+   * shared with labelers, and provides detailed description on how to label
+   * DataItems in Datasets.
+   * 
+ * + * string instruction_uri = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for instructionUri. + */ + com.google.protobuf.ByteString getInstructionUriBytes(); + + /** + * + * + *
+   * Required. Points to a YAML file stored on Google Cloud Storage describing the
+   * config for a specific type of DataLabelingJob.
+   * The schema files that can be used here are found in the
+   * https://storage.googleapis.com/google-cloud-aiplatform bucket in the
+   * /schema/datalabelingjob/inputs/ folder.
+   * 
+ * + * string inputs_schema_uri = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The inputsSchemaUri. + */ + java.lang.String getInputsSchemaUri(); + /** + * + * + *
+   * Required. Points to a YAML file stored on Google Cloud Storage describing the
+   * config for a specific type of DataLabelingJob.
+   * The schema files that can be used here are found in the
+   * https://storage.googleapis.com/google-cloud-aiplatform bucket in the
+   * /schema/datalabelingjob/inputs/ folder.
+   * 
+ * + * string inputs_schema_uri = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for inputsSchemaUri. + */ + com.google.protobuf.ByteString getInputsSchemaUriBytes(); + + /** + * + * + *
+   * Required. Input config parameters for the DataLabelingJob.
+   * 
+ * + * .google.protobuf.Value inputs = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the inputs field is set. + */ + boolean hasInputs(); + /** + * + * + *
+   * Required. Input config parameters for the DataLabelingJob.
+   * 
+ * + * .google.protobuf.Value inputs = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The inputs. + */ + com.google.protobuf.Value getInputs(); + /** + * + * + *
+   * Required. Input config parameters for the DataLabelingJob.
+   * 
+ * + * .google.protobuf.Value inputs = 7 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.protobuf.ValueOrBuilder getInputsOrBuilder(); + + /** + * + * + *
+   * Output only. The detailed state of the job.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.JobState state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Output only. The detailed state of the job.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.JobState state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.aiplatform.v1.JobState getState(); + + /** + * + * + *
+   * Output only. Current labeling job progress percentage scaled in interval [0, 100],
+   * indicating the percentage of DataItems that has been finished.
+   * 
+ * + * int32 labeling_progress = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The labelingProgress. + */ + int getLabelingProgress(); + + /** + * + * + *
+   * Output only. Estimated cost(in US dollars) that the DataLabelingJob has incurred to
+   * date.
+   * 
+ * + * .google.type.Money current_spend = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the currentSpend field is set. + */ + boolean hasCurrentSpend(); + /** + * + * + *
+   * Output only. Estimated cost(in US dollars) that the DataLabelingJob has incurred to
+   * date.
+   * 
+ * + * .google.type.Money current_spend = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The currentSpend. + */ + com.google.type.Money getCurrentSpend(); + /** + * + * + *
+   * Output only. Estimated cost(in US dollars) that the DataLabelingJob has incurred to
+   * date.
+   * 
+ * + * .google.type.Money current_spend = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.type.MoneyOrBuilder getCurrentSpendOrBuilder(); + + /** + * + * + *
+   * Output only. Timestamp when this DataLabelingJob was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Timestamp when this DataLabelingJob was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Timestamp when this DataLabelingJob was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Timestamp when this DataLabelingJob was updated most recently.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. Timestamp when this DataLabelingJob was updated most recently.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. Timestamp when this DataLabelingJob was updated most recently.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. DataLabelingJob errors. It is only populated when job's state is
+   * `JOB_STATE_FAILED` or `JOB_STATE_CANCELLED`.
+   * 
+ * + * .google.rpc.Status error = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the error field is set. + */ + boolean hasError(); + /** + * + * + *
+   * Output only. DataLabelingJob errors. It is only populated when job's state is
+   * `JOB_STATE_FAILED` or `JOB_STATE_CANCELLED`.
+   * 
+ * + * .google.rpc.Status error = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The error. + */ + com.google.rpc.Status getError(); + /** + * + * + *
+   * Output only. DataLabelingJob errors. It is only populated when job's state is
+   * `JOB_STATE_FAILED` or `JOB_STATE_CANCELLED`.
+   * 
+ * + * .google.rpc.Status error = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.rpc.StatusOrBuilder getErrorOrBuilder(); + + /** + * + * + *
+   * The labels with user-defined metadata to organize your DataLabelingJobs.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+   * and are immutable. Following system labels exist for each DataLabelingJob:
+   * * "aiplatform.googleapis.com/schema": output only, its value is the
+   *   [inputs_schema][google.cloud.aiplatform.v1.DataLabelingJob.inputs_schema_uri]'s title.
+   * 
+ * + * map<string, string> labels = 11; + */ + int getLabelsCount(); + /** + * + * + *
+   * The labels with user-defined metadata to organize your DataLabelingJobs.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+   * and are immutable. Following system labels exist for each DataLabelingJob:
+   * * "aiplatform.googleapis.com/schema": output only, its value is the
+   *   [inputs_schema][google.cloud.aiplatform.v1.DataLabelingJob.inputs_schema_uri]'s title.
+   * 
+ * + * map<string, string> labels = 11; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * The labels with user-defined metadata to organize your DataLabelingJobs.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+   * and are immutable. Following system labels exist for each DataLabelingJob:
+   * * "aiplatform.googleapis.com/schema": output only, its value is the
+   *   [inputs_schema][google.cloud.aiplatform.v1.DataLabelingJob.inputs_schema_uri]'s title.
+   * 
+ * + * map<string, string> labels = 11; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * The labels with user-defined metadata to organize your DataLabelingJobs.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+   * and are immutable. Following system labels exist for each DataLabelingJob:
+   * * "aiplatform.googleapis.com/schema": output only, its value is the
+   *   [inputs_schema][google.cloud.aiplatform.v1.DataLabelingJob.inputs_schema_uri]'s title.
+   * 
+ * + * map<string, string> labels = 11; + */ + java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * The labels with user-defined metadata to organize your DataLabelingJobs.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+   * and are immutable. Following system labels exist for each DataLabelingJob:
+   * * "aiplatform.googleapis.com/schema": output only, its value is the
+   *   [inputs_schema][google.cloud.aiplatform.v1.DataLabelingJob.inputs_schema_uri]'s title.
+   * 
+ * + * map<string, string> labels = 11; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * The SpecialistPools' resource names associated with this job.
+   * 
+ * + * repeated string specialist_pools = 16; + * + * @return A list containing the specialistPools. + */ + java.util.List getSpecialistPoolsList(); + /** + * + * + *
+   * The SpecialistPools' resource names associated with this job.
+   * 
+ * + * repeated string specialist_pools = 16; + * + * @return The count of specialistPools. + */ + int getSpecialistPoolsCount(); + /** + * + * + *
+   * The SpecialistPools' resource names associated with this job.
+   * 
+ * + * repeated string specialist_pools = 16; + * + * @param index The index of the element to return. + * @return The specialistPools at the given index. + */ + java.lang.String getSpecialistPools(int index); + /** + * + * + *
+   * The SpecialistPools' resource names associated with this job.
+   * 
+ * + * repeated string specialist_pools = 16; + * + * @param index The index of the value to return. + * @return The bytes of the specialistPools at the given index. + */ + com.google.protobuf.ByteString getSpecialistPoolsBytes(int index); + + /** + * + * + *
+   * Customer-managed encryption key spec for a DataLabelingJob. If set, this
+   * DataLabelingJob will be secured by this key.
+   * Note: Annotations created in the DataLabelingJob are associated with
+   * the EncryptionSpec of the Dataset they are exported to.
+   * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 20; + * + * @return Whether the encryptionSpec field is set. + */ + boolean hasEncryptionSpec(); + /** + * + * + *
+   * Customer-managed encryption key spec for a DataLabelingJob. If set, this
+   * DataLabelingJob will be secured by this key.
+   * Note: Annotations created in the DataLabelingJob are associated with
+   * the EncryptionSpec of the Dataset they are exported to.
+   * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 20; + * + * @return The encryptionSpec. + */ + com.google.cloud.aiplatform.v1.EncryptionSpec getEncryptionSpec(); + /** + * + * + *
+   * Customer-managed encryption key spec for a DataLabelingJob. If set, this
+   * DataLabelingJob will be secured by this key.
+   * Note: Annotations created in the DataLabelingJob are associated with
+   * the EncryptionSpec of the Dataset they are exported to.
+   * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 20; + */ + com.google.cloud.aiplatform.v1.EncryptionSpecOrBuilder getEncryptionSpecOrBuilder(); + + /** + * + * + *
+   * Parameters that configure the active learning pipeline. Active learning will
+   * label the data incrementally via several iterations. For every iteration,
+   * it will select a batch of data based on the sampling strategy.
+   * 
+ * + * .google.cloud.aiplatform.v1.ActiveLearningConfig active_learning_config = 21; + * + * @return Whether the activeLearningConfig field is set. + */ + boolean hasActiveLearningConfig(); + /** + * + * + *
+   * Parameters that configure the active learning pipeline. Active learning will
+   * label the data incrementally via several iterations. For every iteration,
+   * it will select a batch of data based on the sampling strategy.
+   * 
+ * + * .google.cloud.aiplatform.v1.ActiveLearningConfig active_learning_config = 21; + * + * @return The activeLearningConfig. + */ + com.google.cloud.aiplatform.v1.ActiveLearningConfig getActiveLearningConfig(); + /** + * + * + *
+   * Parameters that configure the active learning pipeline. Active learning will
+   * label the data incrementally via several iterations. For every iteration,
+   * it will select a batch of data based on the sampling strategy.
+   * 
+ * + * .google.cloud.aiplatform.v1.ActiveLearningConfig active_learning_config = 21; + */ + com.google.cloud.aiplatform.v1.ActiveLearningConfigOrBuilder getActiveLearningConfigOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DataLabelingJobProto.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DataLabelingJobProto.java new file mode 100644 index 000000000..1b8df1f4c --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DataLabelingJobProto.java @@ -0,0 +1,237 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/data_labeling_job.proto + +package com.google.cloud.aiplatform.v1; + +public final class DataLabelingJobProto { + private DataLabelingJobProto() {} + + 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_v1_DataLabelingJob_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_DataLabelingJob_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_DataLabelingJob_AnnotationLabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_DataLabelingJob_AnnotationLabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_DataLabelingJob_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_DataLabelingJob_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ActiveLearningConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ActiveLearningConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_SampleConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_SampleConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_TrainingConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_TrainingConfig_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n2google/cloud/aiplatform/v1/data_labeli" + + "ng_job.proto\022\032google.cloud.aiplatform.v1" + + "\032\037google/api/field_behavior.proto\032\031googl" + + "e/api/resource.proto\0321google/cloud/aipla" + + "tform/v1/accelerator_type.proto\0320google/" + + "cloud/aiplatform/v1/encryption_spec.prot" + + "o\032*google/cloud/aiplatform/v1/job_state." + + "proto\0320google/cloud/aiplatform/v1/specia" + + "list_pool.proto\032\034google/protobuf/struct." + + "proto\032\037google/protobuf/timestamp.proto\032\027" + + "google/rpc/status.proto\032\027google/type/mon" + + "ey.proto\032\034google/api/annotations.proto\"\337" + + "\010\n\017DataLabelingJob\022\021\n\004name\030\001 \001(\tB\003\340A\003\022\031\n" + + "\014display_name\030\002 \001(\tB\003\340A\002\022;\n\010datasets\030\003 \003" + + "(\tB)\340A\002\372A#\n!aiplatform.googleapis.com/Da" + + "taset\022\\\n\021annotation_labels\030\014 \003(\0132A.googl" + + "e.cloud.aiplatform.v1.DataLabelingJob.An" + + "notationLabelsEntry\022\032\n\rlabeler_count\030\004 \001" + + "(\005B\003\340A\002\022\034\n\017instruction_uri\030\005 \001(\tB\003\340A\002\022\036\n" + + "\021inputs_schema_uri\030\006 \001(\tB\003\340A\002\022+\n\006inputs\030" + + "\007 \001(\0132\026.google.protobuf.ValueB\003\340A\002\0228\n\005st" + + "ate\030\010 \001(\0162$.google.cloud.aiplatform.v1.J" + + "obStateB\003\340A\003\022\036\n\021labeling_progress\030\r \001(\005B" + + "\003\340A\003\022.\n\rcurrent_spend\030\016 \001(\0132\022.google.typ" + + "e.MoneyB\003\340A\003\0224\n\013create_time\030\t \001(\0132\032.goog" + + "le.protobuf.TimestampB\003\340A\003\0224\n\013update_tim" + + "e\030\n \001(\0132\032.google.protobuf.TimestampB\003\340A\003" + + "\022&\n\005error\030\026 \001(\0132\022.google.rpc.StatusB\003\340A\003" + + "\022G\n\006labels\030\013 \003(\01327.google.cloud.aiplatfo" + + "rm.v1.DataLabelingJob.LabelsEntry\022\030\n\020spe" + + "cialist_pools\030\020 \003(\t\022C\n\017encryption_spec\030\024" + + " \001(\0132*.google.cloud.aiplatform.v1.Encryp" + + "tionSpec\022P\n\026active_learning_config\030\025 \001(\013" + + "20.google.cloud.aiplatform.v1.ActiveLear" + + "ningConfig\0327\n\025AnnotationLabelsEntry\022\013\n\003k" + + "ey\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\032-\n\013LabelsEnt" + + "ry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:|\352Ay\n" + + ")aiplatform.googleapis.com/DataLabelingJ" + + "ob\022Lprojects/{project}/locations/{locati" + + "on}/dataLabelingJobs/{data_labeling_job}" + + "\"\370\001\n\024ActiveLearningConfig\022\035\n\023max_data_it" + + "em_count\030\001 \001(\003H\000\022\"\n\030max_data_item_percen" + + "tage\030\002 \001(\005H\000\022?\n\rsample_config\030\003 \001(\0132(.go" + + "ogle.cloud.aiplatform.v1.SampleConfig\022C\n" + + "\017training_config\030\004 \001(\0132*.google.cloud.ai" + + "platform.v1.TrainingConfigB\027\n\025human_labe" + + "ling_budget\"\270\002\n\014SampleConfig\022)\n\037initial_" + + "batch_sample_percentage\030\001 \001(\005H\000\022+\n!follo" + + "wing_batch_sample_percentage\030\003 \001(\005H\001\022P\n\017" + + "sample_strategy\030\005 \001(\01627.google.cloud.aip" + + "latform.v1.SampleConfig.SampleStrategy\"B" + + "\n\016SampleStrategy\022\037\n\033SAMPLE_STRATEGY_UNSP" + + "ECIFIED\020\000\022\017\n\013UNCERTAINTY\020\001B\033\n\031initial_ba" + + "tch_sample_sizeB\035\n\033following_batch_sampl" + + "e_size\"6\n\016TrainingConfig\022$\n\034timeout_trai" + + "ning_milli_hours\030\001 \001(\003B~\n\036com.google.clo" + + "ud.aiplatform.v1B\024DataLabelingJobProtoP\001" + + "ZDgoogle.golang.org/genproto/googleapis/" + + "cloud/aiplatform/v1;aiplatformb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.aiplatform.v1.AcceleratorTypeProto.getDescriptor(), + com.google.cloud.aiplatform.v1.EncryptionSpecProto.getDescriptor(), + com.google.cloud.aiplatform.v1.JobStateProto.getDescriptor(), + com.google.cloud.aiplatform.v1.SpecialistPoolProto.getDescriptor(), + com.google.protobuf.StructProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.rpc.StatusProto.getDescriptor(), + com.google.type.MoneyProto.getDescriptor(), + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1_DataLabelingJob_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_DataLabelingJob_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_DataLabelingJob_descriptor, + new java.lang.String[] { + "Name", + "DisplayName", + "Datasets", + "AnnotationLabels", + "LabelerCount", + "InstructionUri", + "InputsSchemaUri", + "Inputs", + "State", + "LabelingProgress", + "CurrentSpend", + "CreateTime", + "UpdateTime", + "Error", + "Labels", + "SpecialistPools", + "EncryptionSpec", + "ActiveLearningConfig", + }); + internal_static_google_cloud_aiplatform_v1_DataLabelingJob_AnnotationLabelsEntry_descriptor = + internal_static_google_cloud_aiplatform_v1_DataLabelingJob_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_aiplatform_v1_DataLabelingJob_AnnotationLabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_DataLabelingJob_AnnotationLabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_aiplatform_v1_DataLabelingJob_LabelsEntry_descriptor = + internal_static_google_cloud_aiplatform_v1_DataLabelingJob_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_aiplatform_v1_DataLabelingJob_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_DataLabelingJob_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_aiplatform_v1_ActiveLearningConfig_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_aiplatform_v1_ActiveLearningConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ActiveLearningConfig_descriptor, + new java.lang.String[] { + "MaxDataItemCount", + "MaxDataItemPercentage", + "SampleConfig", + "TrainingConfig", + "HumanLabelingBudget", + }); + internal_static_google_cloud_aiplatform_v1_SampleConfig_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_aiplatform_v1_SampleConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_SampleConfig_descriptor, + new java.lang.String[] { + "InitialBatchSamplePercentage", + "FollowingBatchSamplePercentage", + "SampleStrategy", + "InitialBatchSampleSize", + "FollowingBatchSampleSize", + }); + internal_static_google_cloud_aiplatform_v1_TrainingConfig_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_aiplatform_v1_TrainingConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_TrainingConfig_descriptor, + new java.lang.String[] { + "TimeoutTrainingMilliHours", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.aiplatform.v1.AcceleratorTypeProto.getDescriptor(); + com.google.cloud.aiplatform.v1.EncryptionSpecProto.getDescriptor(); + com.google.cloud.aiplatform.v1.JobStateProto.getDescriptor(); + com.google.cloud.aiplatform.v1.SpecialistPoolProto.getDescriptor(); + com.google.protobuf.StructProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.rpc.StatusProto.getDescriptor(); + com.google.type.MoneyProto.getDescriptor(); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/Dataset.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/Dataset.java new file mode 100644 index 000000000..e2e0e62a5 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/Dataset.java @@ -0,0 +1,2796 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/dataset.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * A collection of DataItems and Annotations on them.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.Dataset} + */ +public final class Dataset extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.Dataset) + DatasetOrBuilder { + private static final long serialVersionUID = 0L; + // Use Dataset.newBuilder() to construct. + private Dataset(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Dataset() { + name_ = ""; + displayName_ = ""; + metadataSchemaUri_ = ""; + etag_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Dataset(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Dataset( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + metadataSchemaUri_ = s; + break; + } + case 34: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 42: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + etag_ = s; + break; + } + case 58: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + labels_ = + com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); + break; + } + case 66: + { + com.google.protobuf.Value.Builder subBuilder = null; + if (metadata_ != null) { + subBuilder = metadata_.toBuilder(); + } + metadata_ = input.readMessage(com.google.protobuf.Value.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(metadata_); + metadata_ = subBuilder.buildPartial(); + } + + break; + } + case 90: + { + com.google.cloud.aiplatform.v1.EncryptionSpec.Builder subBuilder = null; + if (encryptionSpec_ != null) { + subBuilder = encryptionSpec_.toBuilder(); + } + encryptionSpec_ = + input.readMessage( + com.google.cloud.aiplatform.v1.EncryptionSpec.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(encryptionSpec_); + encryptionSpec_ = 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.v1.DatasetProto + .internal_static_google_cloud_aiplatform_v1_Dataset_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 7: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.DatasetProto + .internal_static_google_cloud_aiplatform_v1_Dataset_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.Dataset.class, + com.google.cloud.aiplatform.v1.Dataset.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Output only. The resource name of the Dataset.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The resource name of the Dataset.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * Required. The user-defined name of the Dataset.
+   * The name can be up to 128 characters long and can be consist of any UTF-8
+   * characters.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+   * Required. The user-defined name of the Dataset.
+   * The name can be up to 128 characters long and can be consist of any UTF-8
+   * characters.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 METADATA_SCHEMA_URI_FIELD_NUMBER = 3; + private volatile java.lang.Object metadataSchemaUri_; + /** + * + * + *
+   * Required. Points to a YAML file stored on Google Cloud Storage describing additional
+   * information about the Dataset.
+   * The schema is defined as an OpenAPI 3.0.2 Schema Object.
+   * The schema files that can be used here are found in
+   * gs://google-cloud-aiplatform/schema/dataset/metadata/.
+   * 
+ * + * string metadata_schema_uri = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The metadataSchemaUri. + */ + @java.lang.Override + public java.lang.String getMetadataSchemaUri() { + java.lang.Object ref = metadataSchemaUri_; + 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(); + metadataSchemaUri_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Points to a YAML file stored on Google Cloud Storage describing additional
+   * information about the Dataset.
+   * The schema is defined as an OpenAPI 3.0.2 Schema Object.
+   * The schema files that can be used here are found in
+   * gs://google-cloud-aiplatform/schema/dataset/metadata/.
+   * 
+ * + * string metadata_schema_uri = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for metadataSchemaUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMetadataSchemaUriBytes() { + java.lang.Object ref = metadataSchemaUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + metadataSchemaUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int METADATA_FIELD_NUMBER = 8; + private com.google.protobuf.Value metadata_; + /** + * + * + *
+   * Required. Additional information about the Dataset.
+   * 
+ * + * .google.protobuf.Value metadata = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the metadata field is set. + */ + @java.lang.Override + public boolean hasMetadata() { + return metadata_ != null; + } + /** + * + * + *
+   * Required. Additional information about the Dataset.
+   * 
+ * + * .google.protobuf.Value metadata = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The metadata. + */ + @java.lang.Override + public com.google.protobuf.Value getMetadata() { + return metadata_ == null ? com.google.protobuf.Value.getDefaultInstance() : metadata_; + } + /** + * + * + *
+   * Required. Additional information about the Dataset.
+   * 
+ * + * .google.protobuf.Value metadata = 8 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.protobuf.ValueOrBuilder getMetadataOrBuilder() { + return getMetadata(); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. Timestamp when this Dataset was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. Timestamp when this Dataset was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. Timestamp when this Dataset was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. Timestamp when this Dataset was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. Timestamp when this Dataset was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. Timestamp when this Dataset was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + public static final int ETAG_FIELD_NUMBER = 6; + private volatile java.lang.Object etag_; + /** + * + * + *
+   * Used to perform consistent read-modify-write updates. If not set, a blind
+   * "overwrite" update happens.
+   * 
+ * + * string etag = 6; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } + } + /** + * + * + *
+   * Used to perform consistent read-modify-write updates. If not set, a blind
+   * "overwrite" update happens.
+   * 
+ * + * string etag = 6; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LABELS_FIELD_NUMBER = 7; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.aiplatform.v1.DatasetProto + .internal_static_google_cloud_aiplatform_v1_Dataset_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * The labels with user-defined metadata to organize your Datasets.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one Dataset (System
+   * labels are excluded).
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+   * and are immutable. Following system labels exist for each Dataset:
+   * * "aiplatform.googleapis.com/dataset_metadata_schema": output only, its
+   *   value is the [metadata_schema's][google.cloud.aiplatform.v1.Dataset.metadata_schema_uri] title.
+   * 
+ * + * map<string, string> labels = 7; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * The labels with user-defined metadata to organize your Datasets.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one Dataset (System
+   * labels are excluded).
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+   * and are immutable. Following system labels exist for each Dataset:
+   * * "aiplatform.googleapis.com/dataset_metadata_schema": output only, its
+   *   value is the [metadata_schema's][google.cloud.aiplatform.v1.Dataset.metadata_schema_uri] title.
+   * 
+ * + * map<string, string> labels = 7; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * The labels with user-defined metadata to organize your Datasets.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one Dataset (System
+   * labels are excluded).
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+   * and are immutable. Following system labels exist for each Dataset:
+   * * "aiplatform.googleapis.com/dataset_metadata_schema": output only, its
+   *   value is the [metadata_schema's][google.cloud.aiplatform.v1.Dataset.metadata_schema_uri] title.
+   * 
+ * + * map<string, string> labels = 7; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * The labels with user-defined metadata to organize your Datasets.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one Dataset (System
+   * labels are excluded).
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+   * and are immutable. Following system labels exist for each Dataset:
+   * * "aiplatform.googleapis.com/dataset_metadata_schema": output only, its
+   *   value is the [metadata_schema's][google.cloud.aiplatform.v1.Dataset.metadata_schema_uri] title.
+   * 
+ * + * map<string, string> labels = 7; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int ENCRYPTION_SPEC_FIELD_NUMBER = 11; + private com.google.cloud.aiplatform.v1.EncryptionSpec encryptionSpec_; + /** + * + * + *
+   * Customer-managed encryption key spec for a Dataset. If set, this Dataset
+   * and all sub-resources of this Dataset will be secured by this key.
+   * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 11; + * + * @return Whether the encryptionSpec field is set. + */ + @java.lang.Override + public boolean hasEncryptionSpec() { + return encryptionSpec_ != null; + } + /** + * + * + *
+   * Customer-managed encryption key spec for a Dataset. If set, this Dataset
+   * and all sub-resources of this Dataset will be secured by this key.
+   * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 11; + * + * @return The encryptionSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.EncryptionSpec getEncryptionSpec() { + return encryptionSpec_ == null + ? com.google.cloud.aiplatform.v1.EncryptionSpec.getDefaultInstance() + : encryptionSpec_; + } + /** + * + * + *
+   * Customer-managed encryption key spec for a Dataset. If set, this Dataset
+   * and all sub-resources of this Dataset will be secured by this key.
+   * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 11; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.EncryptionSpecOrBuilder getEncryptionSpecOrBuilder() { + return getEncryptionSpec(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + if (!getMetadataSchemaUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, metadataSchemaUri_); + } + if (createTime_ != null) { + output.writeMessage(4, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(5, getUpdateTime()); + } + if (!getEtagBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, etag_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 7); + if (metadata_ != null) { + output.writeMessage(8, getMetadata()); + } + if (encryptionSpec_ != null) { + output.writeMessage(11, getEncryptionSpec()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + if (!getMetadataSchemaUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, metadataSchemaUri_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getUpdateTime()); + } + if (!getEtagBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, etag_); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, labels__); + } + if (metadata_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getMetadata()); + } + if (encryptionSpec_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getEncryptionSpec()); + } + 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.v1.Dataset)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.Dataset other = (com.google.cloud.aiplatform.v1.Dataset) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getMetadataSchemaUri().equals(other.getMetadataSchemaUri())) return false; + if (hasMetadata() != other.hasMetadata()) return false; + if (hasMetadata()) { + if (!getMetadata().equals(other.getMetadata())) return false; + } + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!getEtag().equals(other.getEtag())) return false; + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (hasEncryptionSpec() != other.hasEncryptionSpec()) return false; + if (hasEncryptionSpec()) { + if (!getEncryptionSpec().equals(other.getEncryptionSpec())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + METADATA_SCHEMA_URI_FIELD_NUMBER; + hash = (53 * hash) + getMetadataSchemaUri().hashCode(); + if (hasMetadata()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + if (hasEncryptionSpec()) { + hash = (37 * hash) + ENCRYPTION_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getEncryptionSpec().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.Dataset parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.Dataset parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.Dataset parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.Dataset parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.Dataset parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.Dataset parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.Dataset parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.Dataset parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.Dataset parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.Dataset parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.Dataset parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.Dataset parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1.Dataset prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A collection of DataItems and Annotations on them.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.Dataset} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.Dataset) + com.google.cloud.aiplatform.v1.DatasetOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.DatasetProto + .internal_static_google_cloud_aiplatform_v1_Dataset_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 7: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 7: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.DatasetProto + .internal_static_google_cloud_aiplatform_v1_Dataset_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.Dataset.class, + com.google.cloud.aiplatform.v1.Dataset.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.Dataset.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + displayName_ = ""; + + metadataSchemaUri_ = ""; + + if (metadataBuilder_ == null) { + metadata_ = null; + } else { + metadata_ = null; + metadataBuilder_ = null; + } + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + etag_ = ""; + + internalGetMutableLabels().clear(); + if (encryptionSpecBuilder_ == null) { + encryptionSpec_ = null; + } else { + encryptionSpec_ = null; + encryptionSpecBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.DatasetProto + .internal_static_google_cloud_aiplatform_v1_Dataset_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.Dataset getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.Dataset.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.Dataset build() { + com.google.cloud.aiplatform.v1.Dataset result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.Dataset buildPartial() { + com.google.cloud.aiplatform.v1.Dataset result = + new com.google.cloud.aiplatform.v1.Dataset(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.displayName_ = displayName_; + result.metadataSchemaUri_ = metadataSchemaUri_; + if (metadataBuilder_ == null) { + result.metadata_ = metadata_; + } else { + result.metadata_ = metadataBuilder_.build(); + } + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + result.etag_ = etag_; + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + if (encryptionSpecBuilder_ == null) { + result.encryptionSpec_ = encryptionSpec_; + } else { + result.encryptionSpec_ = encryptionSpecBuilder_.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.v1.Dataset) { + return mergeFrom((com.google.cloud.aiplatform.v1.Dataset) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.Dataset other) { + if (other == com.google.cloud.aiplatform.v1.Dataset.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (!other.getMetadataSchemaUri().isEmpty()) { + metadataSchemaUri_ = other.metadataSchemaUri_; + onChanged(); + } + if (other.hasMetadata()) { + mergeMetadata(other.getMetadata()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + onChanged(); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + if (other.hasEncryptionSpec()) { + mergeEncryptionSpec(other.getEncryptionSpec()); + } + 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.v1.Dataset parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.aiplatform.v1.Dataset) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. The resource name of the Dataset.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The resource name of the Dataset.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The resource name of the Dataset.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource name of the Dataset.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource name of the Dataset.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Required. The user-defined name of the Dataset.
+     * The name can be up to 128 characters long and can be consist of any UTF-8
+     * characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+     * Required. The user-defined name of the Dataset.
+     * The name can be up to 128 characters long and can be consist of any UTF-8
+     * characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+     * Required. The user-defined name of the Dataset.
+     * The name can be up to 128 characters long and can be consist of any UTF-8
+     * characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + /** + * + * + *
+     * Required. The user-defined name of the Dataset.
+     * The name can be up to 128 characters long and can be consist of any UTF-8
+     * characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The user-defined name of the Dataset.
+     * The name can be up to 128 characters long and can be consist of any UTF-8
+     * characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 metadataSchemaUri_ = ""; + /** + * + * + *
+     * Required. Points to a YAML file stored on Google Cloud Storage describing additional
+     * information about the Dataset.
+     * The schema is defined as an OpenAPI 3.0.2 Schema Object.
+     * The schema files that can be used here are found in
+     * gs://google-cloud-aiplatform/schema/dataset/metadata/.
+     * 
+ * + * string metadata_schema_uri = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The metadataSchemaUri. + */ + public java.lang.String getMetadataSchemaUri() { + java.lang.Object ref = metadataSchemaUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + metadataSchemaUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Points to a YAML file stored on Google Cloud Storage describing additional
+     * information about the Dataset.
+     * The schema is defined as an OpenAPI 3.0.2 Schema Object.
+     * The schema files that can be used here are found in
+     * gs://google-cloud-aiplatform/schema/dataset/metadata/.
+     * 
+ * + * string metadata_schema_uri = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for metadataSchemaUri. + */ + public com.google.protobuf.ByteString getMetadataSchemaUriBytes() { + java.lang.Object ref = metadataSchemaUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + metadataSchemaUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Points to a YAML file stored on Google Cloud Storage describing additional
+     * information about the Dataset.
+     * The schema is defined as an OpenAPI 3.0.2 Schema Object.
+     * The schema files that can be used here are found in
+     * gs://google-cloud-aiplatform/schema/dataset/metadata/.
+     * 
+ * + * string metadata_schema_uri = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The metadataSchemaUri to set. + * @return This builder for chaining. + */ + public Builder setMetadataSchemaUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + metadataSchemaUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Points to a YAML file stored on Google Cloud Storage describing additional
+     * information about the Dataset.
+     * The schema is defined as an OpenAPI 3.0.2 Schema Object.
+     * The schema files that can be used here are found in
+     * gs://google-cloud-aiplatform/schema/dataset/metadata/.
+     * 
+ * + * string metadata_schema_uri = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearMetadataSchemaUri() { + + metadataSchemaUri_ = getDefaultInstance().getMetadataSchemaUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Points to a YAML file stored on Google Cloud Storage describing additional
+     * information about the Dataset.
+     * The schema is defined as an OpenAPI 3.0.2 Schema Object.
+     * The schema files that can be used here are found in
+     * gs://google-cloud-aiplatform/schema/dataset/metadata/.
+     * 
+ * + * string metadata_schema_uri = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for metadataSchemaUri to set. + * @return This builder for chaining. + */ + public Builder setMetadataSchemaUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + metadataSchemaUri_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Value metadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Value, + com.google.protobuf.Value.Builder, + com.google.protobuf.ValueOrBuilder> + metadataBuilder_; + /** + * + * + *
+     * Required. Additional information about the Dataset.
+     * 
+ * + * .google.protobuf.Value metadata = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the metadata field is set. + */ + public boolean hasMetadata() { + return metadataBuilder_ != null || metadata_ != null; + } + /** + * + * + *
+     * Required. Additional information about the Dataset.
+     * 
+ * + * .google.protobuf.Value metadata = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The metadata. + */ + public com.google.protobuf.Value getMetadata() { + if (metadataBuilder_ == null) { + return metadata_ == null ? com.google.protobuf.Value.getDefaultInstance() : metadata_; + } else { + return metadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Additional information about the Dataset.
+     * 
+ * + * .google.protobuf.Value metadata = 8 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setMetadata(com.google.protobuf.Value value) { + if (metadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadata_ = value; + onChanged(); + } else { + metadataBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. Additional information about the Dataset.
+     * 
+ * + * .google.protobuf.Value metadata = 8 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setMetadata(com.google.protobuf.Value.Builder builderForValue) { + if (metadataBuilder_ == null) { + metadata_ = builderForValue.build(); + onChanged(); + } else { + metadataBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. Additional information about the Dataset.
+     * 
+ * + * .google.protobuf.Value metadata = 8 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeMetadata(com.google.protobuf.Value value) { + if (metadataBuilder_ == null) { + if (metadata_ != null) { + metadata_ = + com.google.protobuf.Value.newBuilder(metadata_).mergeFrom(value).buildPartial(); + } else { + metadata_ = value; + } + onChanged(); + } else { + metadataBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. Additional information about the Dataset.
+     * 
+ * + * .google.protobuf.Value metadata = 8 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearMetadata() { + if (metadataBuilder_ == null) { + metadata_ = null; + onChanged(); + } else { + metadata_ = null; + metadataBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. Additional information about the Dataset.
+     * 
+ * + * .google.protobuf.Value metadata = 8 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.protobuf.Value.Builder getMetadataBuilder() { + + onChanged(); + return getMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Additional information about the Dataset.
+     * 
+ * + * .google.protobuf.Value metadata = 8 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.protobuf.ValueOrBuilder getMetadataOrBuilder() { + if (metadataBuilder_ != null) { + return metadataBuilder_.getMessageOrBuilder(); + } else { + return metadata_ == null ? com.google.protobuf.Value.getDefaultInstance() : metadata_; + } + } + /** + * + * + *
+     * Required. Additional information about the Dataset.
+     * 
+ * + * .google.protobuf.Value metadata = 8 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Value, + com.google.protobuf.Value.Builder, + com.google.protobuf.ValueOrBuilder> + getMetadataFieldBuilder() { + if (metadataBuilder_ == null) { + metadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Value, + com.google.protobuf.Value.Builder, + com.google.protobuf.ValueOrBuilder>( + getMetadata(), getParentForChildren(), isClean()); + metadata_ = null; + } + return metadataBuilder_; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. Timestamp when this Dataset was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * Output only. Timestamp when this Dataset was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Timestamp when this Dataset was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this Dataset was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this Dataset was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this Dataset was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this Dataset was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Timestamp when this Dataset was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. Timestamp when this Dataset was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. Timestamp when this Dataset was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + * + * + *
+     * Output only. Timestamp when this Dataset was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Timestamp when this Dataset was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this Dataset was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this Dataset was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this Dataset was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this Dataset was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Timestamp when this Dataset was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. Timestamp when this Dataset was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private java.lang.Object etag_ = ""; + /** + * + * + *
+     * Used to perform consistent read-modify-write updates. If not set, a blind
+     * "overwrite" update happens.
+     * 
+ * + * string etag = 6; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Used to perform consistent read-modify-write updates. If not set, a blind
+     * "overwrite" update happens.
+     * 
+ * + * string etag = 6; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Used to perform consistent read-modify-write updates. If not set, a blind
+     * "overwrite" update happens.
+     * 
+ * + * string etag = 6; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + etag_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Used to perform consistent read-modify-write updates. If not set, a blind
+     * "overwrite" update happens.
+     * 
+ * + * string etag = 6; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + + etag_ = getDefaultInstance().getEtag(); + onChanged(); + return this; + } + /** + * + * + *
+     * Used to perform consistent read-modify-write updates. If not set, a blind
+     * "overwrite" update happens.
+     * 
+ * + * string etag = 6; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + etag_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + onChanged(); + ; + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * The labels with user-defined metadata to organize your Datasets.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * No more than 64 user labels can be associated with one Dataset (System
+     * labels are excluded).
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+     * and are immutable. Following system labels exist for each Dataset:
+     * * "aiplatform.googleapis.com/dataset_metadata_schema": output only, its
+     *   value is the [metadata_schema's][google.cloud.aiplatform.v1.Dataset.metadata_schema_uri] title.
+     * 
+ * + * map<string, string> labels = 7; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * The labels with user-defined metadata to organize your Datasets.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * No more than 64 user labels can be associated with one Dataset (System
+     * labels are excluded).
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+     * and are immutable. Following system labels exist for each Dataset:
+     * * "aiplatform.googleapis.com/dataset_metadata_schema": output only, its
+     *   value is the [metadata_schema's][google.cloud.aiplatform.v1.Dataset.metadata_schema_uri] title.
+     * 
+ * + * map<string, string> labels = 7; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * The labels with user-defined metadata to organize your Datasets.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * No more than 64 user labels can be associated with one Dataset (System
+     * labels are excluded).
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+     * and are immutable. Following system labels exist for each Dataset:
+     * * "aiplatform.googleapis.com/dataset_metadata_schema": output only, its
+     *   value is the [metadata_schema's][google.cloud.aiplatform.v1.Dataset.metadata_schema_uri] title.
+     * 
+ * + * map<string, string> labels = 7; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * The labels with user-defined metadata to organize your Datasets.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * No more than 64 user labels can be associated with one Dataset (System
+     * labels are excluded).
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+     * and are immutable. Following system labels exist for each Dataset:
+     * * "aiplatform.googleapis.com/dataset_metadata_schema": output only, its
+     *   value is the [metadata_schema's][google.cloud.aiplatform.v1.Dataset.metadata_schema_uri] title.
+     * 
+ * + * map<string, string> labels = 7; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * The labels with user-defined metadata to organize your Datasets.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * No more than 64 user labels can be associated with one Dataset (System
+     * labels are excluded).
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+     * and are immutable. Following system labels exist for each Dataset:
+     * * "aiplatform.googleapis.com/dataset_metadata_schema": output only, its
+     *   value is the [metadata_schema's][google.cloud.aiplatform.v1.Dataset.metadata_schema_uri] title.
+     * 
+ * + * map<string, string> labels = 7; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * The labels with user-defined metadata to organize your Datasets.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * No more than 64 user labels can be associated with one Dataset (System
+     * labels are excluded).
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+     * and are immutable. Following system labels exist for each Dataset:
+     * * "aiplatform.googleapis.com/dataset_metadata_schema": output only, its
+     *   value is the [metadata_schema's][google.cloud.aiplatform.v1.Dataset.metadata_schema_uri] title.
+     * 
+ * + * map<string, string> labels = 7; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * The labels with user-defined metadata to organize your Datasets.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * No more than 64 user labels can be associated with one Dataset (System
+     * labels are excluded).
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+     * and are immutable. Following system labels exist for each Dataset:
+     * * "aiplatform.googleapis.com/dataset_metadata_schema": output only, its
+     *   value is the [metadata_schema's][google.cloud.aiplatform.v1.Dataset.metadata_schema_uri] title.
+     * 
+ * + * map<string, string> labels = 7; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + return this; + } + + private com.google.cloud.aiplatform.v1.EncryptionSpec encryptionSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.EncryptionSpec, + com.google.cloud.aiplatform.v1.EncryptionSpec.Builder, + com.google.cloud.aiplatform.v1.EncryptionSpecOrBuilder> + encryptionSpecBuilder_; + /** + * + * + *
+     * Customer-managed encryption key spec for a Dataset. If set, this Dataset
+     * and all sub-resources of this Dataset will be secured by this key.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 11; + * + * @return Whether the encryptionSpec field is set. + */ + public boolean hasEncryptionSpec() { + return encryptionSpecBuilder_ != null || encryptionSpec_ != null; + } + /** + * + * + *
+     * Customer-managed encryption key spec for a Dataset. If set, this Dataset
+     * and all sub-resources of this Dataset will be secured by this key.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 11; + * + * @return The encryptionSpec. + */ + public com.google.cloud.aiplatform.v1.EncryptionSpec getEncryptionSpec() { + if (encryptionSpecBuilder_ == null) { + return encryptionSpec_ == null + ? com.google.cloud.aiplatform.v1.EncryptionSpec.getDefaultInstance() + : encryptionSpec_; + } else { + return encryptionSpecBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Customer-managed encryption key spec for a Dataset. If set, this Dataset
+     * and all sub-resources of this Dataset will be secured by this key.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 11; + */ + public Builder setEncryptionSpec(com.google.cloud.aiplatform.v1.EncryptionSpec value) { + if (encryptionSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + encryptionSpec_ = value; + onChanged(); + } else { + encryptionSpecBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Customer-managed encryption key spec for a Dataset. If set, this Dataset
+     * and all sub-resources of this Dataset will be secured by this key.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 11; + */ + public Builder setEncryptionSpec( + com.google.cloud.aiplatform.v1.EncryptionSpec.Builder builderForValue) { + if (encryptionSpecBuilder_ == null) { + encryptionSpec_ = builderForValue.build(); + onChanged(); + } else { + encryptionSpecBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Customer-managed encryption key spec for a Dataset. If set, this Dataset
+     * and all sub-resources of this Dataset will be secured by this key.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 11; + */ + public Builder mergeEncryptionSpec(com.google.cloud.aiplatform.v1.EncryptionSpec value) { + if (encryptionSpecBuilder_ == null) { + if (encryptionSpec_ != null) { + encryptionSpec_ = + com.google.cloud.aiplatform.v1.EncryptionSpec.newBuilder(encryptionSpec_) + .mergeFrom(value) + .buildPartial(); + } else { + encryptionSpec_ = value; + } + onChanged(); + } else { + encryptionSpecBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Customer-managed encryption key spec for a Dataset. If set, this Dataset
+     * and all sub-resources of this Dataset will be secured by this key.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 11; + */ + public Builder clearEncryptionSpec() { + if (encryptionSpecBuilder_ == null) { + encryptionSpec_ = null; + onChanged(); + } else { + encryptionSpec_ = null; + encryptionSpecBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Customer-managed encryption key spec for a Dataset. If set, this Dataset
+     * and all sub-resources of this Dataset will be secured by this key.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 11; + */ + public com.google.cloud.aiplatform.v1.EncryptionSpec.Builder getEncryptionSpecBuilder() { + + onChanged(); + return getEncryptionSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Customer-managed encryption key spec for a Dataset. If set, this Dataset
+     * and all sub-resources of this Dataset will be secured by this key.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 11; + */ + public com.google.cloud.aiplatform.v1.EncryptionSpecOrBuilder getEncryptionSpecOrBuilder() { + if (encryptionSpecBuilder_ != null) { + return encryptionSpecBuilder_.getMessageOrBuilder(); + } else { + return encryptionSpec_ == null + ? com.google.cloud.aiplatform.v1.EncryptionSpec.getDefaultInstance() + : encryptionSpec_; + } + } + /** + * + * + *
+     * Customer-managed encryption key spec for a Dataset. If set, this Dataset
+     * and all sub-resources of this Dataset will be secured by this key.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 11; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.EncryptionSpec, + com.google.cloud.aiplatform.v1.EncryptionSpec.Builder, + com.google.cloud.aiplatform.v1.EncryptionSpecOrBuilder> + getEncryptionSpecFieldBuilder() { + if (encryptionSpecBuilder_ == null) { + encryptionSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.EncryptionSpec, + com.google.cloud.aiplatform.v1.EncryptionSpec.Builder, + com.google.cloud.aiplatform.v1.EncryptionSpecOrBuilder>( + getEncryptionSpec(), getParentForChildren(), isClean()); + encryptionSpec_ = null; + } + return encryptionSpecBuilder_; + } + + @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.v1.Dataset) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.Dataset) + private static final com.google.cloud.aiplatform.v1.Dataset DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.Dataset(); + } + + public static com.google.cloud.aiplatform.v1.Dataset getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Dataset parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Dataset(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.Dataset getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DatasetName.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DatasetName.java new file mode 100644 index 000000000..67e9a2048 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DatasetName.java @@ -0,0 +1,223 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class DatasetName implements ResourceName { + 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; + } + + public String getLocation() { + return location; + } + + public String getDataset() { + return dataset; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static DatasetName of(String project, String location, String dataset) { + return newBuilder().setProject(project).setLocation(location).setDataset(dataset).build(); + } + + public static String format(String project, String location, String dataset) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setDataset(dataset) + .build() + .toString(); + } + + public static DatasetName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_DATASET.validatedMatch( + formattedString, "DatasetName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("dataset")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (DatasetName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_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 (location != null) { + fieldMapBuilder.put("location", location); + } + if (dataset != null) { + fieldMapBuilder.put("dataset", dataset); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_DATASET.instantiate( + "project", project, "location", location, "dataset", dataset); + } + + @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; + } + + public String getLocation() { + return location; + } + + public String getDataset() { + return dataset; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setDataset(String dataset) { + this.dataset = dataset; + return this; + } + + private Builder(DatasetName datasetName) { + project = datasetName.project; + location = datasetName.location; + dataset = datasetName.dataset; + } + + public DatasetName build() { + return new DatasetName(this); + } + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DatasetOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DatasetOrBuilder.java new file mode 100644 index 000000000..58a5bebb8 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DatasetOrBuilder.java @@ -0,0 +1,392 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/dataset.proto + +package com.google.cloud.aiplatform.v1; + +public interface DatasetOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.Dataset) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The resource name of the Dataset.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. The resource name of the Dataset.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The user-defined name of the Dataset.
+   * The name can be up to 128 characters long and can be consist of any UTF-8
+   * characters.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Required. The user-defined name of the Dataset.
+   * The name can be up to 128 characters long and can be consist of any UTF-8
+   * characters.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Required. Points to a YAML file stored on Google Cloud Storage describing additional
+   * information about the Dataset.
+   * The schema is defined as an OpenAPI 3.0.2 Schema Object.
+   * The schema files that can be used here are found in
+   * gs://google-cloud-aiplatform/schema/dataset/metadata/.
+   * 
+ * + * string metadata_schema_uri = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The metadataSchemaUri. + */ + java.lang.String getMetadataSchemaUri(); + /** + * + * + *
+   * Required. Points to a YAML file stored on Google Cloud Storage describing additional
+   * information about the Dataset.
+   * The schema is defined as an OpenAPI 3.0.2 Schema Object.
+   * The schema files that can be used here are found in
+   * gs://google-cloud-aiplatform/schema/dataset/metadata/.
+   * 
+ * + * string metadata_schema_uri = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for metadataSchemaUri. + */ + com.google.protobuf.ByteString getMetadataSchemaUriBytes(); + + /** + * + * + *
+   * Required. Additional information about the Dataset.
+   * 
+ * + * .google.protobuf.Value metadata = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the metadata field is set. + */ + boolean hasMetadata(); + /** + * + * + *
+   * Required. Additional information about the Dataset.
+   * 
+ * + * .google.protobuf.Value metadata = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The metadata. + */ + com.google.protobuf.Value getMetadata(); + /** + * + * + *
+   * Required. Additional information about the Dataset.
+   * 
+ * + * .google.protobuf.Value metadata = 8 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.protobuf.ValueOrBuilder getMetadataOrBuilder(); + + /** + * + * + *
+   * Output only. Timestamp when this Dataset was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Timestamp when this Dataset was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Timestamp when this Dataset was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Timestamp when this Dataset was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. Timestamp when this Dataset was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. Timestamp when this Dataset was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Used to perform consistent read-modify-write updates. If not set, a blind
+   * "overwrite" update happens.
+   * 
+ * + * string etag = 6; + * + * @return The etag. + */ + java.lang.String getEtag(); + /** + * + * + *
+   * Used to perform consistent read-modify-write updates. If not set, a blind
+   * "overwrite" update happens.
+   * 
+ * + * string etag = 6; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); + + /** + * + * + *
+   * The labels with user-defined metadata to organize your Datasets.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one Dataset (System
+   * labels are excluded).
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+   * and are immutable. Following system labels exist for each Dataset:
+   * * "aiplatform.googleapis.com/dataset_metadata_schema": output only, its
+   *   value is the [metadata_schema's][google.cloud.aiplatform.v1.Dataset.metadata_schema_uri] title.
+   * 
+ * + * map<string, string> labels = 7; + */ + int getLabelsCount(); + /** + * + * + *
+   * The labels with user-defined metadata to organize your Datasets.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one Dataset (System
+   * labels are excluded).
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+   * and are immutable. Following system labels exist for each Dataset:
+   * * "aiplatform.googleapis.com/dataset_metadata_schema": output only, its
+   *   value is the [metadata_schema's][google.cloud.aiplatform.v1.Dataset.metadata_schema_uri] title.
+   * 
+ * + * map<string, string> labels = 7; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * The labels with user-defined metadata to organize your Datasets.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one Dataset (System
+   * labels are excluded).
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+   * and are immutable. Following system labels exist for each Dataset:
+   * * "aiplatform.googleapis.com/dataset_metadata_schema": output only, its
+   *   value is the [metadata_schema's][google.cloud.aiplatform.v1.Dataset.metadata_schema_uri] title.
+   * 
+ * + * map<string, string> labels = 7; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * The labels with user-defined metadata to organize your Datasets.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one Dataset (System
+   * labels are excluded).
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+   * and are immutable. Following system labels exist for each Dataset:
+   * * "aiplatform.googleapis.com/dataset_metadata_schema": output only, its
+   *   value is the [metadata_schema's][google.cloud.aiplatform.v1.Dataset.metadata_schema_uri] title.
+   * 
+ * + * map<string, string> labels = 7; + */ + java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * The labels with user-defined metadata to organize your Datasets.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * No more than 64 user labels can be associated with one Dataset (System
+   * labels are excluded).
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
+   * and are immutable. Following system labels exist for each Dataset:
+   * * "aiplatform.googleapis.com/dataset_metadata_schema": output only, its
+   *   value is the [metadata_schema's][google.cloud.aiplatform.v1.Dataset.metadata_schema_uri] title.
+   * 
+ * + * map<string, string> labels = 7; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Customer-managed encryption key spec for a Dataset. If set, this Dataset
+   * and all sub-resources of this Dataset will be secured by this key.
+   * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 11; + * + * @return Whether the encryptionSpec field is set. + */ + boolean hasEncryptionSpec(); + /** + * + * + *
+   * Customer-managed encryption key spec for a Dataset. If set, this Dataset
+   * and all sub-resources of this Dataset will be secured by this key.
+   * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 11; + * + * @return The encryptionSpec. + */ + com.google.cloud.aiplatform.v1.EncryptionSpec getEncryptionSpec(); + /** + * + * + *
+   * Customer-managed encryption key spec for a Dataset. If set, this Dataset
+   * and all sub-resources of this Dataset will be secured by this key.
+   * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 11; + */ + com.google.cloud.aiplatform.v1.EncryptionSpecOrBuilder getEncryptionSpecOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DatasetProto.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DatasetProto.java new file mode 100644 index 000000000..d95aa6499 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DatasetProto.java @@ -0,0 +1,173 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/dataset.proto + +package com.google.cloud.aiplatform.v1; + +public final class DatasetProto { + private DatasetProto() {} + + 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_v1_Dataset_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_Dataset_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_Dataset_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_Dataset_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ImportDataConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ImportDataConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ImportDataConfig_DataItemLabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ImportDataConfig_DataItemLabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ExportDataConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ExportDataConfig_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/v1/dataset.pro" + + "to\022\032google.cloud.aiplatform.v1\032\037google/a" + + "pi/field_behavior.proto\032\031google/api/reso" + + "urce.proto\0320google/cloud/aiplatform/v1/e" + + "ncryption_spec.proto\032#google/cloud/aipla" + + "tform/v1/io.proto\032\034google/protobuf/struc" + + "t.proto\032\037google/protobuf/timestamp.proto" + + "\032\034google/api/annotations.proto\"\233\004\n\007Datas" + + "et\022\021\n\004name\030\001 \001(\tB\003\340A\003\022\031\n\014display_name\030\002 " + + "\001(\tB\003\340A\002\022 \n\023metadata_schema_uri\030\003 \001(\tB\003\340" + + "A\002\022-\n\010metadata\030\010 \001(\0132\026.google.protobuf.V" + + "alueB\003\340A\002\0224\n\013create_time\030\004 \001(\0132\032.google." + + "protobuf.TimestampB\003\340A\003\0224\n\013update_time\030\005" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022\014\n" + + "\004etag\030\006 \001(\t\022?\n\006labels\030\007 \003(\0132/.google.clo" + + "ud.aiplatform.v1.Dataset.LabelsEntry\022C\n\017" + + "encryption_spec\030\013 \001(\0132*.google.cloud.aip" + + "latform.v1.EncryptionSpec\032-\n\013LabelsEntry" + + "\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:b\352A_\n!a" + + "iplatform.googleapis.com/Dataset\022:projec" + + "ts/{project}/locations/{location}/datase" + + "ts/{dataset}\"\214\002\n\020ImportDataConfig\022;\n\ngcs" + + "_source\030\001 \001(\0132%.google.cloud.aiplatform." + + "v1.GcsSourceH\000\022Z\n\020data_item_labels\030\002 \003(\013" + + "2@.google.cloud.aiplatform.v1.ImportData" + + "Config.DataItemLabelsEntry\022\036\n\021import_sch" + + "ema_uri\030\004 \001(\tB\003\340A\002\0325\n\023DataItemLabelsEntr" + + "y\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001B\010\n\006sou" + + "rce\"\204\001\n\020ExportDataConfig\022E\n\017gcs_destinat" + + "ion\030\001 \001(\0132*.google.cloud.aiplatform.v1.G" + + "csDestinationH\000\022\032\n\022annotations_filter\030\002 " + + "\001(\tB\r\n\013destinationBv\n\036com.google.cloud.a" + + "iplatform.v1B\014DatasetProtoP\001ZDgoogle.gol" + + "ang.org/genproto/googleapis/cloud/aiplat" + + "form/v1;aiplatformb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.aiplatform.v1.EncryptionSpecProto.getDescriptor(), + com.google.cloud.aiplatform.v1.IoProto.getDescriptor(), + com.google.protobuf.StructProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1_Dataset_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_Dataset_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_Dataset_descriptor, + new java.lang.String[] { + "Name", + "DisplayName", + "MetadataSchemaUri", + "Metadata", + "CreateTime", + "UpdateTime", + "Etag", + "Labels", + "EncryptionSpec", + }); + internal_static_google_cloud_aiplatform_v1_Dataset_LabelsEntry_descriptor = + internal_static_google_cloud_aiplatform_v1_Dataset_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_aiplatform_v1_Dataset_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_Dataset_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_aiplatform_v1_ImportDataConfig_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_aiplatform_v1_ImportDataConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ImportDataConfig_descriptor, + new java.lang.String[] { + "GcsSource", "DataItemLabels", "ImportSchemaUri", "Source", + }); + internal_static_google_cloud_aiplatform_v1_ImportDataConfig_DataItemLabelsEntry_descriptor = + internal_static_google_cloud_aiplatform_v1_ImportDataConfig_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_aiplatform_v1_ImportDataConfig_DataItemLabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ImportDataConfig_DataItemLabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_aiplatform_v1_ExportDataConfig_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_aiplatform_v1_ExportDataConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ExportDataConfig_descriptor, + new java.lang.String[] { + "GcsDestination", "AnnotationsFilter", "Destination", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.aiplatform.v1.EncryptionSpecProto.getDescriptor(); + com.google.cloud.aiplatform.v1.IoProto.getDescriptor(); + com.google.protobuf.StructProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DatasetServiceProto.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DatasetServiceProto.java new file mode 100644 index 000000000..9658852b1 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DatasetServiceProto.java @@ -0,0 +1,426 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/dataset_service.proto + +package com.google.cloud.aiplatform.v1; + +public final class DatasetServiceProto { + private DatasetServiceProto() {} + + 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_v1_CreateDatasetRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_CreateDatasetRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_CreateDatasetOperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_CreateDatasetOperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_GetDatasetRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_GetDatasetRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_UpdateDatasetRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_UpdateDatasetRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ListDatasetsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ListDatasetsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ListDatasetsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ListDatasetsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_DeleteDatasetRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_DeleteDatasetRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ImportDataRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ImportDataRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ImportDataResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ImportDataResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ImportDataOperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ImportDataOperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ExportDataRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ExportDataRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ExportDataResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ExportDataResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ExportDataOperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ExportDataOperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ListDataItemsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ListDataItemsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ListDataItemsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ListDataItemsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_GetAnnotationSpecRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_GetAnnotationSpecRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ListAnnotationsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ListAnnotationsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ListAnnotationsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ListAnnotationsResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n0google/cloud/aiplatform/v1/dataset_ser" + + "vice.proto\022\032google.cloud.aiplatform.v1\032\034" + + "google/api/annotations.proto\032\027google/api" + + "/client.proto\032\037google/api/field_behavior" + + ".proto\032\031google/api/resource.proto\032+googl" + + "e/cloud/aiplatform/v1/annotation.proto\0320" + + "google/cloud/aiplatform/v1/annotation_sp" + + "ec.proto\032*google/cloud/aiplatform/v1/dat" + + "a_item.proto\032(google/cloud/aiplatform/v1" + + "/dataset.proto\032*google/cloud/aiplatform/" + + "v1/operation.proto\0322google/cloud/aiplatf" + + "orm/v1/training_pipeline.proto\032#google/l" + + "ongrunning/operations.proto\032 google/prot" + + "obuf/field_mask.proto\"\214\001\n\024CreateDatasetR" + + "equest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!location" + + "s.googleapis.com/Location\0229\n\007dataset\030\002 \001" + + "(\0132#.google.cloud.aiplatform.v1.DatasetB" + + "\003\340A\002\"p\n\036CreateDatasetOperationMetadata\022N" + + "\n\020generic_metadata\030\001 \001(\01324.google.cloud." + + "aiplatform.v1.GenericOperationMetadata\"{" + + "\n\021GetDatasetRequest\0227\n\004name\030\001 \001(\tB)\340A\002\372A" + + "#\n!aiplatform.googleapis.com/Dataset\022-\n\t" + + "read_mask\030\002 \001(\0132\032.google.protobuf.FieldM" + + "ask\"\207\001\n\024UpdateDatasetRequest\0229\n\007dataset\030" + + "\001 \001(\0132#.google.cloud.aiplatform.v1.Datas" + + "etB\003\340A\002\0224\n\013update_mask\030\002 \001(\0132\032.google.pr" + + "otobuf.FieldMaskB\003\340A\002\"\310\001\n\023ListDatasetsRe" + + "quest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!locations" + + ".googleapis.com/Location\022\016\n\006filter\030\002 \001(\t" + + "\022\021\n\tpage_size\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\022" + + "-\n\tread_mask\030\005 \001(\0132\032.google.protobuf.Fie" + + "ldMask\022\020\n\010order_by\030\006 \001(\t\"f\n\024ListDatasets" + + "Response\0225\n\010datasets\030\001 \003(\0132#.google.clou" + + "d.aiplatform.v1.Dataset\022\027\n\017next_page_tok" + + "en\030\002 \001(\t\"O\n\024DeleteDatasetRequest\0227\n\004name" + + "\030\001 \001(\tB)\340A\002\372A#\n!aiplatform.googleapis.co" + + "m/Dataset\"\227\001\n\021ImportDataRequest\0227\n\004name\030" + + "\001 \001(\tB)\340A\002\372A#\n!aiplatform.googleapis.com" + + "/Dataset\022I\n\016import_configs\030\002 \003(\0132,.googl" + + "e.cloud.aiplatform.v1.ImportDataConfigB\003" + + "\340A\002\"\024\n\022ImportDataResponse\"m\n\033ImportDataO" + + "perationMetadata\022N\n\020generic_metadata\030\001 \001" + + "(\01324.google.cloud.aiplatform.v1.GenericO" + + "perationMetadata\"\226\001\n\021ExportDataRequest\0227" + + "\n\004name\030\001 \001(\tB)\340A\002\372A#\n!aiplatform.googlea" + + "pis.com/Dataset\022H\n\rexport_config\030\002 \001(\0132," + + ".google.cloud.aiplatform.v1.ExportDataCo" + + "nfigB\003\340A\002\",\n\022ExportDataResponse\022\026\n\016expor" + + "ted_files\030\001 \003(\t\"\213\001\n\033ExportDataOperationM" + + "etadata\022N\n\020generic_metadata\030\001 \001(\01324.goog" + + "le.cloud.aiplatform.v1.GenericOperationM" + + "etadata\022\034\n\024gcs_output_directory\030\002 \001(\t\"\311\001" + + "\n\024ListDataItemsRequest\0229\n\006parent\030\001 \001(\tB)" + + "\340A\002\372A#\n!aiplatform.googleapis.com/Datase" + + "t\022\016\n\006filter\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005\022\022\n\n" + + "page_token\030\004 \001(\t\022-\n\tread_mask\030\005 \001(\0132\032.go" + + "ogle.protobuf.FieldMask\022\020\n\010order_by\030\006 \001(" + + "\t\"j\n\025ListDataItemsResponse\0228\n\ndata_items" + + "\030\001 \003(\0132$.google.cloud.aiplatform.v1.Data" + + "Item\022\027\n\017next_page_token\030\002 \001(\t\"\211\001\n\030GetAnn" + + "otationSpecRequest\022>\n\004name\030\001 \001(\tB0\340A\002\372A*" + + "\n(aiplatform.googleapis.com/AnnotationSp" + + "ec\022-\n\tread_mask\030\002 \001(\0132\032.google.protobuf." + + "FieldMask\"\314\001\n\026ListAnnotationsRequest\022:\n\006" + + "parent\030\001 \001(\tB*\340A\002\372A$\n\"aiplatform.googlea" + + "pis.com/DataItem\022\016\n\006filter\030\002 \001(\t\022\021\n\tpage" + + "_size\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\022-\n\tread_" + + "mask\030\005 \001(\0132\032.google.protobuf.FieldMask\022\020" + + "\n\010order_by\030\006 \001(\t\"o\n\027ListAnnotationsRespo" + + "nse\022;\n\013annotations\030\001 \003(\0132&.google.cloud." + + "aiplatform.v1.Annotation\022\027\n\017next_page_to" + + "ken\030\002 \001(\t2\330\020\n\016DatasetService\022\334\001\n\rCreateD" + + "ataset\0220.google.cloud.aiplatform.v1.Crea" + + "teDatasetRequest\032\035.google.longrunning.Op" + + "eration\"z\202\323\344\223\0027\",/v1/{parent=projects/*/" + + "locations/*}/datasets:\007dataset\332A\016parent," + + "dataset\312A)\n\007Dataset\022\036CreateDatasetOperat" + + "ionMetadata\022\235\001\n\nGetDataset\022-.google.clou" + + "d.aiplatform.v1.GetDatasetRequest\032#.goog" + + "le.cloud.aiplatform.v1.Dataset\";\202\323\344\223\002.\022," + + "/v1/{name=projects/*/locations/*/dataset" + + "s/*}\332A\004name\022\303\001\n\rUpdateDataset\0220.google.c" + + "loud.aiplatform.v1.UpdateDatasetRequest\032" + + "#.google.cloud.aiplatform.v1.Dataset\"[\202\323" + + "\344\223\002?24/v1/{dataset.name=projects/*/locat" + + "ions/*/datasets/*}:\007dataset\332A\023dataset,up" + + "date_mask\022\260\001\n\014ListDatasets\022/.google.clou" + + "d.aiplatform.v1.ListDatasetsRequest\0320.go" + + "ogle.cloud.aiplatform.v1.ListDatasetsRes" + + "ponse\"=\202\323\344\223\002.\022,/v1/{parent=projects/*/lo" + + "cations/*}/datasets\332A\006parent\022\320\001\n\rDeleteD" + + "ataset\0220.google.cloud.aiplatform.v1.Dele" + + "teDatasetRequest\032\035.google.longrunning.Op" + + "eration\"n\202\323\344\223\002.*,/v1/{name=projects/*/lo" + + "cations/*/datasets/*}\332A\004name\312A0\n\025google." + + "protobuf.Empty\022\027DeleteOperationMetadata\022" + + "\345\001\n\nImportData\022-.google.cloud.aiplatform" + + ".v1.ImportDataRequest\032\035.google.longrunni" + + "ng.Operation\"\210\001\202\323\344\223\0028\"3/v1/{name=project" + + "s/*/locations/*/datasets/*}:import:\001*\332A\023" + + "name,import_configs\312A1\n\022ImportDataRespon" + + "se\022\033ImportDataOperationMetadata\022\344\001\n\nExpo" + + "rtData\022-.google.cloud.aiplatform.v1.Expo" + + "rtDataRequest\032\035.google.longrunning.Opera" + + "tion\"\207\001\202\323\344\223\0028\"3/v1/{name=projects/*/loca" + + "tions/*/datasets/*}:export:\001*\332A\022name,exp" + + "ort_config\312A1\n\022ExportDataResponse\022\033Expor" + + "tDataOperationMetadata\022\277\001\n\rListDataItems" + + "\0220.google.cloud.aiplatform.v1.ListDataIt" + + "emsRequest\0321.google.cloud.aiplatform.v1." + + "ListDataItemsResponse\"I\202\323\344\223\002:\0228/v1/{pare" + + "nt=projects/*/locations/*/datasets/*}/da" + + "taItems\332A\006parent\022\304\001\n\021GetAnnotationSpec\0224" + + ".google.cloud.aiplatform.v1.GetAnnotatio" + + "nSpecRequest\032*.google.cloud.aiplatform.v" + + "1.AnnotationSpec\"M\202\323\344\223\002@\022>/v1/{name=proj" + + "ects/*/locations/*/datasets/*/annotation" + + "Specs/*}\332A\004name\022\323\001\n\017ListAnnotations\0222.go" + + "ogle.cloud.aiplatform.v1.ListAnnotations" + + "Request\0323.google.cloud.aiplatform.v1.Lis" + + "tAnnotationsResponse\"W\202\323\344\223\002H\022F/v1/{paren" + + "t=projects/*/locations/*/datasets/*/data" + + "Items/*}/annotations\332A\006parent\032M\312A\031aiplat" + + "form.googleapis.com\322A.https://www.google" + + "apis.com/auth/cloud-platformB}\n\036com.goog" + + "le.cloud.aiplatform.v1B\023DatasetServicePr" + + "otoP\001ZDgoogle.golang.org/genproto/google" + + "apis/cloud/aiplatform/v1;aiplatformb\006pro" + + "to3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.aiplatform.v1.AnnotationProto.getDescriptor(), + com.google.cloud.aiplatform.v1.AnnotationSpecProto.getDescriptor(), + com.google.cloud.aiplatform.v1.DataItemProto.getDescriptor(), + com.google.cloud.aiplatform.v1.DatasetProto.getDescriptor(), + com.google.cloud.aiplatform.v1.OperationProto.getDescriptor(), + com.google.cloud.aiplatform.v1.TrainingPipelineProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1_CreateDatasetRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_CreateDatasetRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_CreateDatasetRequest_descriptor, + new java.lang.String[] { + "Parent", "Dataset", + }); + internal_static_google_cloud_aiplatform_v1_CreateDatasetOperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_aiplatform_v1_CreateDatasetOperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_CreateDatasetOperationMetadata_descriptor, + new java.lang.String[] { + "GenericMetadata", + }); + internal_static_google_cloud_aiplatform_v1_GetDatasetRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_aiplatform_v1_GetDatasetRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_GetDatasetRequest_descriptor, + new java.lang.String[] { + "Name", "ReadMask", + }); + internal_static_google_cloud_aiplatform_v1_UpdateDatasetRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_aiplatform_v1_UpdateDatasetRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_UpdateDatasetRequest_descriptor, + new java.lang.String[] { + "Dataset", "UpdateMask", + }); + internal_static_google_cloud_aiplatform_v1_ListDatasetsRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_aiplatform_v1_ListDatasetsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ListDatasetsRequest_descriptor, + new java.lang.String[] { + "Parent", "Filter", "PageSize", "PageToken", "ReadMask", "OrderBy", + }); + internal_static_google_cloud_aiplatform_v1_ListDatasetsResponse_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_aiplatform_v1_ListDatasetsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ListDatasetsResponse_descriptor, + new java.lang.String[] { + "Datasets", "NextPageToken", + }); + internal_static_google_cloud_aiplatform_v1_DeleteDatasetRequest_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_aiplatform_v1_DeleteDatasetRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_DeleteDatasetRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_aiplatform_v1_ImportDataRequest_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_aiplatform_v1_ImportDataRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ImportDataRequest_descriptor, + new java.lang.String[] { + "Name", "ImportConfigs", + }); + internal_static_google_cloud_aiplatform_v1_ImportDataResponse_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_aiplatform_v1_ImportDataResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ImportDataResponse_descriptor, + new java.lang.String[] {}); + internal_static_google_cloud_aiplatform_v1_ImportDataOperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_aiplatform_v1_ImportDataOperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ImportDataOperationMetadata_descriptor, + new java.lang.String[] { + "GenericMetadata", + }); + internal_static_google_cloud_aiplatform_v1_ExportDataRequest_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_aiplatform_v1_ExportDataRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ExportDataRequest_descriptor, + new java.lang.String[] { + "Name", "ExportConfig", + }); + internal_static_google_cloud_aiplatform_v1_ExportDataResponse_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_aiplatform_v1_ExportDataResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ExportDataResponse_descriptor, + new java.lang.String[] { + "ExportedFiles", + }); + internal_static_google_cloud_aiplatform_v1_ExportDataOperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_aiplatform_v1_ExportDataOperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ExportDataOperationMetadata_descriptor, + new java.lang.String[] { + "GenericMetadata", "GcsOutputDirectory", + }); + internal_static_google_cloud_aiplatform_v1_ListDataItemsRequest_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_cloud_aiplatform_v1_ListDataItemsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ListDataItemsRequest_descriptor, + new java.lang.String[] { + "Parent", "Filter", "PageSize", "PageToken", "ReadMask", "OrderBy", + }); + internal_static_google_cloud_aiplatform_v1_ListDataItemsResponse_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_cloud_aiplatform_v1_ListDataItemsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ListDataItemsResponse_descriptor, + new java.lang.String[] { + "DataItems", "NextPageToken", + }); + internal_static_google_cloud_aiplatform_v1_GetAnnotationSpecRequest_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_cloud_aiplatform_v1_GetAnnotationSpecRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_GetAnnotationSpecRequest_descriptor, + new java.lang.String[] { + "Name", "ReadMask", + }); + internal_static_google_cloud_aiplatform_v1_ListAnnotationsRequest_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_cloud_aiplatform_v1_ListAnnotationsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ListAnnotationsRequest_descriptor, + new java.lang.String[] { + "Parent", "Filter", "PageSize", "PageToken", "ReadMask", "OrderBy", + }); + internal_static_google_cloud_aiplatform_v1_ListAnnotationsResponse_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_google_cloud_aiplatform_v1_ListAnnotationsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ListAnnotationsResponse_descriptor, + new java.lang.String[] { + "Annotations", "NextPageToken", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resourceReference); + registry.add(com.google.longrunning.OperationsProto.operationInfo); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.aiplatform.v1.AnnotationProto.getDescriptor(); + com.google.cloud.aiplatform.v1.AnnotationSpecProto.getDescriptor(); + com.google.cloud.aiplatform.v1.DataItemProto.getDescriptor(); + com.google.cloud.aiplatform.v1.DatasetProto.getDescriptor(); + com.google.cloud.aiplatform.v1.OperationProto.getDescriptor(); + com.google.cloud.aiplatform.v1.TrainingPipelineProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DedicatedResources.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DedicatedResources.java new file mode 100644 index 000000000..4c4a91739 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DedicatedResources.java @@ -0,0 +1,1000 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/machine_resources.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * A description of resources that are dedicated to a DeployedModel, and
+ * that need a higher degree of manual configuration.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.DedicatedResources} + */ +public final class DedicatedResources extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.DedicatedResources) + DedicatedResourcesOrBuilder { + private static final long serialVersionUID = 0L; + // Use DedicatedResources.newBuilder() to construct. + private DedicatedResources(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DedicatedResources() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DedicatedResources(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DedicatedResources( + 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.v1.MachineSpec.Builder subBuilder = null; + if (machineSpec_ != null) { + subBuilder = machineSpec_.toBuilder(); + } + machineSpec_ = + input.readMessage( + com.google.cloud.aiplatform.v1.MachineSpec.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(machineSpec_); + machineSpec_ = subBuilder.buildPartial(); + } + + break; + } + case 16: + { + minReplicaCount_ = input.readInt32(); + break; + } + case 24: + { + maxReplicaCount_ = 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.v1.MachineResourcesProto + .internal_static_google_cloud_aiplatform_v1_DedicatedResources_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.MachineResourcesProto + .internal_static_google_cloud_aiplatform_v1_DedicatedResources_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.DedicatedResources.class, + com.google.cloud.aiplatform.v1.DedicatedResources.Builder.class); + } + + public static final int MACHINE_SPEC_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1.MachineSpec machineSpec_; + /** + * + * + *
+   * Required. Immutable. The specification of a single machine used by the prediction.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the machineSpec field is set. + */ + @java.lang.Override + public boolean hasMachineSpec() { + return machineSpec_ != null; + } + /** + * + * + *
+   * Required. Immutable. The specification of a single machine used by the prediction.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The machineSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.MachineSpec getMachineSpec() { + return machineSpec_ == null + ? com.google.cloud.aiplatform.v1.MachineSpec.getDefaultInstance() + : machineSpec_; + } + /** + * + * + *
+   * Required. Immutable. The specification of a single machine used by the prediction.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.MachineSpecOrBuilder getMachineSpecOrBuilder() { + return getMachineSpec(); + } + + public static final int MIN_REPLICA_COUNT_FIELD_NUMBER = 2; + private int minReplicaCount_; + /** + * + * + *
+   * Required. Immutable. The minimum number of machine replicas this DeployedModel will be always
+   * deployed on. If traffic against it increases, it may dynamically be
+   * deployed onto more replicas, and as traffic decreases, some of these extra
+   * replicas may be freed.
+   * Note: if [machine_spec.accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count] is
+   * above 0, currently the model will be always deployed precisely on
+   * [min_replica_count][google.cloud.aiplatform.v1.DedicatedResources.min_replica_count].
+   * 
+ * + * + * int32 min_replica_count = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The minReplicaCount. + */ + @java.lang.Override + public int getMinReplicaCount() { + return minReplicaCount_; + } + + public static final int MAX_REPLICA_COUNT_FIELD_NUMBER = 3; + private int maxReplicaCount_; + /** + * + * + *
+   * Immutable. The maximum number of replicas this DeployedModel may be deployed on when
+   * the traffic against it increases. If the requested value is too large,
+   * the deployment will error, but if deployment succeeds then the ability
+   * to scale the model to that many replicas is guaranteed (barring service
+   * outages). If traffic against the DeployedModel increases beyond what its
+   * replicas at maximum may handle, a portion of the traffic will be dropped.
+   * If this value is not provided, will use [min_replica_count][google.cloud.aiplatform.v1.DedicatedResources.min_replica_count] as the
+   * default value.
+   * 
+ * + * int32 max_replica_count = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The maxReplicaCount. + */ + @java.lang.Override + public int getMaxReplicaCount() { + return maxReplicaCount_; + } + + 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 (machineSpec_ != null) { + output.writeMessage(1, getMachineSpec()); + } + if (minReplicaCount_ != 0) { + output.writeInt32(2, minReplicaCount_); + } + if (maxReplicaCount_ != 0) { + output.writeInt32(3, maxReplicaCount_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (machineSpec_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getMachineSpec()); + } + if (minReplicaCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, minReplicaCount_); + } + if (maxReplicaCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, maxReplicaCount_); + } + 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.v1.DedicatedResources)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.DedicatedResources other = + (com.google.cloud.aiplatform.v1.DedicatedResources) obj; + + if (hasMachineSpec() != other.hasMachineSpec()) return false; + if (hasMachineSpec()) { + if (!getMachineSpec().equals(other.getMachineSpec())) return false; + } + if (getMinReplicaCount() != other.getMinReplicaCount()) return false; + if (getMaxReplicaCount() != other.getMaxReplicaCount()) 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 (hasMachineSpec()) { + hash = (37 * hash) + MACHINE_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getMachineSpec().hashCode(); + } + hash = (37 * hash) + MIN_REPLICA_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getMinReplicaCount(); + hash = (37 * hash) + MAX_REPLICA_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getMaxReplicaCount(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.DedicatedResources parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DedicatedResources 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.v1.DedicatedResources parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DedicatedResources 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.v1.DedicatedResources parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DedicatedResources parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.DedicatedResources parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DedicatedResources 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.v1.DedicatedResources parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DedicatedResources 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.v1.DedicatedResources parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DedicatedResources 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.v1.DedicatedResources 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 description of resources that are dedicated to a DeployedModel, and
+   * that need a higher degree of manual configuration.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.DedicatedResources} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.DedicatedResources) + com.google.cloud.aiplatform.v1.DedicatedResourcesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.MachineResourcesProto + .internal_static_google_cloud_aiplatform_v1_DedicatedResources_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.MachineResourcesProto + .internal_static_google_cloud_aiplatform_v1_DedicatedResources_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.DedicatedResources.class, + com.google.cloud.aiplatform.v1.DedicatedResources.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.DedicatedResources.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 (machineSpecBuilder_ == null) { + machineSpec_ = null; + } else { + machineSpec_ = null; + machineSpecBuilder_ = null; + } + minReplicaCount_ = 0; + + maxReplicaCount_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.MachineResourcesProto + .internal_static_google_cloud_aiplatform_v1_DedicatedResources_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DedicatedResources getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.DedicatedResources.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DedicatedResources build() { + com.google.cloud.aiplatform.v1.DedicatedResources result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DedicatedResources buildPartial() { + com.google.cloud.aiplatform.v1.DedicatedResources result = + new com.google.cloud.aiplatform.v1.DedicatedResources(this); + if (machineSpecBuilder_ == null) { + result.machineSpec_ = machineSpec_; + } else { + result.machineSpec_ = machineSpecBuilder_.build(); + } + result.minReplicaCount_ = minReplicaCount_; + result.maxReplicaCount_ = maxReplicaCount_; + 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.v1.DedicatedResources) { + return mergeFrom((com.google.cloud.aiplatform.v1.DedicatedResources) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.DedicatedResources other) { + if (other == com.google.cloud.aiplatform.v1.DedicatedResources.getDefaultInstance()) + return this; + if (other.hasMachineSpec()) { + mergeMachineSpec(other.getMachineSpec()); + } + if (other.getMinReplicaCount() != 0) { + setMinReplicaCount(other.getMinReplicaCount()); + } + if (other.getMaxReplicaCount() != 0) { + setMaxReplicaCount(other.getMaxReplicaCount()); + } + 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.v1.DedicatedResources parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.DedicatedResources) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.aiplatform.v1.MachineSpec machineSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.MachineSpec, + com.google.cloud.aiplatform.v1.MachineSpec.Builder, + com.google.cloud.aiplatform.v1.MachineSpecOrBuilder> + machineSpecBuilder_; + /** + * + * + *
+     * Required. Immutable. The specification of a single machine used by the prediction.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the machineSpec field is set. + */ + public boolean hasMachineSpec() { + return machineSpecBuilder_ != null || machineSpec_ != null; + } + /** + * + * + *
+     * Required. Immutable. The specification of a single machine used by the prediction.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The machineSpec. + */ + public com.google.cloud.aiplatform.v1.MachineSpec getMachineSpec() { + if (machineSpecBuilder_ == null) { + return machineSpec_ == null + ? com.google.cloud.aiplatform.v1.MachineSpec.getDefaultInstance() + : machineSpec_; + } else { + return machineSpecBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Immutable. The specification of a single machine used by the prediction.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder setMachineSpec(com.google.cloud.aiplatform.v1.MachineSpec value) { + if (machineSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + machineSpec_ = value; + onChanged(); + } else { + machineSpecBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. Immutable. The specification of a single machine used by the prediction.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder setMachineSpec( + com.google.cloud.aiplatform.v1.MachineSpec.Builder builderForValue) { + if (machineSpecBuilder_ == null) { + machineSpec_ = builderForValue.build(); + onChanged(); + } else { + machineSpecBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. Immutable. The specification of a single machine used by the prediction.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder mergeMachineSpec(com.google.cloud.aiplatform.v1.MachineSpec value) { + if (machineSpecBuilder_ == null) { + if (machineSpec_ != null) { + machineSpec_ = + com.google.cloud.aiplatform.v1.MachineSpec.newBuilder(machineSpec_) + .mergeFrom(value) + .buildPartial(); + } else { + machineSpec_ = value; + } + onChanged(); + } else { + machineSpecBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. Immutable. The specification of a single machine used by the prediction.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder clearMachineSpec() { + if (machineSpecBuilder_ == null) { + machineSpec_ = null; + onChanged(); + } else { + machineSpec_ = null; + machineSpecBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. Immutable. The specification of a single machine used by the prediction.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public com.google.cloud.aiplatform.v1.MachineSpec.Builder getMachineSpecBuilder() { + + onChanged(); + return getMachineSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Immutable. The specification of a single machine used by the prediction.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public com.google.cloud.aiplatform.v1.MachineSpecOrBuilder getMachineSpecOrBuilder() { + if (machineSpecBuilder_ != null) { + return machineSpecBuilder_.getMessageOrBuilder(); + } else { + return machineSpec_ == null + ? com.google.cloud.aiplatform.v1.MachineSpec.getDefaultInstance() + : machineSpec_; + } + } + /** + * + * + *
+     * Required. Immutable. The specification of a single machine used by the prediction.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.MachineSpec, + com.google.cloud.aiplatform.v1.MachineSpec.Builder, + com.google.cloud.aiplatform.v1.MachineSpecOrBuilder> + getMachineSpecFieldBuilder() { + if (machineSpecBuilder_ == null) { + machineSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.MachineSpec, + com.google.cloud.aiplatform.v1.MachineSpec.Builder, + com.google.cloud.aiplatform.v1.MachineSpecOrBuilder>( + getMachineSpec(), getParentForChildren(), isClean()); + machineSpec_ = null; + } + return machineSpecBuilder_; + } + + private int minReplicaCount_; + /** + * + * + *
+     * Required. Immutable. The minimum number of machine replicas this DeployedModel will be always
+     * deployed on. If traffic against it increases, it may dynamically be
+     * deployed onto more replicas, and as traffic decreases, some of these extra
+     * replicas may be freed.
+     * Note: if [machine_spec.accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count] is
+     * above 0, currently the model will be always deployed precisely on
+     * [min_replica_count][google.cloud.aiplatform.v1.DedicatedResources.min_replica_count].
+     * 
+ * + * + * int32 min_replica_count = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The minReplicaCount. + */ + @java.lang.Override + public int getMinReplicaCount() { + return minReplicaCount_; + } + /** + * + * + *
+     * Required. Immutable. The minimum number of machine replicas this DeployedModel will be always
+     * deployed on. If traffic against it increases, it may dynamically be
+     * deployed onto more replicas, and as traffic decreases, some of these extra
+     * replicas may be freed.
+     * Note: if [machine_spec.accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count] is
+     * above 0, currently the model will be always deployed precisely on
+     * [min_replica_count][google.cloud.aiplatform.v1.DedicatedResources.min_replica_count].
+     * 
+ * + * + * int32 min_replica_count = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The minReplicaCount to set. + * @return This builder for chaining. + */ + public Builder setMinReplicaCount(int value) { + + minReplicaCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Immutable. The minimum number of machine replicas this DeployedModel will be always
+     * deployed on. If traffic against it increases, it may dynamically be
+     * deployed onto more replicas, and as traffic decreases, some of these extra
+     * replicas may be freed.
+     * Note: if [machine_spec.accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count] is
+     * above 0, currently the model will be always deployed precisely on
+     * [min_replica_count][google.cloud.aiplatform.v1.DedicatedResources.min_replica_count].
+     * 
+ * + * + * int32 min_replica_count = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return This builder for chaining. + */ + public Builder clearMinReplicaCount() { + + minReplicaCount_ = 0; + onChanged(); + return this; + } + + private int maxReplicaCount_; + /** + * + * + *
+     * Immutable. The maximum number of replicas this DeployedModel may be deployed on when
+     * the traffic against it increases. If the requested value is too large,
+     * the deployment will error, but if deployment succeeds then the ability
+     * to scale the model to that many replicas is guaranteed (barring service
+     * outages). If traffic against the DeployedModel increases beyond what its
+     * replicas at maximum may handle, a portion of the traffic will be dropped.
+     * If this value is not provided, will use [min_replica_count][google.cloud.aiplatform.v1.DedicatedResources.min_replica_count] as the
+     * default value.
+     * 
+ * + * int32 max_replica_count = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The maxReplicaCount. + */ + @java.lang.Override + public int getMaxReplicaCount() { + return maxReplicaCount_; + } + /** + * + * + *
+     * Immutable. The maximum number of replicas this DeployedModel may be deployed on when
+     * the traffic against it increases. If the requested value is too large,
+     * the deployment will error, but if deployment succeeds then the ability
+     * to scale the model to that many replicas is guaranteed (barring service
+     * outages). If traffic against the DeployedModel increases beyond what its
+     * replicas at maximum may handle, a portion of the traffic will be dropped.
+     * If this value is not provided, will use [min_replica_count][google.cloud.aiplatform.v1.DedicatedResources.min_replica_count] as the
+     * default value.
+     * 
+ * + * int32 max_replica_count = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The maxReplicaCount to set. + * @return This builder for chaining. + */ + public Builder setMaxReplicaCount(int value) { + + maxReplicaCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The maximum number of replicas this DeployedModel may be deployed on when
+     * the traffic against it increases. If the requested value is too large,
+     * the deployment will error, but if deployment succeeds then the ability
+     * to scale the model to that many replicas is guaranteed (barring service
+     * outages). If traffic against the DeployedModel increases beyond what its
+     * replicas at maximum may handle, a portion of the traffic will be dropped.
+     * If this value is not provided, will use [min_replica_count][google.cloud.aiplatform.v1.DedicatedResources.min_replica_count] as the
+     * default value.
+     * 
+ * + * int32 max_replica_count = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearMaxReplicaCount() { + + maxReplicaCount_ = 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.v1.DedicatedResources) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.DedicatedResources) + private static final com.google.cloud.aiplatform.v1.DedicatedResources DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.DedicatedResources(); + } + + public static com.google.cloud.aiplatform.v1.DedicatedResources getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DedicatedResources parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DedicatedResources(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.v1.DedicatedResources getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DedicatedResourcesOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DedicatedResourcesOrBuilder.java new file mode 100644 index 000000000..e11c3dab0 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DedicatedResourcesOrBuilder.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/v1/machine_resources.proto + +package com.google.cloud.aiplatform.v1; + +public interface DedicatedResourcesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.DedicatedResources) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Immutable. The specification of a single machine used by the prediction.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the machineSpec field is set. + */ + boolean hasMachineSpec(); + /** + * + * + *
+   * Required. Immutable. The specification of a single machine used by the prediction.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The machineSpec. + */ + com.google.cloud.aiplatform.v1.MachineSpec getMachineSpec(); + /** + * + * + *
+   * Required. Immutable. The specification of a single machine used by the prediction.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + com.google.cloud.aiplatform.v1.MachineSpecOrBuilder getMachineSpecOrBuilder(); + + /** + * + * + *
+   * Required. Immutable. The minimum number of machine replicas this DeployedModel will be always
+   * deployed on. If traffic against it increases, it may dynamically be
+   * deployed onto more replicas, and as traffic decreases, some of these extra
+   * replicas may be freed.
+   * Note: if [machine_spec.accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count] is
+   * above 0, currently the model will be always deployed precisely on
+   * [min_replica_count][google.cloud.aiplatform.v1.DedicatedResources.min_replica_count].
+   * 
+ * + * + * int32 min_replica_count = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The minReplicaCount. + */ + int getMinReplicaCount(); + + /** + * + * + *
+   * Immutable. The maximum number of replicas this DeployedModel may be deployed on when
+   * the traffic against it increases. If the requested value is too large,
+   * the deployment will error, but if deployment succeeds then the ability
+   * to scale the model to that many replicas is guaranteed (barring service
+   * outages). If traffic against the DeployedModel increases beyond what its
+   * replicas at maximum may handle, a portion of the traffic will be dropped.
+   * If this value is not provided, will use [min_replica_count][google.cloud.aiplatform.v1.DedicatedResources.min_replica_count] as the
+   * default value.
+   * 
+ * + * int32 max_replica_count = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The maxReplicaCount. + */ + int getMaxReplicaCount(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteBatchPredictionJobRequest.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteBatchPredictionJobRequest.java new file mode 100644 index 000000000..1e8b94e75 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteBatchPredictionJobRequest.java @@ -0,0 +1,672 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/job_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for [JobService.DeleteBatchPredictionJob][google.cloud.aiplatform.v1.JobService.DeleteBatchPredictionJob].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.DeleteBatchPredictionJobRequest} + */ +public final class DeleteBatchPredictionJobRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.DeleteBatchPredictionJobRequest) + DeleteBatchPredictionJobRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteBatchPredictionJobRequest.newBuilder() to construct. + private DeleteBatchPredictionJobRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteBatchPredictionJobRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteBatchPredictionJobRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteBatchPredictionJobRequest( + 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(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteBatchPredictionJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteBatchPredictionJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.DeleteBatchPredictionJobRequest.class, + com.google.cloud.aiplatform.v1.DeleteBatchPredictionJobRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the BatchPredictionJob resource to be deleted.
+   * Format:
+   * `projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the BatchPredictionJob resource to be deleted.
+   * Format:
+   * `projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.DeleteBatchPredictionJobRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.DeleteBatchPredictionJobRequest other = + (com.google.cloud.aiplatform.v1.DeleteBatchPredictionJobRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.DeleteBatchPredictionJobRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DeleteBatchPredictionJobRequest 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.v1.DeleteBatchPredictionJobRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DeleteBatchPredictionJobRequest 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.v1.DeleteBatchPredictionJobRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DeleteBatchPredictionJobRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.DeleteBatchPredictionJobRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DeleteBatchPredictionJobRequest 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.v1.DeleteBatchPredictionJobRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DeleteBatchPredictionJobRequest 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.v1.DeleteBatchPredictionJobRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DeleteBatchPredictionJobRequest 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.v1.DeleteBatchPredictionJobRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [JobService.DeleteBatchPredictionJob][google.cloud.aiplatform.v1.JobService.DeleteBatchPredictionJob].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.DeleteBatchPredictionJobRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.DeleteBatchPredictionJobRequest) + com.google.cloud.aiplatform.v1.DeleteBatchPredictionJobRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteBatchPredictionJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteBatchPredictionJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.DeleteBatchPredictionJobRequest.class, + com.google.cloud.aiplatform.v1.DeleteBatchPredictionJobRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.DeleteBatchPredictionJobRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteBatchPredictionJobRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeleteBatchPredictionJobRequest + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.DeleteBatchPredictionJobRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeleteBatchPredictionJobRequest build() { + com.google.cloud.aiplatform.v1.DeleteBatchPredictionJobRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeleteBatchPredictionJobRequest buildPartial() { + com.google.cloud.aiplatform.v1.DeleteBatchPredictionJobRequest result = + new com.google.cloud.aiplatform.v1.DeleteBatchPredictionJobRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.DeleteBatchPredictionJobRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.DeleteBatchPredictionJobRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.DeleteBatchPredictionJobRequest other) { + if (other + == com.google.cloud.aiplatform.v1.DeleteBatchPredictionJobRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.aiplatform.v1.DeleteBatchPredictionJobRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.DeleteBatchPredictionJobRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the BatchPredictionJob resource to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the BatchPredictionJob resource to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the BatchPredictionJob resource to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the BatchPredictionJob resource to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the BatchPredictionJob resource to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.DeleteBatchPredictionJobRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.DeleteBatchPredictionJobRequest) + private static final com.google.cloud.aiplatform.v1.DeleteBatchPredictionJobRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.DeleteBatchPredictionJobRequest(); + } + + public static com.google.cloud.aiplatform.v1.DeleteBatchPredictionJobRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteBatchPredictionJobRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteBatchPredictionJobRequest(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.v1.DeleteBatchPredictionJobRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteBatchPredictionJobRequestOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteBatchPredictionJobRequestOrBuilder.java new file mode 100644 index 000000000..a411e0055 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteBatchPredictionJobRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/job_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface DeleteBatchPredictionJobRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.DeleteBatchPredictionJobRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the BatchPredictionJob resource to be deleted.
+   * Format:
+   * `projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the BatchPredictionJob resource to be deleted.
+   * Format:
+   * `projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteCustomJobRequest.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteCustomJobRequest.java new file mode 100644 index 000000000..ea0f33587 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteCustomJobRequest.java @@ -0,0 +1,665 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/job_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for [JobService.DeleteCustomJob][google.cloud.aiplatform.v1.JobService.DeleteCustomJob].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.DeleteCustomJobRequest} + */ +public final class DeleteCustomJobRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.DeleteCustomJobRequest) + DeleteCustomJobRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteCustomJobRequest.newBuilder() to construct. + private DeleteCustomJobRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteCustomJobRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteCustomJobRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteCustomJobRequest( + 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(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteCustomJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteCustomJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.DeleteCustomJobRequest.class, + com.google.cloud.aiplatform.v1.DeleteCustomJobRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the CustomJob resource to be deleted.
+   * Format:
+   * `projects/{project}/locations/{location}/customJobs/{custom_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the CustomJob resource to be deleted.
+   * Format:
+   * `projects/{project}/locations/{location}/customJobs/{custom_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.DeleteCustomJobRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.DeleteCustomJobRequest other = + (com.google.cloud.aiplatform.v1.DeleteCustomJobRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.DeleteCustomJobRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DeleteCustomJobRequest 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.v1.DeleteCustomJobRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DeleteCustomJobRequest 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.v1.DeleteCustomJobRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DeleteCustomJobRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.DeleteCustomJobRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DeleteCustomJobRequest 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.v1.DeleteCustomJobRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DeleteCustomJobRequest 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.v1.DeleteCustomJobRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DeleteCustomJobRequest 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.v1.DeleteCustomJobRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [JobService.DeleteCustomJob][google.cloud.aiplatform.v1.JobService.DeleteCustomJob].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.DeleteCustomJobRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.DeleteCustomJobRequest) + com.google.cloud.aiplatform.v1.DeleteCustomJobRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteCustomJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteCustomJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.DeleteCustomJobRequest.class, + com.google.cloud.aiplatform.v1.DeleteCustomJobRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.DeleteCustomJobRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteCustomJobRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeleteCustomJobRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.DeleteCustomJobRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeleteCustomJobRequest build() { + com.google.cloud.aiplatform.v1.DeleteCustomJobRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeleteCustomJobRequest buildPartial() { + com.google.cloud.aiplatform.v1.DeleteCustomJobRequest result = + new com.google.cloud.aiplatform.v1.DeleteCustomJobRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.DeleteCustomJobRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.DeleteCustomJobRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.DeleteCustomJobRequest other) { + if (other == com.google.cloud.aiplatform.v1.DeleteCustomJobRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.aiplatform.v1.DeleteCustomJobRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.DeleteCustomJobRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the CustomJob resource to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/customJobs/{custom_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the CustomJob resource to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/customJobs/{custom_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the CustomJob resource to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/customJobs/{custom_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the CustomJob resource to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/customJobs/{custom_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the CustomJob resource to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/customJobs/{custom_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.DeleteCustomJobRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.DeleteCustomJobRequest) + private static final com.google.cloud.aiplatform.v1.DeleteCustomJobRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.DeleteCustomJobRequest(); + } + + public static com.google.cloud.aiplatform.v1.DeleteCustomJobRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteCustomJobRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteCustomJobRequest(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.v1.DeleteCustomJobRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteCustomJobRequestOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteCustomJobRequestOrBuilder.java new file mode 100644 index 000000000..c2210ca2d --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteCustomJobRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/job_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface DeleteCustomJobRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.DeleteCustomJobRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the CustomJob resource to be deleted.
+   * Format:
+   * `projects/{project}/locations/{location}/customJobs/{custom_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the CustomJob resource to be deleted.
+   * Format:
+   * `projects/{project}/locations/{location}/customJobs/{custom_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteDataLabelingJobRequest.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteDataLabelingJobRequest.java new file mode 100644 index 000000000..f64b41f40 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteDataLabelingJobRequest.java @@ -0,0 +1,665 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/job_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for [JobService.DeleteDataLabelingJob][google.cloud.aiplatform.v1.JobService.DeleteDataLabelingJob].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.DeleteDataLabelingJobRequest} + */ +public final class DeleteDataLabelingJobRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.DeleteDataLabelingJobRequest) + DeleteDataLabelingJobRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteDataLabelingJobRequest.newBuilder() to construct. + private DeleteDataLabelingJobRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteDataLabelingJobRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteDataLabelingJobRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteDataLabelingJobRequest( + 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(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteDataLabelingJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteDataLabelingJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.DeleteDataLabelingJobRequest.class, + com.google.cloud.aiplatform.v1.DeleteDataLabelingJobRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the DataLabelingJob to be deleted.
+   * Format:
+   * `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the DataLabelingJob to be deleted.
+   * Format:
+   * `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.DeleteDataLabelingJobRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.DeleteDataLabelingJobRequest other = + (com.google.cloud.aiplatform.v1.DeleteDataLabelingJobRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.DeleteDataLabelingJobRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DeleteDataLabelingJobRequest 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.v1.DeleteDataLabelingJobRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DeleteDataLabelingJobRequest 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.v1.DeleteDataLabelingJobRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DeleteDataLabelingJobRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.DeleteDataLabelingJobRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DeleteDataLabelingJobRequest 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.v1.DeleteDataLabelingJobRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DeleteDataLabelingJobRequest 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.v1.DeleteDataLabelingJobRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DeleteDataLabelingJobRequest 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.v1.DeleteDataLabelingJobRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [JobService.DeleteDataLabelingJob][google.cloud.aiplatform.v1.JobService.DeleteDataLabelingJob].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.DeleteDataLabelingJobRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.DeleteDataLabelingJobRequest) + com.google.cloud.aiplatform.v1.DeleteDataLabelingJobRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteDataLabelingJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteDataLabelingJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.DeleteDataLabelingJobRequest.class, + com.google.cloud.aiplatform.v1.DeleteDataLabelingJobRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.DeleteDataLabelingJobRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteDataLabelingJobRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeleteDataLabelingJobRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.DeleteDataLabelingJobRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeleteDataLabelingJobRequest build() { + com.google.cloud.aiplatform.v1.DeleteDataLabelingJobRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeleteDataLabelingJobRequest buildPartial() { + com.google.cloud.aiplatform.v1.DeleteDataLabelingJobRequest result = + new com.google.cloud.aiplatform.v1.DeleteDataLabelingJobRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.DeleteDataLabelingJobRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.DeleteDataLabelingJobRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.DeleteDataLabelingJobRequest other) { + if (other == com.google.cloud.aiplatform.v1.DeleteDataLabelingJobRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.aiplatform.v1.DeleteDataLabelingJobRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.DeleteDataLabelingJobRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the DataLabelingJob to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the DataLabelingJob to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the DataLabelingJob to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the DataLabelingJob to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the DataLabelingJob to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.DeleteDataLabelingJobRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.DeleteDataLabelingJobRequest) + private static final com.google.cloud.aiplatform.v1.DeleteDataLabelingJobRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.DeleteDataLabelingJobRequest(); + } + + public static com.google.cloud.aiplatform.v1.DeleteDataLabelingJobRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteDataLabelingJobRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteDataLabelingJobRequest(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.v1.DeleteDataLabelingJobRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteDataLabelingJobRequestOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteDataLabelingJobRequestOrBuilder.java new file mode 100644 index 000000000..7e350759e --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteDataLabelingJobRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/job_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface DeleteDataLabelingJobRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.DeleteDataLabelingJobRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the DataLabelingJob to be deleted.
+   * Format:
+   * `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the DataLabelingJob to be deleted.
+   * Format:
+   * `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteDatasetRequest.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteDatasetRequest.java new file mode 100644 index 000000000..70763bef0 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteDatasetRequest.java @@ -0,0 +1,664 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/dataset_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for [DatasetService.DeleteDataset][google.cloud.aiplatform.v1.DatasetService.DeleteDataset].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.DeleteDatasetRequest} + */ +public final class DeleteDatasetRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.DeleteDatasetRequest) + DeleteDatasetRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteDatasetRequest.newBuilder() to construct. + private DeleteDatasetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteDatasetRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteDatasetRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteDatasetRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteDatasetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteDatasetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.DeleteDatasetRequest.class, + com.google.cloud.aiplatform.v1.DeleteDatasetRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The resource name of the Dataset to delete.
+   * Format:
+   * `projects/{project}/locations/{location}/datasets/{dataset}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the Dataset to delete.
+   * Format:
+   * `projects/{project}/locations/{location}/datasets/{dataset}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.DeleteDatasetRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.DeleteDatasetRequest other = + (com.google.cloud.aiplatform.v1.DeleteDatasetRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.DeleteDatasetRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DeleteDatasetRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.DeleteDatasetRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DeleteDatasetRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.DeleteDatasetRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DeleteDatasetRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.DeleteDatasetRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DeleteDatasetRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.DeleteDatasetRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DeleteDatasetRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.DeleteDatasetRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DeleteDatasetRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1.DeleteDatasetRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [DatasetService.DeleteDataset][google.cloud.aiplatform.v1.DatasetService.DeleteDataset].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.DeleteDatasetRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.DeleteDatasetRequest) + com.google.cloud.aiplatform.v1.DeleteDatasetRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteDatasetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteDatasetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.DeleteDatasetRequest.class, + com.google.cloud.aiplatform.v1.DeleteDatasetRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.DeleteDatasetRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteDatasetRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeleteDatasetRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.DeleteDatasetRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeleteDatasetRequest build() { + com.google.cloud.aiplatform.v1.DeleteDatasetRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeleteDatasetRequest buildPartial() { + com.google.cloud.aiplatform.v1.DeleteDatasetRequest result = + new com.google.cloud.aiplatform.v1.DeleteDatasetRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.DeleteDatasetRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.DeleteDatasetRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.DeleteDatasetRequest other) { + if (other == com.google.cloud.aiplatform.v1.DeleteDatasetRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.aiplatform.v1.DeleteDatasetRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.DeleteDatasetRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The resource name of the Dataset to delete.
+     * Format:
+     * `projects/{project}/locations/{location}/datasets/{dataset}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Dataset to delete.
+     * Format:
+     * `projects/{project}/locations/{location}/datasets/{dataset}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Dataset to delete.
+     * Format:
+     * `projects/{project}/locations/{location}/datasets/{dataset}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Dataset to delete.
+     * Format:
+     * `projects/{project}/locations/{location}/datasets/{dataset}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Dataset to delete.
+     * Format:
+     * `projects/{project}/locations/{location}/datasets/{dataset}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.DeleteDatasetRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.DeleteDatasetRequest) + private static final com.google.cloud.aiplatform.v1.DeleteDatasetRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.DeleteDatasetRequest(); + } + + public static com.google.cloud.aiplatform.v1.DeleteDatasetRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteDatasetRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteDatasetRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeleteDatasetRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteDatasetRequestOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteDatasetRequestOrBuilder.java new file mode 100644 index 000000000..3e7373b8d --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteDatasetRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/dataset_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface DeleteDatasetRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.DeleteDatasetRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the Dataset to delete.
+   * Format:
+   * `projects/{project}/locations/{location}/datasets/{dataset}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The resource name of the Dataset to delete.
+   * Format:
+   * `projects/{project}/locations/{location}/datasets/{dataset}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteEndpointRequest.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteEndpointRequest.java new file mode 100644 index 000000000..01c766923 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteEndpointRequest.java @@ -0,0 +1,664 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/endpoint_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for [EndpointService.DeleteEndpoint][google.cloud.aiplatform.v1.EndpointService.DeleteEndpoint].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.DeleteEndpointRequest} + */ +public final class DeleteEndpointRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.DeleteEndpointRequest) + DeleteEndpointRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteEndpointRequest.newBuilder() to construct. + private DeleteEndpointRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteEndpointRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteEndpointRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteEndpointRequest( + 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(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.EndpointServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteEndpointRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.EndpointServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteEndpointRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.DeleteEndpointRequest.class, + com.google.cloud.aiplatform.v1.DeleteEndpointRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the Endpoint resource to be deleted.
+   * Format:
+   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the Endpoint resource to be deleted.
+   * Format:
+   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.DeleteEndpointRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.DeleteEndpointRequest other = + (com.google.cloud.aiplatform.v1.DeleteEndpointRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.DeleteEndpointRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DeleteEndpointRequest 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.v1.DeleteEndpointRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DeleteEndpointRequest 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.v1.DeleteEndpointRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DeleteEndpointRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.DeleteEndpointRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DeleteEndpointRequest 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.v1.DeleteEndpointRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DeleteEndpointRequest 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.v1.DeleteEndpointRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DeleteEndpointRequest 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.v1.DeleteEndpointRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [EndpointService.DeleteEndpoint][google.cloud.aiplatform.v1.EndpointService.DeleteEndpoint].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.DeleteEndpointRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.DeleteEndpointRequest) + com.google.cloud.aiplatform.v1.DeleteEndpointRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.EndpointServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteEndpointRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.EndpointServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteEndpointRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.DeleteEndpointRequest.class, + com.google.cloud.aiplatform.v1.DeleteEndpointRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.DeleteEndpointRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.EndpointServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteEndpointRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeleteEndpointRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.DeleteEndpointRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeleteEndpointRequest build() { + com.google.cloud.aiplatform.v1.DeleteEndpointRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeleteEndpointRequest buildPartial() { + com.google.cloud.aiplatform.v1.DeleteEndpointRequest result = + new com.google.cloud.aiplatform.v1.DeleteEndpointRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.DeleteEndpointRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.DeleteEndpointRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.DeleteEndpointRequest other) { + if (other == com.google.cloud.aiplatform.v1.DeleteEndpointRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.aiplatform.v1.DeleteEndpointRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.DeleteEndpointRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the Endpoint resource to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the Endpoint resource to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the Endpoint resource to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the Endpoint resource to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the Endpoint resource to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.DeleteEndpointRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.DeleteEndpointRequest) + private static final com.google.cloud.aiplatform.v1.DeleteEndpointRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.DeleteEndpointRequest(); + } + + public static com.google.cloud.aiplatform.v1.DeleteEndpointRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteEndpointRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteEndpointRequest(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.v1.DeleteEndpointRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteEndpointRequestOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteEndpointRequestOrBuilder.java new file mode 100644 index 000000000..834815779 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteEndpointRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/endpoint_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface DeleteEndpointRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.DeleteEndpointRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the Endpoint resource to be deleted.
+   * Format:
+   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the Endpoint resource to be deleted.
+   * Format:
+   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteHyperparameterTuningJobRequest.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteHyperparameterTuningJobRequest.java new file mode 100644 index 000000000..5b59f5eff --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteHyperparameterTuningJobRequest.java @@ -0,0 +1,678 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/job_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for [JobService.DeleteHyperparameterTuningJob][google.cloud.aiplatform.v1.JobService.DeleteHyperparameterTuningJob].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.DeleteHyperparameterTuningJobRequest} + */ +public final class DeleteHyperparameterTuningJobRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.DeleteHyperparameterTuningJobRequest) + DeleteHyperparameterTuningJobRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteHyperparameterTuningJobRequest.newBuilder() to construct. + private DeleteHyperparameterTuningJobRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteHyperparameterTuningJobRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteHyperparameterTuningJobRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteHyperparameterTuningJobRequest( + 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(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteHyperparameterTuningJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteHyperparameterTuningJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.DeleteHyperparameterTuningJobRequest.class, + com.google.cloud.aiplatform.v1.DeleteHyperparameterTuningJobRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the HyperparameterTuningJob resource to be deleted.
+   * Format:
+   * `projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the HyperparameterTuningJob resource to be deleted.
+   * Format:
+   * `projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.DeleteHyperparameterTuningJobRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.DeleteHyperparameterTuningJobRequest other = + (com.google.cloud.aiplatform.v1.DeleteHyperparameterTuningJobRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.DeleteHyperparameterTuningJobRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DeleteHyperparameterTuningJobRequest 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.v1.DeleteHyperparameterTuningJobRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DeleteHyperparameterTuningJobRequest 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.v1.DeleteHyperparameterTuningJobRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DeleteHyperparameterTuningJobRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.DeleteHyperparameterTuningJobRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DeleteHyperparameterTuningJobRequest 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.v1.DeleteHyperparameterTuningJobRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DeleteHyperparameterTuningJobRequest + 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.v1.DeleteHyperparameterTuningJobRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DeleteHyperparameterTuningJobRequest 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.v1.DeleteHyperparameterTuningJobRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [JobService.DeleteHyperparameterTuningJob][google.cloud.aiplatform.v1.JobService.DeleteHyperparameterTuningJob].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.DeleteHyperparameterTuningJobRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.DeleteHyperparameterTuningJobRequest) + com.google.cloud.aiplatform.v1.DeleteHyperparameterTuningJobRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteHyperparameterTuningJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteHyperparameterTuningJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.DeleteHyperparameterTuningJobRequest.class, + com.google.cloud.aiplatform.v1.DeleteHyperparameterTuningJobRequest.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.DeleteHyperparameterTuningJobRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteHyperparameterTuningJobRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeleteHyperparameterTuningJobRequest + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.DeleteHyperparameterTuningJobRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeleteHyperparameterTuningJobRequest build() { + com.google.cloud.aiplatform.v1.DeleteHyperparameterTuningJobRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeleteHyperparameterTuningJobRequest buildPartial() { + com.google.cloud.aiplatform.v1.DeleteHyperparameterTuningJobRequest result = + new com.google.cloud.aiplatform.v1.DeleteHyperparameterTuningJobRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.DeleteHyperparameterTuningJobRequest) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.DeleteHyperparameterTuningJobRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.DeleteHyperparameterTuningJobRequest other) { + if (other + == com.google.cloud.aiplatform.v1.DeleteHyperparameterTuningJobRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.aiplatform.v1.DeleteHyperparameterTuningJobRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.DeleteHyperparameterTuningJobRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the HyperparameterTuningJob resource to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the HyperparameterTuningJob resource to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the HyperparameterTuningJob resource to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the HyperparameterTuningJob resource to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the HyperparameterTuningJob resource to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.DeleteHyperparameterTuningJobRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.DeleteHyperparameterTuningJobRequest) + private static final com.google.cloud.aiplatform.v1.DeleteHyperparameterTuningJobRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.DeleteHyperparameterTuningJobRequest(); + } + + public static com.google.cloud.aiplatform.v1.DeleteHyperparameterTuningJobRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteHyperparameterTuningJobRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteHyperparameterTuningJobRequest(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.v1.DeleteHyperparameterTuningJobRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteHyperparameterTuningJobRequestOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteHyperparameterTuningJobRequestOrBuilder.java new file mode 100644 index 000000000..7df63a1c4 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteHyperparameterTuningJobRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/job_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface DeleteHyperparameterTuningJobRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.DeleteHyperparameterTuningJobRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the HyperparameterTuningJob resource to be deleted.
+   * Format:
+   * `projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the HyperparameterTuningJob resource to be deleted.
+   * Format:
+   * `projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteModelRequest.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteModelRequest.java new file mode 100644 index 000000000..aa1191e50 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteModelRequest.java @@ -0,0 +1,657 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/model_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for [ModelService.DeleteModel][google.cloud.aiplatform.v1.ModelService.DeleteModel].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.DeleteModelRequest} + */ +public final class DeleteModelRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.DeleteModelRequest) + DeleteModelRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteModelRequest.newBuilder() to construct. + private DeleteModelRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteModelRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteModelRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteModelRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteModelRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteModelRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.DeleteModelRequest.class, + com.google.cloud.aiplatform.v1.DeleteModelRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the Model resource to be deleted.
+   * Format: `projects/{project}/locations/{location}/models/{model}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the Model resource to be deleted.
+   * Format: `projects/{project}/locations/{location}/models/{model}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.DeleteModelRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.DeleteModelRequest other = + (com.google.cloud.aiplatform.v1.DeleteModelRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.DeleteModelRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DeleteModelRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.DeleteModelRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DeleteModelRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.DeleteModelRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DeleteModelRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.DeleteModelRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DeleteModelRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.DeleteModelRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DeleteModelRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.DeleteModelRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DeleteModelRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1.DeleteModelRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [ModelService.DeleteModel][google.cloud.aiplatform.v1.ModelService.DeleteModel].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.DeleteModelRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.DeleteModelRequest) + com.google.cloud.aiplatform.v1.DeleteModelRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteModelRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteModelRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.DeleteModelRequest.class, + com.google.cloud.aiplatform.v1.DeleteModelRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.DeleteModelRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteModelRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeleteModelRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.DeleteModelRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeleteModelRequest build() { + com.google.cloud.aiplatform.v1.DeleteModelRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeleteModelRequest buildPartial() { + com.google.cloud.aiplatform.v1.DeleteModelRequest result = + new com.google.cloud.aiplatform.v1.DeleteModelRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.DeleteModelRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.DeleteModelRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.DeleteModelRequest other) { + if (other == com.google.cloud.aiplatform.v1.DeleteModelRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.aiplatform.v1.DeleteModelRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.DeleteModelRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the Model resource to be deleted.
+     * Format: `projects/{project}/locations/{location}/models/{model}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the Model resource to be deleted.
+     * Format: `projects/{project}/locations/{location}/models/{model}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the Model resource to be deleted.
+     * Format: `projects/{project}/locations/{location}/models/{model}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the Model resource to be deleted.
+     * Format: `projects/{project}/locations/{location}/models/{model}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the Model resource to be deleted.
+     * Format: `projects/{project}/locations/{location}/models/{model}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.DeleteModelRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.DeleteModelRequest) + private static final com.google.cloud.aiplatform.v1.DeleteModelRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.DeleteModelRequest(); + } + + public static com.google.cloud.aiplatform.v1.DeleteModelRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteModelRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteModelRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeleteModelRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteModelRequestOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteModelRequestOrBuilder.java new file mode 100644 index 000000000..713ee6121 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteModelRequestOrBuilder.java @@ -0,0 +1,56 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/model_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface DeleteModelRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.DeleteModelRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the Model resource to be deleted.
+   * Format: `projects/{project}/locations/{location}/models/{model}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the Model resource to be deleted.
+   * Format: `projects/{project}/locations/{location}/models/{model}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteOperationMetadata.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteOperationMetadata.java new file mode 100644 index 000000000..0aed72962 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteOperationMetadata.java @@ -0,0 +1,741 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/operation.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Details of operations that perform deletes of any entities.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.DeleteOperationMetadata} + */ +public final class DeleteOperationMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.DeleteOperationMetadata) + DeleteOperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteOperationMetadata.newBuilder() to construct. + private DeleteOperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteOperationMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteOperationMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteOperationMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder subBuilder = null; + if (genericMetadata_ != null) { + subBuilder = genericMetadata_.toBuilder(); + } + genericMetadata_ = + input.readMessage( + com.google.cloud.aiplatform.v1.GenericOperationMetadata.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(genericMetadata_); + genericMetadata_ = 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.v1.OperationProto + .internal_static_google_cloud_aiplatform_v1_DeleteOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.OperationProto + .internal_static_google_cloud_aiplatform_v1_DeleteOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.DeleteOperationMetadata.class, + com.google.cloud.aiplatform.v1.DeleteOperationMetadata.Builder.class); + } + + public static final int GENERIC_METADATA_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1.GenericOperationMetadata genericMetadata_; + /** + * + * + *
+   * The common part of the operation metadata.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + @java.lang.Override + public boolean hasGenericMetadata() { + return genericMetadata_ != null; + } + /** + * + * + *
+   * The common part of the operation metadata.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata() { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + /** + * + * + *
+   * The common part of the operation metadata.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder() { + return getGenericMetadata(); + } + + 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 (genericMetadata_ != null) { + output.writeMessage(1, getGenericMetadata()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (genericMetadata_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getGenericMetadata()); + } + 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.v1.DeleteOperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.DeleteOperationMetadata other = + (com.google.cloud.aiplatform.v1.DeleteOperationMetadata) obj; + + if (hasGenericMetadata() != other.hasGenericMetadata()) return false; + if (hasGenericMetadata()) { + if (!getGenericMetadata().equals(other.getGenericMetadata())) 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 (hasGenericMetadata()) { + hash = (37 * hash) + GENERIC_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getGenericMetadata().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.DeleteOperationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DeleteOperationMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.DeleteOperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DeleteOperationMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.DeleteOperationMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DeleteOperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.DeleteOperationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DeleteOperationMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.DeleteOperationMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DeleteOperationMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.DeleteOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DeleteOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.DeleteOperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Details of operations that perform deletes of any entities.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.DeleteOperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.DeleteOperationMetadata) + com.google.cloud.aiplatform.v1.DeleteOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.OperationProto + .internal_static_google_cloud_aiplatform_v1_DeleteOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.OperationProto + .internal_static_google_cloud_aiplatform_v1_DeleteOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.DeleteOperationMetadata.class, + com.google.cloud.aiplatform.v1.DeleteOperationMetadata.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.DeleteOperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (genericMetadataBuilder_ == null) { + genericMetadata_ = null; + } else { + genericMetadata_ = null; + genericMetadataBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.OperationProto + .internal_static_google_cloud_aiplatform_v1_DeleteOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeleteOperationMetadata getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.DeleteOperationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeleteOperationMetadata build() { + com.google.cloud.aiplatform.v1.DeleteOperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeleteOperationMetadata buildPartial() { + com.google.cloud.aiplatform.v1.DeleteOperationMetadata result = + new com.google.cloud.aiplatform.v1.DeleteOperationMetadata(this); + if (genericMetadataBuilder_ == null) { + result.genericMetadata_ = genericMetadata_; + } else { + result.genericMetadata_ = genericMetadataBuilder_.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.v1.DeleteOperationMetadata) { + return mergeFrom((com.google.cloud.aiplatform.v1.DeleteOperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.DeleteOperationMetadata other) { + if (other == com.google.cloud.aiplatform.v1.DeleteOperationMetadata.getDefaultInstance()) + return this; + if (other.hasGenericMetadata()) { + mergeGenericMetadata(other.getGenericMetadata()); + } + 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.v1.DeleteOperationMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.DeleteOperationMetadata) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.aiplatform.v1.GenericOperationMetadata genericMetadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder> + genericMetadataBuilder_; + /** + * + * + *
+     * The common part of the operation metadata.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + public boolean hasGenericMetadata() { + return genericMetadataBuilder_ != null || genericMetadata_ != null; + } + /** + * + * + *
+     * The common part of the operation metadata.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata() { + if (genericMetadataBuilder_ == null) { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } else { + return genericMetadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The common part of the operation metadata.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder setGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata value) { + if (genericMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + genericMetadata_ = value; + onChanged(); + } else { + genericMetadataBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The common part of the operation metadata.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder setGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder builderForValue) { + if (genericMetadataBuilder_ == null) { + genericMetadata_ = builderForValue.build(); + onChanged(); + } else { + genericMetadataBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The common part of the operation metadata.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder mergeGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata value) { + if (genericMetadataBuilder_ == null) { + if (genericMetadata_ != null) { + genericMetadata_ = + com.google.cloud.aiplatform.v1.GenericOperationMetadata.newBuilder(genericMetadata_) + .mergeFrom(value) + .buildPartial(); + } else { + genericMetadata_ = value; + } + onChanged(); + } else { + genericMetadataBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The common part of the operation metadata.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder clearGenericMetadata() { + if (genericMetadataBuilder_ == null) { + genericMetadata_ = null; + onChanged(); + } else { + genericMetadata_ = null; + genericMetadataBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The common part of the operation metadata.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder + getGenericMetadataBuilder() { + + onChanged(); + return getGenericMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The common part of the operation metadata.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder() { + if (genericMetadataBuilder_ != null) { + return genericMetadataBuilder_.getMessageOrBuilder(); + } else { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + } + /** + * + * + *
+     * The common part of the operation metadata.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder> + getGenericMetadataFieldBuilder() { + if (genericMetadataBuilder_ == null) { + genericMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder>( + getGenericMetadata(), getParentForChildren(), isClean()); + genericMetadata_ = null; + } + return genericMetadataBuilder_; + } + + @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.v1.DeleteOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.DeleteOperationMetadata) + private static final com.google.cloud.aiplatform.v1.DeleteOperationMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.DeleteOperationMetadata(); + } + + public static com.google.cloud.aiplatform.v1.DeleteOperationMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteOperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteOperationMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeleteOperationMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteOperationMetadataOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteOperationMetadataOrBuilder.java new file mode 100644 index 000000000..b81f1c43c --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteOperationMetadataOrBuilder.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/v1/operation.proto + +package com.google.cloud.aiplatform.v1; + +public interface DeleteOperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.DeleteOperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The common part of the operation metadata.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + boolean hasGenericMetadata(); + /** + * + * + *
+   * The common part of the operation metadata.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata(); + /** + * + * + *
+   * The common part of the operation metadata.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder getGenericMetadataOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteSpecialistPoolRequest.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteSpecialistPoolRequest.java new file mode 100644 index 000000000..6a2300f84 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteSpecialistPoolRequest.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/v1/specialist_pool_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for [SpecialistPoolService.DeleteSpecialistPool][google.cloud.aiplatform.v1.SpecialistPoolService.DeleteSpecialistPool].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.DeleteSpecialistPoolRequest} + */ +public final class DeleteSpecialistPoolRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.DeleteSpecialistPoolRequest) + DeleteSpecialistPoolRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteSpecialistPoolRequest.newBuilder() to construct. + private DeleteSpecialistPoolRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteSpecialistPoolRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteSpecialistPoolRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteSpecialistPoolRequest( + 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(); + + name_ = s; + break; + } + case 16: + { + force_ = 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.v1.SpecialistPoolServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteSpecialistPoolRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.SpecialistPoolServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteSpecialistPoolRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.DeleteSpecialistPoolRequest.class, + com.google.cloud.aiplatform.v1.DeleteSpecialistPoolRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The resource name of the SpecialistPool to delete. Format:
+   * `projects/{project}/locations/{location}/specialistPools/{specialist_pool}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the SpecialistPool to delete. Format:
+   * `projects/{project}/locations/{location}/specialistPools/{specialist_pool}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FORCE_FIELD_NUMBER = 2; + private boolean force_; + /** + * + * + *
+   * If set to true, any specialist managers in this SpecialistPool will also be
+   * deleted. (Otherwise, the request will only work if the SpecialistPool has
+   * no specialist managers.)
+   * 
+ * + * bool force = 2; + * + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (force_ != false) { + output.writeBool(2, force_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (force_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, force_); + } + 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.v1.DeleteSpecialistPoolRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.DeleteSpecialistPoolRequest other = + (com.google.cloud.aiplatform.v1.DeleteSpecialistPoolRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (getForce() != other.getForce()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + FORCE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getForce()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.DeleteSpecialistPoolRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DeleteSpecialistPoolRequest 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.v1.DeleteSpecialistPoolRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DeleteSpecialistPoolRequest 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.v1.DeleteSpecialistPoolRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DeleteSpecialistPoolRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.DeleteSpecialistPoolRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DeleteSpecialistPoolRequest 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.v1.DeleteSpecialistPoolRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DeleteSpecialistPoolRequest 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.v1.DeleteSpecialistPoolRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DeleteSpecialistPoolRequest 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.v1.DeleteSpecialistPoolRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [SpecialistPoolService.DeleteSpecialistPool][google.cloud.aiplatform.v1.SpecialistPoolService.DeleteSpecialistPool].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.DeleteSpecialistPoolRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.DeleteSpecialistPoolRequest) + com.google.cloud.aiplatform.v1.DeleteSpecialistPoolRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.SpecialistPoolServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteSpecialistPoolRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.SpecialistPoolServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteSpecialistPoolRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.DeleteSpecialistPoolRequest.class, + com.google.cloud.aiplatform.v1.DeleteSpecialistPoolRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.DeleteSpecialistPoolRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + force_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.SpecialistPoolServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteSpecialistPoolRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeleteSpecialistPoolRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.DeleteSpecialistPoolRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeleteSpecialistPoolRequest build() { + com.google.cloud.aiplatform.v1.DeleteSpecialistPoolRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeleteSpecialistPoolRequest buildPartial() { + com.google.cloud.aiplatform.v1.DeleteSpecialistPoolRequest result = + new com.google.cloud.aiplatform.v1.DeleteSpecialistPoolRequest(this); + result.name_ = name_; + result.force_ = force_; + 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.v1.DeleteSpecialistPoolRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.DeleteSpecialistPoolRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.DeleteSpecialistPoolRequest other) { + if (other == com.google.cloud.aiplatform.v1.DeleteSpecialistPoolRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.getForce() != false) { + setForce(other.getForce()); + } + 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.v1.DeleteSpecialistPoolRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.DeleteSpecialistPoolRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The resource name of the SpecialistPool to delete. Format:
+     * `projects/{project}/locations/{location}/specialistPools/{specialist_pool}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the SpecialistPool to delete. Format:
+     * `projects/{project}/locations/{location}/specialistPools/{specialist_pool}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the SpecialistPool to delete. Format:
+     * `projects/{project}/locations/{location}/specialistPools/{specialist_pool}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the SpecialistPool to delete. Format:
+     * `projects/{project}/locations/{location}/specialistPools/{specialist_pool}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the SpecialistPool to delete. Format:
+     * `projects/{project}/locations/{location}/specialistPools/{specialist_pool}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private boolean force_; + /** + * + * + *
+     * If set to true, any specialist managers in this SpecialistPool will also be
+     * deleted. (Otherwise, the request will only work if the SpecialistPool has
+     * no specialist managers.)
+     * 
+ * + * bool force = 2; + * + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + /** + * + * + *
+     * If set to true, any specialist managers in this SpecialistPool will also be
+     * deleted. (Otherwise, the request will only work if the SpecialistPool has
+     * no specialist managers.)
+     * 
+ * + * bool force = 2; + * + * @param value The force to set. + * @return This builder for chaining. + */ + public Builder setForce(boolean value) { + + force_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * If set to true, any specialist managers in this SpecialistPool will also be
+     * deleted. (Otherwise, the request will only work if the SpecialistPool has
+     * no specialist managers.)
+     * 
+ * + * bool force = 2; + * + * @return This builder for chaining. + */ + public Builder clearForce() { + + force_ = 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.v1.DeleteSpecialistPoolRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.DeleteSpecialistPoolRequest) + private static final com.google.cloud.aiplatform.v1.DeleteSpecialistPoolRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.DeleteSpecialistPoolRequest(); + } + + public static com.google.cloud.aiplatform.v1.DeleteSpecialistPoolRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteSpecialistPoolRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteSpecialistPoolRequest(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.v1.DeleteSpecialistPoolRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteSpecialistPoolRequestOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteSpecialistPoolRequestOrBuilder.java new file mode 100644 index 000000000..d983b08f2 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteSpecialistPoolRequestOrBuilder.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/v1/specialist_pool_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface DeleteSpecialistPoolRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.DeleteSpecialistPoolRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the SpecialistPool to delete. Format:
+   * `projects/{project}/locations/{location}/specialistPools/{specialist_pool}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The resource name of the SpecialistPool to delete. Format:
+   * `projects/{project}/locations/{location}/specialistPools/{specialist_pool}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * If set to true, any specialist managers in this SpecialistPool will also be
+   * deleted. (Otherwise, the request will only work if the SpecialistPool has
+   * no specialist managers.)
+   * 
+ * + * bool force = 2; + * + * @return The force. + */ + boolean getForce(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteTrainingPipelineRequest.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteTrainingPipelineRequest.java new file mode 100644 index 000000000..479f01d16 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteTrainingPipelineRequest.java @@ -0,0 +1,668 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/pipeline_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for [PipelineService.DeleteTrainingPipeline][google.cloud.aiplatform.v1.PipelineService.DeleteTrainingPipeline].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.DeleteTrainingPipelineRequest} + */ +public final class DeleteTrainingPipelineRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.DeleteTrainingPipelineRequest) + DeleteTrainingPipelineRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteTrainingPipelineRequest.newBuilder() to construct. + private DeleteTrainingPipelineRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteTrainingPipelineRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteTrainingPipelineRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteTrainingPipelineRequest( + 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(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.PipelineServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteTrainingPipelineRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.PipelineServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteTrainingPipelineRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.DeleteTrainingPipelineRequest.class, + com.google.cloud.aiplatform.v1.DeleteTrainingPipelineRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the TrainingPipeline resource to be deleted.
+   * Format:
+   * `projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the TrainingPipeline resource to be deleted.
+   * Format:
+   * `projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.DeleteTrainingPipelineRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.DeleteTrainingPipelineRequest other = + (com.google.cloud.aiplatform.v1.DeleteTrainingPipelineRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.DeleteTrainingPipelineRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DeleteTrainingPipelineRequest 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.v1.DeleteTrainingPipelineRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DeleteTrainingPipelineRequest 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.v1.DeleteTrainingPipelineRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DeleteTrainingPipelineRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.DeleteTrainingPipelineRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DeleteTrainingPipelineRequest 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.v1.DeleteTrainingPipelineRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DeleteTrainingPipelineRequest 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.v1.DeleteTrainingPipelineRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DeleteTrainingPipelineRequest 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.v1.DeleteTrainingPipelineRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [PipelineService.DeleteTrainingPipeline][google.cloud.aiplatform.v1.PipelineService.DeleteTrainingPipeline].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.DeleteTrainingPipelineRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.DeleteTrainingPipelineRequest) + com.google.cloud.aiplatform.v1.DeleteTrainingPipelineRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.PipelineServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteTrainingPipelineRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.PipelineServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteTrainingPipelineRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.DeleteTrainingPipelineRequest.class, + com.google.cloud.aiplatform.v1.DeleteTrainingPipelineRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.DeleteTrainingPipelineRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.PipelineServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteTrainingPipelineRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeleteTrainingPipelineRequest + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.DeleteTrainingPipelineRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeleteTrainingPipelineRequest build() { + com.google.cloud.aiplatform.v1.DeleteTrainingPipelineRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeleteTrainingPipelineRequest buildPartial() { + com.google.cloud.aiplatform.v1.DeleteTrainingPipelineRequest result = + new com.google.cloud.aiplatform.v1.DeleteTrainingPipelineRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.DeleteTrainingPipelineRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.DeleteTrainingPipelineRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.DeleteTrainingPipelineRequest other) { + if (other + == com.google.cloud.aiplatform.v1.DeleteTrainingPipelineRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.aiplatform.v1.DeleteTrainingPipelineRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.DeleteTrainingPipelineRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the TrainingPipeline resource to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the TrainingPipeline resource to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the TrainingPipeline resource to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the TrainingPipeline resource to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the TrainingPipeline resource to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.DeleteTrainingPipelineRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.DeleteTrainingPipelineRequest) + private static final com.google.cloud.aiplatform.v1.DeleteTrainingPipelineRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.DeleteTrainingPipelineRequest(); + } + + public static com.google.cloud.aiplatform.v1.DeleteTrainingPipelineRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteTrainingPipelineRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteTrainingPipelineRequest(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.v1.DeleteTrainingPipelineRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteTrainingPipelineRequestOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteTrainingPipelineRequestOrBuilder.java new file mode 100644 index 000000000..72f0163fa --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteTrainingPipelineRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/pipeline_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface DeleteTrainingPipelineRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.DeleteTrainingPipelineRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the TrainingPipeline resource to be deleted.
+   * Format:
+   * `projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the TrainingPipeline resource to be deleted.
+   * Format:
+   * `projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeployModelOperationMetadata.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeployModelOperationMetadata.java new file mode 100644 index 000000000..d6ce3dd7e --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeployModelOperationMetadata.java @@ -0,0 +1,741 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/endpoint_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Runtime operation information for [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.DeployModelOperationMetadata} + */ +public final class DeployModelOperationMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.DeployModelOperationMetadata) + DeployModelOperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeployModelOperationMetadata.newBuilder() to construct. + private DeployModelOperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeployModelOperationMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeployModelOperationMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeployModelOperationMetadata( + 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.v1.GenericOperationMetadata.Builder subBuilder = null; + if (genericMetadata_ != null) { + subBuilder = genericMetadata_.toBuilder(); + } + genericMetadata_ = + input.readMessage( + com.google.cloud.aiplatform.v1.GenericOperationMetadata.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(genericMetadata_); + genericMetadata_ = 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.v1.EndpointServiceProto + .internal_static_google_cloud_aiplatform_v1_DeployModelOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.EndpointServiceProto + .internal_static_google_cloud_aiplatform_v1_DeployModelOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.DeployModelOperationMetadata.class, + com.google.cloud.aiplatform.v1.DeployModelOperationMetadata.Builder.class); + } + + public static final int GENERIC_METADATA_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1.GenericOperationMetadata genericMetadata_; + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + @java.lang.Override + public boolean hasGenericMetadata() { + return genericMetadata_ != null; + } + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata() { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder() { + return getGenericMetadata(); + } + + 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 (genericMetadata_ != null) { + output.writeMessage(1, getGenericMetadata()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (genericMetadata_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getGenericMetadata()); + } + 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.v1.DeployModelOperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.DeployModelOperationMetadata other = + (com.google.cloud.aiplatform.v1.DeployModelOperationMetadata) obj; + + if (hasGenericMetadata() != other.hasGenericMetadata()) return false; + if (hasGenericMetadata()) { + if (!getGenericMetadata().equals(other.getGenericMetadata())) 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 (hasGenericMetadata()) { + hash = (37 * hash) + GENERIC_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getGenericMetadata().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.DeployModelOperationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DeployModelOperationMetadata 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.v1.DeployModelOperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DeployModelOperationMetadata 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.v1.DeployModelOperationMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DeployModelOperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.DeployModelOperationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DeployModelOperationMetadata 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.v1.DeployModelOperationMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DeployModelOperationMetadata 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.v1.DeployModelOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DeployModelOperationMetadata 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.v1.DeployModelOperationMetadata 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; + } + /** + * + * + *
+   * Runtime operation information for [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.DeployModelOperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.DeployModelOperationMetadata) + com.google.cloud.aiplatform.v1.DeployModelOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.EndpointServiceProto + .internal_static_google_cloud_aiplatform_v1_DeployModelOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.EndpointServiceProto + .internal_static_google_cloud_aiplatform_v1_DeployModelOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.DeployModelOperationMetadata.class, + com.google.cloud.aiplatform.v1.DeployModelOperationMetadata.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.DeployModelOperationMetadata.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 (genericMetadataBuilder_ == null) { + genericMetadata_ = null; + } else { + genericMetadata_ = null; + genericMetadataBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.EndpointServiceProto + .internal_static_google_cloud_aiplatform_v1_DeployModelOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeployModelOperationMetadata getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.DeployModelOperationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeployModelOperationMetadata build() { + com.google.cloud.aiplatform.v1.DeployModelOperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeployModelOperationMetadata buildPartial() { + com.google.cloud.aiplatform.v1.DeployModelOperationMetadata result = + new com.google.cloud.aiplatform.v1.DeployModelOperationMetadata(this); + if (genericMetadataBuilder_ == null) { + result.genericMetadata_ = genericMetadata_; + } else { + result.genericMetadata_ = genericMetadataBuilder_.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.v1.DeployModelOperationMetadata) { + return mergeFrom((com.google.cloud.aiplatform.v1.DeployModelOperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.DeployModelOperationMetadata other) { + if (other == com.google.cloud.aiplatform.v1.DeployModelOperationMetadata.getDefaultInstance()) + return this; + if (other.hasGenericMetadata()) { + mergeGenericMetadata(other.getGenericMetadata()); + } + 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.v1.DeployModelOperationMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.DeployModelOperationMetadata) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.aiplatform.v1.GenericOperationMetadata genericMetadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder> + genericMetadataBuilder_; + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + public boolean hasGenericMetadata() { + return genericMetadataBuilder_ != null || genericMetadata_ != null; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata() { + if (genericMetadataBuilder_ == null) { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } else { + return genericMetadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder setGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata value) { + if (genericMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + genericMetadata_ = value; + onChanged(); + } else { + genericMetadataBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder setGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder builderForValue) { + if (genericMetadataBuilder_ == null) { + genericMetadata_ = builderForValue.build(); + onChanged(); + } else { + genericMetadataBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder mergeGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata value) { + if (genericMetadataBuilder_ == null) { + if (genericMetadata_ != null) { + genericMetadata_ = + com.google.cloud.aiplatform.v1.GenericOperationMetadata.newBuilder(genericMetadata_) + .mergeFrom(value) + .buildPartial(); + } else { + genericMetadata_ = value; + } + onChanged(); + } else { + genericMetadataBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder clearGenericMetadata() { + if (genericMetadataBuilder_ == null) { + genericMetadata_ = null; + onChanged(); + } else { + genericMetadata_ = null; + genericMetadataBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder + getGenericMetadataBuilder() { + + onChanged(); + return getGenericMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder() { + if (genericMetadataBuilder_ != null) { + return genericMetadataBuilder_.getMessageOrBuilder(); + } else { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder> + getGenericMetadataFieldBuilder() { + if (genericMetadataBuilder_ == null) { + genericMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder>( + getGenericMetadata(), getParentForChildren(), isClean()); + genericMetadata_ = null; + } + return genericMetadataBuilder_; + } + + @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.v1.DeployModelOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.DeployModelOperationMetadata) + private static final com.google.cloud.aiplatform.v1.DeployModelOperationMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.DeployModelOperationMetadata(); + } + + public static com.google.cloud.aiplatform.v1.DeployModelOperationMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeployModelOperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeployModelOperationMetadata(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.v1.DeployModelOperationMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeployModelOperationMetadataOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeployModelOperationMetadataOrBuilder.java new file mode 100644 index 000000000..79ee8256c --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeployModelOperationMetadataOrBuilder.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/v1/endpoint_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface DeployModelOperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.DeployModelOperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + boolean hasGenericMetadata(); + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata(); + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder getGenericMetadataOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeployModelRequest.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeployModelRequest.java new file mode 100644 index 000000000..200f79509 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeployModelRequest.java @@ -0,0 +1,1418 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/endpoint_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.DeployModelRequest} + */ +public final class DeployModelRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.DeployModelRequest) + DeployModelRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeployModelRequest.newBuilder() to construct. + private DeployModelRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeployModelRequest() { + endpoint_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeployModelRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeployModelRequest( + 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(); + + endpoint_ = s; + break; + } + case 18: + { + com.google.cloud.aiplatform.v1.DeployedModel.Builder subBuilder = null; + if (deployedModel_ != null) { + subBuilder = deployedModel_.toBuilder(); + } + deployedModel_ = + input.readMessage( + com.google.cloud.aiplatform.v1.DeployedModel.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(deployedModel_); + deployedModel_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + trafficSplit_ = + com.google.protobuf.MapField.newMapField( + TrafficSplitDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry trafficSplit__ = + input.readMessage( + TrafficSplitDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + trafficSplit_.getMutableMap().put(trafficSplit__.getKey(), trafficSplit__.getValue()); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.EndpointServiceProto + .internal_static_google_cloud_aiplatform_v1_DeployModelRequest_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 3: + return internalGetTrafficSplit(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.EndpointServiceProto + .internal_static_google_cloud_aiplatform_v1_DeployModelRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.DeployModelRequest.class, + com.google.cloud.aiplatform.v1.DeployModelRequest.Builder.class); + } + + public static final int ENDPOINT_FIELD_NUMBER = 1; + private volatile java.lang.Object endpoint_; + /** + * + * + *
+   * Required. The name of the Endpoint resource into which to deploy a Model.
+   * Format:
+   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+   * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The endpoint. + */ + @java.lang.Override + public java.lang.String getEndpoint() { + java.lang.Object ref = endpoint_; + 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(); + endpoint_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the Endpoint resource into which to deploy a Model.
+   * Format:
+   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+   * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for endpoint. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEndpointBytes() { + java.lang.Object ref = endpoint_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + endpoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEPLOYED_MODEL_FIELD_NUMBER = 2; + private com.google.cloud.aiplatform.v1.DeployedModel deployedModel_; + /** + * + * + *
+   * Required. The DeployedModel to be created within the Endpoint. Note that
+   * [Endpoint.traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] must be updated for the DeployedModel to start
+   * receiving traffic, either as part of this call, or via
+   * [EndpointService.UpdateEndpoint][google.cloud.aiplatform.v1.EndpointService.UpdateEndpoint].
+   * 
+ * + * + * .google.cloud.aiplatform.v1.DeployedModel deployed_model = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the deployedModel field is set. + */ + @java.lang.Override + public boolean hasDeployedModel() { + return deployedModel_ != null; + } + /** + * + * + *
+   * Required. The DeployedModel to be created within the Endpoint. Note that
+   * [Endpoint.traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] must be updated for the DeployedModel to start
+   * receiving traffic, either as part of this call, or via
+   * [EndpointService.UpdateEndpoint][google.cloud.aiplatform.v1.EndpointService.UpdateEndpoint].
+   * 
+ * + * + * .google.cloud.aiplatform.v1.DeployedModel deployed_model = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The deployedModel. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeployedModel getDeployedModel() { + return deployedModel_ == null + ? com.google.cloud.aiplatform.v1.DeployedModel.getDefaultInstance() + : deployedModel_; + } + /** + * + * + *
+   * Required. The DeployedModel to be created within the Endpoint. Note that
+   * [Endpoint.traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] must be updated for the DeployedModel to start
+   * receiving traffic, either as part of this call, or via
+   * [EndpointService.UpdateEndpoint][google.cloud.aiplatform.v1.EndpointService.UpdateEndpoint].
+   * 
+ * + * + * .google.cloud.aiplatform.v1.DeployedModel deployed_model = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeployedModelOrBuilder getDeployedModelOrBuilder() { + return getDeployedModel(); + } + + public static final int TRAFFIC_SPLIT_FIELD_NUMBER = 3; + + private static final class TrafficSplitDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.aiplatform.v1.EndpointServiceProto + .internal_static_google_cloud_aiplatform_v1_DeployModelRequest_TrafficSplitEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.INT32, + 0); + } + + private com.google.protobuf.MapField trafficSplit_; + + private com.google.protobuf.MapField + internalGetTrafficSplit() { + if (trafficSplit_ == null) { + return com.google.protobuf.MapField.emptyMapField( + TrafficSplitDefaultEntryHolder.defaultEntry); + } + return trafficSplit_; + } + + public int getTrafficSplitCount() { + return internalGetTrafficSplit().getMap().size(); + } + /** + * + * + *
+   * A map from a DeployedModel's ID to the percentage of this Endpoint's
+   * traffic that should be forwarded to that DeployedModel.
+   * If this field is non-empty, then the Endpoint's
+   * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be overwritten with it.
+   * To refer to the ID of the just being deployed Model, a "0" should be used,
+   * and the actual ID of the new DeployedModel will be filled in its place by
+   * this method. The traffic percentage values must add up to 100.
+   * If this field is empty, then the Endpoint's
+   * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] is not updated.
+   * 
+ * + * map<string, int32> traffic_split = 3; + */ + @java.lang.Override + public boolean containsTrafficSplit(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetTrafficSplit().getMap().containsKey(key); + } + /** Use {@link #getTrafficSplitMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getTrafficSplit() { + return getTrafficSplitMap(); + } + /** + * + * + *
+   * A map from a DeployedModel's ID to the percentage of this Endpoint's
+   * traffic that should be forwarded to that DeployedModel.
+   * If this field is non-empty, then the Endpoint's
+   * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be overwritten with it.
+   * To refer to the ID of the just being deployed Model, a "0" should be used,
+   * and the actual ID of the new DeployedModel will be filled in its place by
+   * this method. The traffic percentage values must add up to 100.
+   * If this field is empty, then the Endpoint's
+   * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] is not updated.
+   * 
+ * + * map<string, int32> traffic_split = 3; + */ + @java.lang.Override + public java.util.Map getTrafficSplitMap() { + return internalGetTrafficSplit().getMap(); + } + /** + * + * + *
+   * A map from a DeployedModel's ID to the percentage of this Endpoint's
+   * traffic that should be forwarded to that DeployedModel.
+   * If this field is non-empty, then the Endpoint's
+   * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be overwritten with it.
+   * To refer to the ID of the just being deployed Model, a "0" should be used,
+   * and the actual ID of the new DeployedModel will be filled in its place by
+   * this method. The traffic percentage values must add up to 100.
+   * If this field is empty, then the Endpoint's
+   * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] is not updated.
+   * 
+ * + * map<string, int32> traffic_split = 3; + */ + @java.lang.Override + public int getTrafficSplitOrDefault(java.lang.String key, int defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetTrafficSplit().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * A map from a DeployedModel's ID to the percentage of this Endpoint's
+   * traffic that should be forwarded to that DeployedModel.
+   * If this field is non-empty, then the Endpoint's
+   * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be overwritten with it.
+   * To refer to the ID of the just being deployed Model, a "0" should be used,
+   * and the actual ID of the new DeployedModel will be filled in its place by
+   * this method. The traffic percentage values must add up to 100.
+   * If this field is empty, then the Endpoint's
+   * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] is not updated.
+   * 
+ * + * map<string, int32> traffic_split = 3; + */ + @java.lang.Override + public int getTrafficSplitOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetTrafficSplit().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getEndpointBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, endpoint_); + } + if (deployedModel_ != null) { + output.writeMessage(2, getDeployedModel()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetTrafficSplit(), TrafficSplitDefaultEntryHolder.defaultEntry, 3); + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getEndpointBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, endpoint_); + } + if (deployedModel_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDeployedModel()); + } + for (java.util.Map.Entry entry : + internalGetTrafficSplit().getMap().entrySet()) { + com.google.protobuf.MapEntry trafficSplit__ = + TrafficSplitDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, trafficSplit__); + } + 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.v1.DeployModelRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.DeployModelRequest other = + (com.google.cloud.aiplatform.v1.DeployModelRequest) obj; + + if (!getEndpoint().equals(other.getEndpoint())) return false; + if (hasDeployedModel() != other.hasDeployedModel()) return false; + if (hasDeployedModel()) { + if (!getDeployedModel().equals(other.getDeployedModel())) return false; + } + if (!internalGetTrafficSplit().equals(other.internalGetTrafficSplit())) 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) + ENDPOINT_FIELD_NUMBER; + hash = (53 * hash) + getEndpoint().hashCode(); + if (hasDeployedModel()) { + hash = (37 * hash) + DEPLOYED_MODEL_FIELD_NUMBER; + hash = (53 * hash) + getDeployedModel().hashCode(); + } + if (!internalGetTrafficSplit().getMap().isEmpty()) { + hash = (37 * hash) + TRAFFIC_SPLIT_FIELD_NUMBER; + hash = (53 * hash) + internalGetTrafficSplit().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.DeployModelRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DeployModelRequest 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.v1.DeployModelRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DeployModelRequest 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.v1.DeployModelRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DeployModelRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.DeployModelRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DeployModelRequest 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.v1.DeployModelRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DeployModelRequest 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.v1.DeployModelRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DeployModelRequest 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.v1.DeployModelRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.DeployModelRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.DeployModelRequest) + com.google.cloud.aiplatform.v1.DeployModelRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.EndpointServiceProto + .internal_static_google_cloud_aiplatform_v1_DeployModelRequest_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 3: + return internalGetTrafficSplit(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 3: + return internalGetMutableTrafficSplit(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.EndpointServiceProto + .internal_static_google_cloud_aiplatform_v1_DeployModelRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.DeployModelRequest.class, + com.google.cloud.aiplatform.v1.DeployModelRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.DeployModelRequest.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(); + endpoint_ = ""; + + if (deployedModelBuilder_ == null) { + deployedModel_ = null; + } else { + deployedModel_ = null; + deployedModelBuilder_ = null; + } + internalGetMutableTrafficSplit().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.EndpointServiceProto + .internal_static_google_cloud_aiplatform_v1_DeployModelRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeployModelRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.DeployModelRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeployModelRequest build() { + com.google.cloud.aiplatform.v1.DeployModelRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeployModelRequest buildPartial() { + com.google.cloud.aiplatform.v1.DeployModelRequest result = + new com.google.cloud.aiplatform.v1.DeployModelRequest(this); + int from_bitField0_ = bitField0_; + result.endpoint_ = endpoint_; + if (deployedModelBuilder_ == null) { + result.deployedModel_ = deployedModel_; + } else { + result.deployedModel_ = deployedModelBuilder_.build(); + } + result.trafficSplit_ = internalGetTrafficSplit(); + result.trafficSplit_.makeImmutable(); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.DeployModelRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.DeployModelRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.DeployModelRequest other) { + if (other == com.google.cloud.aiplatform.v1.DeployModelRequest.getDefaultInstance()) + return this; + if (!other.getEndpoint().isEmpty()) { + endpoint_ = other.endpoint_; + onChanged(); + } + if (other.hasDeployedModel()) { + mergeDeployedModel(other.getDeployedModel()); + } + internalGetMutableTrafficSplit().mergeFrom(other.internalGetTrafficSplit()); + 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.v1.DeployModelRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.DeployModelRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object endpoint_ = ""; + /** + * + * + *
+     * Required. The name of the Endpoint resource into which to deploy a Model.
+     * Format:
+     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+     * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The endpoint. + */ + public java.lang.String getEndpoint() { + java.lang.Object ref = endpoint_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpoint_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the Endpoint resource into which to deploy a Model.
+     * Format:
+     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+     * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for endpoint. + */ + public com.google.protobuf.ByteString getEndpointBytes() { + java.lang.Object ref = endpoint_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + endpoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the Endpoint resource into which to deploy a Model.
+     * Format:
+     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+     * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The endpoint to set. + * @return This builder for chaining. + */ + public Builder setEndpoint(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + endpoint_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the Endpoint resource into which to deploy a Model.
+     * Format:
+     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+     * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearEndpoint() { + + endpoint_ = getDefaultInstance().getEndpoint(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the Endpoint resource into which to deploy a Model.
+     * Format:
+     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+     * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for endpoint to set. + * @return This builder for chaining. + */ + public Builder setEndpointBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + endpoint_ = value; + onChanged(); + return this; + } + + private com.google.cloud.aiplatform.v1.DeployedModel deployedModel_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.DeployedModel, + com.google.cloud.aiplatform.v1.DeployedModel.Builder, + com.google.cloud.aiplatform.v1.DeployedModelOrBuilder> + deployedModelBuilder_; + /** + * + * + *
+     * Required. The DeployedModel to be created within the Endpoint. Note that
+     * [Endpoint.traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] must be updated for the DeployedModel to start
+     * receiving traffic, either as part of this call, or via
+     * [EndpointService.UpdateEndpoint][google.cloud.aiplatform.v1.EndpointService.UpdateEndpoint].
+     * 
+ * + * + * .google.cloud.aiplatform.v1.DeployedModel deployed_model = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the deployedModel field is set. + */ + public boolean hasDeployedModel() { + return deployedModelBuilder_ != null || deployedModel_ != null; + } + /** + * + * + *
+     * Required. The DeployedModel to be created within the Endpoint. Note that
+     * [Endpoint.traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] must be updated for the DeployedModel to start
+     * receiving traffic, either as part of this call, or via
+     * [EndpointService.UpdateEndpoint][google.cloud.aiplatform.v1.EndpointService.UpdateEndpoint].
+     * 
+ * + * + * .google.cloud.aiplatform.v1.DeployedModel deployed_model = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The deployedModel. + */ + public com.google.cloud.aiplatform.v1.DeployedModel getDeployedModel() { + if (deployedModelBuilder_ == null) { + return deployedModel_ == null + ? com.google.cloud.aiplatform.v1.DeployedModel.getDefaultInstance() + : deployedModel_; + } else { + return deployedModelBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The DeployedModel to be created within the Endpoint. Note that
+     * [Endpoint.traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] must be updated for the DeployedModel to start
+     * receiving traffic, either as part of this call, or via
+     * [EndpointService.UpdateEndpoint][google.cloud.aiplatform.v1.EndpointService.UpdateEndpoint].
+     * 
+ * + * + * .google.cloud.aiplatform.v1.DeployedModel deployed_model = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDeployedModel(com.google.cloud.aiplatform.v1.DeployedModel value) { + if (deployedModelBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + deployedModel_ = value; + onChanged(); + } else { + deployedModelBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The DeployedModel to be created within the Endpoint. Note that
+     * [Endpoint.traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] must be updated for the DeployedModel to start
+     * receiving traffic, either as part of this call, or via
+     * [EndpointService.UpdateEndpoint][google.cloud.aiplatform.v1.EndpointService.UpdateEndpoint].
+     * 
+ * + * + * .google.cloud.aiplatform.v1.DeployedModel deployed_model = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDeployedModel( + com.google.cloud.aiplatform.v1.DeployedModel.Builder builderForValue) { + if (deployedModelBuilder_ == null) { + deployedModel_ = builderForValue.build(); + onChanged(); + } else { + deployedModelBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The DeployedModel to be created within the Endpoint. Note that
+     * [Endpoint.traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] must be updated for the DeployedModel to start
+     * receiving traffic, either as part of this call, or via
+     * [EndpointService.UpdateEndpoint][google.cloud.aiplatform.v1.EndpointService.UpdateEndpoint].
+     * 
+ * + * + * .google.cloud.aiplatform.v1.DeployedModel deployed_model = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeDeployedModel(com.google.cloud.aiplatform.v1.DeployedModel value) { + if (deployedModelBuilder_ == null) { + if (deployedModel_ != null) { + deployedModel_ = + com.google.cloud.aiplatform.v1.DeployedModel.newBuilder(deployedModel_) + .mergeFrom(value) + .buildPartial(); + } else { + deployedModel_ = value; + } + onChanged(); + } else { + deployedModelBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The DeployedModel to be created within the Endpoint. Note that
+     * [Endpoint.traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] must be updated for the DeployedModel to start
+     * receiving traffic, either as part of this call, or via
+     * [EndpointService.UpdateEndpoint][google.cloud.aiplatform.v1.EndpointService.UpdateEndpoint].
+     * 
+ * + * + * .google.cloud.aiplatform.v1.DeployedModel deployed_model = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearDeployedModel() { + if (deployedModelBuilder_ == null) { + deployedModel_ = null; + onChanged(); + } else { + deployedModel_ = null; + deployedModelBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The DeployedModel to be created within the Endpoint. Note that
+     * [Endpoint.traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] must be updated for the DeployedModel to start
+     * receiving traffic, either as part of this call, or via
+     * [EndpointService.UpdateEndpoint][google.cloud.aiplatform.v1.EndpointService.UpdateEndpoint].
+     * 
+ * + * + * .google.cloud.aiplatform.v1.DeployedModel deployed_model = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.DeployedModel.Builder getDeployedModelBuilder() { + + onChanged(); + return getDeployedModelFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The DeployedModel to be created within the Endpoint. Note that
+     * [Endpoint.traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] must be updated for the DeployedModel to start
+     * receiving traffic, either as part of this call, or via
+     * [EndpointService.UpdateEndpoint][google.cloud.aiplatform.v1.EndpointService.UpdateEndpoint].
+     * 
+ * + * + * .google.cloud.aiplatform.v1.DeployedModel deployed_model = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.DeployedModelOrBuilder getDeployedModelOrBuilder() { + if (deployedModelBuilder_ != null) { + return deployedModelBuilder_.getMessageOrBuilder(); + } else { + return deployedModel_ == null + ? com.google.cloud.aiplatform.v1.DeployedModel.getDefaultInstance() + : deployedModel_; + } + } + /** + * + * + *
+     * Required. The DeployedModel to be created within the Endpoint. Note that
+     * [Endpoint.traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] must be updated for the DeployedModel to start
+     * receiving traffic, either as part of this call, or via
+     * [EndpointService.UpdateEndpoint][google.cloud.aiplatform.v1.EndpointService.UpdateEndpoint].
+     * 
+ * + * + * .google.cloud.aiplatform.v1.DeployedModel deployed_model = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.DeployedModel, + com.google.cloud.aiplatform.v1.DeployedModel.Builder, + com.google.cloud.aiplatform.v1.DeployedModelOrBuilder> + getDeployedModelFieldBuilder() { + if (deployedModelBuilder_ == null) { + deployedModelBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.DeployedModel, + com.google.cloud.aiplatform.v1.DeployedModel.Builder, + com.google.cloud.aiplatform.v1.DeployedModelOrBuilder>( + getDeployedModel(), getParentForChildren(), isClean()); + deployedModel_ = null; + } + return deployedModelBuilder_; + } + + private com.google.protobuf.MapField trafficSplit_; + + private com.google.protobuf.MapField + internalGetTrafficSplit() { + if (trafficSplit_ == null) { + return com.google.protobuf.MapField.emptyMapField( + TrafficSplitDefaultEntryHolder.defaultEntry); + } + return trafficSplit_; + } + + private com.google.protobuf.MapField + internalGetMutableTrafficSplit() { + onChanged(); + ; + if (trafficSplit_ == null) { + trafficSplit_ = + com.google.protobuf.MapField.newMapField(TrafficSplitDefaultEntryHolder.defaultEntry); + } + if (!trafficSplit_.isMutable()) { + trafficSplit_ = trafficSplit_.copy(); + } + return trafficSplit_; + } + + public int getTrafficSplitCount() { + return internalGetTrafficSplit().getMap().size(); + } + /** + * + * + *
+     * A map from a DeployedModel's ID to the percentage of this Endpoint's
+     * traffic that should be forwarded to that DeployedModel.
+     * If this field is non-empty, then the Endpoint's
+     * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be overwritten with it.
+     * To refer to the ID of the just being deployed Model, a "0" should be used,
+     * and the actual ID of the new DeployedModel will be filled in its place by
+     * this method. The traffic percentage values must add up to 100.
+     * If this field is empty, then the Endpoint's
+     * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] is not updated.
+     * 
+ * + * map<string, int32> traffic_split = 3; + */ + @java.lang.Override + public boolean containsTrafficSplit(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetTrafficSplit().getMap().containsKey(key); + } + /** Use {@link #getTrafficSplitMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getTrafficSplit() { + return getTrafficSplitMap(); + } + /** + * + * + *
+     * A map from a DeployedModel's ID to the percentage of this Endpoint's
+     * traffic that should be forwarded to that DeployedModel.
+     * If this field is non-empty, then the Endpoint's
+     * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be overwritten with it.
+     * To refer to the ID of the just being deployed Model, a "0" should be used,
+     * and the actual ID of the new DeployedModel will be filled in its place by
+     * this method. The traffic percentage values must add up to 100.
+     * If this field is empty, then the Endpoint's
+     * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] is not updated.
+     * 
+ * + * map<string, int32> traffic_split = 3; + */ + @java.lang.Override + public java.util.Map getTrafficSplitMap() { + return internalGetTrafficSplit().getMap(); + } + /** + * + * + *
+     * A map from a DeployedModel's ID to the percentage of this Endpoint's
+     * traffic that should be forwarded to that DeployedModel.
+     * If this field is non-empty, then the Endpoint's
+     * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be overwritten with it.
+     * To refer to the ID of the just being deployed Model, a "0" should be used,
+     * and the actual ID of the new DeployedModel will be filled in its place by
+     * this method. The traffic percentage values must add up to 100.
+     * If this field is empty, then the Endpoint's
+     * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] is not updated.
+     * 
+ * + * map<string, int32> traffic_split = 3; + */ + @java.lang.Override + public int getTrafficSplitOrDefault(java.lang.String key, int defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetTrafficSplit().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * A map from a DeployedModel's ID to the percentage of this Endpoint's
+     * traffic that should be forwarded to that DeployedModel.
+     * If this field is non-empty, then the Endpoint's
+     * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be overwritten with it.
+     * To refer to the ID of the just being deployed Model, a "0" should be used,
+     * and the actual ID of the new DeployedModel will be filled in its place by
+     * this method. The traffic percentage values must add up to 100.
+     * If this field is empty, then the Endpoint's
+     * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] is not updated.
+     * 
+ * + * map<string, int32> traffic_split = 3; + */ + @java.lang.Override + public int getTrafficSplitOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetTrafficSplit().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearTrafficSplit() { + internalGetMutableTrafficSplit().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * A map from a DeployedModel's ID to the percentage of this Endpoint's
+     * traffic that should be forwarded to that DeployedModel.
+     * If this field is non-empty, then the Endpoint's
+     * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be overwritten with it.
+     * To refer to the ID of the just being deployed Model, a "0" should be used,
+     * and the actual ID of the new DeployedModel will be filled in its place by
+     * this method. The traffic percentage values must add up to 100.
+     * If this field is empty, then the Endpoint's
+     * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] is not updated.
+     * 
+ * + * map<string, int32> traffic_split = 3; + */ + public Builder removeTrafficSplit(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableTrafficSplit().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableTrafficSplit() { + return internalGetMutableTrafficSplit().getMutableMap(); + } + /** + * + * + *
+     * A map from a DeployedModel's ID to the percentage of this Endpoint's
+     * traffic that should be forwarded to that DeployedModel.
+     * If this field is non-empty, then the Endpoint's
+     * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be overwritten with it.
+     * To refer to the ID of the just being deployed Model, a "0" should be used,
+     * and the actual ID of the new DeployedModel will be filled in its place by
+     * this method. The traffic percentage values must add up to 100.
+     * If this field is empty, then the Endpoint's
+     * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] is not updated.
+     * 
+ * + * map<string, int32> traffic_split = 3; + */ + public Builder putTrafficSplit(java.lang.String key, int value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + + internalGetMutableTrafficSplit().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * A map from a DeployedModel's ID to the percentage of this Endpoint's
+     * traffic that should be forwarded to that DeployedModel.
+     * If this field is non-empty, then the Endpoint's
+     * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be overwritten with it.
+     * To refer to the ID of the just being deployed Model, a "0" should be used,
+     * and the actual ID of the new DeployedModel will be filled in its place by
+     * this method. The traffic percentage values must add up to 100.
+     * If this field is empty, then the Endpoint's
+     * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] is not updated.
+     * 
+ * + * map<string, int32> traffic_split = 3; + */ + public Builder putAllTrafficSplit(java.util.Map values) { + internalGetMutableTrafficSplit().getMutableMap().putAll(values); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.DeployModelRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.DeployModelRequest) + private static final com.google.cloud.aiplatform.v1.DeployModelRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.DeployModelRequest(); + } + + public static com.google.cloud.aiplatform.v1.DeployModelRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeployModelRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeployModelRequest(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.v1.DeployModelRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeployModelRequestOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeployModelRequestOrBuilder.java new file mode 100644 index 000000000..4fe0c0b2f --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeployModelRequestOrBuilder.java @@ -0,0 +1,202 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/endpoint_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface DeployModelRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.DeployModelRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the Endpoint resource into which to deploy a Model.
+   * Format:
+   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+   * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The endpoint. + */ + java.lang.String getEndpoint(); + /** + * + * + *
+   * Required. The name of the Endpoint resource into which to deploy a Model.
+   * Format:
+   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+   * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for endpoint. + */ + com.google.protobuf.ByteString getEndpointBytes(); + + /** + * + * + *
+   * Required. The DeployedModel to be created within the Endpoint. Note that
+   * [Endpoint.traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] must be updated for the DeployedModel to start
+   * receiving traffic, either as part of this call, or via
+   * [EndpointService.UpdateEndpoint][google.cloud.aiplatform.v1.EndpointService.UpdateEndpoint].
+   * 
+ * + * + * .google.cloud.aiplatform.v1.DeployedModel deployed_model = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the deployedModel field is set. + */ + boolean hasDeployedModel(); + /** + * + * + *
+   * Required. The DeployedModel to be created within the Endpoint. Note that
+   * [Endpoint.traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] must be updated for the DeployedModel to start
+   * receiving traffic, either as part of this call, or via
+   * [EndpointService.UpdateEndpoint][google.cloud.aiplatform.v1.EndpointService.UpdateEndpoint].
+   * 
+ * + * + * .google.cloud.aiplatform.v1.DeployedModel deployed_model = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The deployedModel. + */ + com.google.cloud.aiplatform.v1.DeployedModel getDeployedModel(); + /** + * + * + *
+   * Required. The DeployedModel to be created within the Endpoint. Note that
+   * [Endpoint.traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] must be updated for the DeployedModel to start
+   * receiving traffic, either as part of this call, or via
+   * [EndpointService.UpdateEndpoint][google.cloud.aiplatform.v1.EndpointService.UpdateEndpoint].
+   * 
+ * + * + * .google.cloud.aiplatform.v1.DeployedModel deployed_model = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1.DeployedModelOrBuilder getDeployedModelOrBuilder(); + + /** + * + * + *
+   * A map from a DeployedModel's ID to the percentage of this Endpoint's
+   * traffic that should be forwarded to that DeployedModel.
+   * If this field is non-empty, then the Endpoint's
+   * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be overwritten with it.
+   * To refer to the ID of the just being deployed Model, a "0" should be used,
+   * and the actual ID of the new DeployedModel will be filled in its place by
+   * this method. The traffic percentage values must add up to 100.
+   * If this field is empty, then the Endpoint's
+   * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] is not updated.
+   * 
+ * + * map<string, int32> traffic_split = 3; + */ + int getTrafficSplitCount(); + /** + * + * + *
+   * A map from a DeployedModel's ID to the percentage of this Endpoint's
+   * traffic that should be forwarded to that DeployedModel.
+   * If this field is non-empty, then the Endpoint's
+   * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be overwritten with it.
+   * To refer to the ID of the just being deployed Model, a "0" should be used,
+   * and the actual ID of the new DeployedModel will be filled in its place by
+   * this method. The traffic percentage values must add up to 100.
+   * If this field is empty, then the Endpoint's
+   * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] is not updated.
+   * 
+ * + * map<string, int32> traffic_split = 3; + */ + boolean containsTrafficSplit(java.lang.String key); + /** Use {@link #getTrafficSplitMap()} instead. */ + @java.lang.Deprecated + java.util.Map getTrafficSplit(); + /** + * + * + *
+   * A map from a DeployedModel's ID to the percentage of this Endpoint's
+   * traffic that should be forwarded to that DeployedModel.
+   * If this field is non-empty, then the Endpoint's
+   * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be overwritten with it.
+   * To refer to the ID of the just being deployed Model, a "0" should be used,
+   * and the actual ID of the new DeployedModel will be filled in its place by
+   * this method. The traffic percentage values must add up to 100.
+   * If this field is empty, then the Endpoint's
+   * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] is not updated.
+   * 
+ * + * map<string, int32> traffic_split = 3; + */ + java.util.Map getTrafficSplitMap(); + /** + * + * + *
+   * A map from a DeployedModel's ID to the percentage of this Endpoint's
+   * traffic that should be forwarded to that DeployedModel.
+   * If this field is non-empty, then the Endpoint's
+   * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be overwritten with it.
+   * To refer to the ID of the just being deployed Model, a "0" should be used,
+   * and the actual ID of the new DeployedModel will be filled in its place by
+   * this method. The traffic percentage values must add up to 100.
+   * If this field is empty, then the Endpoint's
+   * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] is not updated.
+   * 
+ * + * map<string, int32> traffic_split = 3; + */ + int getTrafficSplitOrDefault(java.lang.String key, int defaultValue); + /** + * + * + *
+   * A map from a DeployedModel's ID to the percentage of this Endpoint's
+   * traffic that should be forwarded to that DeployedModel.
+   * If this field is non-empty, then the Endpoint's
+   * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be overwritten with it.
+   * To refer to the ID of the just being deployed Model, a "0" should be used,
+   * and the actual ID of the new DeployedModel will be filled in its place by
+   * this method. The traffic percentage values must add up to 100.
+   * If this field is empty, then the Endpoint's
+   * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] is not updated.
+   * 
+ * + * map<string, int32> traffic_split = 3; + */ + int getTrafficSplitOrThrow(java.lang.String key); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeployModelResponse.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeployModelResponse.java new file mode 100644 index 000000000..2aa110e34 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeployModelResponse.java @@ -0,0 +1,734 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/endpoint_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Response message for [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.DeployModelResponse} + */ +public final class DeployModelResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.DeployModelResponse) + DeployModelResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeployModelResponse.newBuilder() to construct. + private DeployModelResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeployModelResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeployModelResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeployModelResponse( + 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.v1.DeployedModel.Builder subBuilder = null; + if (deployedModel_ != null) { + subBuilder = deployedModel_.toBuilder(); + } + deployedModel_ = + input.readMessage( + com.google.cloud.aiplatform.v1.DeployedModel.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(deployedModel_); + deployedModel_ = 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.v1.EndpointServiceProto + .internal_static_google_cloud_aiplatform_v1_DeployModelResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.EndpointServiceProto + .internal_static_google_cloud_aiplatform_v1_DeployModelResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.DeployModelResponse.class, + com.google.cloud.aiplatform.v1.DeployModelResponse.Builder.class); + } + + public static final int DEPLOYED_MODEL_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1.DeployedModel deployedModel_; + /** + * + * + *
+   * The DeployedModel that had been deployed in the Endpoint.
+   * 
+ * + * .google.cloud.aiplatform.v1.DeployedModel deployed_model = 1; + * + * @return Whether the deployedModel field is set. + */ + @java.lang.Override + public boolean hasDeployedModel() { + return deployedModel_ != null; + } + /** + * + * + *
+   * The DeployedModel that had been deployed in the Endpoint.
+   * 
+ * + * .google.cloud.aiplatform.v1.DeployedModel deployed_model = 1; + * + * @return The deployedModel. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeployedModel getDeployedModel() { + return deployedModel_ == null + ? com.google.cloud.aiplatform.v1.DeployedModel.getDefaultInstance() + : deployedModel_; + } + /** + * + * + *
+   * The DeployedModel that had been deployed in the Endpoint.
+   * 
+ * + * .google.cloud.aiplatform.v1.DeployedModel deployed_model = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeployedModelOrBuilder getDeployedModelOrBuilder() { + return getDeployedModel(); + } + + 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 (deployedModel_ != null) { + output.writeMessage(1, getDeployedModel()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (deployedModel_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getDeployedModel()); + } + 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.v1.DeployModelResponse)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.DeployModelResponse other = + (com.google.cloud.aiplatform.v1.DeployModelResponse) obj; + + if (hasDeployedModel() != other.hasDeployedModel()) return false; + if (hasDeployedModel()) { + if (!getDeployedModel().equals(other.getDeployedModel())) 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 (hasDeployedModel()) { + hash = (37 * hash) + DEPLOYED_MODEL_FIELD_NUMBER; + hash = (53 * hash) + getDeployedModel().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.DeployModelResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DeployModelResponse 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.v1.DeployModelResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DeployModelResponse 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.v1.DeployModelResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DeployModelResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.DeployModelResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DeployModelResponse 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.v1.DeployModelResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DeployModelResponse 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.v1.DeployModelResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DeployModelResponse 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.v1.DeployModelResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.DeployModelResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.DeployModelResponse) + com.google.cloud.aiplatform.v1.DeployModelResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.EndpointServiceProto + .internal_static_google_cloud_aiplatform_v1_DeployModelResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.EndpointServiceProto + .internal_static_google_cloud_aiplatform_v1_DeployModelResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.DeployModelResponse.class, + com.google.cloud.aiplatform.v1.DeployModelResponse.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.DeployModelResponse.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 (deployedModelBuilder_ == null) { + deployedModel_ = null; + } else { + deployedModel_ = null; + deployedModelBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.EndpointServiceProto + .internal_static_google_cloud_aiplatform_v1_DeployModelResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeployModelResponse getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.DeployModelResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeployModelResponse build() { + com.google.cloud.aiplatform.v1.DeployModelResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeployModelResponse buildPartial() { + com.google.cloud.aiplatform.v1.DeployModelResponse result = + new com.google.cloud.aiplatform.v1.DeployModelResponse(this); + if (deployedModelBuilder_ == null) { + result.deployedModel_ = deployedModel_; + } else { + result.deployedModel_ = deployedModelBuilder_.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.v1.DeployModelResponse) { + return mergeFrom((com.google.cloud.aiplatform.v1.DeployModelResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.DeployModelResponse other) { + if (other == com.google.cloud.aiplatform.v1.DeployModelResponse.getDefaultInstance()) + return this; + if (other.hasDeployedModel()) { + mergeDeployedModel(other.getDeployedModel()); + } + 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.v1.DeployModelResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.DeployModelResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.aiplatform.v1.DeployedModel deployedModel_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.DeployedModel, + com.google.cloud.aiplatform.v1.DeployedModel.Builder, + com.google.cloud.aiplatform.v1.DeployedModelOrBuilder> + deployedModelBuilder_; + /** + * + * + *
+     * The DeployedModel that had been deployed in the Endpoint.
+     * 
+ * + * .google.cloud.aiplatform.v1.DeployedModel deployed_model = 1; + * + * @return Whether the deployedModel field is set. + */ + public boolean hasDeployedModel() { + return deployedModelBuilder_ != null || deployedModel_ != null; + } + /** + * + * + *
+     * The DeployedModel that had been deployed in the Endpoint.
+     * 
+ * + * .google.cloud.aiplatform.v1.DeployedModel deployed_model = 1; + * + * @return The deployedModel. + */ + public com.google.cloud.aiplatform.v1.DeployedModel getDeployedModel() { + if (deployedModelBuilder_ == null) { + return deployedModel_ == null + ? com.google.cloud.aiplatform.v1.DeployedModel.getDefaultInstance() + : deployedModel_; + } else { + return deployedModelBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The DeployedModel that had been deployed in the Endpoint.
+     * 
+ * + * .google.cloud.aiplatform.v1.DeployedModel deployed_model = 1; + */ + public Builder setDeployedModel(com.google.cloud.aiplatform.v1.DeployedModel value) { + if (deployedModelBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + deployedModel_ = value; + onChanged(); + } else { + deployedModelBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The DeployedModel that had been deployed in the Endpoint.
+     * 
+ * + * .google.cloud.aiplatform.v1.DeployedModel deployed_model = 1; + */ + public Builder setDeployedModel( + com.google.cloud.aiplatform.v1.DeployedModel.Builder builderForValue) { + if (deployedModelBuilder_ == null) { + deployedModel_ = builderForValue.build(); + onChanged(); + } else { + deployedModelBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The DeployedModel that had been deployed in the Endpoint.
+     * 
+ * + * .google.cloud.aiplatform.v1.DeployedModel deployed_model = 1; + */ + public Builder mergeDeployedModel(com.google.cloud.aiplatform.v1.DeployedModel value) { + if (deployedModelBuilder_ == null) { + if (deployedModel_ != null) { + deployedModel_ = + com.google.cloud.aiplatform.v1.DeployedModel.newBuilder(deployedModel_) + .mergeFrom(value) + .buildPartial(); + } else { + deployedModel_ = value; + } + onChanged(); + } else { + deployedModelBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The DeployedModel that had been deployed in the Endpoint.
+     * 
+ * + * .google.cloud.aiplatform.v1.DeployedModel deployed_model = 1; + */ + public Builder clearDeployedModel() { + if (deployedModelBuilder_ == null) { + deployedModel_ = null; + onChanged(); + } else { + deployedModel_ = null; + deployedModelBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The DeployedModel that had been deployed in the Endpoint.
+     * 
+ * + * .google.cloud.aiplatform.v1.DeployedModel deployed_model = 1; + */ + public com.google.cloud.aiplatform.v1.DeployedModel.Builder getDeployedModelBuilder() { + + onChanged(); + return getDeployedModelFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The DeployedModel that had been deployed in the Endpoint.
+     * 
+ * + * .google.cloud.aiplatform.v1.DeployedModel deployed_model = 1; + */ + public com.google.cloud.aiplatform.v1.DeployedModelOrBuilder getDeployedModelOrBuilder() { + if (deployedModelBuilder_ != null) { + return deployedModelBuilder_.getMessageOrBuilder(); + } else { + return deployedModel_ == null + ? com.google.cloud.aiplatform.v1.DeployedModel.getDefaultInstance() + : deployedModel_; + } + } + /** + * + * + *
+     * The DeployedModel that had been deployed in the Endpoint.
+     * 
+ * + * .google.cloud.aiplatform.v1.DeployedModel deployed_model = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.DeployedModel, + com.google.cloud.aiplatform.v1.DeployedModel.Builder, + com.google.cloud.aiplatform.v1.DeployedModelOrBuilder> + getDeployedModelFieldBuilder() { + if (deployedModelBuilder_ == null) { + deployedModelBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.DeployedModel, + com.google.cloud.aiplatform.v1.DeployedModel.Builder, + com.google.cloud.aiplatform.v1.DeployedModelOrBuilder>( + getDeployedModel(), getParentForChildren(), isClean()); + deployedModel_ = null; + } + return deployedModelBuilder_; + } + + @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.v1.DeployModelResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.DeployModelResponse) + private static final com.google.cloud.aiplatform.v1.DeployModelResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.DeployModelResponse(); + } + + public static com.google.cloud.aiplatform.v1.DeployModelResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeployModelResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeployModelResponse(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.v1.DeployModelResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeployModelResponseOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeployModelResponseOrBuilder.java new file mode 100644 index 000000000..c1439591c --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeployModelResponseOrBuilder.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/v1/endpoint_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface DeployModelResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.DeployModelResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The DeployedModel that had been deployed in the Endpoint.
+   * 
+ * + * .google.cloud.aiplatform.v1.DeployedModel deployed_model = 1; + * + * @return Whether the deployedModel field is set. + */ + boolean hasDeployedModel(); + /** + * + * + *
+   * The DeployedModel that had been deployed in the Endpoint.
+   * 
+ * + * .google.cloud.aiplatform.v1.DeployedModel deployed_model = 1; + * + * @return The deployedModel. + */ + com.google.cloud.aiplatform.v1.DeployedModel getDeployedModel(); + /** + * + * + *
+   * The DeployedModel that had been deployed in the Endpoint.
+   * 
+ * + * .google.cloud.aiplatform.v1.DeployedModel deployed_model = 1; + */ + com.google.cloud.aiplatform.v1.DeployedModelOrBuilder getDeployedModelOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeployedModel.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeployedModel.java new file mode 100644 index 000000000..0ab666b42 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeployedModel.java @@ -0,0 +1,2474 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/endpoint.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * A deployment of a Model. Endpoints contain one or more DeployedModels.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.DeployedModel} + */ +public final class DeployedModel extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.DeployedModel) + DeployedModelOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeployedModel.newBuilder() to construct. + private DeployedModel(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeployedModel() { + id_ = ""; + model_ = ""; + displayName_ = ""; + serviceAccount_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeployedModel(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeployedModel( + 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(); + + model_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 50: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 58: + { + com.google.cloud.aiplatform.v1.DedicatedResources.Builder subBuilder = null; + if (predictionResourcesCase_ == 7) { + subBuilder = + ((com.google.cloud.aiplatform.v1.DedicatedResources) predictionResources_) + .toBuilder(); + } + predictionResources_ = + input.readMessage( + com.google.cloud.aiplatform.v1.DedicatedResources.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.aiplatform.v1.DedicatedResources) predictionResources_); + predictionResources_ = subBuilder.buildPartial(); + } + predictionResourcesCase_ = 7; + break; + } + case 66: + { + com.google.cloud.aiplatform.v1.AutomaticResources.Builder subBuilder = null; + if (predictionResourcesCase_ == 8) { + subBuilder = + ((com.google.cloud.aiplatform.v1.AutomaticResources) predictionResources_) + .toBuilder(); + } + predictionResources_ = + input.readMessage( + com.google.cloud.aiplatform.v1.AutomaticResources.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.aiplatform.v1.AutomaticResources) predictionResources_); + predictionResources_ = subBuilder.buildPartial(); + } + predictionResourcesCase_ = 8; + break; + } + case 90: + { + java.lang.String s = input.readStringRequireUtf8(); + + serviceAccount_ = s; + break; + } + case 104: + { + enableAccessLogging_ = input.readBool(); + break; + } + case 120: + { + disableContainerLogging_ = 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.v1.EndpointProto + .internal_static_google_cloud_aiplatform_v1_DeployedModel_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.EndpointProto + .internal_static_google_cloud_aiplatform_v1_DeployedModel_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.DeployedModel.class, + com.google.cloud.aiplatform.v1.DeployedModel.Builder.class); + } + + private int predictionResourcesCase_ = 0; + private java.lang.Object predictionResources_; + + public enum PredictionResourcesCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + DEDICATED_RESOURCES(7), + AUTOMATIC_RESOURCES(8), + PREDICTIONRESOURCES_NOT_SET(0); + private final int value; + + private PredictionResourcesCase(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 PredictionResourcesCase valueOf(int value) { + return forNumber(value); + } + + public static PredictionResourcesCase forNumber(int value) { + switch (value) { + case 7: + return DEDICATED_RESOURCES; + case 8: + return AUTOMATIC_RESOURCES; + case 0: + return PREDICTIONRESOURCES_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public PredictionResourcesCase getPredictionResourcesCase() { + return PredictionResourcesCase.forNumber(predictionResourcesCase_); + } + + public static final int DEDICATED_RESOURCES_FIELD_NUMBER = 7; + /** + * + * + *
+   * A description of resources that are dedicated to the DeployedModel, and
+   * that need a higher degree of manual configuration.
+   * 
+ * + * .google.cloud.aiplatform.v1.DedicatedResources dedicated_resources = 7; + * + * @return Whether the dedicatedResources field is set. + */ + @java.lang.Override + public boolean hasDedicatedResources() { + return predictionResourcesCase_ == 7; + } + /** + * + * + *
+   * A description of resources that are dedicated to the DeployedModel, and
+   * that need a higher degree of manual configuration.
+   * 
+ * + * .google.cloud.aiplatform.v1.DedicatedResources dedicated_resources = 7; + * + * @return The dedicatedResources. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.DedicatedResources getDedicatedResources() { + if (predictionResourcesCase_ == 7) { + return (com.google.cloud.aiplatform.v1.DedicatedResources) predictionResources_; + } + return com.google.cloud.aiplatform.v1.DedicatedResources.getDefaultInstance(); + } + /** + * + * + *
+   * A description of resources that are dedicated to the DeployedModel, and
+   * that need a higher degree of manual configuration.
+   * 
+ * + * .google.cloud.aiplatform.v1.DedicatedResources dedicated_resources = 7; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.DedicatedResourcesOrBuilder + getDedicatedResourcesOrBuilder() { + if (predictionResourcesCase_ == 7) { + return (com.google.cloud.aiplatform.v1.DedicatedResources) predictionResources_; + } + return com.google.cloud.aiplatform.v1.DedicatedResources.getDefaultInstance(); + } + + public static final int AUTOMATIC_RESOURCES_FIELD_NUMBER = 8; + /** + * + * + *
+   * A description of resources that to large degree are decided by AI
+   * Platform, and require only a modest additional configuration.
+   * 
+ * + * .google.cloud.aiplatform.v1.AutomaticResources automatic_resources = 8; + * + * @return Whether the automaticResources field is set. + */ + @java.lang.Override + public boolean hasAutomaticResources() { + return predictionResourcesCase_ == 8; + } + /** + * + * + *
+   * A description of resources that to large degree are decided by AI
+   * Platform, and require only a modest additional configuration.
+   * 
+ * + * .google.cloud.aiplatform.v1.AutomaticResources automatic_resources = 8; + * + * @return The automaticResources. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.AutomaticResources getAutomaticResources() { + if (predictionResourcesCase_ == 8) { + return (com.google.cloud.aiplatform.v1.AutomaticResources) predictionResources_; + } + return com.google.cloud.aiplatform.v1.AutomaticResources.getDefaultInstance(); + } + /** + * + * + *
+   * A description of resources that to large degree are decided by AI
+   * Platform, and require only a modest additional configuration.
+   * 
+ * + * .google.cloud.aiplatform.v1.AutomaticResources automatic_resources = 8; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.AutomaticResourcesOrBuilder + getAutomaticResourcesOrBuilder() { + if (predictionResourcesCase_ == 8) { + return (com.google.cloud.aiplatform.v1.AutomaticResources) predictionResources_; + } + return com.google.cloud.aiplatform.v1.AutomaticResources.getDefaultInstance(); + } + + public static final int ID_FIELD_NUMBER = 1; + private volatile java.lang.Object id_; + /** + * + * + *
+   * Output only. The ID of the DeployedModel.
+   * 
+ * + * string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + /** + * + * + *
+   * Output only. The ID of the DeployedModel.
+   * 
+ * + * string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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 MODEL_FIELD_NUMBER = 2; + private volatile java.lang.Object model_; + /** + * + * + *
+   * Required. The name of the Model that this is the deployment of. Note that the Model
+   * may be in a different location than the DeployedModel's Endpoint.
+   * 
+ * + * + * string model = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The model. + */ + @java.lang.Override + public java.lang.String getModel() { + java.lang.Object ref = model_; + 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(); + model_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the Model that this is the deployment of. Note that the Model
+   * may be in a different location than the DeployedModel's Endpoint.
+   * 
+ * + * + * string model = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for model. + */ + @java.lang.Override + public com.google.protobuf.ByteString getModelBytes() { + java.lang.Object ref = model_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + model_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 3; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * The display name of the DeployedModel. If not provided upon creation,
+   * the Model's display_name is used.
+   * 
+ * + * string display_name = 3; + * + * @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 DeployedModel. If not provided upon creation,
+   * the Model's display_name is used.
+   * 
+ * + * string display_name = 3; + * + * @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 CREATE_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. Timestamp when the DeployedModel was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. Timestamp when the DeployedModel was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. Timestamp when the DeployedModel was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int SERVICE_ACCOUNT_FIELD_NUMBER = 11; + private volatile java.lang.Object serviceAccount_; + /** + * + * + *
+   * The service account that the DeployedModel's container runs as. Specify the
+   * email address of the service account. If this service account is not
+   * specified, the container runs as a service account that doesn't have access
+   * to the resource project.
+   * Users deploying the Model must have the `iam.serviceAccounts.actAs`
+   * permission on this service account.
+   * 
+ * + * string service_account = 11; + * + * @return The serviceAccount. + */ + @java.lang.Override + public java.lang.String getServiceAccount() { + java.lang.Object ref = serviceAccount_; + 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(); + serviceAccount_ = s; + return s; + } + } + /** + * + * + *
+   * The service account that the DeployedModel's container runs as. Specify the
+   * email address of the service account. If this service account is not
+   * specified, the container runs as a service account that doesn't have access
+   * to the resource project.
+   * Users deploying the Model must have the `iam.serviceAccounts.actAs`
+   * permission on this service account.
+   * 
+ * + * string service_account = 11; + * + * @return The bytes for serviceAccount. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServiceAccountBytes() { + java.lang.Object ref = serviceAccount_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceAccount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISABLE_CONTAINER_LOGGING_FIELD_NUMBER = 15; + private boolean disableContainerLogging_; + /** + * + * + *
+   * For custom-trained Models and AutoML Tabular Models, the container of the
+   * DeployedModel instances will send `stderr` and `stdout` streams to
+   * Stackdriver Logging by default. Please note that the logs incur cost,
+   * which are subject to [Cloud Logging
+   * pricing](https://cloud.google.com/stackdriver/pricing).
+   * User can disable container logging by setting this flag to true.
+   * 
+ * + * bool disable_container_logging = 15; + * + * @return The disableContainerLogging. + */ + @java.lang.Override + public boolean getDisableContainerLogging() { + return disableContainerLogging_; + } + + public static final int ENABLE_ACCESS_LOGGING_FIELD_NUMBER = 13; + private boolean enableAccessLogging_; + /** + * + * + *
+   * These logs are like standard server access logs, containing
+   * information like timestamp and latency for each prediction request.
+   * Note that Stackdriver logs may incur a cost, especially if your project
+   * receives prediction requests at a high queries per second rate (QPS).
+   * Estimate your costs before enabling this option.
+   * 
+ * + * bool enable_access_logging = 13; + * + * @return The enableAccessLogging. + */ + @java.lang.Override + public boolean getEnableAccessLogging() { + return enableAccessLogging_; + } + + 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 (!getModelBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, model_); + } + if (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, displayName_); + } + if (createTime_ != null) { + output.writeMessage(6, getCreateTime()); + } + if (predictionResourcesCase_ == 7) { + output.writeMessage( + 7, (com.google.cloud.aiplatform.v1.DedicatedResources) predictionResources_); + } + if (predictionResourcesCase_ == 8) { + output.writeMessage( + 8, (com.google.cloud.aiplatform.v1.AutomaticResources) predictionResources_); + } + if (!getServiceAccountBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 11, serviceAccount_); + } + if (enableAccessLogging_ != false) { + output.writeBool(13, enableAccessLogging_); + } + if (disableContainerLogging_ != false) { + output.writeBool(15, disableContainerLogging_); + } + 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 (!getModelBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, model_); + } + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, displayName_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getCreateTime()); + } + if (predictionResourcesCase_ == 7) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, (com.google.cloud.aiplatform.v1.DedicatedResources) predictionResources_); + } + if (predictionResourcesCase_ == 8) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 8, (com.google.cloud.aiplatform.v1.AutomaticResources) predictionResources_); + } + if (!getServiceAccountBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, serviceAccount_); + } + if (enableAccessLogging_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(13, enableAccessLogging_); + } + if (disableContainerLogging_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(15, disableContainerLogging_); + } + 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.v1.DeployedModel)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.DeployedModel other = + (com.google.cloud.aiplatform.v1.DeployedModel) obj; + + if (!getId().equals(other.getId())) return false; + if (!getModel().equals(other.getModel())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (!getServiceAccount().equals(other.getServiceAccount())) return false; + if (getDisableContainerLogging() != other.getDisableContainerLogging()) return false; + if (getEnableAccessLogging() != other.getEnableAccessLogging()) return false; + if (!getPredictionResourcesCase().equals(other.getPredictionResourcesCase())) return false; + switch (predictionResourcesCase_) { + case 7: + if (!getDedicatedResources().equals(other.getDedicatedResources())) return false; + break; + case 8: + if (!getAutomaticResources().equals(other.getAutomaticResources())) 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) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (37 * hash) + MODEL_FIELD_NUMBER; + hash = (53 * hash) + getModel().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + hash = (37 * hash) + SERVICE_ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getServiceAccount().hashCode(); + hash = (37 * hash) + DISABLE_CONTAINER_LOGGING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDisableContainerLogging()); + hash = (37 * hash) + ENABLE_ACCESS_LOGGING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableAccessLogging()); + switch (predictionResourcesCase_) { + case 7: + hash = (37 * hash) + DEDICATED_RESOURCES_FIELD_NUMBER; + hash = (53 * hash) + getDedicatedResources().hashCode(); + break; + case 8: + hash = (37 * hash) + AUTOMATIC_RESOURCES_FIELD_NUMBER; + hash = (53 * hash) + getAutomaticResources().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.DeployedModel parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DeployedModel 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.v1.DeployedModel parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DeployedModel 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.v1.DeployedModel parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DeployedModel parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.DeployedModel parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DeployedModel 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.v1.DeployedModel parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DeployedModel 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.v1.DeployedModel parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DeployedModel 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.v1.DeployedModel 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 deployment of a Model. Endpoints contain one or more DeployedModels.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.DeployedModel} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.DeployedModel) + com.google.cloud.aiplatform.v1.DeployedModelOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.EndpointProto + .internal_static_google_cloud_aiplatform_v1_DeployedModel_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.EndpointProto + .internal_static_google_cloud_aiplatform_v1_DeployedModel_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.DeployedModel.class, + com.google.cloud.aiplatform.v1.DeployedModel.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.DeployedModel.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_ = ""; + + model_ = ""; + + displayName_ = ""; + + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + serviceAccount_ = ""; + + disableContainerLogging_ = false; + + enableAccessLogging_ = false; + + predictionResourcesCase_ = 0; + predictionResources_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.EndpointProto + .internal_static_google_cloud_aiplatform_v1_DeployedModel_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeployedModel getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.DeployedModel.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeployedModel build() { + com.google.cloud.aiplatform.v1.DeployedModel result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeployedModel buildPartial() { + com.google.cloud.aiplatform.v1.DeployedModel result = + new com.google.cloud.aiplatform.v1.DeployedModel(this); + if (predictionResourcesCase_ == 7) { + if (dedicatedResourcesBuilder_ == null) { + result.predictionResources_ = predictionResources_; + } else { + result.predictionResources_ = dedicatedResourcesBuilder_.build(); + } + } + if (predictionResourcesCase_ == 8) { + if (automaticResourcesBuilder_ == null) { + result.predictionResources_ = predictionResources_; + } else { + result.predictionResources_ = automaticResourcesBuilder_.build(); + } + } + result.id_ = id_; + result.model_ = model_; + result.displayName_ = displayName_; + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + result.serviceAccount_ = serviceAccount_; + result.disableContainerLogging_ = disableContainerLogging_; + result.enableAccessLogging_ = enableAccessLogging_; + result.predictionResourcesCase_ = predictionResourcesCase_; + 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.v1.DeployedModel) { + return mergeFrom((com.google.cloud.aiplatform.v1.DeployedModel) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.DeployedModel other) { + if (other == com.google.cloud.aiplatform.v1.DeployedModel.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + onChanged(); + } + if (!other.getModel().isEmpty()) { + model_ = other.model_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (!other.getServiceAccount().isEmpty()) { + serviceAccount_ = other.serviceAccount_; + onChanged(); + } + if (other.getDisableContainerLogging() != false) { + setDisableContainerLogging(other.getDisableContainerLogging()); + } + if (other.getEnableAccessLogging() != false) { + setEnableAccessLogging(other.getEnableAccessLogging()); + } + switch (other.getPredictionResourcesCase()) { + case DEDICATED_RESOURCES: + { + mergeDedicatedResources(other.getDedicatedResources()); + break; + } + case AUTOMATIC_RESOURCES: + { + mergeAutomaticResources(other.getAutomaticResources()); + break; + } + case PREDICTIONRESOURCES_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.v1.DeployedModel parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.aiplatform.v1.DeployedModel) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int predictionResourcesCase_ = 0; + private java.lang.Object predictionResources_; + + public PredictionResourcesCase getPredictionResourcesCase() { + return PredictionResourcesCase.forNumber(predictionResourcesCase_); + } + + public Builder clearPredictionResources() { + predictionResourcesCase_ = 0; + predictionResources_ = null; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.DedicatedResources, + com.google.cloud.aiplatform.v1.DedicatedResources.Builder, + com.google.cloud.aiplatform.v1.DedicatedResourcesOrBuilder> + dedicatedResourcesBuilder_; + /** + * + * + *
+     * A description of resources that are dedicated to the DeployedModel, and
+     * that need a higher degree of manual configuration.
+     * 
+ * + * .google.cloud.aiplatform.v1.DedicatedResources dedicated_resources = 7; + * + * @return Whether the dedicatedResources field is set. + */ + @java.lang.Override + public boolean hasDedicatedResources() { + return predictionResourcesCase_ == 7; + } + /** + * + * + *
+     * A description of resources that are dedicated to the DeployedModel, and
+     * that need a higher degree of manual configuration.
+     * 
+ * + * .google.cloud.aiplatform.v1.DedicatedResources dedicated_resources = 7; + * + * @return The dedicatedResources. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.DedicatedResources getDedicatedResources() { + if (dedicatedResourcesBuilder_ == null) { + if (predictionResourcesCase_ == 7) { + return (com.google.cloud.aiplatform.v1.DedicatedResources) predictionResources_; + } + return com.google.cloud.aiplatform.v1.DedicatedResources.getDefaultInstance(); + } else { + if (predictionResourcesCase_ == 7) { + return dedicatedResourcesBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1.DedicatedResources.getDefaultInstance(); + } + } + /** + * + * + *
+     * A description of resources that are dedicated to the DeployedModel, and
+     * that need a higher degree of manual configuration.
+     * 
+ * + * .google.cloud.aiplatform.v1.DedicatedResources dedicated_resources = 7; + */ + public Builder setDedicatedResources(com.google.cloud.aiplatform.v1.DedicatedResources value) { + if (dedicatedResourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + predictionResources_ = value; + onChanged(); + } else { + dedicatedResourcesBuilder_.setMessage(value); + } + predictionResourcesCase_ = 7; + return this; + } + /** + * + * + *
+     * A description of resources that are dedicated to the DeployedModel, and
+     * that need a higher degree of manual configuration.
+     * 
+ * + * .google.cloud.aiplatform.v1.DedicatedResources dedicated_resources = 7; + */ + public Builder setDedicatedResources( + com.google.cloud.aiplatform.v1.DedicatedResources.Builder builderForValue) { + if (dedicatedResourcesBuilder_ == null) { + predictionResources_ = builderForValue.build(); + onChanged(); + } else { + dedicatedResourcesBuilder_.setMessage(builderForValue.build()); + } + predictionResourcesCase_ = 7; + return this; + } + /** + * + * + *
+     * A description of resources that are dedicated to the DeployedModel, and
+     * that need a higher degree of manual configuration.
+     * 
+ * + * .google.cloud.aiplatform.v1.DedicatedResources dedicated_resources = 7; + */ + public Builder mergeDedicatedResources( + com.google.cloud.aiplatform.v1.DedicatedResources value) { + if (dedicatedResourcesBuilder_ == null) { + if (predictionResourcesCase_ == 7 + && predictionResources_ + != com.google.cloud.aiplatform.v1.DedicatedResources.getDefaultInstance()) { + predictionResources_ = + com.google.cloud.aiplatform.v1.DedicatedResources.newBuilder( + (com.google.cloud.aiplatform.v1.DedicatedResources) predictionResources_) + .mergeFrom(value) + .buildPartial(); + } else { + predictionResources_ = value; + } + onChanged(); + } else { + if (predictionResourcesCase_ == 7) { + dedicatedResourcesBuilder_.mergeFrom(value); + } + dedicatedResourcesBuilder_.setMessage(value); + } + predictionResourcesCase_ = 7; + return this; + } + /** + * + * + *
+     * A description of resources that are dedicated to the DeployedModel, and
+     * that need a higher degree of manual configuration.
+     * 
+ * + * .google.cloud.aiplatform.v1.DedicatedResources dedicated_resources = 7; + */ + public Builder clearDedicatedResources() { + if (dedicatedResourcesBuilder_ == null) { + if (predictionResourcesCase_ == 7) { + predictionResourcesCase_ = 0; + predictionResources_ = null; + onChanged(); + } + } else { + if (predictionResourcesCase_ == 7) { + predictionResourcesCase_ = 0; + predictionResources_ = null; + } + dedicatedResourcesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A description of resources that are dedicated to the DeployedModel, and
+     * that need a higher degree of manual configuration.
+     * 
+ * + * .google.cloud.aiplatform.v1.DedicatedResources dedicated_resources = 7; + */ + public com.google.cloud.aiplatform.v1.DedicatedResources.Builder + getDedicatedResourcesBuilder() { + return getDedicatedResourcesFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * A description of resources that are dedicated to the DeployedModel, and
+     * that need a higher degree of manual configuration.
+     * 
+ * + * .google.cloud.aiplatform.v1.DedicatedResources dedicated_resources = 7; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.DedicatedResourcesOrBuilder + getDedicatedResourcesOrBuilder() { + if ((predictionResourcesCase_ == 7) && (dedicatedResourcesBuilder_ != null)) { + return dedicatedResourcesBuilder_.getMessageOrBuilder(); + } else { + if (predictionResourcesCase_ == 7) { + return (com.google.cloud.aiplatform.v1.DedicatedResources) predictionResources_; + } + return com.google.cloud.aiplatform.v1.DedicatedResources.getDefaultInstance(); + } + } + /** + * + * + *
+     * A description of resources that are dedicated to the DeployedModel, and
+     * that need a higher degree of manual configuration.
+     * 
+ * + * .google.cloud.aiplatform.v1.DedicatedResources dedicated_resources = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.DedicatedResources, + com.google.cloud.aiplatform.v1.DedicatedResources.Builder, + com.google.cloud.aiplatform.v1.DedicatedResourcesOrBuilder> + getDedicatedResourcesFieldBuilder() { + if (dedicatedResourcesBuilder_ == null) { + if (!(predictionResourcesCase_ == 7)) { + predictionResources_ = + com.google.cloud.aiplatform.v1.DedicatedResources.getDefaultInstance(); + } + dedicatedResourcesBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.DedicatedResources, + com.google.cloud.aiplatform.v1.DedicatedResources.Builder, + com.google.cloud.aiplatform.v1.DedicatedResourcesOrBuilder>( + (com.google.cloud.aiplatform.v1.DedicatedResources) predictionResources_, + getParentForChildren(), + isClean()); + predictionResources_ = null; + } + predictionResourcesCase_ = 7; + onChanged(); + ; + return dedicatedResourcesBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.AutomaticResources, + com.google.cloud.aiplatform.v1.AutomaticResources.Builder, + com.google.cloud.aiplatform.v1.AutomaticResourcesOrBuilder> + automaticResourcesBuilder_; + /** + * + * + *
+     * A description of resources that to large degree are decided by AI
+     * Platform, and require only a modest additional configuration.
+     * 
+ * + * .google.cloud.aiplatform.v1.AutomaticResources automatic_resources = 8; + * + * @return Whether the automaticResources field is set. + */ + @java.lang.Override + public boolean hasAutomaticResources() { + return predictionResourcesCase_ == 8; + } + /** + * + * + *
+     * A description of resources that to large degree are decided by AI
+     * Platform, and require only a modest additional configuration.
+     * 
+ * + * .google.cloud.aiplatform.v1.AutomaticResources automatic_resources = 8; + * + * @return The automaticResources. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.AutomaticResources getAutomaticResources() { + if (automaticResourcesBuilder_ == null) { + if (predictionResourcesCase_ == 8) { + return (com.google.cloud.aiplatform.v1.AutomaticResources) predictionResources_; + } + return com.google.cloud.aiplatform.v1.AutomaticResources.getDefaultInstance(); + } else { + if (predictionResourcesCase_ == 8) { + return automaticResourcesBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1.AutomaticResources.getDefaultInstance(); + } + } + /** + * + * + *
+     * A description of resources that to large degree are decided by AI
+     * Platform, and require only a modest additional configuration.
+     * 
+ * + * .google.cloud.aiplatform.v1.AutomaticResources automatic_resources = 8; + */ + public Builder setAutomaticResources(com.google.cloud.aiplatform.v1.AutomaticResources value) { + if (automaticResourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + predictionResources_ = value; + onChanged(); + } else { + automaticResourcesBuilder_.setMessage(value); + } + predictionResourcesCase_ = 8; + return this; + } + /** + * + * + *
+     * A description of resources that to large degree are decided by AI
+     * Platform, and require only a modest additional configuration.
+     * 
+ * + * .google.cloud.aiplatform.v1.AutomaticResources automatic_resources = 8; + */ + public Builder setAutomaticResources( + com.google.cloud.aiplatform.v1.AutomaticResources.Builder builderForValue) { + if (automaticResourcesBuilder_ == null) { + predictionResources_ = builderForValue.build(); + onChanged(); + } else { + automaticResourcesBuilder_.setMessage(builderForValue.build()); + } + predictionResourcesCase_ = 8; + return this; + } + /** + * + * + *
+     * A description of resources that to large degree are decided by AI
+     * Platform, and require only a modest additional configuration.
+     * 
+ * + * .google.cloud.aiplatform.v1.AutomaticResources automatic_resources = 8; + */ + public Builder mergeAutomaticResources( + com.google.cloud.aiplatform.v1.AutomaticResources value) { + if (automaticResourcesBuilder_ == null) { + if (predictionResourcesCase_ == 8 + && predictionResources_ + != com.google.cloud.aiplatform.v1.AutomaticResources.getDefaultInstance()) { + predictionResources_ = + com.google.cloud.aiplatform.v1.AutomaticResources.newBuilder( + (com.google.cloud.aiplatform.v1.AutomaticResources) predictionResources_) + .mergeFrom(value) + .buildPartial(); + } else { + predictionResources_ = value; + } + onChanged(); + } else { + if (predictionResourcesCase_ == 8) { + automaticResourcesBuilder_.mergeFrom(value); + } + automaticResourcesBuilder_.setMessage(value); + } + predictionResourcesCase_ = 8; + return this; + } + /** + * + * + *
+     * A description of resources that to large degree are decided by AI
+     * Platform, and require only a modest additional configuration.
+     * 
+ * + * .google.cloud.aiplatform.v1.AutomaticResources automatic_resources = 8; + */ + public Builder clearAutomaticResources() { + if (automaticResourcesBuilder_ == null) { + if (predictionResourcesCase_ == 8) { + predictionResourcesCase_ = 0; + predictionResources_ = null; + onChanged(); + } + } else { + if (predictionResourcesCase_ == 8) { + predictionResourcesCase_ = 0; + predictionResources_ = null; + } + automaticResourcesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A description of resources that to large degree are decided by AI
+     * Platform, and require only a modest additional configuration.
+     * 
+ * + * .google.cloud.aiplatform.v1.AutomaticResources automatic_resources = 8; + */ + public com.google.cloud.aiplatform.v1.AutomaticResources.Builder + getAutomaticResourcesBuilder() { + return getAutomaticResourcesFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * A description of resources that to large degree are decided by AI
+     * Platform, and require only a modest additional configuration.
+     * 
+ * + * .google.cloud.aiplatform.v1.AutomaticResources automatic_resources = 8; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.AutomaticResourcesOrBuilder + getAutomaticResourcesOrBuilder() { + if ((predictionResourcesCase_ == 8) && (automaticResourcesBuilder_ != null)) { + return automaticResourcesBuilder_.getMessageOrBuilder(); + } else { + if (predictionResourcesCase_ == 8) { + return (com.google.cloud.aiplatform.v1.AutomaticResources) predictionResources_; + } + return com.google.cloud.aiplatform.v1.AutomaticResources.getDefaultInstance(); + } + } + /** + * + * + *
+     * A description of resources that to large degree are decided by AI
+     * Platform, and require only a modest additional configuration.
+     * 
+ * + * .google.cloud.aiplatform.v1.AutomaticResources automatic_resources = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.AutomaticResources, + com.google.cloud.aiplatform.v1.AutomaticResources.Builder, + com.google.cloud.aiplatform.v1.AutomaticResourcesOrBuilder> + getAutomaticResourcesFieldBuilder() { + if (automaticResourcesBuilder_ == null) { + if (!(predictionResourcesCase_ == 8)) { + predictionResources_ = + com.google.cloud.aiplatform.v1.AutomaticResources.getDefaultInstance(); + } + automaticResourcesBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.AutomaticResources, + com.google.cloud.aiplatform.v1.AutomaticResources.Builder, + com.google.cloud.aiplatform.v1.AutomaticResourcesOrBuilder>( + (com.google.cloud.aiplatform.v1.AutomaticResources) predictionResources_, + getParentForChildren(), + isClean()); + predictionResources_ = null; + } + predictionResourcesCase_ = 8; + onChanged(); + ; + return automaticResourcesBuilder_; + } + + private java.lang.Object id_ = ""; + /** + * + * + *
+     * Output only. The ID of the DeployedModel.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + /** + * + * + *
+     * Output only. The ID of the DeployedModel.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + /** + * + * + *
+     * Output only. The ID of the DeployedModel.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + /** + * + * + *
+     * Output only. The ID of the DeployedModel.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearId() { + + id_ = getDefaultInstance().getId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The ID of the DeployedModel.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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 model_ = ""; + /** + * + * + *
+     * Required. The name of the Model that this is the deployment of. Note that the Model
+     * may be in a different location than the DeployedModel's Endpoint.
+     * 
+ * + * + * string model = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The model. + */ + public java.lang.String getModel() { + java.lang.Object ref = model_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + model_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the Model that this is the deployment of. Note that the Model
+     * may be in a different location than the DeployedModel's Endpoint.
+     * 
+ * + * + * string model = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for model. + */ + public com.google.protobuf.ByteString getModelBytes() { + java.lang.Object ref = model_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + model_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the Model that this is the deployment of. Note that the Model
+     * may be in a different location than the DeployedModel's Endpoint.
+     * 
+ * + * + * string model = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The model to set. + * @return This builder for chaining. + */ + public Builder setModel(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + model_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the Model that this is the deployment of. Note that the Model
+     * may be in a different location than the DeployedModel's Endpoint.
+     * 
+ * + * + * string model = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearModel() { + + model_ = getDefaultInstance().getModel(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the Model that this is the deployment of. Note that the Model
+     * may be in a different location than the DeployedModel's Endpoint.
+     * 
+ * + * + * string model = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for model to set. + * @return This builder for chaining. + */ + public Builder setModelBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + model_ = value; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * The display name of the DeployedModel. If not provided upon creation,
+     * the Model's display_name is used.
+     * 
+ * + * string display_name = 3; + * + * @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 DeployedModel. If not provided upon creation,
+     * the Model's display_name is used.
+     * 
+ * + * string display_name = 3; + * + * @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 DeployedModel. If not provided upon creation,
+     * the Model's display_name is used.
+     * 
+ * + * string display_name = 3; + * + * @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 DeployedModel. If not provided upon creation,
+     * the Model's display_name is used.
+     * 
+ * + * string display_name = 3; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The display name of the DeployedModel. If not provided upon creation,
+     * the Model's display_name is used.
+     * 
+ * + * string display_name = 3; + * + * @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.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. Timestamp when the DeployedModel was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * Output only. Timestamp when the DeployedModel was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Timestamp when the DeployedModel was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when the DeployedModel was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when the DeployedModel was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when the DeployedModel was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when the DeployedModel was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Timestamp when the DeployedModel was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. Timestamp when the DeployedModel was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private java.lang.Object serviceAccount_ = ""; + /** + * + * + *
+     * The service account that the DeployedModel's container runs as. Specify the
+     * email address of the service account. If this service account is not
+     * specified, the container runs as a service account that doesn't have access
+     * to the resource project.
+     * Users deploying the Model must have the `iam.serviceAccounts.actAs`
+     * permission on this service account.
+     * 
+ * + * string service_account = 11; + * + * @return The serviceAccount. + */ + public java.lang.String getServiceAccount() { + java.lang.Object ref = serviceAccount_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceAccount_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The service account that the DeployedModel's container runs as. Specify the
+     * email address of the service account. If this service account is not
+     * specified, the container runs as a service account that doesn't have access
+     * to the resource project.
+     * Users deploying the Model must have the `iam.serviceAccounts.actAs`
+     * permission on this service account.
+     * 
+ * + * string service_account = 11; + * + * @return The bytes for serviceAccount. + */ + public com.google.protobuf.ByteString getServiceAccountBytes() { + java.lang.Object ref = serviceAccount_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceAccount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The service account that the DeployedModel's container runs as. Specify the
+     * email address of the service account. If this service account is not
+     * specified, the container runs as a service account that doesn't have access
+     * to the resource project.
+     * Users deploying the Model must have the `iam.serviceAccounts.actAs`
+     * permission on this service account.
+     * 
+ * + * string service_account = 11; + * + * @param value The serviceAccount to set. + * @return This builder for chaining. + */ + public Builder setServiceAccount(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + serviceAccount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The service account that the DeployedModel's container runs as. Specify the
+     * email address of the service account. If this service account is not
+     * specified, the container runs as a service account that doesn't have access
+     * to the resource project.
+     * Users deploying the Model must have the `iam.serviceAccounts.actAs`
+     * permission on this service account.
+     * 
+ * + * string service_account = 11; + * + * @return This builder for chaining. + */ + public Builder clearServiceAccount() { + + serviceAccount_ = getDefaultInstance().getServiceAccount(); + onChanged(); + return this; + } + /** + * + * + *
+     * The service account that the DeployedModel's container runs as. Specify the
+     * email address of the service account. If this service account is not
+     * specified, the container runs as a service account that doesn't have access
+     * to the resource project.
+     * Users deploying the Model must have the `iam.serviceAccounts.actAs`
+     * permission on this service account.
+     * 
+ * + * string service_account = 11; + * + * @param value The bytes for serviceAccount to set. + * @return This builder for chaining. + */ + public Builder setServiceAccountBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + serviceAccount_ = value; + onChanged(); + return this; + } + + private boolean disableContainerLogging_; + /** + * + * + *
+     * For custom-trained Models and AutoML Tabular Models, the container of the
+     * DeployedModel instances will send `stderr` and `stdout` streams to
+     * Stackdriver Logging by default. Please note that the logs incur cost,
+     * which are subject to [Cloud Logging
+     * pricing](https://cloud.google.com/stackdriver/pricing).
+     * User can disable container logging by setting this flag to true.
+     * 
+ * + * bool disable_container_logging = 15; + * + * @return The disableContainerLogging. + */ + @java.lang.Override + public boolean getDisableContainerLogging() { + return disableContainerLogging_; + } + /** + * + * + *
+     * For custom-trained Models and AutoML Tabular Models, the container of the
+     * DeployedModel instances will send `stderr` and `stdout` streams to
+     * Stackdriver Logging by default. Please note that the logs incur cost,
+     * which are subject to [Cloud Logging
+     * pricing](https://cloud.google.com/stackdriver/pricing).
+     * User can disable container logging by setting this flag to true.
+     * 
+ * + * bool disable_container_logging = 15; + * + * @param value The disableContainerLogging to set. + * @return This builder for chaining. + */ + public Builder setDisableContainerLogging(boolean value) { + + disableContainerLogging_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * For custom-trained Models and AutoML Tabular Models, the container of the
+     * DeployedModel instances will send `stderr` and `stdout` streams to
+     * Stackdriver Logging by default. Please note that the logs incur cost,
+     * which are subject to [Cloud Logging
+     * pricing](https://cloud.google.com/stackdriver/pricing).
+     * User can disable container logging by setting this flag to true.
+     * 
+ * + * bool disable_container_logging = 15; + * + * @return This builder for chaining. + */ + public Builder clearDisableContainerLogging() { + + disableContainerLogging_ = false; + onChanged(); + return this; + } + + private boolean enableAccessLogging_; + /** + * + * + *
+     * These logs are like standard server access logs, containing
+     * information like timestamp and latency for each prediction request.
+     * Note that Stackdriver logs may incur a cost, especially if your project
+     * receives prediction requests at a high queries per second rate (QPS).
+     * Estimate your costs before enabling this option.
+     * 
+ * + * bool enable_access_logging = 13; + * + * @return The enableAccessLogging. + */ + @java.lang.Override + public boolean getEnableAccessLogging() { + return enableAccessLogging_; + } + /** + * + * + *
+     * These logs are like standard server access logs, containing
+     * information like timestamp and latency for each prediction request.
+     * Note that Stackdriver logs may incur a cost, especially if your project
+     * receives prediction requests at a high queries per second rate (QPS).
+     * Estimate your costs before enabling this option.
+     * 
+ * + * bool enable_access_logging = 13; + * + * @param value The enableAccessLogging to set. + * @return This builder for chaining. + */ + public Builder setEnableAccessLogging(boolean value) { + + enableAccessLogging_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * These logs are like standard server access logs, containing
+     * information like timestamp and latency for each prediction request.
+     * Note that Stackdriver logs may incur a cost, especially if your project
+     * receives prediction requests at a high queries per second rate (QPS).
+     * Estimate your costs before enabling this option.
+     * 
+ * + * bool enable_access_logging = 13; + * + * @return This builder for chaining. + */ + public Builder clearEnableAccessLogging() { + + enableAccessLogging_ = 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.v1.DeployedModel) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.DeployedModel) + private static final com.google.cloud.aiplatform.v1.DeployedModel DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.DeployedModel(); + } + + public static com.google.cloud.aiplatform.v1.DeployedModel getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeployedModel parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeployedModel(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.v1.DeployedModel getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeployedModelNameProto.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeployedModelNameProto.java new file mode 100644 index 000000000..155510f17 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeployedModelNameProto.java @@ -0,0 +1,83 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/deployed_model_ref.proto + +package com.google.cloud.aiplatform.v1; + +public final class DeployedModelNameProto { + private DeployedModelNameProto() {} + + 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_v1_DeployedModelRef_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_DeployedModelRef_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n3google/cloud/aiplatform/v1/deployed_mo" + + "del_ref.proto\022\032google.cloud.aiplatform.v" + + "1\032\037google/api/field_behavior.proto\032\031goog" + + "le/api/resource.proto\032\034google/api/annota" + + "tions.proto\"p\n\020DeployedModelRef\022<\n\010endpo" + + "int\030\001 \001(\tB*\340A\005\372A$\n\"aiplatform.googleapis" + + ".com/Endpoint\022\036\n\021deployed_model_id\030\002 \001(\t" + + "B\003\340A\005B\200\001\n\036com.google.cloud.aiplatform.v1" + + "B\026DeployedModelNameProtoP\001ZDgoogle.golan" + + "g.org/genproto/googleapis/cloud/aiplatfo" + + "rm/v1;aiplatformb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1_DeployedModelRef_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_DeployedModelRef_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_DeployedModelRef_descriptor, + new java.lang.String[] { + "Endpoint", "DeployedModelId", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeployedModelOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeployedModelOrBuilder.java new file mode 100644 index 000000000..a921d5ee4 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeployedModelOrBuilder.java @@ -0,0 +1,295 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/endpoint.proto + +package com.google.cloud.aiplatform.v1; + +public interface DeployedModelOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.DeployedModel) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A description of resources that are dedicated to the DeployedModel, and
+   * that need a higher degree of manual configuration.
+   * 
+ * + * .google.cloud.aiplatform.v1.DedicatedResources dedicated_resources = 7; + * + * @return Whether the dedicatedResources field is set. + */ + boolean hasDedicatedResources(); + /** + * + * + *
+   * A description of resources that are dedicated to the DeployedModel, and
+   * that need a higher degree of manual configuration.
+   * 
+ * + * .google.cloud.aiplatform.v1.DedicatedResources dedicated_resources = 7; + * + * @return The dedicatedResources. + */ + com.google.cloud.aiplatform.v1.DedicatedResources getDedicatedResources(); + /** + * + * + *
+   * A description of resources that are dedicated to the DeployedModel, and
+   * that need a higher degree of manual configuration.
+   * 
+ * + * .google.cloud.aiplatform.v1.DedicatedResources dedicated_resources = 7; + */ + com.google.cloud.aiplatform.v1.DedicatedResourcesOrBuilder getDedicatedResourcesOrBuilder(); + + /** + * + * + *
+   * A description of resources that to large degree are decided by AI
+   * Platform, and require only a modest additional configuration.
+   * 
+ * + * .google.cloud.aiplatform.v1.AutomaticResources automatic_resources = 8; + * + * @return Whether the automaticResources field is set. + */ + boolean hasAutomaticResources(); + /** + * + * + *
+   * A description of resources that to large degree are decided by AI
+   * Platform, and require only a modest additional configuration.
+   * 
+ * + * .google.cloud.aiplatform.v1.AutomaticResources automatic_resources = 8; + * + * @return The automaticResources. + */ + com.google.cloud.aiplatform.v1.AutomaticResources getAutomaticResources(); + /** + * + * + *
+   * A description of resources that to large degree are decided by AI
+   * Platform, and require only a modest additional configuration.
+   * 
+ * + * .google.cloud.aiplatform.v1.AutomaticResources automatic_resources = 8; + */ + com.google.cloud.aiplatform.v1.AutomaticResourcesOrBuilder getAutomaticResourcesOrBuilder(); + + /** + * + * + *
+   * Output only. The ID of the DeployedModel.
+   * 
+ * + * string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The id. + */ + java.lang.String getId(); + /** + * + * + *
+   * Output only. The ID of the DeployedModel.
+   * 
+ * + * string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for id. + */ + com.google.protobuf.ByteString getIdBytes(); + + /** + * + * + *
+   * Required. The name of the Model that this is the deployment of. Note that the Model
+   * may be in a different location than the DeployedModel's Endpoint.
+   * 
+ * + * + * string model = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The model. + */ + java.lang.String getModel(); + /** + * + * + *
+   * Required. The name of the Model that this is the deployment of. Note that the Model
+   * may be in a different location than the DeployedModel's Endpoint.
+   * 
+ * + * + * string model = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for model. + */ + com.google.protobuf.ByteString getModelBytes(); + + /** + * + * + *
+   * The display name of the DeployedModel. If not provided upon creation,
+   * the Model's display_name is used.
+   * 
+ * + * string display_name = 3; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * The display name of the DeployedModel. If not provided upon creation,
+   * the Model's display_name is used.
+   * 
+ * + * string display_name = 3; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Output only. Timestamp when the DeployedModel was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Timestamp when the DeployedModel was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Timestamp when the DeployedModel was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * The service account that the DeployedModel's container runs as. Specify the
+   * email address of the service account. If this service account is not
+   * specified, the container runs as a service account that doesn't have access
+   * to the resource project.
+   * Users deploying the Model must have the `iam.serviceAccounts.actAs`
+   * permission on this service account.
+   * 
+ * + * string service_account = 11; + * + * @return The serviceAccount. + */ + java.lang.String getServiceAccount(); + /** + * + * + *
+   * The service account that the DeployedModel's container runs as. Specify the
+   * email address of the service account. If this service account is not
+   * specified, the container runs as a service account that doesn't have access
+   * to the resource project.
+   * Users deploying the Model must have the `iam.serviceAccounts.actAs`
+   * permission on this service account.
+   * 
+ * + * string service_account = 11; + * + * @return The bytes for serviceAccount. + */ + com.google.protobuf.ByteString getServiceAccountBytes(); + + /** + * + * + *
+   * For custom-trained Models and AutoML Tabular Models, the container of the
+   * DeployedModel instances will send `stderr` and `stdout` streams to
+   * Stackdriver Logging by default. Please note that the logs incur cost,
+   * which are subject to [Cloud Logging
+   * pricing](https://cloud.google.com/stackdriver/pricing).
+   * User can disable container logging by setting this flag to true.
+   * 
+ * + * bool disable_container_logging = 15; + * + * @return The disableContainerLogging. + */ + boolean getDisableContainerLogging(); + + /** + * + * + *
+   * These logs are like standard server access logs, containing
+   * information like timestamp and latency for each prediction request.
+   * Note that Stackdriver logs may incur a cost, especially if your project
+   * receives prediction requests at a high queries per second rate (QPS).
+   * Estimate your costs before enabling this option.
+   * 
+ * + * bool enable_access_logging = 13; + * + * @return The enableAccessLogging. + */ + boolean getEnableAccessLogging(); + + public com.google.cloud.aiplatform.v1.DeployedModel.PredictionResourcesCase + getPredictionResourcesCase(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeployedModelRef.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeployedModelRef.java new file mode 100644 index 000000000..fcc68e358 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeployedModelRef.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/v1/deployed_model_ref.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Points to a DeployedModel.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.DeployedModelRef} + */ +public final class DeployedModelRef extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.DeployedModelRef) + DeployedModelRefOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeployedModelRef.newBuilder() to construct. + private DeployedModelRef(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeployedModelRef() { + endpoint_ = ""; + deployedModelId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeployedModelRef(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeployedModelRef( + 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(); + + endpoint_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + deployedModelId_ = 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.v1.DeployedModelNameProto + .internal_static_google_cloud_aiplatform_v1_DeployedModelRef_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.DeployedModelNameProto + .internal_static_google_cloud_aiplatform_v1_DeployedModelRef_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.DeployedModelRef.class, + com.google.cloud.aiplatform.v1.DeployedModelRef.Builder.class); + } + + public static final int ENDPOINT_FIELD_NUMBER = 1; + private volatile java.lang.Object endpoint_; + /** + * + * + *
+   * Immutable. A resource name of an Endpoint.
+   * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The endpoint. + */ + @java.lang.Override + public java.lang.String getEndpoint() { + java.lang.Object ref = endpoint_; + 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(); + endpoint_ = s; + return s; + } + } + /** + * + * + *
+   * Immutable. A resource name of an Endpoint.
+   * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for endpoint. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEndpointBytes() { + java.lang.Object ref = endpoint_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + endpoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEPLOYED_MODEL_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object deployedModelId_; + /** + * + * + *
+   * Immutable. An ID of a DeployedModel in the above Endpoint.
+   * 
+ * + * string deployed_model_id = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The deployedModelId. + */ + @java.lang.Override + public java.lang.String getDeployedModelId() { + java.lang.Object ref = deployedModelId_; + 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(); + deployedModelId_ = s; + return s; + } + } + /** + * + * + *
+   * Immutable. An ID of a DeployedModel in the above Endpoint.
+   * 
+ * + * string deployed_model_id = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for deployedModelId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDeployedModelIdBytes() { + java.lang.Object ref = deployedModelId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + deployedModelId_ = 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 (!getEndpointBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, endpoint_); + } + if (!getDeployedModelIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, deployedModelId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getEndpointBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, endpoint_); + } + if (!getDeployedModelIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, deployedModelId_); + } + 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.v1.DeployedModelRef)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.DeployedModelRef other = + (com.google.cloud.aiplatform.v1.DeployedModelRef) obj; + + if (!getEndpoint().equals(other.getEndpoint())) return false; + if (!getDeployedModelId().equals(other.getDeployedModelId())) 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) + ENDPOINT_FIELD_NUMBER; + hash = (53 * hash) + getEndpoint().hashCode(); + hash = (37 * hash) + DEPLOYED_MODEL_ID_FIELD_NUMBER; + hash = (53 * hash) + getDeployedModelId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.DeployedModelRef parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DeployedModelRef 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.v1.DeployedModelRef parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DeployedModelRef 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.v1.DeployedModelRef parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DeployedModelRef parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.DeployedModelRef parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DeployedModelRef 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.v1.DeployedModelRef parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DeployedModelRef 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.v1.DeployedModelRef parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DeployedModelRef 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.v1.DeployedModelRef 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; + } + /** + * + * + *
+   * Points to a DeployedModel.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.DeployedModelRef} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.DeployedModelRef) + com.google.cloud.aiplatform.v1.DeployedModelRefOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.DeployedModelNameProto + .internal_static_google_cloud_aiplatform_v1_DeployedModelRef_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.DeployedModelNameProto + .internal_static_google_cloud_aiplatform_v1_DeployedModelRef_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.DeployedModelRef.class, + com.google.cloud.aiplatform.v1.DeployedModelRef.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.DeployedModelRef.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(); + endpoint_ = ""; + + deployedModelId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.DeployedModelNameProto + .internal_static_google_cloud_aiplatform_v1_DeployedModelRef_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeployedModelRef getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.DeployedModelRef.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeployedModelRef build() { + com.google.cloud.aiplatform.v1.DeployedModelRef result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeployedModelRef buildPartial() { + com.google.cloud.aiplatform.v1.DeployedModelRef result = + new com.google.cloud.aiplatform.v1.DeployedModelRef(this); + result.endpoint_ = endpoint_; + result.deployedModelId_ = deployedModelId_; + 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.v1.DeployedModelRef) { + return mergeFrom((com.google.cloud.aiplatform.v1.DeployedModelRef) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.DeployedModelRef other) { + if (other == com.google.cloud.aiplatform.v1.DeployedModelRef.getDefaultInstance()) + return this; + if (!other.getEndpoint().isEmpty()) { + endpoint_ = other.endpoint_; + onChanged(); + } + if (!other.getDeployedModelId().isEmpty()) { + deployedModelId_ = other.deployedModelId_; + 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.v1.DeployedModelRef parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.aiplatform.v1.DeployedModelRef) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object endpoint_ = ""; + /** + * + * + *
+     * Immutable. A resource name of an Endpoint.
+     * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The endpoint. + */ + public java.lang.String getEndpoint() { + java.lang.Object ref = endpoint_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpoint_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Immutable. A resource name of an Endpoint.
+     * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for endpoint. + */ + public com.google.protobuf.ByteString getEndpointBytes() { + java.lang.Object ref = endpoint_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + endpoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Immutable. A resource name of an Endpoint.
+     * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @param value The endpoint to set. + * @return This builder for chaining. + */ + public Builder setEndpoint(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + endpoint_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. A resource name of an Endpoint.
+     * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearEndpoint() { + + endpoint_ = getDefaultInstance().getEndpoint(); + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. A resource name of an Endpoint.
+     * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for endpoint to set. + * @return This builder for chaining. + */ + public Builder setEndpointBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + endpoint_ = value; + onChanged(); + return this; + } + + private java.lang.Object deployedModelId_ = ""; + /** + * + * + *
+     * Immutable. An ID of a DeployedModel in the above Endpoint.
+     * 
+ * + * string deployed_model_id = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The deployedModelId. + */ + public java.lang.String getDeployedModelId() { + java.lang.Object ref = deployedModelId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deployedModelId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Immutable. An ID of a DeployedModel in the above Endpoint.
+     * 
+ * + * string deployed_model_id = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for deployedModelId. + */ + public com.google.protobuf.ByteString getDeployedModelIdBytes() { + java.lang.Object ref = deployedModelId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + deployedModelId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Immutable. An ID of a DeployedModel in the above Endpoint.
+     * 
+ * + * string deployed_model_id = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The deployedModelId to set. + * @return This builder for chaining. + */ + public Builder setDeployedModelId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + deployedModelId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. An ID of a DeployedModel in the above Endpoint.
+     * 
+ * + * string deployed_model_id = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearDeployedModelId() { + + deployedModelId_ = getDefaultInstance().getDeployedModelId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. An ID of a DeployedModel in the above Endpoint.
+     * 
+ * + * string deployed_model_id = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The bytes for deployedModelId to set. + * @return This builder for chaining. + */ + public Builder setDeployedModelIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + deployedModelId_ = 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.v1.DeployedModelRef) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.DeployedModelRef) + private static final com.google.cloud.aiplatform.v1.DeployedModelRef DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.DeployedModelRef(); + } + + public static com.google.cloud.aiplatform.v1.DeployedModelRef getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeployedModelRef parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeployedModelRef(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.v1.DeployedModelRef getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeployedModelRefOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeployedModelRefOrBuilder.java new file mode 100644 index 000000000..b3448d4ee --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeployedModelRefOrBuilder.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/v1/deployed_model_ref.proto + +package com.google.cloud.aiplatform.v1; + +public interface DeployedModelRefOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.DeployedModelRef) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Immutable. A resource name of an Endpoint.
+   * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The endpoint. + */ + java.lang.String getEndpoint(); + /** + * + * + *
+   * Immutable. A resource name of an Endpoint.
+   * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for endpoint. + */ + com.google.protobuf.ByteString getEndpointBytes(); + + /** + * + * + *
+   * Immutable. An ID of a DeployedModel in the above Endpoint.
+   * 
+ * + * string deployed_model_id = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The deployedModelId. + */ + java.lang.String getDeployedModelId(); + /** + * + * + *
+   * Immutable. An ID of a DeployedModel in the above Endpoint.
+   * 
+ * + * string deployed_model_id = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for deployedModelId. + */ + com.google.protobuf.ByteString getDeployedModelIdBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DiskSpec.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DiskSpec.java new file mode 100644 index 000000000..2197f5f26 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DiskSpec.java @@ -0,0 +1,737 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/machine_resources.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Represents the spec of disk options.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.DiskSpec} + */ +public final class DiskSpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.DiskSpec) + DiskSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use DiskSpec.newBuilder() to construct. + private DiskSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DiskSpec() { + bootDiskType_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DiskSpec(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DiskSpec( + 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(); + + bootDiskType_ = s; + break; + } + case 16: + { + bootDiskSizeGb_ = 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.v1.MachineResourcesProto + .internal_static_google_cloud_aiplatform_v1_DiskSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.MachineResourcesProto + .internal_static_google_cloud_aiplatform_v1_DiskSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.DiskSpec.class, + com.google.cloud.aiplatform.v1.DiskSpec.Builder.class); + } + + public static final int BOOT_DISK_TYPE_FIELD_NUMBER = 1; + private volatile java.lang.Object bootDiskType_; + /** + * + * + *
+   * Type of the boot disk (default is "pd-ssd").
+   * Valid values: "pd-ssd" (Persistent Disk Solid State Drive) or
+   * "pd-standard" (Persistent Disk Hard Disk Drive).
+   * 
+ * + * string boot_disk_type = 1; + * + * @return The bootDiskType. + */ + @java.lang.Override + public java.lang.String getBootDiskType() { + java.lang.Object ref = bootDiskType_; + 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(); + bootDiskType_ = s; + return s; + } + } + /** + * + * + *
+   * Type of the boot disk (default is "pd-ssd").
+   * Valid values: "pd-ssd" (Persistent Disk Solid State Drive) or
+   * "pd-standard" (Persistent Disk Hard Disk Drive).
+   * 
+ * + * string boot_disk_type = 1; + * + * @return The bytes for bootDiskType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBootDiskTypeBytes() { + java.lang.Object ref = bootDiskType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + bootDiskType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BOOT_DISK_SIZE_GB_FIELD_NUMBER = 2; + private int bootDiskSizeGb_; + /** + * + * + *
+   * Size in GB of the boot disk (default is 100GB).
+   * 
+ * + * int32 boot_disk_size_gb = 2; + * + * @return The bootDiskSizeGb. + */ + @java.lang.Override + public int getBootDiskSizeGb() { + return bootDiskSizeGb_; + } + + 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 (!getBootDiskTypeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, bootDiskType_); + } + if (bootDiskSizeGb_ != 0) { + output.writeInt32(2, bootDiskSizeGb_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getBootDiskTypeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, bootDiskType_); + } + if (bootDiskSizeGb_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, bootDiskSizeGb_); + } + 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.v1.DiskSpec)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.DiskSpec other = (com.google.cloud.aiplatform.v1.DiskSpec) obj; + + if (!getBootDiskType().equals(other.getBootDiskType())) return false; + if (getBootDiskSizeGb() != other.getBootDiskSizeGb()) 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) + BOOT_DISK_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getBootDiskType().hashCode(); + hash = (37 * hash) + BOOT_DISK_SIZE_GB_FIELD_NUMBER; + hash = (53 * hash) + getBootDiskSizeGb(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.DiskSpec parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DiskSpec 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.v1.DiskSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DiskSpec 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.v1.DiskSpec parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DiskSpec parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.DiskSpec parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DiskSpec 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.v1.DiskSpec parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DiskSpec 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.v1.DiskSpec parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DiskSpec 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.v1.DiskSpec 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 the spec of disk options.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.DiskSpec} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.DiskSpec) + com.google.cloud.aiplatform.v1.DiskSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.MachineResourcesProto + .internal_static_google_cloud_aiplatform_v1_DiskSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.MachineResourcesProto + .internal_static_google_cloud_aiplatform_v1_DiskSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.DiskSpec.class, + com.google.cloud.aiplatform.v1.DiskSpec.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.DiskSpec.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(); + bootDiskType_ = ""; + + bootDiskSizeGb_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.MachineResourcesProto + .internal_static_google_cloud_aiplatform_v1_DiskSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DiskSpec getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.DiskSpec.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DiskSpec build() { + com.google.cloud.aiplatform.v1.DiskSpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DiskSpec buildPartial() { + com.google.cloud.aiplatform.v1.DiskSpec result = + new com.google.cloud.aiplatform.v1.DiskSpec(this); + result.bootDiskType_ = bootDiskType_; + result.bootDiskSizeGb_ = bootDiskSizeGb_; + 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.v1.DiskSpec) { + return mergeFrom((com.google.cloud.aiplatform.v1.DiskSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.DiskSpec other) { + if (other == com.google.cloud.aiplatform.v1.DiskSpec.getDefaultInstance()) return this; + if (!other.getBootDiskType().isEmpty()) { + bootDiskType_ = other.bootDiskType_; + onChanged(); + } + if (other.getBootDiskSizeGb() != 0) { + setBootDiskSizeGb(other.getBootDiskSizeGb()); + } + 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.v1.DiskSpec parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.aiplatform.v1.DiskSpec) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object bootDiskType_ = ""; + /** + * + * + *
+     * Type of the boot disk (default is "pd-ssd").
+     * Valid values: "pd-ssd" (Persistent Disk Solid State Drive) or
+     * "pd-standard" (Persistent Disk Hard Disk Drive).
+     * 
+ * + * string boot_disk_type = 1; + * + * @return The bootDiskType. + */ + public java.lang.String getBootDiskType() { + java.lang.Object ref = bootDiskType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + bootDiskType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Type of the boot disk (default is "pd-ssd").
+     * Valid values: "pd-ssd" (Persistent Disk Solid State Drive) or
+     * "pd-standard" (Persistent Disk Hard Disk Drive).
+     * 
+ * + * string boot_disk_type = 1; + * + * @return The bytes for bootDiskType. + */ + public com.google.protobuf.ByteString getBootDiskTypeBytes() { + java.lang.Object ref = bootDiskType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + bootDiskType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Type of the boot disk (default is "pd-ssd").
+     * Valid values: "pd-ssd" (Persistent Disk Solid State Drive) or
+     * "pd-standard" (Persistent Disk Hard Disk Drive).
+     * 
+ * + * string boot_disk_type = 1; + * + * @param value The bootDiskType to set. + * @return This builder for chaining. + */ + public Builder setBootDiskType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + bootDiskType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Type of the boot disk (default is "pd-ssd").
+     * Valid values: "pd-ssd" (Persistent Disk Solid State Drive) or
+     * "pd-standard" (Persistent Disk Hard Disk Drive).
+     * 
+ * + * string boot_disk_type = 1; + * + * @return This builder for chaining. + */ + public Builder clearBootDiskType() { + + bootDiskType_ = getDefaultInstance().getBootDiskType(); + onChanged(); + return this; + } + /** + * + * + *
+     * Type of the boot disk (default is "pd-ssd").
+     * Valid values: "pd-ssd" (Persistent Disk Solid State Drive) or
+     * "pd-standard" (Persistent Disk Hard Disk Drive).
+     * 
+ * + * string boot_disk_type = 1; + * + * @param value The bytes for bootDiskType to set. + * @return This builder for chaining. + */ + public Builder setBootDiskTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + bootDiskType_ = value; + onChanged(); + return this; + } + + private int bootDiskSizeGb_; + /** + * + * + *
+     * Size in GB of the boot disk (default is 100GB).
+     * 
+ * + * int32 boot_disk_size_gb = 2; + * + * @return The bootDiskSizeGb. + */ + @java.lang.Override + public int getBootDiskSizeGb() { + return bootDiskSizeGb_; + } + /** + * + * + *
+     * Size in GB of the boot disk (default is 100GB).
+     * 
+ * + * int32 boot_disk_size_gb = 2; + * + * @param value The bootDiskSizeGb to set. + * @return This builder for chaining. + */ + public Builder setBootDiskSizeGb(int value) { + + bootDiskSizeGb_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Size in GB of the boot disk (default is 100GB).
+     * 
+ * + * int32 boot_disk_size_gb = 2; + * + * @return This builder for chaining. + */ + public Builder clearBootDiskSizeGb() { + + bootDiskSizeGb_ = 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.v1.DiskSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.DiskSpec) + private static final com.google.cloud.aiplatform.v1.DiskSpec DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.DiskSpec(); + } + + public static com.google.cloud.aiplatform.v1.DiskSpec getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DiskSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DiskSpec(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.v1.DiskSpec getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DiskSpecOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DiskSpecOrBuilder.java new file mode 100644 index 000000000..cdaed1fef --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DiskSpecOrBuilder.java @@ -0,0 +1,67 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/machine_resources.proto + +package com.google.cloud.aiplatform.v1; + +public interface DiskSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.DiskSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Type of the boot disk (default is "pd-ssd").
+   * Valid values: "pd-ssd" (Persistent Disk Solid State Drive) or
+   * "pd-standard" (Persistent Disk Hard Disk Drive).
+   * 
+ * + * string boot_disk_type = 1; + * + * @return The bootDiskType. + */ + java.lang.String getBootDiskType(); + /** + * + * + *
+   * Type of the boot disk (default is "pd-ssd").
+   * Valid values: "pd-ssd" (Persistent Disk Solid State Drive) or
+   * "pd-standard" (Persistent Disk Hard Disk Drive).
+   * 
+ * + * string boot_disk_type = 1; + * + * @return The bytes for bootDiskType. + */ + com.google.protobuf.ByteString getBootDiskTypeBytes(); + + /** + * + * + *
+   * Size in GB of the boot disk (default is 100GB).
+   * 
+ * + * int32 boot_disk_size_gb = 2; + * + * @return The bootDiskSizeGb. + */ + int getBootDiskSizeGb(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EncryptionSpec.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EncryptionSpec.java new file mode 100644 index 000000000..dab2bd986 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EncryptionSpec.java @@ -0,0 +1,664 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/encryption_spec.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Represents a customer-managed encryption key spec that can be applied to
+ * a top-level resource.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.EncryptionSpec} + */ +public final class EncryptionSpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.EncryptionSpec) + EncryptionSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use EncryptionSpec.newBuilder() to construct. + private EncryptionSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private EncryptionSpec() { + kmsKeyName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new EncryptionSpec(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private EncryptionSpec( + 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(); + + kmsKeyName_ = 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.v1.EncryptionSpecProto + .internal_static_google_cloud_aiplatform_v1_EncryptionSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.EncryptionSpecProto + .internal_static_google_cloud_aiplatform_v1_EncryptionSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.EncryptionSpec.class, + com.google.cloud.aiplatform.v1.EncryptionSpec.Builder.class); + } + + public static final int KMS_KEY_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object kmsKeyName_; + /** + * + * + *
+   * Required. The Cloud KMS resource identifier of the customer managed encryption key
+   * used to protect a resource. Has the form:
+   * `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`.
+   * The key needs to be in the same region as where the compute resource is
+   * created.
+   * 
+ * + * string kms_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The kmsKeyName. + */ + @java.lang.Override + public java.lang.String getKmsKeyName() { + java.lang.Object ref = kmsKeyName_; + 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(); + kmsKeyName_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The Cloud KMS resource identifier of the customer managed encryption key
+   * used to protect a resource. Has the form:
+   * `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`.
+   * The key needs to be in the same region as where the compute resource is
+   * created.
+   * 
+ * + * string kms_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for kmsKeyName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKmsKeyNameBytes() { + java.lang.Object ref = kmsKeyName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kmsKeyName_ = 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 (!getKmsKeyNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, kmsKeyName_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getKmsKeyNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, kmsKeyName_); + } + 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.v1.EncryptionSpec)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.EncryptionSpec other = + (com.google.cloud.aiplatform.v1.EncryptionSpec) obj; + + if (!getKmsKeyName().equals(other.getKmsKeyName())) 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) + KMS_KEY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getKmsKeyName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.EncryptionSpec parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.EncryptionSpec 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.v1.EncryptionSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.EncryptionSpec 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.v1.EncryptionSpec parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.EncryptionSpec parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.EncryptionSpec parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.EncryptionSpec 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.v1.EncryptionSpec parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.EncryptionSpec 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.v1.EncryptionSpec parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.EncryptionSpec 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.v1.EncryptionSpec 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 customer-managed encryption key spec that can be applied to
+   * a top-level resource.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.EncryptionSpec} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.EncryptionSpec) + com.google.cloud.aiplatform.v1.EncryptionSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.EncryptionSpecProto + .internal_static_google_cloud_aiplatform_v1_EncryptionSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.EncryptionSpecProto + .internal_static_google_cloud_aiplatform_v1_EncryptionSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.EncryptionSpec.class, + com.google.cloud.aiplatform.v1.EncryptionSpec.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.EncryptionSpec.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(); + kmsKeyName_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.EncryptionSpecProto + .internal_static_google_cloud_aiplatform_v1_EncryptionSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.EncryptionSpec getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.EncryptionSpec.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.EncryptionSpec build() { + com.google.cloud.aiplatform.v1.EncryptionSpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.EncryptionSpec buildPartial() { + com.google.cloud.aiplatform.v1.EncryptionSpec result = + new com.google.cloud.aiplatform.v1.EncryptionSpec(this); + result.kmsKeyName_ = kmsKeyName_; + 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.v1.EncryptionSpec) { + return mergeFrom((com.google.cloud.aiplatform.v1.EncryptionSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.EncryptionSpec other) { + if (other == com.google.cloud.aiplatform.v1.EncryptionSpec.getDefaultInstance()) return this; + if (!other.getKmsKeyName().isEmpty()) { + kmsKeyName_ = other.kmsKeyName_; + 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.v1.EncryptionSpec parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.aiplatform.v1.EncryptionSpec) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object kmsKeyName_ = ""; + /** + * + * + *
+     * Required. The Cloud KMS resource identifier of the customer managed encryption key
+     * used to protect a resource. Has the form:
+     * `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`.
+     * The key needs to be in the same region as where the compute resource is
+     * created.
+     * 
+ * + * string kms_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The kmsKeyName. + */ + public java.lang.String getKmsKeyName() { + java.lang.Object ref = kmsKeyName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kmsKeyName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The Cloud KMS resource identifier of the customer managed encryption key
+     * used to protect a resource. Has the form:
+     * `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`.
+     * The key needs to be in the same region as where the compute resource is
+     * created.
+     * 
+ * + * string kms_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for kmsKeyName. + */ + public com.google.protobuf.ByteString getKmsKeyNameBytes() { + java.lang.Object ref = kmsKeyName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kmsKeyName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The Cloud KMS resource identifier of the customer managed encryption key
+     * used to protect a resource. Has the form:
+     * `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`.
+     * The key needs to be in the same region as where the compute resource is
+     * created.
+     * 
+ * + * string kms_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The kmsKeyName to set. + * @return This builder for chaining. + */ + public Builder setKmsKeyName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + kmsKeyName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Cloud KMS resource identifier of the customer managed encryption key
+     * used to protect a resource. Has the form:
+     * `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`.
+     * The key needs to be in the same region as where the compute resource is
+     * created.
+     * 
+ * + * string kms_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearKmsKeyName() { + + kmsKeyName_ = getDefaultInstance().getKmsKeyName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Cloud KMS resource identifier of the customer managed encryption key
+     * used to protect a resource. Has the form:
+     * `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`.
+     * The key needs to be in the same region as where the compute resource is
+     * created.
+     * 
+ * + * string kms_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for kmsKeyName to set. + * @return This builder for chaining. + */ + public Builder setKmsKeyNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + kmsKeyName_ = 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.v1.EncryptionSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.EncryptionSpec) + private static final com.google.cloud.aiplatform.v1.EncryptionSpec DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.EncryptionSpec(); + } + + public static com.google.cloud.aiplatform.v1.EncryptionSpec getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EncryptionSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new EncryptionSpec(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.v1.EncryptionSpec getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EncryptionSpecOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EncryptionSpecOrBuilder.java new file mode 100644 index 000000000..27deda3a3 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EncryptionSpecOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/encryption_spec.proto + +package com.google.cloud.aiplatform.v1; + +public interface EncryptionSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.EncryptionSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The Cloud KMS resource identifier of the customer managed encryption key
+   * used to protect a resource. Has the form:
+   * `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`.
+   * The key needs to be in the same region as where the compute resource is
+   * created.
+   * 
+ * + * string kms_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The kmsKeyName. + */ + java.lang.String getKmsKeyName(); + /** + * + * + *
+   * Required. The Cloud KMS resource identifier of the customer managed encryption key
+   * used to protect a resource. Has the form:
+   * `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`.
+   * The key needs to be in the same region as where the compute resource is
+   * created.
+   * 
+ * + * string kms_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for kmsKeyName. + */ + com.google.protobuf.ByteString getKmsKeyNameBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EncryptionSpecProto.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EncryptionSpecProto.java new file mode 100644 index 000000000..690221ab0 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EncryptionSpecProto.java @@ -0,0 +1,78 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/encryption_spec.proto + +package com.google.cloud.aiplatform.v1; + +public final class EncryptionSpecProto { + private EncryptionSpecProto() {} + + 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_v1_EncryptionSpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_EncryptionSpec_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n0google/cloud/aiplatform/v1/encryption_" + + "spec.proto\022\032google.cloud.aiplatform.v1\032\037" + + "google/api/field_behavior.proto\032\034google/" + + "api/annotations.proto\"+\n\016EncryptionSpec\022" + + "\031\n\014kms_key_name\030\001 \001(\tB\003\340A\002B}\n\036com.google" + + ".cloud.aiplatform.v1B\023EncryptionSpecProt" + + "oP\001ZDgoogle.golang.org/genproto/googleap" + + "is/cloud/aiplatform/v1;aiplatformb\006proto" + + "3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1_EncryptionSpec_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_EncryptionSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_EncryptionSpec_descriptor, + new java.lang.String[] { + "KmsKeyName", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/Endpoint.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/Endpoint.java new file mode 100644 index 000000000..140da54f3 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/Endpoint.java @@ -0,0 +1,3395 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/endpoint.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Models are deployed into it, and afterwards Endpoint is called to obtain
+ * predictions and explanations.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.Endpoint} + */ +public final class Endpoint extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.Endpoint) + EndpointOrBuilder { + private static final long serialVersionUID = 0L; + // Use Endpoint.newBuilder() to construct. + private Endpoint(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Endpoint() { + name_ = ""; + displayName_ = ""; + description_ = ""; + deployedModels_ = java.util.Collections.emptyList(); + etag_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Endpoint(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Endpoint( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 34: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + deployedModels_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + deployedModels_.add( + input.readMessage( + com.google.cloud.aiplatform.v1.DeployedModel.parser(), extensionRegistry)); + break; + } + case 42: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + trafficSplit_ = + com.google.protobuf.MapField.newMapField( + TrafficSplitDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000002; + } + com.google.protobuf.MapEntry trafficSplit__ = + input.readMessage( + TrafficSplitDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + trafficSplit_.getMutableMap().put(trafficSplit__.getKey(), trafficSplit__.getValue()); + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + etag_ = s; + break; + } + case 58: + { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + labels_ = + com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000004; + } + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); + break; + } + case 66: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 74: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + case 82: + { + com.google.cloud.aiplatform.v1.EncryptionSpec.Builder subBuilder = null; + if (encryptionSpec_ != null) { + subBuilder = encryptionSpec_.toBuilder(); + } + encryptionSpec_ = + input.readMessage( + com.google.cloud.aiplatform.v1.EncryptionSpec.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(encryptionSpec_); + encryptionSpec_ = 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)) { + deployedModels_ = java.util.Collections.unmodifiableList(deployedModels_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.EndpointProto + .internal_static_google_cloud_aiplatform_v1_Endpoint_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 5: + return internalGetTrafficSplit(); + case 7: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.EndpointProto + .internal_static_google_cloud_aiplatform_v1_Endpoint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.Endpoint.class, + com.google.cloud.aiplatform.v1.Endpoint.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Output only. The resource name of the Endpoint.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The resource name of the Endpoint.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * Required. The display name of the Endpoint.
+   * The name can be up to 128 characters long and can be consist of any UTF-8
+   * characters.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+   * Required. The display name of the Endpoint.
+   * The name can be up to 128 characters long and can be consist of any UTF-8
+   * characters.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 DESCRIPTION_FIELD_NUMBER = 3; + private volatile java.lang.Object description_; + /** + * + * + *
+   * The description of the Endpoint.
+   * 
+ * + * string description = 3; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * The description of the Endpoint.
+   * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEPLOYED_MODELS_FIELD_NUMBER = 4; + private java.util.List deployedModels_; + /** + * + * + *
+   * Output only. The models deployed in this Endpoint.
+   * To add or remove DeployedModels use [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel] and
+   * [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel] respectively.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.DeployedModel deployed_models = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List getDeployedModelsList() { + return deployedModels_; + } + /** + * + * + *
+   * Output only. The models deployed in this Endpoint.
+   * To add or remove DeployedModels use [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel] and
+   * [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel] respectively.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.DeployedModel deployed_models = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getDeployedModelsOrBuilderList() { + return deployedModels_; + } + /** + * + * + *
+   * Output only. The models deployed in this Endpoint.
+   * To add or remove DeployedModels use [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel] and
+   * [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel] respectively.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.DeployedModel deployed_models = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getDeployedModelsCount() { + return deployedModels_.size(); + } + /** + * + * + *
+   * Output only. The models deployed in this Endpoint.
+   * To add or remove DeployedModels use [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel] and
+   * [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel] respectively.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.DeployedModel deployed_models = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeployedModel getDeployedModels(int index) { + return deployedModels_.get(index); + } + /** + * + * + *
+   * Output only. The models deployed in this Endpoint.
+   * To add or remove DeployedModels use [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel] and
+   * [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel] respectively.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.DeployedModel deployed_models = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeployedModelOrBuilder getDeployedModelsOrBuilder( + int index) { + return deployedModels_.get(index); + } + + public static final int TRAFFIC_SPLIT_FIELD_NUMBER = 5; + + private static final class TrafficSplitDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.aiplatform.v1.EndpointProto + .internal_static_google_cloud_aiplatform_v1_Endpoint_TrafficSplitEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.INT32, + 0); + } + + private com.google.protobuf.MapField trafficSplit_; + + private com.google.protobuf.MapField + internalGetTrafficSplit() { + if (trafficSplit_ == null) { + return com.google.protobuf.MapField.emptyMapField( + TrafficSplitDefaultEntryHolder.defaultEntry); + } + return trafficSplit_; + } + + public int getTrafficSplitCount() { + return internalGetTrafficSplit().getMap().size(); + } + /** + * + * + *
+   * A map from a DeployedModel's ID to the percentage of this Endpoint's
+   * traffic that should be forwarded to that DeployedModel.
+   * If a DeployedModel's ID is not listed in this map, then it receives no
+   * traffic.
+   * The traffic percentage values must add up to 100, or map must be empty if
+   * the Endpoint is to not accept any traffic at a moment.
+   * 
+ * + * map<string, int32> traffic_split = 5; + */ + @java.lang.Override + public boolean containsTrafficSplit(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetTrafficSplit().getMap().containsKey(key); + } + /** Use {@link #getTrafficSplitMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getTrafficSplit() { + return getTrafficSplitMap(); + } + /** + * + * + *
+   * A map from a DeployedModel's ID to the percentage of this Endpoint's
+   * traffic that should be forwarded to that DeployedModel.
+   * If a DeployedModel's ID is not listed in this map, then it receives no
+   * traffic.
+   * The traffic percentage values must add up to 100, or map must be empty if
+   * the Endpoint is to not accept any traffic at a moment.
+   * 
+ * + * map<string, int32> traffic_split = 5; + */ + @java.lang.Override + public java.util.Map getTrafficSplitMap() { + return internalGetTrafficSplit().getMap(); + } + /** + * + * + *
+   * A map from a DeployedModel's ID to the percentage of this Endpoint's
+   * traffic that should be forwarded to that DeployedModel.
+   * If a DeployedModel's ID is not listed in this map, then it receives no
+   * traffic.
+   * The traffic percentage values must add up to 100, or map must be empty if
+   * the Endpoint is to not accept any traffic at a moment.
+   * 
+ * + * map<string, int32> traffic_split = 5; + */ + @java.lang.Override + public int getTrafficSplitOrDefault(java.lang.String key, int defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetTrafficSplit().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * A map from a DeployedModel's ID to the percentage of this Endpoint's
+   * traffic that should be forwarded to that DeployedModel.
+   * If a DeployedModel's ID is not listed in this map, then it receives no
+   * traffic.
+   * The traffic percentage values must add up to 100, or map must be empty if
+   * the Endpoint is to not accept any traffic at a moment.
+   * 
+ * + * map<string, int32> traffic_split = 5; + */ + @java.lang.Override + public int getTrafficSplitOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetTrafficSplit().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int ETAG_FIELD_NUMBER = 6; + private volatile java.lang.Object etag_; + /** + * + * + *
+   * Used to perform consistent read-modify-write updates. If not set, a blind
+   * "overwrite" update happens.
+   * 
+ * + * string etag = 6; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } + } + /** + * + * + *
+   * Used to perform consistent read-modify-write updates. If not set, a blind
+   * "overwrite" update happens.
+   * 
+ * + * string etag = 6; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LABELS_FIELD_NUMBER = 7; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.aiplatform.v1.EndpointProto + .internal_static_google_cloud_aiplatform_v1_Endpoint_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * The labels with user-defined metadata to organize your Endpoints.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 7; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * The labels with user-defined metadata to organize your Endpoints.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 7; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * The labels with user-defined metadata to organize your Endpoints.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 7; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * The labels with user-defined metadata to organize your Endpoints.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 7; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 8; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. Timestamp when this Endpoint was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. Timestamp when this Endpoint was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. Timestamp when this Endpoint was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 9; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. Timestamp when this Endpoint was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. Timestamp when this Endpoint was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. Timestamp when this Endpoint was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + public static final int ENCRYPTION_SPEC_FIELD_NUMBER = 10; + private com.google.cloud.aiplatform.v1.EncryptionSpec encryptionSpec_; + /** + * + * + *
+   * Customer-managed encryption key spec for an Endpoint. If set, this
+   * Endpoint and all sub-resources of this Endpoint will be secured by
+   * this key.
+   * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 10; + * + * @return Whether the encryptionSpec field is set. + */ + @java.lang.Override + public boolean hasEncryptionSpec() { + return encryptionSpec_ != null; + } + /** + * + * + *
+   * Customer-managed encryption key spec for an Endpoint. If set, this
+   * Endpoint and all sub-resources of this Endpoint will be secured by
+   * this key.
+   * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 10; + * + * @return The encryptionSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.EncryptionSpec getEncryptionSpec() { + return encryptionSpec_ == null + ? com.google.cloud.aiplatform.v1.EncryptionSpec.getDefaultInstance() + : encryptionSpec_; + } + /** + * + * + *
+   * Customer-managed encryption key spec for an Endpoint. If set, this
+   * Endpoint and all sub-resources of this Endpoint will be secured by
+   * this key.
+   * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 10; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.EncryptionSpecOrBuilder getEncryptionSpecOrBuilder() { + return getEncryptionSpec(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + for (int i = 0; i < deployedModels_.size(); i++) { + output.writeMessage(4, deployedModels_.get(i)); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetTrafficSplit(), TrafficSplitDefaultEntryHolder.defaultEntry, 5); + if (!getEtagBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, etag_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 7); + if (createTime_ != null) { + output.writeMessage(8, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(9, getUpdateTime()); + } + if (encryptionSpec_ != null) { + output.writeMessage(10, getEncryptionSpec()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + for (int i = 0; i < deployedModels_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, deployedModels_.get(i)); + } + for (java.util.Map.Entry entry : + internalGetTrafficSplit().getMap().entrySet()) { + com.google.protobuf.MapEntry trafficSplit__ = + TrafficSplitDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, trafficSplit__); + } + if (!getEtagBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, etag_); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, labels__); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getUpdateTime()); + } + if (encryptionSpec_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getEncryptionSpec()); + } + 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.v1.Endpoint)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.Endpoint other = (com.google.cloud.aiplatform.v1.Endpoint) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getDeployedModelsList().equals(other.getDeployedModelsList())) return false; + if (!internalGetTrafficSplit().equals(other.internalGetTrafficSplit())) return false; + if (!getEtag().equals(other.getEtag())) return false; + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (hasEncryptionSpec() != other.hasEncryptionSpec()) return false; + if (hasEncryptionSpec()) { + if (!getEncryptionSpec().equals(other.getEncryptionSpec())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (getDeployedModelsCount() > 0) { + hash = (37 * hash) + DEPLOYED_MODELS_FIELD_NUMBER; + hash = (53 * hash) + getDeployedModelsList().hashCode(); + } + if (!internalGetTrafficSplit().getMap().isEmpty()) { + hash = (37 * hash) + TRAFFIC_SPLIT_FIELD_NUMBER; + hash = (53 * hash) + internalGetTrafficSplit().hashCode(); + } + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (hasEncryptionSpec()) { + hash = (37 * hash) + ENCRYPTION_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getEncryptionSpec().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.Endpoint parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.Endpoint 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.v1.Endpoint parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.Endpoint 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.v1.Endpoint parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.Endpoint parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.Endpoint parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.Endpoint 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.v1.Endpoint parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.Endpoint 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.v1.Endpoint parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.Endpoint 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.v1.Endpoint 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; + } + /** + * + * + *
+   * Models are deployed into it, and afterwards Endpoint is called to obtain
+   * predictions and explanations.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.Endpoint} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.Endpoint) + com.google.cloud.aiplatform.v1.EndpointOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.EndpointProto + .internal_static_google_cloud_aiplatform_v1_Endpoint_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 5: + return internalGetTrafficSplit(); + case 7: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 5: + return internalGetMutableTrafficSplit(); + case 7: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.EndpointProto + .internal_static_google_cloud_aiplatform_v1_Endpoint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.Endpoint.class, + com.google.cloud.aiplatform.v1.Endpoint.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.Endpoint.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getDeployedModelsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + displayName_ = ""; + + description_ = ""; + + if (deployedModelsBuilder_ == null) { + deployedModels_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + deployedModelsBuilder_.clear(); + } + internalGetMutableTrafficSplit().clear(); + etag_ = ""; + + internalGetMutableLabels().clear(); + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + if (encryptionSpecBuilder_ == null) { + encryptionSpec_ = null; + } else { + encryptionSpec_ = null; + encryptionSpecBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.EndpointProto + .internal_static_google_cloud_aiplatform_v1_Endpoint_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.Endpoint getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.Endpoint.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.Endpoint build() { + com.google.cloud.aiplatform.v1.Endpoint result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.Endpoint buildPartial() { + com.google.cloud.aiplatform.v1.Endpoint result = + new com.google.cloud.aiplatform.v1.Endpoint(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.displayName_ = displayName_; + result.description_ = description_; + if (deployedModelsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + deployedModels_ = java.util.Collections.unmodifiableList(deployedModels_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.deployedModels_ = deployedModels_; + } else { + result.deployedModels_ = deployedModelsBuilder_.build(); + } + result.trafficSplit_ = internalGetTrafficSplit(); + result.trafficSplit_.makeImmutable(); + result.etag_ = etag_; + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + if (encryptionSpecBuilder_ == null) { + result.encryptionSpec_ = encryptionSpec_; + } else { + result.encryptionSpec_ = encryptionSpecBuilder_.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.v1.Endpoint) { + return mergeFrom((com.google.cloud.aiplatform.v1.Endpoint) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.Endpoint other) { + if (other == com.google.cloud.aiplatform.v1.Endpoint.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (deployedModelsBuilder_ == null) { + if (!other.deployedModels_.isEmpty()) { + if (deployedModels_.isEmpty()) { + deployedModels_ = other.deployedModels_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDeployedModelsIsMutable(); + deployedModels_.addAll(other.deployedModels_); + } + onChanged(); + } + } else { + if (!other.deployedModels_.isEmpty()) { + if (deployedModelsBuilder_.isEmpty()) { + deployedModelsBuilder_.dispose(); + deployedModelsBuilder_ = null; + deployedModels_ = other.deployedModels_; + bitField0_ = (bitField0_ & ~0x00000001); + deployedModelsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDeployedModelsFieldBuilder() + : null; + } else { + deployedModelsBuilder_.addAllMessages(other.deployedModels_); + } + } + } + internalGetMutableTrafficSplit().mergeFrom(other.internalGetTrafficSplit()); + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + onChanged(); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.hasEncryptionSpec()) { + mergeEncryptionSpec(other.getEncryptionSpec()); + } + 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.v1.Endpoint parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.aiplatform.v1.Endpoint) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. The resource name of the Endpoint.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The resource name of the Endpoint.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The resource name of the Endpoint.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource name of the Endpoint.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource name of the Endpoint.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Required. The display name of the Endpoint.
+     * The name can be up to 128 characters long and can be consist of any UTF-8
+     * characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+     * Required. The display name of the Endpoint.
+     * The name can be up to 128 characters long and can be consist of any UTF-8
+     * characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+     * Required. The display name of the Endpoint.
+     * The name can be up to 128 characters long and can be consist of any UTF-8
+     * characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + /** + * + * + *
+     * Required. The display name of the Endpoint.
+     * The name can be up to 128 characters long and can be consist of any UTF-8
+     * characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The display name of the Endpoint.
+     * The name can be up to 128 characters long and can be consist of any UTF-8
+     * characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 description_ = ""; + /** + * + * + *
+     * The description of the Endpoint.
+     * 
+ * + * string description = 3; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The description of the Endpoint.
+     * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The description of the Endpoint.
+     * 
+ * + * string description = 3; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The description of the Endpoint.
+     * 
+ * + * string description = 3; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
+     * The description of the Endpoint.
+     * 
+ * + * string description = 3; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private java.util.List deployedModels_ = + java.util.Collections.emptyList(); + + private void ensureDeployedModelsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + deployedModels_ = + new java.util.ArrayList(deployedModels_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.DeployedModel, + com.google.cloud.aiplatform.v1.DeployedModel.Builder, + com.google.cloud.aiplatform.v1.DeployedModelOrBuilder> + deployedModelsBuilder_; + + /** + * + * + *
+     * Output only. The models deployed in this Endpoint.
+     * To add or remove DeployedModels use [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel] and
+     * [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel] respectively.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.DeployedModel deployed_models = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List getDeployedModelsList() { + if (deployedModelsBuilder_ == null) { + return java.util.Collections.unmodifiableList(deployedModels_); + } else { + return deployedModelsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Output only. The models deployed in this Endpoint.
+     * To add or remove DeployedModels use [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel] and
+     * [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel] respectively.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.DeployedModel deployed_models = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getDeployedModelsCount() { + if (deployedModelsBuilder_ == null) { + return deployedModels_.size(); + } else { + return deployedModelsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Output only. The models deployed in this Endpoint.
+     * To add or remove DeployedModels use [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel] and
+     * [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel] respectively.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.DeployedModel deployed_models = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.DeployedModel getDeployedModels(int index) { + if (deployedModelsBuilder_ == null) { + return deployedModels_.get(index); + } else { + return deployedModelsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Output only. The models deployed in this Endpoint.
+     * To add or remove DeployedModels use [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel] and
+     * [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel] respectively.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.DeployedModel deployed_models = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDeployedModels( + int index, com.google.cloud.aiplatform.v1.DeployedModel value) { + if (deployedModelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeployedModelsIsMutable(); + deployedModels_.set(index, value); + onChanged(); + } else { + deployedModelsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. The models deployed in this Endpoint.
+     * To add or remove DeployedModels use [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel] and
+     * [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel] respectively.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.DeployedModel deployed_models = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDeployedModels( + int index, com.google.cloud.aiplatform.v1.DeployedModel.Builder builderForValue) { + if (deployedModelsBuilder_ == null) { + ensureDeployedModelsIsMutable(); + deployedModels_.set(index, builderForValue.build()); + onChanged(); + } else { + deployedModelsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. The models deployed in this Endpoint.
+     * To add or remove DeployedModels use [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel] and
+     * [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel] respectively.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.DeployedModel deployed_models = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addDeployedModels(com.google.cloud.aiplatform.v1.DeployedModel value) { + if (deployedModelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeployedModelsIsMutable(); + deployedModels_.add(value); + onChanged(); + } else { + deployedModelsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Output only. The models deployed in this Endpoint.
+     * To add or remove DeployedModels use [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel] and
+     * [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel] respectively.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.DeployedModel deployed_models = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addDeployedModels( + int index, com.google.cloud.aiplatform.v1.DeployedModel value) { + if (deployedModelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeployedModelsIsMutable(); + deployedModels_.add(index, value); + onChanged(); + } else { + deployedModelsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. The models deployed in this Endpoint.
+     * To add or remove DeployedModels use [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel] and
+     * [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel] respectively.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.DeployedModel deployed_models = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addDeployedModels( + com.google.cloud.aiplatform.v1.DeployedModel.Builder builderForValue) { + if (deployedModelsBuilder_ == null) { + ensureDeployedModelsIsMutable(); + deployedModels_.add(builderForValue.build()); + onChanged(); + } else { + deployedModelsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. The models deployed in this Endpoint.
+     * To add or remove DeployedModels use [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel] and
+     * [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel] respectively.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.DeployedModel deployed_models = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addDeployedModels( + int index, com.google.cloud.aiplatform.v1.DeployedModel.Builder builderForValue) { + if (deployedModelsBuilder_ == null) { + ensureDeployedModelsIsMutable(); + deployedModels_.add(index, builderForValue.build()); + onChanged(); + } else { + deployedModelsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. The models deployed in this Endpoint.
+     * To add or remove DeployedModels use [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel] and
+     * [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel] respectively.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.DeployedModel deployed_models = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllDeployedModels( + java.lang.Iterable values) { + if (deployedModelsBuilder_ == null) { + ensureDeployedModelsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, deployedModels_); + onChanged(); + } else { + deployedModelsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Output only. The models deployed in this Endpoint.
+     * To add or remove DeployedModels use [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel] and
+     * [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel] respectively.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.DeployedModel deployed_models = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearDeployedModels() { + if (deployedModelsBuilder_ == null) { + deployedModels_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + deployedModelsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. The models deployed in this Endpoint.
+     * To add or remove DeployedModels use [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel] and
+     * [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel] respectively.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.DeployedModel deployed_models = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeDeployedModels(int index) { + if (deployedModelsBuilder_ == null) { + ensureDeployedModelsIsMutable(); + deployedModels_.remove(index); + onChanged(); + } else { + deployedModelsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Output only. The models deployed in this Endpoint.
+     * To add or remove DeployedModels use [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel] and
+     * [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel] respectively.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.DeployedModel deployed_models = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.DeployedModel.Builder getDeployedModelsBuilder( + int index) { + return getDeployedModelsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Output only. The models deployed in this Endpoint.
+     * To add or remove DeployedModels use [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel] and
+     * [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel] respectively.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.DeployedModel deployed_models = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.DeployedModelOrBuilder getDeployedModelsOrBuilder( + int index) { + if (deployedModelsBuilder_ == null) { + return deployedModels_.get(index); + } else { + return deployedModelsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Output only. The models deployed in this Endpoint.
+     * To add or remove DeployedModels use [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel] and
+     * [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel] respectively.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.DeployedModel deployed_models = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getDeployedModelsOrBuilderList() { + if (deployedModelsBuilder_ != null) { + return deployedModelsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(deployedModels_); + } + } + /** + * + * + *
+     * Output only. The models deployed in this Endpoint.
+     * To add or remove DeployedModels use [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel] and
+     * [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel] respectively.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.DeployedModel deployed_models = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.DeployedModel.Builder addDeployedModelsBuilder() { + return getDeployedModelsFieldBuilder() + .addBuilder(com.google.cloud.aiplatform.v1.DeployedModel.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. The models deployed in this Endpoint.
+     * To add or remove DeployedModels use [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel] and
+     * [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel] respectively.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.DeployedModel deployed_models = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.DeployedModel.Builder addDeployedModelsBuilder( + int index) { + return getDeployedModelsFieldBuilder() + .addBuilder(index, com.google.cloud.aiplatform.v1.DeployedModel.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. The models deployed in this Endpoint.
+     * To add or remove DeployedModels use [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel] and
+     * [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel] respectively.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.DeployedModel deployed_models = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getDeployedModelsBuilderList() { + return getDeployedModelsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.DeployedModel, + com.google.cloud.aiplatform.v1.DeployedModel.Builder, + com.google.cloud.aiplatform.v1.DeployedModelOrBuilder> + getDeployedModelsFieldBuilder() { + if (deployedModelsBuilder_ == null) { + deployedModelsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.DeployedModel, + com.google.cloud.aiplatform.v1.DeployedModel.Builder, + com.google.cloud.aiplatform.v1.DeployedModelOrBuilder>( + deployedModels_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + deployedModels_ = null; + } + return deployedModelsBuilder_; + } + + private com.google.protobuf.MapField trafficSplit_; + + private com.google.protobuf.MapField + internalGetTrafficSplit() { + if (trafficSplit_ == null) { + return com.google.protobuf.MapField.emptyMapField( + TrafficSplitDefaultEntryHolder.defaultEntry); + } + return trafficSplit_; + } + + private com.google.protobuf.MapField + internalGetMutableTrafficSplit() { + onChanged(); + ; + if (trafficSplit_ == null) { + trafficSplit_ = + com.google.protobuf.MapField.newMapField(TrafficSplitDefaultEntryHolder.defaultEntry); + } + if (!trafficSplit_.isMutable()) { + trafficSplit_ = trafficSplit_.copy(); + } + return trafficSplit_; + } + + public int getTrafficSplitCount() { + return internalGetTrafficSplit().getMap().size(); + } + /** + * + * + *
+     * A map from a DeployedModel's ID to the percentage of this Endpoint's
+     * traffic that should be forwarded to that DeployedModel.
+     * If a DeployedModel's ID is not listed in this map, then it receives no
+     * traffic.
+     * The traffic percentage values must add up to 100, or map must be empty if
+     * the Endpoint is to not accept any traffic at a moment.
+     * 
+ * + * map<string, int32> traffic_split = 5; + */ + @java.lang.Override + public boolean containsTrafficSplit(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetTrafficSplit().getMap().containsKey(key); + } + /** Use {@link #getTrafficSplitMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getTrafficSplit() { + return getTrafficSplitMap(); + } + /** + * + * + *
+     * A map from a DeployedModel's ID to the percentage of this Endpoint's
+     * traffic that should be forwarded to that DeployedModel.
+     * If a DeployedModel's ID is not listed in this map, then it receives no
+     * traffic.
+     * The traffic percentage values must add up to 100, or map must be empty if
+     * the Endpoint is to not accept any traffic at a moment.
+     * 
+ * + * map<string, int32> traffic_split = 5; + */ + @java.lang.Override + public java.util.Map getTrafficSplitMap() { + return internalGetTrafficSplit().getMap(); + } + /** + * + * + *
+     * A map from a DeployedModel's ID to the percentage of this Endpoint's
+     * traffic that should be forwarded to that DeployedModel.
+     * If a DeployedModel's ID is not listed in this map, then it receives no
+     * traffic.
+     * The traffic percentage values must add up to 100, or map must be empty if
+     * the Endpoint is to not accept any traffic at a moment.
+     * 
+ * + * map<string, int32> traffic_split = 5; + */ + @java.lang.Override + public int getTrafficSplitOrDefault(java.lang.String key, int defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetTrafficSplit().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * A map from a DeployedModel's ID to the percentage of this Endpoint's
+     * traffic that should be forwarded to that DeployedModel.
+     * If a DeployedModel's ID is not listed in this map, then it receives no
+     * traffic.
+     * The traffic percentage values must add up to 100, or map must be empty if
+     * the Endpoint is to not accept any traffic at a moment.
+     * 
+ * + * map<string, int32> traffic_split = 5; + */ + @java.lang.Override + public int getTrafficSplitOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetTrafficSplit().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearTrafficSplit() { + internalGetMutableTrafficSplit().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * A map from a DeployedModel's ID to the percentage of this Endpoint's
+     * traffic that should be forwarded to that DeployedModel.
+     * If a DeployedModel's ID is not listed in this map, then it receives no
+     * traffic.
+     * The traffic percentage values must add up to 100, or map must be empty if
+     * the Endpoint is to not accept any traffic at a moment.
+     * 
+ * + * map<string, int32> traffic_split = 5; + */ + public Builder removeTrafficSplit(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableTrafficSplit().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableTrafficSplit() { + return internalGetMutableTrafficSplit().getMutableMap(); + } + /** + * + * + *
+     * A map from a DeployedModel's ID to the percentage of this Endpoint's
+     * traffic that should be forwarded to that DeployedModel.
+     * If a DeployedModel's ID is not listed in this map, then it receives no
+     * traffic.
+     * The traffic percentage values must add up to 100, or map must be empty if
+     * the Endpoint is to not accept any traffic at a moment.
+     * 
+ * + * map<string, int32> traffic_split = 5; + */ + public Builder putTrafficSplit(java.lang.String key, int value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + + internalGetMutableTrafficSplit().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * A map from a DeployedModel's ID to the percentage of this Endpoint's
+     * traffic that should be forwarded to that DeployedModel.
+     * If a DeployedModel's ID is not listed in this map, then it receives no
+     * traffic.
+     * The traffic percentage values must add up to 100, or map must be empty if
+     * the Endpoint is to not accept any traffic at a moment.
+     * 
+ * + * map<string, int32> traffic_split = 5; + */ + public Builder putAllTrafficSplit(java.util.Map values) { + internalGetMutableTrafficSplit().getMutableMap().putAll(values); + return this; + } + + private java.lang.Object etag_ = ""; + /** + * + * + *
+     * Used to perform consistent read-modify-write updates. If not set, a blind
+     * "overwrite" update happens.
+     * 
+ * + * string etag = 6; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Used to perform consistent read-modify-write updates. If not set, a blind
+     * "overwrite" update happens.
+     * 
+ * + * string etag = 6; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Used to perform consistent read-modify-write updates. If not set, a blind
+     * "overwrite" update happens.
+     * 
+ * + * string etag = 6; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + etag_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Used to perform consistent read-modify-write updates. If not set, a blind
+     * "overwrite" update happens.
+     * 
+ * + * string etag = 6; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + + etag_ = getDefaultInstance().getEtag(); + onChanged(); + return this; + } + /** + * + * + *
+     * Used to perform consistent read-modify-write updates. If not set, a blind
+     * "overwrite" update happens.
+     * 
+ * + * string etag = 6; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + etag_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + onChanged(); + ; + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * The labels with user-defined metadata to organize your Endpoints.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 7; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * The labels with user-defined metadata to organize your Endpoints.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 7; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * The labels with user-defined metadata to organize your Endpoints.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 7; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * The labels with user-defined metadata to organize your Endpoints.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 7; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * The labels with user-defined metadata to organize your Endpoints.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 7; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * The labels with user-defined metadata to organize your Endpoints.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 7; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * The labels with user-defined metadata to organize your Endpoints.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 7; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. Timestamp when this Endpoint was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * Output only. Timestamp when this Endpoint was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Timestamp when this Endpoint was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this Endpoint was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this Endpoint was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this Endpoint was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this Endpoint was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Timestamp when this Endpoint was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. Timestamp when this Endpoint was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. Timestamp when this Endpoint was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + * + * + *
+     * Output only. Timestamp when this Endpoint was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Timestamp when this Endpoint was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this Endpoint was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this Endpoint was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this Endpoint was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this Endpoint was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Timestamp when this Endpoint was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. Timestamp when this Endpoint was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.cloud.aiplatform.v1.EncryptionSpec encryptionSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.EncryptionSpec, + com.google.cloud.aiplatform.v1.EncryptionSpec.Builder, + com.google.cloud.aiplatform.v1.EncryptionSpecOrBuilder> + encryptionSpecBuilder_; + /** + * + * + *
+     * Customer-managed encryption key spec for an Endpoint. If set, this
+     * Endpoint and all sub-resources of this Endpoint will be secured by
+     * this key.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 10; + * + * @return Whether the encryptionSpec field is set. + */ + public boolean hasEncryptionSpec() { + return encryptionSpecBuilder_ != null || encryptionSpec_ != null; + } + /** + * + * + *
+     * Customer-managed encryption key spec for an Endpoint. If set, this
+     * Endpoint and all sub-resources of this Endpoint will be secured by
+     * this key.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 10; + * + * @return The encryptionSpec. + */ + public com.google.cloud.aiplatform.v1.EncryptionSpec getEncryptionSpec() { + if (encryptionSpecBuilder_ == null) { + return encryptionSpec_ == null + ? com.google.cloud.aiplatform.v1.EncryptionSpec.getDefaultInstance() + : encryptionSpec_; + } else { + return encryptionSpecBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Customer-managed encryption key spec for an Endpoint. If set, this
+     * Endpoint and all sub-resources of this Endpoint will be secured by
+     * this key.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 10; + */ + public Builder setEncryptionSpec(com.google.cloud.aiplatform.v1.EncryptionSpec value) { + if (encryptionSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + encryptionSpec_ = value; + onChanged(); + } else { + encryptionSpecBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Customer-managed encryption key spec for an Endpoint. If set, this
+     * Endpoint and all sub-resources of this Endpoint will be secured by
+     * this key.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 10; + */ + public Builder setEncryptionSpec( + com.google.cloud.aiplatform.v1.EncryptionSpec.Builder builderForValue) { + if (encryptionSpecBuilder_ == null) { + encryptionSpec_ = builderForValue.build(); + onChanged(); + } else { + encryptionSpecBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Customer-managed encryption key spec for an Endpoint. If set, this
+     * Endpoint and all sub-resources of this Endpoint will be secured by
+     * this key.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 10; + */ + public Builder mergeEncryptionSpec(com.google.cloud.aiplatform.v1.EncryptionSpec value) { + if (encryptionSpecBuilder_ == null) { + if (encryptionSpec_ != null) { + encryptionSpec_ = + com.google.cloud.aiplatform.v1.EncryptionSpec.newBuilder(encryptionSpec_) + .mergeFrom(value) + .buildPartial(); + } else { + encryptionSpec_ = value; + } + onChanged(); + } else { + encryptionSpecBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Customer-managed encryption key spec for an Endpoint. If set, this
+     * Endpoint and all sub-resources of this Endpoint will be secured by
+     * this key.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 10; + */ + public Builder clearEncryptionSpec() { + if (encryptionSpecBuilder_ == null) { + encryptionSpec_ = null; + onChanged(); + } else { + encryptionSpec_ = null; + encryptionSpecBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Customer-managed encryption key spec for an Endpoint. If set, this
+     * Endpoint and all sub-resources of this Endpoint will be secured by
+     * this key.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 10; + */ + public com.google.cloud.aiplatform.v1.EncryptionSpec.Builder getEncryptionSpecBuilder() { + + onChanged(); + return getEncryptionSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Customer-managed encryption key spec for an Endpoint. If set, this
+     * Endpoint and all sub-resources of this Endpoint will be secured by
+     * this key.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 10; + */ + public com.google.cloud.aiplatform.v1.EncryptionSpecOrBuilder getEncryptionSpecOrBuilder() { + if (encryptionSpecBuilder_ != null) { + return encryptionSpecBuilder_.getMessageOrBuilder(); + } else { + return encryptionSpec_ == null + ? com.google.cloud.aiplatform.v1.EncryptionSpec.getDefaultInstance() + : encryptionSpec_; + } + } + /** + * + * + *
+     * Customer-managed encryption key spec for an Endpoint. If set, this
+     * Endpoint and all sub-resources of this Endpoint will be secured by
+     * this key.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.EncryptionSpec, + com.google.cloud.aiplatform.v1.EncryptionSpec.Builder, + com.google.cloud.aiplatform.v1.EncryptionSpecOrBuilder> + getEncryptionSpecFieldBuilder() { + if (encryptionSpecBuilder_ == null) { + encryptionSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.EncryptionSpec, + com.google.cloud.aiplatform.v1.EncryptionSpec.Builder, + com.google.cloud.aiplatform.v1.EncryptionSpecOrBuilder>( + getEncryptionSpec(), getParentForChildren(), isClean()); + encryptionSpec_ = null; + } + return encryptionSpecBuilder_; + } + + @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.v1.Endpoint) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.Endpoint) + private static final com.google.cloud.aiplatform.v1.Endpoint DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.Endpoint(); + } + + public static com.google.cloud.aiplatform.v1.Endpoint getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Endpoint parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Endpoint(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.v1.Endpoint getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EndpointName.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EndpointName.java new file mode 100644 index 000000000..c83fa3a0f --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EndpointName.java @@ -0,0 +1,223 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class EndpointName implements ResourceName { + 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; + } + + public String getLocation() { + return location; + } + + public String getEndpoint() { + return endpoint; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static EndpointName of(String project, String location, String endpoint) { + return newBuilder().setProject(project).setLocation(location).setEndpoint(endpoint).build(); + } + + public static String format(String project, String location, String endpoint) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setEndpoint(endpoint) + .build() + .toString(); + } + + public static EndpointName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_ENDPOINT.validatedMatch( + formattedString, "EndpointName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("endpoint")); + } + + 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 (EndpointName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_ENDPOINT.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 (location != null) { + fieldMapBuilder.put("location", location); + } + if (endpoint != null) { + fieldMapBuilder.put("endpoint", endpoint); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_ENDPOINT.instantiate( + "project", project, "location", location, "endpoint", endpoint); + } + + @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; + } + + public String getLocation() { + return location; + } + + public String getEndpoint() { + return endpoint; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setEndpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + private Builder(EndpointName endpointName) { + project = endpointName.project; + location = endpointName.location; + endpoint = endpointName.endpoint; + } + + public EndpointName build() { + return new EndpointName(this); + } + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EndpointOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EndpointOrBuilder.java new file mode 100644 index 000000000..83721873c --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EndpointOrBuilder.java @@ -0,0 +1,473 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/endpoint.proto + +package com.google.cloud.aiplatform.v1; + +public interface EndpointOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.Endpoint) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The resource name of the Endpoint.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. The resource name of the Endpoint.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The display name of the Endpoint.
+   * The name can be up to 128 characters long and can be consist of any UTF-8
+   * characters.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Required. The display name of the Endpoint.
+   * The name can be up to 128 characters long and can be consist of any UTF-8
+   * characters.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * The description of the Endpoint.
+   * 
+ * + * string description = 3; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * The description of the Endpoint.
+   * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Output only. The models deployed in this Endpoint.
+   * To add or remove DeployedModels use [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel] and
+   * [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel] respectively.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.DeployedModel deployed_models = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getDeployedModelsList(); + /** + * + * + *
+   * Output only. The models deployed in this Endpoint.
+   * To add or remove DeployedModels use [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel] and
+   * [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel] respectively.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.DeployedModel deployed_models = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1.DeployedModel getDeployedModels(int index); + /** + * + * + *
+   * Output only. The models deployed in this Endpoint.
+   * To add or remove DeployedModels use [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel] and
+   * [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel] respectively.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.DeployedModel deployed_models = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getDeployedModelsCount(); + /** + * + * + *
+   * Output only. The models deployed in this Endpoint.
+   * To add or remove DeployedModels use [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel] and
+   * [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel] respectively.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.DeployedModel deployed_models = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getDeployedModelsOrBuilderList(); + /** + * + * + *
+   * Output only. The models deployed in this Endpoint.
+   * To add or remove DeployedModels use [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel] and
+   * [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel] respectively.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.DeployedModel deployed_models = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1.DeployedModelOrBuilder getDeployedModelsOrBuilder(int index); + + /** + * + * + *
+   * A map from a DeployedModel's ID to the percentage of this Endpoint's
+   * traffic that should be forwarded to that DeployedModel.
+   * If a DeployedModel's ID is not listed in this map, then it receives no
+   * traffic.
+   * The traffic percentage values must add up to 100, or map must be empty if
+   * the Endpoint is to not accept any traffic at a moment.
+   * 
+ * + * map<string, int32> traffic_split = 5; + */ + int getTrafficSplitCount(); + /** + * + * + *
+   * A map from a DeployedModel's ID to the percentage of this Endpoint's
+   * traffic that should be forwarded to that DeployedModel.
+   * If a DeployedModel's ID is not listed in this map, then it receives no
+   * traffic.
+   * The traffic percentage values must add up to 100, or map must be empty if
+   * the Endpoint is to not accept any traffic at a moment.
+   * 
+ * + * map<string, int32> traffic_split = 5; + */ + boolean containsTrafficSplit(java.lang.String key); + /** Use {@link #getTrafficSplitMap()} instead. */ + @java.lang.Deprecated + java.util.Map getTrafficSplit(); + /** + * + * + *
+   * A map from a DeployedModel's ID to the percentage of this Endpoint's
+   * traffic that should be forwarded to that DeployedModel.
+   * If a DeployedModel's ID is not listed in this map, then it receives no
+   * traffic.
+   * The traffic percentage values must add up to 100, or map must be empty if
+   * the Endpoint is to not accept any traffic at a moment.
+   * 
+ * + * map<string, int32> traffic_split = 5; + */ + java.util.Map getTrafficSplitMap(); + /** + * + * + *
+   * A map from a DeployedModel's ID to the percentage of this Endpoint's
+   * traffic that should be forwarded to that DeployedModel.
+   * If a DeployedModel's ID is not listed in this map, then it receives no
+   * traffic.
+   * The traffic percentage values must add up to 100, or map must be empty if
+   * the Endpoint is to not accept any traffic at a moment.
+   * 
+ * + * map<string, int32> traffic_split = 5; + */ + int getTrafficSplitOrDefault(java.lang.String key, int defaultValue); + /** + * + * + *
+   * A map from a DeployedModel's ID to the percentage of this Endpoint's
+   * traffic that should be forwarded to that DeployedModel.
+   * If a DeployedModel's ID is not listed in this map, then it receives no
+   * traffic.
+   * The traffic percentage values must add up to 100, or map must be empty if
+   * the Endpoint is to not accept any traffic at a moment.
+   * 
+ * + * map<string, int32> traffic_split = 5; + */ + int getTrafficSplitOrThrow(java.lang.String key); + + /** + * + * + *
+   * Used to perform consistent read-modify-write updates. If not set, a blind
+   * "overwrite" update happens.
+   * 
+ * + * string etag = 6; + * + * @return The etag. + */ + java.lang.String getEtag(); + /** + * + * + *
+   * Used to perform consistent read-modify-write updates. If not set, a blind
+   * "overwrite" update happens.
+   * 
+ * + * string etag = 6; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); + + /** + * + * + *
+   * The labels with user-defined metadata to organize your Endpoints.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 7; + */ + int getLabelsCount(); + /** + * + * + *
+   * The labels with user-defined metadata to organize your Endpoints.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 7; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * The labels with user-defined metadata to organize your Endpoints.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 7; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * The labels with user-defined metadata to organize your Endpoints.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 7; + */ + java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * The labels with user-defined metadata to organize your Endpoints.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 7; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Output only. Timestamp when this Endpoint was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Timestamp when this Endpoint was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Timestamp when this Endpoint was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Timestamp when this Endpoint was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. Timestamp when this Endpoint was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. Timestamp when this Endpoint was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Customer-managed encryption key spec for an Endpoint. If set, this
+   * Endpoint and all sub-resources of this Endpoint will be secured by
+   * this key.
+   * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 10; + * + * @return Whether the encryptionSpec field is set. + */ + boolean hasEncryptionSpec(); + /** + * + * + *
+   * Customer-managed encryption key spec for an Endpoint. If set, this
+   * Endpoint and all sub-resources of this Endpoint will be secured by
+   * this key.
+   * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 10; + * + * @return The encryptionSpec. + */ + com.google.cloud.aiplatform.v1.EncryptionSpec getEncryptionSpec(); + /** + * + * + *
+   * Customer-managed encryption key spec for an Endpoint. If set, this
+   * Endpoint and all sub-resources of this Endpoint will be secured by
+   * this key.
+   * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 10; + */ + com.google.cloud.aiplatform.v1.EncryptionSpecOrBuilder getEncryptionSpecOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EndpointProto.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EndpointProto.java new file mode 100644 index 000000000..e4e9e1dda --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EndpointProto.java @@ -0,0 +1,172 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/endpoint.proto + +package com.google.cloud.aiplatform.v1; + +public final class EndpointProto { + private EndpointProto() {} + + 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_v1_Endpoint_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_Endpoint_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_Endpoint_TrafficSplitEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_Endpoint_TrafficSplitEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_Endpoint_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_Endpoint_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_DeployedModel_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_DeployedModel_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/v1/endpoint.pr" + + "oto\022\032google.cloud.aiplatform.v1\032\037google/" + + "api/field_behavior.proto\032\031google/api/res" + + "ource.proto\0320google/cloud/aiplatform/v1/" + + "encryption_spec.proto\0322google/cloud/aipl" + + "atform/v1/machine_resources.proto\032\037googl" + + "e/protobuf/timestamp.proto\032\034google/api/a" + + "nnotations.proto\"\261\005\n\010Endpoint\022\021\n\004name\030\001 " + + "\001(\tB\003\340A\003\022\031\n\014display_name\030\002 \001(\tB\003\340A\002\022\023\n\013d" + + "escription\030\003 \001(\t\022G\n\017deployed_models\030\004 \003(" + + "\0132).google.cloud.aiplatform.v1.DeployedM" + + "odelB\003\340A\003\022M\n\rtraffic_split\030\005 \003(\01326.googl" + + "e.cloud.aiplatform.v1.Endpoint.TrafficSp" + + "litEntry\022\014\n\004etag\030\006 \001(\t\022@\n\006labels\030\007 \003(\01320" + + ".google.cloud.aiplatform.v1.Endpoint.Lab" + + "elsEntry\0224\n\013create_time\030\010 \001(\0132\032.google.p" + + "rotobuf.TimestampB\003\340A\003\0224\n\013update_time\030\t " + + "\001(\0132\032.google.protobuf.TimestampB\003\340A\003\022C\n\017" + + "encryption_spec\030\n \001(\0132*.google.cloud.aip" + + "latform.v1.EncryptionSpec\0323\n\021TrafficSpli" + + "tEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\005:\0028\001\032-" + + "\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(" + + "\t:\0028\001:e\352Ab\n\"aiplatform.googleapis.com/En" + + "dpoint\022\202\323\344\223\002/\022-/v1/{parent=projects/*/loc" + + "ations/*}/endpoints\332A\006parent\022\312\001\n\016UpdateE" + + "ndpoint\0221.google.cloud.aiplatform.v1.Upd" + + "ateEndpointRequest\032$.google.cloud.aiplat" + + "form.v1.Endpoint\"_\202\323\344\223\002B26/v1/{endpoint." + + "name=projects/*/locations/*/endpoints/*}" + + ":\010endpoint\332A\024endpoint,update_mask\022\323\001\n\016De" + + "leteEndpoint\0221.google.cloud.aiplatform.v" + + "1.DeleteEndpointRequest\032\035.google.longrun" + + "ning.Operation\"o\202\323\344\223\002/*-/v1/{name=projec" + + "ts/*/locations/*/endpoints/*}\332A\004name\312A0\n" + + "\025google.protobuf.Empty\022\027DeleteOperationM" + + "etadata\022\205\002\n\013DeployModel\022..google.cloud.a" + + "iplatform.v1.DeployModelRequest\032\035.google" + + ".longrunning.Operation\"\246\001\202\323\344\223\002B\"=/v1/{en" + + "dpoint=projects/*/locations/*/endpoints/" + + "*}:deployModel:\001*\332A%endpoint,deployed_mo" + + "del,traffic_split\312A3\n\023DeployModelRespons" + + "e\022\034DeployModelOperationMetadata\022\222\002\n\rUnde" + + "ployModel\0220.google.cloud.aiplatform.v1.U" + + "ndeployModelRequest\032\035.google.longrunning" + + ".Operation\"\257\001\202\323\344\223\002D\"?/v1/{endpoint=proje" + + "cts/*/locations/*/endpoints/*}:undeployM" + + "odel:\001*\332A(endpoint,deployed_model_id,tra" + + "ffic_split\312A7\n\025UndeployModelResponse\022\036Un" + + "deployModelOperationMetadata\032M\312A\031aiplatf" + + "orm.googleapis.com\322A.https://www.googlea" + + "pis.com/auth/cloud-platformB~\n\036com.googl" + + "e.cloud.aiplatform.v1B\024EndpointServicePr" + + "otoP\001ZDgoogle.golang.org/genproto/google" + + "apis/cloud/aiplatform/v1;aiplatformb\006pro" + + "to3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.aiplatform.v1.EndpointProto.getDescriptor(), + com.google.cloud.aiplatform.v1.OperationProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1_CreateEndpointRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_CreateEndpointRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_CreateEndpointRequest_descriptor, + new java.lang.String[] { + "Parent", "Endpoint", + }); + internal_static_google_cloud_aiplatform_v1_CreateEndpointOperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_aiplatform_v1_CreateEndpointOperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_CreateEndpointOperationMetadata_descriptor, + new java.lang.String[] { + "GenericMetadata", + }); + internal_static_google_cloud_aiplatform_v1_GetEndpointRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_aiplatform_v1_GetEndpointRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_GetEndpointRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_aiplatform_v1_ListEndpointsRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_aiplatform_v1_ListEndpointsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ListEndpointsRequest_descriptor, + new java.lang.String[] { + "Parent", "Filter", "PageSize", "PageToken", "ReadMask", "OrderBy", + }); + internal_static_google_cloud_aiplatform_v1_ListEndpointsResponse_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_aiplatform_v1_ListEndpointsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ListEndpointsResponse_descriptor, + new java.lang.String[] { + "Endpoints", "NextPageToken", + }); + internal_static_google_cloud_aiplatform_v1_UpdateEndpointRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_aiplatform_v1_UpdateEndpointRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_UpdateEndpointRequest_descriptor, + new java.lang.String[] { + "Endpoint", "UpdateMask", + }); + internal_static_google_cloud_aiplatform_v1_DeleteEndpointRequest_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_aiplatform_v1_DeleteEndpointRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_DeleteEndpointRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_aiplatform_v1_DeployModelRequest_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_aiplatform_v1_DeployModelRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_DeployModelRequest_descriptor, + new java.lang.String[] { + "Endpoint", "DeployedModel", "TrafficSplit", + }); + internal_static_google_cloud_aiplatform_v1_DeployModelRequest_TrafficSplitEntry_descriptor = + internal_static_google_cloud_aiplatform_v1_DeployModelRequest_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_aiplatform_v1_DeployModelRequest_TrafficSplitEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_DeployModelRequest_TrafficSplitEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_aiplatform_v1_DeployModelResponse_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_aiplatform_v1_DeployModelResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_DeployModelResponse_descriptor, + new java.lang.String[] { + "DeployedModel", + }); + internal_static_google_cloud_aiplatform_v1_DeployModelOperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_aiplatform_v1_DeployModelOperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_DeployModelOperationMetadata_descriptor, + new java.lang.String[] { + "GenericMetadata", + }); + internal_static_google_cloud_aiplatform_v1_UndeployModelRequest_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_aiplatform_v1_UndeployModelRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_UndeployModelRequest_descriptor, + new java.lang.String[] { + "Endpoint", "DeployedModelId", "TrafficSplit", + }); + internal_static_google_cloud_aiplatform_v1_UndeployModelRequest_TrafficSplitEntry_descriptor = + internal_static_google_cloud_aiplatform_v1_UndeployModelRequest_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_aiplatform_v1_UndeployModelRequest_TrafficSplitEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_UndeployModelRequest_TrafficSplitEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_aiplatform_v1_UndeployModelResponse_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_aiplatform_v1_UndeployModelResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_UndeployModelResponse_descriptor, + new java.lang.String[] {}); + internal_static_google_cloud_aiplatform_v1_UndeployModelOperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_aiplatform_v1_UndeployModelOperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_UndeployModelOperationMetadata_descriptor, + new java.lang.String[] { + "GenericMetadata", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resourceReference); + registry.add(com.google.longrunning.OperationsProto.operationInfo); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.aiplatform.v1.EndpointProto.getDescriptor(); + com.google.cloud.aiplatform.v1.OperationProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EnvVar.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EnvVar.java new file mode 100644 index 000000000..91c7cf23f --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EnvVar.java @@ -0,0 +1,853 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/env_var.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Represents an environment variable present in a Container or Python Module.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.EnvVar} + */ +public final class EnvVar extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.EnvVar) + EnvVarOrBuilder { + private static final long serialVersionUID = 0L; + // Use EnvVar.newBuilder() to construct. + private EnvVar(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private EnvVar() { + name_ = ""; + value_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new EnvVar(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private EnvVar( + 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(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + value_ = 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.v1.EnvVarProto + .internal_static_google_cloud_aiplatform_v1_EnvVar_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.EnvVarProto + .internal_static_google_cloud_aiplatform_v1_EnvVar_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.EnvVar.class, + com.google.cloud.aiplatform.v1.EnvVar.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. Name of the environment variable. Must be a valid C identifier.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the environment variable. Must be a valid C identifier.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALUE_FIELD_NUMBER = 2; + private volatile java.lang.Object value_; + /** + * + * + *
+   * Required. Variables that reference a $(VAR_NAME) are expanded
+   * using the previous defined environment variables in the container and
+   * any service environment variables. If a variable cannot be resolved,
+   * the reference in the input string will be unchanged. The $(VAR_NAME)
+   * syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped
+   * references will never be expanded, regardless of whether the variable
+   * exists or not.
+   * 
+ * + * string value = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The value. + */ + @java.lang.Override + public java.lang.String getValue() { + java.lang.Object ref = value_; + 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(); + value_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Variables that reference a $(VAR_NAME) are expanded
+   * using the previous defined environment variables in the container and
+   * any service environment variables. If a variable cannot be resolved,
+   * the reference in the input string will be unchanged. The $(VAR_NAME)
+   * syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped
+   * references will never be expanded, regardless of whether the variable
+   * exists or not.
+   * 
+ * + * string value = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for value. + */ + @java.lang.Override + public com.google.protobuf.ByteString getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getValueBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, value_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getValueBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, value_); + } + 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.v1.EnvVar)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.EnvVar other = (com.google.cloud.aiplatform.v1.EnvVar) obj; + + if (!getName().equals(other.getName())) return false; + if (!getValue().equals(other.getValue())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.EnvVar parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.EnvVar 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.v1.EnvVar parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.EnvVar 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.v1.EnvVar parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.EnvVar parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.EnvVar parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.EnvVar 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.v1.EnvVar parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.EnvVar 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.v1.EnvVar parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.EnvVar 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.v1.EnvVar 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 an environment variable present in a Container or Python Module.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.EnvVar} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.EnvVar) + com.google.cloud.aiplatform.v1.EnvVarOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.EnvVarProto + .internal_static_google_cloud_aiplatform_v1_EnvVar_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.EnvVarProto + .internal_static_google_cloud_aiplatform_v1_EnvVar_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.EnvVar.class, + com.google.cloud.aiplatform.v1.EnvVar.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.EnvVar.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + value_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.EnvVarProto + .internal_static_google_cloud_aiplatform_v1_EnvVar_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.EnvVar getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.EnvVar.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.EnvVar build() { + com.google.cloud.aiplatform.v1.EnvVar result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.EnvVar buildPartial() { + com.google.cloud.aiplatform.v1.EnvVar result = + new com.google.cloud.aiplatform.v1.EnvVar(this); + result.name_ = name_; + result.value_ = value_; + 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.v1.EnvVar) { + return mergeFrom((com.google.cloud.aiplatform.v1.EnvVar) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.EnvVar other) { + if (other == com.google.cloud.aiplatform.v1.EnvVar.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getValue().isEmpty()) { + value_ = other.value_; + 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.v1.EnvVar parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.aiplatform.v1.EnvVar) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Name of the environment variable. Must be a valid C identifier.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the environment variable. Must be a valid C identifier.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the environment variable. Must be a valid C identifier.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the environment variable. Must be a valid C identifier.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the environment variable. Must be a valid C identifier.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object value_ = ""; + /** + * + * + *
+     * Required. Variables that reference a $(VAR_NAME) are expanded
+     * using the previous defined environment variables in the container and
+     * any service environment variables. If a variable cannot be resolved,
+     * the reference in the input string will be unchanged. The $(VAR_NAME)
+     * syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped
+     * references will never be expanded, regardless of whether the variable
+     * exists or not.
+     * 
+ * + * string value = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The value. + */ + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + value_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Variables that reference a $(VAR_NAME) are expanded
+     * using the previous defined environment variables in the container and
+     * any service environment variables. If a variable cannot be resolved,
+     * the reference in the input string will be unchanged. The $(VAR_NAME)
+     * syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped
+     * references will never be expanded, regardless of whether the variable
+     * exists or not.
+     * 
+ * + * string value = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for value. + */ + public com.google.protobuf.ByteString getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Variables that reference a $(VAR_NAME) are expanded
+     * using the previous defined environment variables in the container and
+     * any service environment variables. If a variable cannot be resolved,
+     * the reference in the input string will be unchanged. The $(VAR_NAME)
+     * syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped
+     * references will never be expanded, regardless of whether the variable
+     * exists or not.
+     * 
+ * + * string value = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The value to set. + * @return This builder for chaining. + */ + public Builder setValue(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + value_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Variables that reference a $(VAR_NAME) are expanded
+     * using the previous defined environment variables in the container and
+     * any service environment variables. If a variable cannot be resolved,
+     * the reference in the input string will be unchanged. The $(VAR_NAME)
+     * syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped
+     * references will never be expanded, regardless of whether the variable
+     * exists or not.
+     * 
+ * + * string value = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearValue() { + + value_ = getDefaultInstance().getValue(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Variables that reference a $(VAR_NAME) are expanded
+     * using the previous defined environment variables in the container and
+     * any service environment variables. If a variable cannot be resolved,
+     * the reference in the input string will be unchanged. The $(VAR_NAME)
+     * syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped
+     * references will never be expanded, regardless of whether the variable
+     * exists or not.
+     * 
+ * + * string value = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for value to set. + * @return This builder for chaining. + */ + public Builder setValueBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + value_ = 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.v1.EnvVar) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.EnvVar) + private static final com.google.cloud.aiplatform.v1.EnvVar DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.EnvVar(); + } + + public static com.google.cloud.aiplatform.v1.EnvVar getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EnvVar parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new EnvVar(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.v1.EnvVar getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EnvVarOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EnvVarOrBuilder.java new file mode 100644 index 000000000..a1db21820 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EnvVarOrBuilder.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/v1/env_var.proto + +package com.google.cloud.aiplatform.v1; + +public interface EnvVarOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.EnvVar) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the environment variable. Must be a valid C identifier.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the environment variable. Must be a valid C identifier.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. Variables that reference a $(VAR_NAME) are expanded
+   * using the previous defined environment variables in the container and
+   * any service environment variables. If a variable cannot be resolved,
+   * the reference in the input string will be unchanged. The $(VAR_NAME)
+   * syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped
+   * references will never be expanded, regardless of whether the variable
+   * exists or not.
+   * 
+ * + * string value = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The value. + */ + java.lang.String getValue(); + /** + * + * + *
+   * Required. Variables that reference a $(VAR_NAME) are expanded
+   * using the previous defined environment variables in the container and
+   * any service environment variables. If a variable cannot be resolved,
+   * the reference in the input string will be unchanged. The $(VAR_NAME)
+   * syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped
+   * references will never be expanded, regardless of whether the variable
+   * exists or not.
+   * 
+ * + * string value = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for value. + */ + com.google.protobuf.ByteString getValueBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EnvVarProto.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EnvVarProto.java new file mode 100644 index 000000000..2925ecb74 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EnvVarProto.java @@ -0,0 +1,77 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/env_var.proto + +package com.google.cloud.aiplatform.v1; + +public final class EnvVarProto { + private EnvVarProto() {} + + 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_v1_EnvVar_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_EnvVar_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/v1/env_var.pro" + + "to\022\032google.cloud.aiplatform.v1\032\037google/a" + + "pi/field_behavior.proto\032\034google/api/anno" + + "tations.proto\"/\n\006EnvVar\022\021\n\004name\030\001 \001(\tB\003\340" + + "A\002\022\022\n\005value\030\002 \001(\tB\003\340A\002Bu\n\036com.google.clo" + + "ud.aiplatform.v1B\013EnvVarProtoP\001ZDgoogle." + + "golang.org/genproto/googleapis/cloud/aip" + + "latform/v1;aiplatformb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1_EnvVar_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_EnvVar_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_EnvVar_descriptor, + new java.lang.String[] { + "Name", "Value", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ExportDataConfig.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ExportDataConfig.java new file mode 100644 index 000000000..a57884903 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ExportDataConfig.java @@ -0,0 +1,1134 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/dataset.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Describes what part of the Dataset is to be exported, the destination of
+ * the export and how to export.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ExportDataConfig} + */ +public final class ExportDataConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ExportDataConfig) + ExportDataConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExportDataConfig.newBuilder() to construct. + private ExportDataConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExportDataConfig() { + annotationsFilter_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExportDataConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ExportDataConfig( + 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.v1.GcsDestination.Builder subBuilder = null; + if (destinationCase_ == 1) { + subBuilder = + ((com.google.cloud.aiplatform.v1.GcsDestination) destination_).toBuilder(); + } + destination_ = + input.readMessage( + com.google.cloud.aiplatform.v1.GcsDestination.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.aiplatform.v1.GcsDestination) destination_); + destination_ = subBuilder.buildPartial(); + } + destinationCase_ = 1; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + annotationsFilter_ = 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.v1.DatasetProto + .internal_static_google_cloud_aiplatform_v1_ExportDataConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.DatasetProto + .internal_static_google_cloud_aiplatform_v1_ExportDataConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ExportDataConfig.class, + com.google.cloud.aiplatform.v1.ExportDataConfig.Builder.class); + } + + private int destinationCase_ = 0; + private java.lang.Object destination_; + + public enum DestinationCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + GCS_DESTINATION(1), + DESTINATION_NOT_SET(0); + private final int value; + + private DestinationCase(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 DestinationCase valueOf(int value) { + return forNumber(value); + } + + public static DestinationCase forNumber(int value) { + switch (value) { + case 1: + return GCS_DESTINATION; + case 0: + return DESTINATION_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public DestinationCase getDestinationCase() { + return DestinationCase.forNumber(destinationCase_); + } + + public static final int GCS_DESTINATION_FIELD_NUMBER = 1; + /** + * + * + *
+   * The Google Cloud Storage location where the output is to be written to.
+   * In the given directory a new directory will be created with name:
+   * `export-data-<dataset-display-name>-<timestamp-of-export-call>` where
+   * timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All export
+   * output will be written into that directory. Inside that directory,
+   * annotations with the same schema will be grouped into sub directories
+   * which are named with the corresponding annotations' schema title. Inside
+   * these sub directories, a schema.yaml will be created to describe the
+   * output format.
+   * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination gcs_destination = 1; + * + * @return Whether the gcsDestination field is set. + */ + @java.lang.Override + public boolean hasGcsDestination() { + return destinationCase_ == 1; + } + /** + * + * + *
+   * The Google Cloud Storage location where the output is to be written to.
+   * In the given directory a new directory will be created with name:
+   * `export-data-<dataset-display-name>-<timestamp-of-export-call>` where
+   * timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All export
+   * output will be written into that directory. Inside that directory,
+   * annotations with the same schema will be grouped into sub directories
+   * which are named with the corresponding annotations' schema title. Inside
+   * these sub directories, a schema.yaml will be created to describe the
+   * output format.
+   * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination gcs_destination = 1; + * + * @return The gcsDestination. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GcsDestination getGcsDestination() { + if (destinationCase_ == 1) { + return (com.google.cloud.aiplatform.v1.GcsDestination) destination_; + } + return com.google.cloud.aiplatform.v1.GcsDestination.getDefaultInstance(); + } + /** + * + * + *
+   * The Google Cloud Storage location where the output is to be written to.
+   * In the given directory a new directory will be created with name:
+   * `export-data-<dataset-display-name>-<timestamp-of-export-call>` where
+   * timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All export
+   * output will be written into that directory. Inside that directory,
+   * annotations with the same schema will be grouped into sub directories
+   * which are named with the corresponding annotations' schema title. Inside
+   * these sub directories, a schema.yaml will be created to describe the
+   * output format.
+   * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination gcs_destination = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GcsDestinationOrBuilder getGcsDestinationOrBuilder() { + if (destinationCase_ == 1) { + return (com.google.cloud.aiplatform.v1.GcsDestination) destination_; + } + return com.google.cloud.aiplatform.v1.GcsDestination.getDefaultInstance(); + } + + public static final int ANNOTATIONS_FILTER_FIELD_NUMBER = 2; + private volatile java.lang.Object annotationsFilter_; + /** + * + * + *
+   * A filter on Annotations of the Dataset. Only Annotations on to-be-exported
+   * DataItems(specified by [data_items_filter][]) that match this filter will
+   * be exported. The filter syntax is the same as in
+   * [ListAnnotations][google.cloud.aiplatform.v1.DatasetService.ListAnnotations].
+   * 
+ * + * string annotations_filter = 2; + * + * @return The annotationsFilter. + */ + @java.lang.Override + public java.lang.String getAnnotationsFilter() { + java.lang.Object ref = annotationsFilter_; + 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(); + annotationsFilter_ = s; + return s; + } + } + /** + * + * + *
+   * A filter on Annotations of the Dataset. Only Annotations on to-be-exported
+   * DataItems(specified by [data_items_filter][]) that match this filter will
+   * be exported. The filter syntax is the same as in
+   * [ListAnnotations][google.cloud.aiplatform.v1.DatasetService.ListAnnotations].
+   * 
+ * + * string annotations_filter = 2; + * + * @return The bytes for annotationsFilter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAnnotationsFilterBytes() { + java.lang.Object ref = annotationsFilter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + annotationsFilter_ = 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 (destinationCase_ == 1) { + output.writeMessage(1, (com.google.cloud.aiplatform.v1.GcsDestination) destination_); + } + if (!getAnnotationsFilterBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, annotationsFilter_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (destinationCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.cloud.aiplatform.v1.GcsDestination) destination_); + } + if (!getAnnotationsFilterBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, annotationsFilter_); + } + 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.v1.ExportDataConfig)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ExportDataConfig other = + (com.google.cloud.aiplatform.v1.ExportDataConfig) obj; + + if (!getAnnotationsFilter().equals(other.getAnnotationsFilter())) return false; + if (!getDestinationCase().equals(other.getDestinationCase())) return false; + switch (destinationCase_) { + case 1: + if (!getGcsDestination().equals(other.getGcsDestination())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ANNOTATIONS_FILTER_FIELD_NUMBER; + hash = (53 * hash) + getAnnotationsFilter().hashCode(); + switch (destinationCase_) { + case 1: + hash = (37 * hash) + GCS_DESTINATION_FIELD_NUMBER; + hash = (53 * hash) + getGcsDestination().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.ExportDataConfig parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ExportDataConfig 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.v1.ExportDataConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ExportDataConfig 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.v1.ExportDataConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ExportDataConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ExportDataConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ExportDataConfig 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.v1.ExportDataConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ExportDataConfig 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.v1.ExportDataConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ExportDataConfig 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.v1.ExportDataConfig 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; + } + /** + * + * + *
+   * Describes what part of the Dataset is to be exported, the destination of
+   * the export and how to export.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ExportDataConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ExportDataConfig) + com.google.cloud.aiplatform.v1.ExportDataConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.DatasetProto + .internal_static_google_cloud_aiplatform_v1_ExportDataConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.DatasetProto + .internal_static_google_cloud_aiplatform_v1_ExportDataConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ExportDataConfig.class, + com.google.cloud.aiplatform.v1.ExportDataConfig.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ExportDataConfig.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(); + annotationsFilter_ = ""; + + destinationCase_ = 0; + destination_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.DatasetProto + .internal_static_google_cloud_aiplatform_v1_ExportDataConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ExportDataConfig getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ExportDataConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ExportDataConfig build() { + com.google.cloud.aiplatform.v1.ExportDataConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ExportDataConfig buildPartial() { + com.google.cloud.aiplatform.v1.ExportDataConfig result = + new com.google.cloud.aiplatform.v1.ExportDataConfig(this); + if (destinationCase_ == 1) { + if (gcsDestinationBuilder_ == null) { + result.destination_ = destination_; + } else { + result.destination_ = gcsDestinationBuilder_.build(); + } + } + result.annotationsFilter_ = annotationsFilter_; + result.destinationCase_ = destinationCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.ExportDataConfig) { + return mergeFrom((com.google.cloud.aiplatform.v1.ExportDataConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.ExportDataConfig other) { + if (other == com.google.cloud.aiplatform.v1.ExportDataConfig.getDefaultInstance()) + return this; + if (!other.getAnnotationsFilter().isEmpty()) { + annotationsFilter_ = other.annotationsFilter_; + onChanged(); + } + switch (other.getDestinationCase()) { + case GCS_DESTINATION: + { + mergeGcsDestination(other.getGcsDestination()); + break; + } + case DESTINATION_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.aiplatform.v1.ExportDataConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.aiplatform.v1.ExportDataConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int destinationCase_ = 0; + private java.lang.Object destination_; + + public DestinationCase getDestinationCase() { + return DestinationCase.forNumber(destinationCase_); + } + + public Builder clearDestination() { + destinationCase_ = 0; + destination_ = null; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GcsDestination, + com.google.cloud.aiplatform.v1.GcsDestination.Builder, + com.google.cloud.aiplatform.v1.GcsDestinationOrBuilder> + gcsDestinationBuilder_; + /** + * + * + *
+     * The Google Cloud Storage location where the output is to be written to.
+     * In the given directory a new directory will be created with name:
+     * `export-data-<dataset-display-name>-<timestamp-of-export-call>` where
+     * timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All export
+     * output will be written into that directory. Inside that directory,
+     * annotations with the same schema will be grouped into sub directories
+     * which are named with the corresponding annotations' schema title. Inside
+     * these sub directories, a schema.yaml will be created to describe the
+     * output format.
+     * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination gcs_destination = 1; + * + * @return Whether the gcsDestination field is set. + */ + @java.lang.Override + public boolean hasGcsDestination() { + return destinationCase_ == 1; + } + /** + * + * + *
+     * The Google Cloud Storage location where the output is to be written to.
+     * In the given directory a new directory will be created with name:
+     * `export-data-<dataset-display-name>-<timestamp-of-export-call>` where
+     * timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All export
+     * output will be written into that directory. Inside that directory,
+     * annotations with the same schema will be grouped into sub directories
+     * which are named with the corresponding annotations' schema title. Inside
+     * these sub directories, a schema.yaml will be created to describe the
+     * output format.
+     * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination gcs_destination = 1; + * + * @return The gcsDestination. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GcsDestination getGcsDestination() { + if (gcsDestinationBuilder_ == null) { + if (destinationCase_ == 1) { + return (com.google.cloud.aiplatform.v1.GcsDestination) destination_; + } + return com.google.cloud.aiplatform.v1.GcsDestination.getDefaultInstance(); + } else { + if (destinationCase_ == 1) { + return gcsDestinationBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1.GcsDestination.getDefaultInstance(); + } + } + /** + * + * + *
+     * The Google Cloud Storage location where the output is to be written to.
+     * In the given directory a new directory will be created with name:
+     * `export-data-<dataset-display-name>-<timestamp-of-export-call>` where
+     * timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All export
+     * output will be written into that directory. Inside that directory,
+     * annotations with the same schema will be grouped into sub directories
+     * which are named with the corresponding annotations' schema title. Inside
+     * these sub directories, a schema.yaml will be created to describe the
+     * output format.
+     * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination gcs_destination = 1; + */ + public Builder setGcsDestination(com.google.cloud.aiplatform.v1.GcsDestination value) { + if (gcsDestinationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + destination_ = value; + onChanged(); + } else { + gcsDestinationBuilder_.setMessage(value); + } + destinationCase_ = 1; + return this; + } + /** + * + * + *
+     * The Google Cloud Storage location where the output is to be written to.
+     * In the given directory a new directory will be created with name:
+     * `export-data-<dataset-display-name>-<timestamp-of-export-call>` where
+     * timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All export
+     * output will be written into that directory. Inside that directory,
+     * annotations with the same schema will be grouped into sub directories
+     * which are named with the corresponding annotations' schema title. Inside
+     * these sub directories, a schema.yaml will be created to describe the
+     * output format.
+     * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination gcs_destination = 1; + */ + public Builder setGcsDestination( + com.google.cloud.aiplatform.v1.GcsDestination.Builder builderForValue) { + if (gcsDestinationBuilder_ == null) { + destination_ = builderForValue.build(); + onChanged(); + } else { + gcsDestinationBuilder_.setMessage(builderForValue.build()); + } + destinationCase_ = 1; + return this; + } + /** + * + * + *
+     * The Google Cloud Storage location where the output is to be written to.
+     * In the given directory a new directory will be created with name:
+     * `export-data-<dataset-display-name>-<timestamp-of-export-call>` where
+     * timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All export
+     * output will be written into that directory. Inside that directory,
+     * annotations with the same schema will be grouped into sub directories
+     * which are named with the corresponding annotations' schema title. Inside
+     * these sub directories, a schema.yaml will be created to describe the
+     * output format.
+     * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination gcs_destination = 1; + */ + public Builder mergeGcsDestination(com.google.cloud.aiplatform.v1.GcsDestination value) { + if (gcsDestinationBuilder_ == null) { + if (destinationCase_ == 1 + && destination_ != com.google.cloud.aiplatform.v1.GcsDestination.getDefaultInstance()) { + destination_ = + com.google.cloud.aiplatform.v1.GcsDestination.newBuilder( + (com.google.cloud.aiplatform.v1.GcsDestination) destination_) + .mergeFrom(value) + .buildPartial(); + } else { + destination_ = value; + } + onChanged(); + } else { + if (destinationCase_ == 1) { + gcsDestinationBuilder_.mergeFrom(value); + } + gcsDestinationBuilder_.setMessage(value); + } + destinationCase_ = 1; + return this; + } + /** + * + * + *
+     * The Google Cloud Storage location where the output is to be written to.
+     * In the given directory a new directory will be created with name:
+     * `export-data-<dataset-display-name>-<timestamp-of-export-call>` where
+     * timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All export
+     * output will be written into that directory. Inside that directory,
+     * annotations with the same schema will be grouped into sub directories
+     * which are named with the corresponding annotations' schema title. Inside
+     * these sub directories, a schema.yaml will be created to describe the
+     * output format.
+     * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination gcs_destination = 1; + */ + public Builder clearGcsDestination() { + if (gcsDestinationBuilder_ == null) { + if (destinationCase_ == 1) { + destinationCase_ = 0; + destination_ = null; + onChanged(); + } + } else { + if (destinationCase_ == 1) { + destinationCase_ = 0; + destination_ = null; + } + gcsDestinationBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The Google Cloud Storage location where the output is to be written to.
+     * In the given directory a new directory will be created with name:
+     * `export-data-<dataset-display-name>-<timestamp-of-export-call>` where
+     * timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All export
+     * output will be written into that directory. Inside that directory,
+     * annotations with the same schema will be grouped into sub directories
+     * which are named with the corresponding annotations' schema title. Inside
+     * these sub directories, a schema.yaml will be created to describe the
+     * output format.
+     * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination gcs_destination = 1; + */ + public com.google.cloud.aiplatform.v1.GcsDestination.Builder getGcsDestinationBuilder() { + return getGcsDestinationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The Google Cloud Storage location where the output is to be written to.
+     * In the given directory a new directory will be created with name:
+     * `export-data-<dataset-display-name>-<timestamp-of-export-call>` where
+     * timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All export
+     * output will be written into that directory. Inside that directory,
+     * annotations with the same schema will be grouped into sub directories
+     * which are named with the corresponding annotations' schema title. Inside
+     * these sub directories, a schema.yaml will be created to describe the
+     * output format.
+     * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination gcs_destination = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GcsDestinationOrBuilder getGcsDestinationOrBuilder() { + if ((destinationCase_ == 1) && (gcsDestinationBuilder_ != null)) { + return gcsDestinationBuilder_.getMessageOrBuilder(); + } else { + if (destinationCase_ == 1) { + return (com.google.cloud.aiplatform.v1.GcsDestination) destination_; + } + return com.google.cloud.aiplatform.v1.GcsDestination.getDefaultInstance(); + } + } + /** + * + * + *
+     * The Google Cloud Storage location where the output is to be written to.
+     * In the given directory a new directory will be created with name:
+     * `export-data-<dataset-display-name>-<timestamp-of-export-call>` where
+     * timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All export
+     * output will be written into that directory. Inside that directory,
+     * annotations with the same schema will be grouped into sub directories
+     * which are named with the corresponding annotations' schema title. Inside
+     * these sub directories, a schema.yaml will be created to describe the
+     * output format.
+     * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination gcs_destination = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GcsDestination, + com.google.cloud.aiplatform.v1.GcsDestination.Builder, + com.google.cloud.aiplatform.v1.GcsDestinationOrBuilder> + getGcsDestinationFieldBuilder() { + if (gcsDestinationBuilder_ == null) { + if (!(destinationCase_ == 1)) { + destination_ = com.google.cloud.aiplatform.v1.GcsDestination.getDefaultInstance(); + } + gcsDestinationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GcsDestination, + com.google.cloud.aiplatform.v1.GcsDestination.Builder, + com.google.cloud.aiplatform.v1.GcsDestinationOrBuilder>( + (com.google.cloud.aiplatform.v1.GcsDestination) destination_, + getParentForChildren(), + isClean()); + destination_ = null; + } + destinationCase_ = 1; + onChanged(); + ; + return gcsDestinationBuilder_; + } + + private java.lang.Object annotationsFilter_ = ""; + /** + * + * + *
+     * A filter on Annotations of the Dataset. Only Annotations on to-be-exported
+     * DataItems(specified by [data_items_filter][]) that match this filter will
+     * be exported. The filter syntax is the same as in
+     * [ListAnnotations][google.cloud.aiplatform.v1.DatasetService.ListAnnotations].
+     * 
+ * + * string annotations_filter = 2; + * + * @return The annotationsFilter. + */ + public java.lang.String getAnnotationsFilter() { + java.lang.Object ref = annotationsFilter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + annotationsFilter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A filter on Annotations of the Dataset. Only Annotations on to-be-exported
+     * DataItems(specified by [data_items_filter][]) that match this filter will
+     * be exported. The filter syntax is the same as in
+     * [ListAnnotations][google.cloud.aiplatform.v1.DatasetService.ListAnnotations].
+     * 
+ * + * string annotations_filter = 2; + * + * @return The bytes for annotationsFilter. + */ + public com.google.protobuf.ByteString getAnnotationsFilterBytes() { + java.lang.Object ref = annotationsFilter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + annotationsFilter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A filter on Annotations of the Dataset. Only Annotations on to-be-exported
+     * DataItems(specified by [data_items_filter][]) that match this filter will
+     * be exported. The filter syntax is the same as in
+     * [ListAnnotations][google.cloud.aiplatform.v1.DatasetService.ListAnnotations].
+     * 
+ * + * string annotations_filter = 2; + * + * @param value The annotationsFilter to set. + * @return This builder for chaining. + */ + public Builder setAnnotationsFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + annotationsFilter_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A filter on Annotations of the Dataset. Only Annotations on to-be-exported
+     * DataItems(specified by [data_items_filter][]) that match this filter will
+     * be exported. The filter syntax is the same as in
+     * [ListAnnotations][google.cloud.aiplatform.v1.DatasetService.ListAnnotations].
+     * 
+ * + * string annotations_filter = 2; + * + * @return This builder for chaining. + */ + public Builder clearAnnotationsFilter() { + + annotationsFilter_ = getDefaultInstance().getAnnotationsFilter(); + onChanged(); + return this; + } + /** + * + * + *
+     * A filter on Annotations of the Dataset. Only Annotations on to-be-exported
+     * DataItems(specified by [data_items_filter][]) that match this filter will
+     * be exported. The filter syntax is the same as in
+     * [ListAnnotations][google.cloud.aiplatform.v1.DatasetService.ListAnnotations].
+     * 
+ * + * string annotations_filter = 2; + * + * @param value The bytes for annotationsFilter to set. + * @return This builder for chaining. + */ + public Builder setAnnotationsFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + annotationsFilter_ = 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.v1.ExportDataConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ExportDataConfig) + private static final com.google.cloud.aiplatform.v1.ExportDataConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ExportDataConfig(); + } + + public static com.google.cloud.aiplatform.v1.ExportDataConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExportDataConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ExportDataConfig(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.v1.ExportDataConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ExportDataConfigOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ExportDataConfigOrBuilder.java new file mode 100644 index 000000000..209d8b129 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ExportDataConfigOrBuilder.java @@ -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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/dataset.proto + +package com.google.cloud.aiplatform.v1; + +public interface ExportDataConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ExportDataConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The Google Cloud Storage location where the output is to be written to.
+   * In the given directory a new directory will be created with name:
+   * `export-data-<dataset-display-name>-<timestamp-of-export-call>` where
+   * timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All export
+   * output will be written into that directory. Inside that directory,
+   * annotations with the same schema will be grouped into sub directories
+   * which are named with the corresponding annotations' schema title. Inside
+   * these sub directories, a schema.yaml will be created to describe the
+   * output format.
+   * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination gcs_destination = 1; + * + * @return Whether the gcsDestination field is set. + */ + boolean hasGcsDestination(); + /** + * + * + *
+   * The Google Cloud Storage location where the output is to be written to.
+   * In the given directory a new directory will be created with name:
+   * `export-data-<dataset-display-name>-<timestamp-of-export-call>` where
+   * timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All export
+   * output will be written into that directory. Inside that directory,
+   * annotations with the same schema will be grouped into sub directories
+   * which are named with the corresponding annotations' schema title. Inside
+   * these sub directories, a schema.yaml will be created to describe the
+   * output format.
+   * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination gcs_destination = 1; + * + * @return The gcsDestination. + */ + com.google.cloud.aiplatform.v1.GcsDestination getGcsDestination(); + /** + * + * + *
+   * The Google Cloud Storage location where the output is to be written to.
+   * In the given directory a new directory will be created with name:
+   * `export-data-<dataset-display-name>-<timestamp-of-export-call>` where
+   * timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All export
+   * output will be written into that directory. Inside that directory,
+   * annotations with the same schema will be grouped into sub directories
+   * which are named with the corresponding annotations' schema title. Inside
+   * these sub directories, a schema.yaml will be created to describe the
+   * output format.
+   * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination gcs_destination = 1; + */ + com.google.cloud.aiplatform.v1.GcsDestinationOrBuilder getGcsDestinationOrBuilder(); + + /** + * + * + *
+   * A filter on Annotations of the Dataset. Only Annotations on to-be-exported
+   * DataItems(specified by [data_items_filter][]) that match this filter will
+   * be exported. The filter syntax is the same as in
+   * [ListAnnotations][google.cloud.aiplatform.v1.DatasetService.ListAnnotations].
+   * 
+ * + * string annotations_filter = 2; + * + * @return The annotationsFilter. + */ + java.lang.String getAnnotationsFilter(); + /** + * + * + *
+   * A filter on Annotations of the Dataset. Only Annotations on to-be-exported
+   * DataItems(specified by [data_items_filter][]) that match this filter will
+   * be exported. The filter syntax is the same as in
+   * [ListAnnotations][google.cloud.aiplatform.v1.DatasetService.ListAnnotations].
+   * 
+ * + * string annotations_filter = 2; + * + * @return The bytes for annotationsFilter. + */ + com.google.protobuf.ByteString getAnnotationsFilterBytes(); + + public com.google.cloud.aiplatform.v1.ExportDataConfig.DestinationCase getDestinationCase(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ExportDataOperationMetadata.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ExportDataOperationMetadata.java new file mode 100644 index 000000000..915b8a39e --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ExportDataOperationMetadata.java @@ -0,0 +1,928 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/dataset_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Runtime operation information for [DatasetService.ExportData][google.cloud.aiplatform.v1.DatasetService.ExportData].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ExportDataOperationMetadata} + */ +public final class ExportDataOperationMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ExportDataOperationMetadata) + ExportDataOperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExportDataOperationMetadata.newBuilder() to construct. + private ExportDataOperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExportDataOperationMetadata() { + gcsOutputDirectory_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExportDataOperationMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ExportDataOperationMetadata( + 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.v1.GenericOperationMetadata.Builder subBuilder = null; + if (genericMetadata_ != null) { + subBuilder = genericMetadata_.toBuilder(); + } + genericMetadata_ = + input.readMessage( + com.google.cloud.aiplatform.v1.GenericOperationMetadata.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(genericMetadata_); + genericMetadata_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + gcsOutputDirectory_ = 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.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_ExportDataOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_ExportDataOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ExportDataOperationMetadata.class, + com.google.cloud.aiplatform.v1.ExportDataOperationMetadata.Builder.class); + } + + public static final int GENERIC_METADATA_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1.GenericOperationMetadata genericMetadata_; + /** + * + * + *
+   * The common part of the operation metadata.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + @java.lang.Override + public boolean hasGenericMetadata() { + return genericMetadata_ != null; + } + /** + * + * + *
+   * The common part of the operation metadata.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata() { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + /** + * + * + *
+   * The common part of the operation metadata.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder() { + return getGenericMetadata(); + } + + public static final int GCS_OUTPUT_DIRECTORY_FIELD_NUMBER = 2; + private volatile java.lang.Object gcsOutputDirectory_; + /** + * + * + *
+   * A Google Cloud Storage directory which path ends with '/'. The exported
+   * data is stored in the directory.
+   * 
+ * + * string gcs_output_directory = 2; + * + * @return The gcsOutputDirectory. + */ + @java.lang.Override + public java.lang.String getGcsOutputDirectory() { + java.lang.Object ref = gcsOutputDirectory_; + 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(); + gcsOutputDirectory_ = s; + return s; + } + } + /** + * + * + *
+   * A Google Cloud Storage directory which path ends with '/'. The exported
+   * data is stored in the directory.
+   * 
+ * + * string gcs_output_directory = 2; + * + * @return The bytes for gcsOutputDirectory. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGcsOutputDirectoryBytes() { + java.lang.Object ref = gcsOutputDirectory_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + gcsOutputDirectory_ = 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 (genericMetadata_ != null) { + output.writeMessage(1, getGenericMetadata()); + } + if (!getGcsOutputDirectoryBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, gcsOutputDirectory_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (genericMetadata_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getGenericMetadata()); + } + if (!getGcsOutputDirectoryBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, gcsOutputDirectory_); + } + 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.v1.ExportDataOperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ExportDataOperationMetadata other = + (com.google.cloud.aiplatform.v1.ExportDataOperationMetadata) obj; + + if (hasGenericMetadata() != other.hasGenericMetadata()) return false; + if (hasGenericMetadata()) { + if (!getGenericMetadata().equals(other.getGenericMetadata())) return false; + } + if (!getGcsOutputDirectory().equals(other.getGcsOutputDirectory())) 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 (hasGenericMetadata()) { + hash = (37 * hash) + GENERIC_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getGenericMetadata().hashCode(); + } + hash = (37 * hash) + GCS_OUTPUT_DIRECTORY_FIELD_NUMBER; + hash = (53 * hash) + getGcsOutputDirectory().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.ExportDataOperationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ExportDataOperationMetadata 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.v1.ExportDataOperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ExportDataOperationMetadata 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.v1.ExportDataOperationMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ExportDataOperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ExportDataOperationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ExportDataOperationMetadata 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.v1.ExportDataOperationMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ExportDataOperationMetadata 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.v1.ExportDataOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ExportDataOperationMetadata 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.v1.ExportDataOperationMetadata 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; + } + /** + * + * + *
+   * Runtime operation information for [DatasetService.ExportData][google.cloud.aiplatform.v1.DatasetService.ExportData].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ExportDataOperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ExportDataOperationMetadata) + com.google.cloud.aiplatform.v1.ExportDataOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_ExportDataOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_ExportDataOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ExportDataOperationMetadata.class, + com.google.cloud.aiplatform.v1.ExportDataOperationMetadata.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ExportDataOperationMetadata.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 (genericMetadataBuilder_ == null) { + genericMetadata_ = null; + } else { + genericMetadata_ = null; + genericMetadataBuilder_ = null; + } + gcsOutputDirectory_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_ExportDataOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ExportDataOperationMetadata getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ExportDataOperationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ExportDataOperationMetadata build() { + com.google.cloud.aiplatform.v1.ExportDataOperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ExportDataOperationMetadata buildPartial() { + com.google.cloud.aiplatform.v1.ExportDataOperationMetadata result = + new com.google.cloud.aiplatform.v1.ExportDataOperationMetadata(this); + if (genericMetadataBuilder_ == null) { + result.genericMetadata_ = genericMetadata_; + } else { + result.genericMetadata_ = genericMetadataBuilder_.build(); + } + result.gcsOutputDirectory_ = gcsOutputDirectory_; + 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.v1.ExportDataOperationMetadata) { + return mergeFrom((com.google.cloud.aiplatform.v1.ExportDataOperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.ExportDataOperationMetadata other) { + if (other == com.google.cloud.aiplatform.v1.ExportDataOperationMetadata.getDefaultInstance()) + return this; + if (other.hasGenericMetadata()) { + mergeGenericMetadata(other.getGenericMetadata()); + } + if (!other.getGcsOutputDirectory().isEmpty()) { + gcsOutputDirectory_ = other.gcsOutputDirectory_; + 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.v1.ExportDataOperationMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.ExportDataOperationMetadata) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.aiplatform.v1.GenericOperationMetadata genericMetadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder> + genericMetadataBuilder_; + /** + * + * + *
+     * The common part of the operation metadata.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + public boolean hasGenericMetadata() { + return genericMetadataBuilder_ != null || genericMetadata_ != null; + } + /** + * + * + *
+     * The common part of the operation metadata.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata() { + if (genericMetadataBuilder_ == null) { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } else { + return genericMetadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The common part of the operation metadata.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder setGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata value) { + if (genericMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + genericMetadata_ = value; + onChanged(); + } else { + genericMetadataBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The common part of the operation metadata.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder setGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder builderForValue) { + if (genericMetadataBuilder_ == null) { + genericMetadata_ = builderForValue.build(); + onChanged(); + } else { + genericMetadataBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The common part of the operation metadata.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder mergeGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata value) { + if (genericMetadataBuilder_ == null) { + if (genericMetadata_ != null) { + genericMetadata_ = + com.google.cloud.aiplatform.v1.GenericOperationMetadata.newBuilder(genericMetadata_) + .mergeFrom(value) + .buildPartial(); + } else { + genericMetadata_ = value; + } + onChanged(); + } else { + genericMetadataBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The common part of the operation metadata.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder clearGenericMetadata() { + if (genericMetadataBuilder_ == null) { + genericMetadata_ = null; + onChanged(); + } else { + genericMetadata_ = null; + genericMetadataBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The common part of the operation metadata.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder + getGenericMetadataBuilder() { + + onChanged(); + return getGenericMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The common part of the operation metadata.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder() { + if (genericMetadataBuilder_ != null) { + return genericMetadataBuilder_.getMessageOrBuilder(); + } else { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + } + /** + * + * + *
+     * The common part of the operation metadata.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder> + getGenericMetadataFieldBuilder() { + if (genericMetadataBuilder_ == null) { + genericMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder>( + getGenericMetadata(), getParentForChildren(), isClean()); + genericMetadata_ = null; + } + return genericMetadataBuilder_; + } + + private java.lang.Object gcsOutputDirectory_ = ""; + /** + * + * + *
+     * A Google Cloud Storage directory which path ends with '/'. The exported
+     * data is stored in the directory.
+     * 
+ * + * string gcs_output_directory = 2; + * + * @return The gcsOutputDirectory. + */ + public java.lang.String getGcsOutputDirectory() { + java.lang.Object ref = gcsOutputDirectory_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gcsOutputDirectory_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A Google Cloud Storage directory which path ends with '/'. The exported
+     * data is stored in the directory.
+     * 
+ * + * string gcs_output_directory = 2; + * + * @return The bytes for gcsOutputDirectory. + */ + public com.google.protobuf.ByteString getGcsOutputDirectoryBytes() { + java.lang.Object ref = gcsOutputDirectory_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + gcsOutputDirectory_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A Google Cloud Storage directory which path ends with '/'. The exported
+     * data is stored in the directory.
+     * 
+ * + * string gcs_output_directory = 2; + * + * @param value The gcsOutputDirectory to set. + * @return This builder for chaining. + */ + public Builder setGcsOutputDirectory(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + gcsOutputDirectory_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A Google Cloud Storage directory which path ends with '/'. The exported
+     * data is stored in the directory.
+     * 
+ * + * string gcs_output_directory = 2; + * + * @return This builder for chaining. + */ + public Builder clearGcsOutputDirectory() { + + gcsOutputDirectory_ = getDefaultInstance().getGcsOutputDirectory(); + onChanged(); + return this; + } + /** + * + * + *
+     * A Google Cloud Storage directory which path ends with '/'. The exported
+     * data is stored in the directory.
+     * 
+ * + * string gcs_output_directory = 2; + * + * @param value The bytes for gcsOutputDirectory to set. + * @return This builder for chaining. + */ + public Builder setGcsOutputDirectoryBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + gcsOutputDirectory_ = 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.v1.ExportDataOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ExportDataOperationMetadata) + private static final com.google.cloud.aiplatform.v1.ExportDataOperationMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ExportDataOperationMetadata(); + } + + public static com.google.cloud.aiplatform.v1.ExportDataOperationMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExportDataOperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ExportDataOperationMetadata(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.v1.ExportDataOperationMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ExportDataOperationMetadataOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ExportDataOperationMetadataOrBuilder.java new file mode 100644 index 000000000..346de89b7 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ExportDataOperationMetadataOrBuilder.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/v1/dataset_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface ExportDataOperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ExportDataOperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The common part of the operation metadata.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + boolean hasGenericMetadata(); + /** + * + * + *
+   * The common part of the operation metadata.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata(); + /** + * + * + *
+   * The common part of the operation metadata.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder getGenericMetadataOrBuilder(); + + /** + * + * + *
+   * A Google Cloud Storage directory which path ends with '/'. The exported
+   * data is stored in the directory.
+   * 
+ * + * string gcs_output_directory = 2; + * + * @return The gcsOutputDirectory. + */ + java.lang.String getGcsOutputDirectory(); + /** + * + * + *
+   * A Google Cloud Storage directory which path ends with '/'. The exported
+   * data is stored in the directory.
+   * 
+ * + * string gcs_output_directory = 2; + * + * @return The bytes for gcsOutputDirectory. + */ + com.google.protobuf.ByteString getGcsOutputDirectoryBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ExportDataRequest.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ExportDataRequest.java new file mode 100644 index 000000000..0fd27dba0 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ExportDataRequest.java @@ -0,0 +1,965 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/dataset_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for [DatasetService.ExportData][google.cloud.aiplatform.v1.DatasetService.ExportData].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ExportDataRequest} + */ +public final class ExportDataRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ExportDataRequest) + ExportDataRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExportDataRequest.newBuilder() to construct. + private ExportDataRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExportDataRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExportDataRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ExportDataRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + com.google.cloud.aiplatform.v1.ExportDataConfig.Builder subBuilder = null; + if (exportConfig_ != null) { + subBuilder = exportConfig_.toBuilder(); + } + exportConfig_ = + input.readMessage( + com.google.cloud.aiplatform.v1.ExportDataConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(exportConfig_); + exportConfig_ = 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.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_ExportDataRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_ExportDataRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ExportDataRequest.class, + com.google.cloud.aiplatform.v1.ExportDataRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the Dataset resource.
+   * Format:
+   * `projects/{project}/locations/{location}/datasets/{dataset}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the Dataset resource.
+   * Format:
+   * `projects/{project}/locations/{location}/datasets/{dataset}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXPORT_CONFIG_FIELD_NUMBER = 2; + private com.google.cloud.aiplatform.v1.ExportDataConfig exportConfig_; + /** + * + * + *
+   * Required. The desired output location.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ExportDataConfig export_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the exportConfig field is set. + */ + @java.lang.Override + public boolean hasExportConfig() { + return exportConfig_ != null; + } + /** + * + * + *
+   * Required. The desired output location.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ExportDataConfig export_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The exportConfig. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ExportDataConfig getExportConfig() { + return exportConfig_ == null + ? com.google.cloud.aiplatform.v1.ExportDataConfig.getDefaultInstance() + : exportConfig_; + } + /** + * + * + *
+   * Required. The desired output location.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ExportDataConfig export_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ExportDataConfigOrBuilder getExportConfigOrBuilder() { + return getExportConfig(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (exportConfig_ != null) { + output.writeMessage(2, getExportConfig()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (exportConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getExportConfig()); + } + 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.v1.ExportDataRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ExportDataRequest other = + (com.google.cloud.aiplatform.v1.ExportDataRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (hasExportConfig() != other.hasExportConfig()) return false; + if (hasExportConfig()) { + if (!getExportConfig().equals(other.getExportConfig())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasExportConfig()) { + hash = (37 * hash) + EXPORT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getExportConfig().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.ExportDataRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ExportDataRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ExportDataRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ExportDataRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ExportDataRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ExportDataRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ExportDataRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ExportDataRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ExportDataRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ExportDataRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ExportDataRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ExportDataRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1.ExportDataRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [DatasetService.ExportData][google.cloud.aiplatform.v1.DatasetService.ExportData].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ExportDataRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ExportDataRequest) + com.google.cloud.aiplatform.v1.ExportDataRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_ExportDataRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_ExportDataRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ExportDataRequest.class, + com.google.cloud.aiplatform.v1.ExportDataRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ExportDataRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + if (exportConfigBuilder_ == null) { + exportConfig_ = null; + } else { + exportConfig_ = null; + exportConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_ExportDataRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ExportDataRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ExportDataRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ExportDataRequest build() { + com.google.cloud.aiplatform.v1.ExportDataRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ExportDataRequest buildPartial() { + com.google.cloud.aiplatform.v1.ExportDataRequest result = + new com.google.cloud.aiplatform.v1.ExportDataRequest(this); + result.name_ = name_; + if (exportConfigBuilder_ == null) { + result.exportConfig_ = exportConfig_; + } else { + result.exportConfig_ = exportConfigBuilder_.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.v1.ExportDataRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.ExportDataRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.ExportDataRequest other) { + if (other == com.google.cloud.aiplatform.v1.ExportDataRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasExportConfig()) { + mergeExportConfig(other.getExportConfig()); + } + 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.v1.ExportDataRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.aiplatform.v1.ExportDataRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the Dataset resource.
+     * Format:
+     * `projects/{project}/locations/{location}/datasets/{dataset}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the Dataset resource.
+     * Format:
+     * `projects/{project}/locations/{location}/datasets/{dataset}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the Dataset resource.
+     * Format:
+     * `projects/{project}/locations/{location}/datasets/{dataset}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the Dataset resource.
+     * Format:
+     * `projects/{project}/locations/{location}/datasets/{dataset}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the Dataset resource.
+     * Format:
+     * `projects/{project}/locations/{location}/datasets/{dataset}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private com.google.cloud.aiplatform.v1.ExportDataConfig exportConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.ExportDataConfig, + com.google.cloud.aiplatform.v1.ExportDataConfig.Builder, + com.google.cloud.aiplatform.v1.ExportDataConfigOrBuilder> + exportConfigBuilder_; + /** + * + * + *
+     * Required. The desired output location.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ExportDataConfig export_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the exportConfig field is set. + */ + public boolean hasExportConfig() { + return exportConfigBuilder_ != null || exportConfig_ != null; + } + /** + * + * + *
+     * Required. The desired output location.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ExportDataConfig export_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The exportConfig. + */ + public com.google.cloud.aiplatform.v1.ExportDataConfig getExportConfig() { + if (exportConfigBuilder_ == null) { + return exportConfig_ == null + ? com.google.cloud.aiplatform.v1.ExportDataConfig.getDefaultInstance() + : exportConfig_; + } else { + return exportConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The desired output location.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ExportDataConfig export_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setExportConfig(com.google.cloud.aiplatform.v1.ExportDataConfig value) { + if (exportConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + exportConfig_ = value; + onChanged(); + } else { + exportConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The desired output location.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ExportDataConfig export_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setExportConfig( + com.google.cloud.aiplatform.v1.ExportDataConfig.Builder builderForValue) { + if (exportConfigBuilder_ == null) { + exportConfig_ = builderForValue.build(); + onChanged(); + } else { + exportConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The desired output location.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ExportDataConfig export_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeExportConfig(com.google.cloud.aiplatform.v1.ExportDataConfig value) { + if (exportConfigBuilder_ == null) { + if (exportConfig_ != null) { + exportConfig_ = + com.google.cloud.aiplatform.v1.ExportDataConfig.newBuilder(exportConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + exportConfig_ = value; + } + onChanged(); + } else { + exportConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The desired output location.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ExportDataConfig export_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearExportConfig() { + if (exportConfigBuilder_ == null) { + exportConfig_ = null; + onChanged(); + } else { + exportConfig_ = null; + exportConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The desired output location.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ExportDataConfig export_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.ExportDataConfig.Builder getExportConfigBuilder() { + + onChanged(); + return getExportConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The desired output location.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ExportDataConfig export_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.ExportDataConfigOrBuilder getExportConfigOrBuilder() { + if (exportConfigBuilder_ != null) { + return exportConfigBuilder_.getMessageOrBuilder(); + } else { + return exportConfig_ == null + ? com.google.cloud.aiplatform.v1.ExportDataConfig.getDefaultInstance() + : exportConfig_; + } + } + /** + * + * + *
+     * Required. The desired output location.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ExportDataConfig export_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.ExportDataConfig, + com.google.cloud.aiplatform.v1.ExportDataConfig.Builder, + com.google.cloud.aiplatform.v1.ExportDataConfigOrBuilder> + getExportConfigFieldBuilder() { + if (exportConfigBuilder_ == null) { + exportConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.ExportDataConfig, + com.google.cloud.aiplatform.v1.ExportDataConfig.Builder, + com.google.cloud.aiplatform.v1.ExportDataConfigOrBuilder>( + getExportConfig(), getParentForChildren(), isClean()); + exportConfig_ = null; + } + return exportConfigBuilder_; + } + + @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.v1.ExportDataRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ExportDataRequest) + private static final com.google.cloud.aiplatform.v1.ExportDataRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ExportDataRequest(); + } + + public static com.google.cloud.aiplatform.v1.ExportDataRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExportDataRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ExportDataRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ExportDataRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ExportDataRequestOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ExportDataRequestOrBuilder.java new file mode 100644 index 000000000..cbcf559a1 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ExportDataRequestOrBuilder.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/v1/dataset_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface ExportDataRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ExportDataRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the Dataset resource.
+   * Format:
+   * `projects/{project}/locations/{location}/datasets/{dataset}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the Dataset resource.
+   * Format:
+   * `projects/{project}/locations/{location}/datasets/{dataset}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The desired output location.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ExportDataConfig export_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the exportConfig field is set. + */ + boolean hasExportConfig(); + /** + * + * + *
+   * Required. The desired output location.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ExportDataConfig export_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The exportConfig. + */ + com.google.cloud.aiplatform.v1.ExportDataConfig getExportConfig(); + /** + * + * + *
+   * Required. The desired output location.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ExportDataConfig export_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1.ExportDataConfigOrBuilder getExportConfigOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ExportDataResponse.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ExportDataResponse.java new file mode 100644 index 000000000..495c4e262 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ExportDataResponse.java @@ -0,0 +1,737 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/dataset_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Response message for [DatasetService.ExportData][google.cloud.aiplatform.v1.DatasetService.ExportData].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ExportDataResponse} + */ +public final class ExportDataResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ExportDataResponse) + ExportDataResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExportDataResponse.newBuilder() to construct. + private ExportDataResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExportDataResponse() { + exportedFiles_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExportDataResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ExportDataResponse( + 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)) { + exportedFiles_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + exportedFiles_.add(s); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + exportedFiles_ = exportedFiles_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_ExportDataResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_ExportDataResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ExportDataResponse.class, + com.google.cloud.aiplatform.v1.ExportDataResponse.Builder.class); + } + + public static final int EXPORTED_FILES_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList exportedFiles_; + /** + * + * + *
+   * All of the files that are exported in this export operation.
+   * 
+ * + * repeated string exported_files = 1; + * + * @return A list containing the exportedFiles. + */ + public com.google.protobuf.ProtocolStringList getExportedFilesList() { + return exportedFiles_; + } + /** + * + * + *
+   * All of the files that are exported in this export operation.
+   * 
+ * + * repeated string exported_files = 1; + * + * @return The count of exportedFiles. + */ + public int getExportedFilesCount() { + return exportedFiles_.size(); + } + /** + * + * + *
+   * All of the files that are exported in this export operation.
+   * 
+ * + * repeated string exported_files = 1; + * + * @param index The index of the element to return. + * @return The exportedFiles at the given index. + */ + public java.lang.String getExportedFiles(int index) { + return exportedFiles_.get(index); + } + /** + * + * + *
+   * All of the files that are exported in this export operation.
+   * 
+ * + * repeated string exported_files = 1; + * + * @param index The index of the value to return. + * @return The bytes of the exportedFiles at the given index. + */ + public com.google.protobuf.ByteString getExportedFilesBytes(int index) { + return exportedFiles_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < exportedFiles_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, exportedFiles_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < exportedFiles_.size(); i++) { + dataSize += computeStringSizeNoTag(exportedFiles_.getRaw(i)); + } + size += dataSize; + size += 1 * getExportedFilesList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.ExportDataResponse)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ExportDataResponse other = + (com.google.cloud.aiplatform.v1.ExportDataResponse) obj; + + if (!getExportedFilesList().equals(other.getExportedFilesList())) 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 (getExportedFilesCount() > 0) { + hash = (37 * hash) + EXPORTED_FILES_FIELD_NUMBER; + hash = (53 * hash) + getExportedFilesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.ExportDataResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ExportDataResponse 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.v1.ExportDataResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ExportDataResponse 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.v1.ExportDataResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ExportDataResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ExportDataResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ExportDataResponse 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.v1.ExportDataResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ExportDataResponse 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.v1.ExportDataResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ExportDataResponse 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.v1.ExportDataResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for [DatasetService.ExportData][google.cloud.aiplatform.v1.DatasetService.ExportData].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ExportDataResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ExportDataResponse) + com.google.cloud.aiplatform.v1.ExportDataResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_ExportDataResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_ExportDataResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ExportDataResponse.class, + com.google.cloud.aiplatform.v1.ExportDataResponse.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ExportDataResponse.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(); + exportedFiles_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_ExportDataResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ExportDataResponse getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ExportDataResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ExportDataResponse build() { + com.google.cloud.aiplatform.v1.ExportDataResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ExportDataResponse buildPartial() { + com.google.cloud.aiplatform.v1.ExportDataResponse result = + new com.google.cloud.aiplatform.v1.ExportDataResponse(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + exportedFiles_ = exportedFiles_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.exportedFiles_ = exportedFiles_; + 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.v1.ExportDataResponse) { + return mergeFrom((com.google.cloud.aiplatform.v1.ExportDataResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.ExportDataResponse other) { + if (other == com.google.cloud.aiplatform.v1.ExportDataResponse.getDefaultInstance()) + return this; + if (!other.exportedFiles_.isEmpty()) { + if (exportedFiles_.isEmpty()) { + exportedFiles_ = other.exportedFiles_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureExportedFilesIsMutable(); + exportedFiles_.addAll(other.exportedFiles_); + } + 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.v1.ExportDataResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.ExportDataResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringList exportedFiles_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureExportedFilesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + exportedFiles_ = new com.google.protobuf.LazyStringArrayList(exportedFiles_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * All of the files that are exported in this export operation.
+     * 
+ * + * repeated string exported_files = 1; + * + * @return A list containing the exportedFiles. + */ + public com.google.protobuf.ProtocolStringList getExportedFilesList() { + return exportedFiles_.getUnmodifiableView(); + } + /** + * + * + *
+     * All of the files that are exported in this export operation.
+     * 
+ * + * repeated string exported_files = 1; + * + * @return The count of exportedFiles. + */ + public int getExportedFilesCount() { + return exportedFiles_.size(); + } + /** + * + * + *
+     * All of the files that are exported in this export operation.
+     * 
+ * + * repeated string exported_files = 1; + * + * @param index The index of the element to return. + * @return The exportedFiles at the given index. + */ + public java.lang.String getExportedFiles(int index) { + return exportedFiles_.get(index); + } + /** + * + * + *
+     * All of the files that are exported in this export operation.
+     * 
+ * + * repeated string exported_files = 1; + * + * @param index The index of the value to return. + * @return The bytes of the exportedFiles at the given index. + */ + public com.google.protobuf.ByteString getExportedFilesBytes(int index) { + return exportedFiles_.getByteString(index); + } + /** + * + * + *
+     * All of the files that are exported in this export operation.
+     * 
+ * + * repeated string exported_files = 1; + * + * @param index The index to set the value at. + * @param value The exportedFiles to set. + * @return This builder for chaining. + */ + public Builder setExportedFiles(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureExportedFilesIsMutable(); + exportedFiles_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * All of the files that are exported in this export operation.
+     * 
+ * + * repeated string exported_files = 1; + * + * @param value The exportedFiles to add. + * @return This builder for chaining. + */ + public Builder addExportedFiles(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureExportedFilesIsMutable(); + exportedFiles_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * All of the files that are exported in this export operation.
+     * 
+ * + * repeated string exported_files = 1; + * + * @param values The exportedFiles to add. + * @return This builder for chaining. + */ + public Builder addAllExportedFiles(java.lang.Iterable values) { + ensureExportedFilesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, exportedFiles_); + onChanged(); + return this; + } + /** + * + * + *
+     * All of the files that are exported in this export operation.
+     * 
+ * + * repeated string exported_files = 1; + * + * @return This builder for chaining. + */ + public Builder clearExportedFiles() { + exportedFiles_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * All of the files that are exported in this export operation.
+     * 
+ * + * repeated string exported_files = 1; + * + * @param value The bytes of the exportedFiles to add. + * @return This builder for chaining. + */ + public Builder addExportedFilesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureExportedFilesIsMutable(); + exportedFiles_.add(value); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.ExportDataResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ExportDataResponse) + private static final com.google.cloud.aiplatform.v1.ExportDataResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ExportDataResponse(); + } + + public static com.google.cloud.aiplatform.v1.ExportDataResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExportDataResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ExportDataResponse(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.v1.ExportDataResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ExportDataResponseOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ExportDataResponseOrBuilder.java new file mode 100644 index 000000000..9a88a23e0 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ExportDataResponseOrBuilder.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/v1/dataset_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface ExportDataResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ExportDataResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * All of the files that are exported in this export operation.
+   * 
+ * + * repeated string exported_files = 1; + * + * @return A list containing the exportedFiles. + */ + java.util.List getExportedFilesList(); + /** + * + * + *
+   * All of the files that are exported in this export operation.
+   * 
+ * + * repeated string exported_files = 1; + * + * @return The count of exportedFiles. + */ + int getExportedFilesCount(); + /** + * + * + *
+   * All of the files that are exported in this export operation.
+   * 
+ * + * repeated string exported_files = 1; + * + * @param index The index of the element to return. + * @return The exportedFiles at the given index. + */ + java.lang.String getExportedFiles(int index); + /** + * + * + *
+   * All of the files that are exported in this export operation.
+   * 
+ * + * repeated string exported_files = 1; + * + * @param index The index of the value to return. + * @return The bytes of the exportedFiles at the given index. + */ + com.google.protobuf.ByteString getExportedFilesBytes(int index); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ExportModelOperationMetadata.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ExportModelOperationMetadata.java new file mode 100644 index 000000000..3b2a2d0d1 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ExportModelOperationMetadata.java @@ -0,0 +1,1958 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/model_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Details of [ModelService.ExportModel][google.cloud.aiplatform.v1.ModelService.ExportModel] operation.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ExportModelOperationMetadata} + */ +public final class ExportModelOperationMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ExportModelOperationMetadata) + ExportModelOperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExportModelOperationMetadata.newBuilder() to construct. + private ExportModelOperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExportModelOperationMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExportModelOperationMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ExportModelOperationMetadata( + 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.v1.GenericOperationMetadata.Builder subBuilder = null; + if (genericMetadata_ != null) { + subBuilder = genericMetadata_.toBuilder(); + } + genericMetadata_ = + input.readMessage( + com.google.cloud.aiplatform.v1.GenericOperationMetadata.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(genericMetadata_); + genericMetadata_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfo.Builder + subBuilder = null; + if (outputInfo_ != null) { + subBuilder = outputInfo_.toBuilder(); + } + outputInfo_ = + input.readMessage( + com.google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfo + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(outputInfo_); + outputInfo_ = 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.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_ExportModelOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_ExportModelOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ExportModelOperationMetadata.class, + com.google.cloud.aiplatform.v1.ExportModelOperationMetadata.Builder.class); + } + + public interface OutputInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Output only. If the Model artifact is being exported to Google Cloud Storage this is
+     * the full path of the directory created, into which the Model files are
+     * being written to.
+     * 
+ * + * string artifact_output_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The artifactOutputUri. + */ + java.lang.String getArtifactOutputUri(); + /** + * + * + *
+     * Output only. If the Model artifact is being exported to Google Cloud Storage this is
+     * the full path of the directory created, into which the Model files are
+     * being written to.
+     * 
+ * + * string artifact_output_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for artifactOutputUri. + */ + com.google.protobuf.ByteString getArtifactOutputUriBytes(); + + /** + * + * + *
+     * Output only. If the Model image is being exported to Google Container Registry or
+     * Artifact Registry this is the full path of the image created.
+     * 
+ * + * string image_output_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The imageOutputUri. + */ + java.lang.String getImageOutputUri(); + /** + * + * + *
+     * Output only. If the Model image is being exported to Google Container Registry or
+     * Artifact Registry this is the full path of the image created.
+     * 
+ * + * string image_output_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for imageOutputUri. + */ + com.google.protobuf.ByteString getImageOutputUriBytes(); + } + /** + * + * + *
+   * Further describes the output of the ExportModel. Supplements
+   * [ExportModelRequest.OutputConfig][google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfo} + */ + public static final class OutputInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfo) + OutputInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use OutputInfo.newBuilder() to construct. + private OutputInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private OutputInfo() { + artifactOutputUri_ = ""; + imageOutputUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OutputInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private OutputInfo( + 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 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + artifactOutputUri_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + imageOutputUri_ = 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.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_ExportModelOperationMetadata_OutputInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_ExportModelOperationMetadata_OutputInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfo.class, + com.google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfo.Builder.class); + } + + public static final int ARTIFACT_OUTPUT_URI_FIELD_NUMBER = 2; + private volatile java.lang.Object artifactOutputUri_; + /** + * + * + *
+     * Output only. If the Model artifact is being exported to Google Cloud Storage this is
+     * the full path of the directory created, into which the Model files are
+     * being written to.
+     * 
+ * + * string artifact_output_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The artifactOutputUri. + */ + @java.lang.Override + public java.lang.String getArtifactOutputUri() { + java.lang.Object ref = artifactOutputUri_; + 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(); + artifactOutputUri_ = s; + return s; + } + } + /** + * + * + *
+     * Output only. If the Model artifact is being exported to Google Cloud Storage this is
+     * the full path of the directory created, into which the Model files are
+     * being written to.
+     * 
+ * + * string artifact_output_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for artifactOutputUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getArtifactOutputUriBytes() { + java.lang.Object ref = artifactOutputUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + artifactOutputUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IMAGE_OUTPUT_URI_FIELD_NUMBER = 3; + private volatile java.lang.Object imageOutputUri_; + /** + * + * + *
+     * Output only. If the Model image is being exported to Google Container Registry or
+     * Artifact Registry this is the full path of the image created.
+     * 
+ * + * string image_output_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The imageOutputUri. + */ + @java.lang.Override + public java.lang.String getImageOutputUri() { + java.lang.Object ref = imageOutputUri_; + 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(); + imageOutputUri_ = s; + return s; + } + } + /** + * + * + *
+     * Output only. If the Model image is being exported to Google Container Registry or
+     * Artifact Registry this is the full path of the image created.
+     * 
+ * + * string image_output_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for imageOutputUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getImageOutputUriBytes() { + java.lang.Object ref = imageOutputUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + imageOutputUri_ = 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 (!getArtifactOutputUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, artifactOutputUri_); + } + if (!getImageOutputUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, imageOutputUri_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getArtifactOutputUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, artifactOutputUri_); + } + if (!getImageOutputUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, imageOutputUri_); + } + 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.v1.ExportModelOperationMetadata.OutputInfo)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfo other = + (com.google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfo) obj; + + if (!getArtifactOutputUri().equals(other.getArtifactOutputUri())) return false; + if (!getImageOutputUri().equals(other.getImageOutputUri())) 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) + ARTIFACT_OUTPUT_URI_FIELD_NUMBER; + hash = (53 * hash) + getArtifactOutputUri().hashCode(); + hash = (37 * hash) + IMAGE_OUTPUT_URI_FIELD_NUMBER; + hash = (53 * hash) + getImageOutputUri().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfo 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.v1.ExportModelOperationMetadata.OutputInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfo 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.v1.ExportModelOperationMetadata.OutputInfo parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfo 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.v1.ExportModelOperationMetadata.OutputInfo + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfo + 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.v1.ExportModelOperationMetadata.OutputInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfo 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.v1.ExportModelOperationMetadata.OutputInfo 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; + } + /** + * + * + *
+     * Further describes the output of the ExportModel. Supplements
+     * [ExportModelRequest.OutputConfig][google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig].
+     * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfo} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfo) + com.google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_ExportModelOperationMetadata_OutputInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_ExportModelOperationMetadata_OutputInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfo.class, + com.google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfo.Builder + .class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfo.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(); + artifactOutputUri_ = ""; + + imageOutputUri_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_ExportModelOperationMetadata_OutputInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfo + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfo + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfo build() { + com.google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfo result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfo buildPartial() { + com.google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfo result = + new com.google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfo(this); + result.artifactOutputUri_ = artifactOutputUri_; + result.imageOutputUri_ = imageOutputUri_; + 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.v1.ExportModelOperationMetadata.OutputInfo) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfo other) { + if (other + == com.google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfo + .getDefaultInstance()) return this; + if (!other.getArtifactOutputUri().isEmpty()) { + artifactOutputUri_ = other.artifactOutputUri_; + onChanged(); + } + if (!other.getImageOutputUri().isEmpty()) { + imageOutputUri_ = other.imageOutputUri_; + 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.v1.ExportModelOperationMetadata.OutputInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfo) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object artifactOutputUri_ = ""; + /** + * + * + *
+       * Output only. If the Model artifact is being exported to Google Cloud Storage this is
+       * the full path of the directory created, into which the Model files are
+       * being written to.
+       * 
+ * + * string artifact_output_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The artifactOutputUri. + */ + public java.lang.String getArtifactOutputUri() { + java.lang.Object ref = artifactOutputUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + artifactOutputUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Output only. If the Model artifact is being exported to Google Cloud Storage this is
+       * the full path of the directory created, into which the Model files are
+       * being written to.
+       * 
+ * + * string artifact_output_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for artifactOutputUri. + */ + public com.google.protobuf.ByteString getArtifactOutputUriBytes() { + java.lang.Object ref = artifactOutputUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + artifactOutputUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Output only. If the Model artifact is being exported to Google Cloud Storage this is
+       * the full path of the directory created, into which the Model files are
+       * being written to.
+       * 
+ * + * string artifact_output_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The artifactOutputUri to set. + * @return This builder for chaining. + */ + public Builder setArtifactOutputUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + artifactOutputUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. If the Model artifact is being exported to Google Cloud Storage this is
+       * the full path of the directory created, into which the Model files are
+       * being written to.
+       * 
+ * + * string artifact_output_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearArtifactOutputUri() { + + artifactOutputUri_ = getDefaultInstance().getArtifactOutputUri(); + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. If the Model artifact is being exported to Google Cloud Storage this is
+       * the full path of the directory created, into which the Model files are
+       * being written to.
+       * 
+ * + * string artifact_output_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for artifactOutputUri to set. + * @return This builder for chaining. + */ + public Builder setArtifactOutputUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + artifactOutputUri_ = value; + onChanged(); + return this; + } + + private java.lang.Object imageOutputUri_ = ""; + /** + * + * + *
+       * Output only. If the Model image is being exported to Google Container Registry or
+       * Artifact Registry this is the full path of the image created.
+       * 
+ * + * string image_output_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The imageOutputUri. + */ + public java.lang.String getImageOutputUri() { + java.lang.Object ref = imageOutputUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + imageOutputUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Output only. If the Model image is being exported to Google Container Registry or
+       * Artifact Registry this is the full path of the image created.
+       * 
+ * + * string image_output_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for imageOutputUri. + */ + public com.google.protobuf.ByteString getImageOutputUriBytes() { + java.lang.Object ref = imageOutputUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + imageOutputUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Output only. If the Model image is being exported to Google Container Registry or
+       * Artifact Registry this is the full path of the image created.
+       * 
+ * + * string image_output_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The imageOutputUri to set. + * @return This builder for chaining. + */ + public Builder setImageOutputUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + imageOutputUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. If the Model image is being exported to Google Container Registry or
+       * Artifact Registry this is the full path of the image created.
+       * 
+ * + * string image_output_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearImageOutputUri() { + + imageOutputUri_ = getDefaultInstance().getImageOutputUri(); + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. If the Model image is being exported to Google Container Registry or
+       * Artifact Registry this is the full path of the image created.
+       * 
+ * + * string image_output_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for imageOutputUri to set. + * @return This builder for chaining. + */ + public Builder setImageOutputUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + imageOutputUri_ = 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.v1.ExportModelOperationMetadata.OutputInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfo) + private static final com.google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfo + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfo(); + } + + public static com.google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfo + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OutputInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new OutputInfo(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.v1.ExportModelOperationMetadata.OutputInfo + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int GENERIC_METADATA_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1.GenericOperationMetadata genericMetadata_; + /** + * + * + *
+   * The common part of the operation metadata.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + @java.lang.Override + public boolean hasGenericMetadata() { + return genericMetadata_ != null; + } + /** + * + * + *
+   * The common part of the operation metadata.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata() { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + /** + * + * + *
+   * The common part of the operation metadata.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder() { + return getGenericMetadata(); + } + + public static final int OUTPUT_INFO_FIELD_NUMBER = 2; + private com.google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfo outputInfo_; + /** + * + * + *
+   * Output only. Information further describing the output of this Model export.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfo output_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the outputInfo field is set. + */ + @java.lang.Override + public boolean hasOutputInfo() { + return outputInfo_ != null; + } + /** + * + * + *
+   * Output only. Information further describing the output of this Model export.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfo output_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The outputInfo. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfo getOutputInfo() { + return outputInfo_ == null + ? com.google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfo + .getDefaultInstance() + : outputInfo_; + } + /** + * + * + *
+   * Output only. Information further describing the output of this Model export.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfo output_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfoOrBuilder + getOutputInfoOrBuilder() { + return getOutputInfo(); + } + + 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 (genericMetadata_ != null) { + output.writeMessage(1, getGenericMetadata()); + } + if (outputInfo_ != null) { + output.writeMessage(2, getOutputInfo()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (genericMetadata_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getGenericMetadata()); + } + if (outputInfo_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getOutputInfo()); + } + 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.v1.ExportModelOperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ExportModelOperationMetadata other = + (com.google.cloud.aiplatform.v1.ExportModelOperationMetadata) obj; + + if (hasGenericMetadata() != other.hasGenericMetadata()) return false; + if (hasGenericMetadata()) { + if (!getGenericMetadata().equals(other.getGenericMetadata())) return false; + } + if (hasOutputInfo() != other.hasOutputInfo()) return false; + if (hasOutputInfo()) { + if (!getOutputInfo().equals(other.getOutputInfo())) 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 (hasGenericMetadata()) { + hash = (37 * hash) + GENERIC_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getGenericMetadata().hashCode(); + } + if (hasOutputInfo()) { + hash = (37 * hash) + OUTPUT_INFO_FIELD_NUMBER; + hash = (53 * hash) + getOutputInfo().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.ExportModelOperationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ExportModelOperationMetadata 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.v1.ExportModelOperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ExportModelOperationMetadata 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.v1.ExportModelOperationMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ExportModelOperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ExportModelOperationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ExportModelOperationMetadata 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.v1.ExportModelOperationMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ExportModelOperationMetadata 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.v1.ExportModelOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ExportModelOperationMetadata 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.v1.ExportModelOperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Details of [ModelService.ExportModel][google.cloud.aiplatform.v1.ModelService.ExportModel] operation.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ExportModelOperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ExportModelOperationMetadata) + com.google.cloud.aiplatform.v1.ExportModelOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_ExportModelOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_ExportModelOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ExportModelOperationMetadata.class, + com.google.cloud.aiplatform.v1.ExportModelOperationMetadata.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ExportModelOperationMetadata.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 (genericMetadataBuilder_ == null) { + genericMetadata_ = null; + } else { + genericMetadata_ = null; + genericMetadataBuilder_ = null; + } + if (outputInfoBuilder_ == null) { + outputInfo_ = null; + } else { + outputInfo_ = null; + outputInfoBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_ExportModelOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ExportModelOperationMetadata getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ExportModelOperationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ExportModelOperationMetadata build() { + com.google.cloud.aiplatform.v1.ExportModelOperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ExportModelOperationMetadata buildPartial() { + com.google.cloud.aiplatform.v1.ExportModelOperationMetadata result = + new com.google.cloud.aiplatform.v1.ExportModelOperationMetadata(this); + if (genericMetadataBuilder_ == null) { + result.genericMetadata_ = genericMetadata_; + } else { + result.genericMetadata_ = genericMetadataBuilder_.build(); + } + if (outputInfoBuilder_ == null) { + result.outputInfo_ = outputInfo_; + } else { + result.outputInfo_ = outputInfoBuilder_.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.v1.ExportModelOperationMetadata) { + return mergeFrom((com.google.cloud.aiplatform.v1.ExportModelOperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.ExportModelOperationMetadata other) { + if (other == com.google.cloud.aiplatform.v1.ExportModelOperationMetadata.getDefaultInstance()) + return this; + if (other.hasGenericMetadata()) { + mergeGenericMetadata(other.getGenericMetadata()); + } + if (other.hasOutputInfo()) { + mergeOutputInfo(other.getOutputInfo()); + } + 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.v1.ExportModelOperationMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.ExportModelOperationMetadata) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.aiplatform.v1.GenericOperationMetadata genericMetadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder> + genericMetadataBuilder_; + /** + * + * + *
+     * The common part of the operation metadata.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + public boolean hasGenericMetadata() { + return genericMetadataBuilder_ != null || genericMetadata_ != null; + } + /** + * + * + *
+     * The common part of the operation metadata.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata() { + if (genericMetadataBuilder_ == null) { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } else { + return genericMetadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The common part of the operation metadata.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder setGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata value) { + if (genericMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + genericMetadata_ = value; + onChanged(); + } else { + genericMetadataBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The common part of the operation metadata.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder setGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder builderForValue) { + if (genericMetadataBuilder_ == null) { + genericMetadata_ = builderForValue.build(); + onChanged(); + } else { + genericMetadataBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The common part of the operation metadata.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder mergeGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata value) { + if (genericMetadataBuilder_ == null) { + if (genericMetadata_ != null) { + genericMetadata_ = + com.google.cloud.aiplatform.v1.GenericOperationMetadata.newBuilder(genericMetadata_) + .mergeFrom(value) + .buildPartial(); + } else { + genericMetadata_ = value; + } + onChanged(); + } else { + genericMetadataBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The common part of the operation metadata.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder clearGenericMetadata() { + if (genericMetadataBuilder_ == null) { + genericMetadata_ = null; + onChanged(); + } else { + genericMetadata_ = null; + genericMetadataBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The common part of the operation metadata.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder + getGenericMetadataBuilder() { + + onChanged(); + return getGenericMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The common part of the operation metadata.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder() { + if (genericMetadataBuilder_ != null) { + return genericMetadataBuilder_.getMessageOrBuilder(); + } else { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + } + /** + * + * + *
+     * The common part of the operation metadata.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder> + getGenericMetadataFieldBuilder() { + if (genericMetadataBuilder_ == null) { + genericMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder>( + getGenericMetadata(), getParentForChildren(), isClean()); + genericMetadata_ = null; + } + return genericMetadataBuilder_; + } + + private com.google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfo outputInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfo, + com.google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfo.Builder, + com.google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfoOrBuilder> + outputInfoBuilder_; + /** + * + * + *
+     * Output only. Information further describing the output of this Model export.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfo output_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the outputInfo field is set. + */ + public boolean hasOutputInfo() { + return outputInfoBuilder_ != null || outputInfo_ != null; + } + /** + * + * + *
+     * Output only. Information further describing the output of this Model export.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfo output_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The outputInfo. + */ + public com.google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfo getOutputInfo() { + if (outputInfoBuilder_ == null) { + return outputInfo_ == null + ? com.google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfo + .getDefaultInstance() + : outputInfo_; + } else { + return outputInfoBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Information further describing the output of this Model export.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfo output_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setOutputInfo( + com.google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfo value) { + if (outputInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + outputInfo_ = value; + onChanged(); + } else { + outputInfoBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Information further describing the output of this Model export.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfo output_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setOutputInfo( + com.google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfo.Builder + builderForValue) { + if (outputInfoBuilder_ == null) { + outputInfo_ = builderForValue.build(); + onChanged(); + } else { + outputInfoBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Information further describing the output of this Model export.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfo output_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeOutputInfo( + com.google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfo value) { + if (outputInfoBuilder_ == null) { + if (outputInfo_ != null) { + outputInfo_ = + com.google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfo.newBuilder( + outputInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + outputInfo_ = value; + } + onChanged(); + } else { + outputInfoBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Information further describing the output of this Model export.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfo output_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearOutputInfo() { + if (outputInfoBuilder_ == null) { + outputInfo_ = null; + onChanged(); + } else { + outputInfo_ = null; + outputInfoBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Information further describing the output of this Model export.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfo output_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfo.Builder + getOutputInfoBuilder() { + + onChanged(); + return getOutputInfoFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Information further describing the output of this Model export.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfo output_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfoOrBuilder + getOutputInfoOrBuilder() { + if (outputInfoBuilder_ != null) { + return outputInfoBuilder_.getMessageOrBuilder(); + } else { + return outputInfo_ == null + ? com.google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfo + .getDefaultInstance() + : outputInfo_; + } + } + /** + * + * + *
+     * Output only. Information further describing the output of this Model export.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfo output_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfo, + com.google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfo.Builder, + com.google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfoOrBuilder> + getOutputInfoFieldBuilder() { + if (outputInfoBuilder_ == null) { + outputInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfo, + com.google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfo.Builder, + com.google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfoOrBuilder>( + getOutputInfo(), getParentForChildren(), isClean()); + outputInfo_ = null; + } + return outputInfoBuilder_; + } + + @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.v1.ExportModelOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ExportModelOperationMetadata) + private static final com.google.cloud.aiplatform.v1.ExportModelOperationMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ExportModelOperationMetadata(); + } + + public static com.google.cloud.aiplatform.v1.ExportModelOperationMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExportModelOperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ExportModelOperationMetadata(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.v1.ExportModelOperationMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ExportModelOperationMetadataOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ExportModelOperationMetadataOrBuilder.java new file mode 100644 index 000000000..7c5b27c2d --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ExportModelOperationMetadataOrBuilder.java @@ -0,0 +1,102 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/model_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface ExportModelOperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ExportModelOperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The common part of the operation metadata.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + boolean hasGenericMetadata(); + /** + * + * + *
+   * The common part of the operation metadata.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata(); + /** + * + * + *
+   * The common part of the operation metadata.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder getGenericMetadataOrBuilder(); + + /** + * + * + *
+   * Output only. Information further describing the output of this Model export.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfo output_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the outputInfo field is set. + */ + boolean hasOutputInfo(); + /** + * + * + *
+   * Output only. Information further describing the output of this Model export.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfo output_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The outputInfo. + */ + com.google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfo getOutputInfo(); + /** + * + * + *
+   * Output only. Information further describing the output of this Model export.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfo output_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfoOrBuilder + getOutputInfoOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ExportModelRequest.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ExportModelRequest.java new file mode 100644 index 000000000..629296b6d --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ExportModelRequest.java @@ -0,0 +1,2451 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/model_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for [ModelService.ExportModel][google.cloud.aiplatform.v1.ModelService.ExportModel].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ExportModelRequest} + */ +public final class ExportModelRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ExportModelRequest) + ExportModelRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExportModelRequest.newBuilder() to construct. + private ExportModelRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExportModelRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExportModelRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ExportModelRequest( + 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(); + + name_ = s; + break; + } + case 18: + { + com.google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig.Builder subBuilder = + null; + if (outputConfig_ != null) { + subBuilder = outputConfig_.toBuilder(); + } + outputConfig_ = + input.readMessage( + com.google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(outputConfig_); + outputConfig_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_ExportModelRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_ExportModelRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ExportModelRequest.class, + com.google.cloud.aiplatform.v1.ExportModelRequest.Builder.class); + } + + public interface OutputConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The ID of the format in which the Model must be exported. Each Model
+     * lists the [export formats it supports][google.cloud.aiplatform.v1.Model.supported_export_formats].
+     * If no value is provided here, then the first from the list of the Model's
+     * supported formats is used by default.
+     * 
+ * + * string export_format_id = 1; + * + * @return The exportFormatId. + */ + java.lang.String getExportFormatId(); + /** + * + * + *
+     * The ID of the format in which the Model must be exported. Each Model
+     * lists the [export formats it supports][google.cloud.aiplatform.v1.Model.supported_export_formats].
+     * If no value is provided here, then the first from the list of the Model's
+     * supported formats is used by default.
+     * 
+ * + * string export_format_id = 1; + * + * @return The bytes for exportFormatId. + */ + com.google.protobuf.ByteString getExportFormatIdBytes(); + + /** + * + * + *
+     * The Cloud Storage location where the Model artifact is to be
+     * written to. Under the directory given as the destination a new one with
+     * name "`model-export-<model-display-name>-<timestamp-of-export-call>`",
+     * where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format,
+     * will be created. Inside, the Model and any of its supporting files
+     * will be written.
+     * This field should only be set when the `exportableContent` field of the
+     * [Model.supported_export_formats] object contains `ARTIFACT`.
+     * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination artifact_destination = 3; + * + * @return Whether the artifactDestination field is set. + */ + boolean hasArtifactDestination(); + /** + * + * + *
+     * The Cloud Storage location where the Model artifact is to be
+     * written to. Under the directory given as the destination a new one with
+     * name "`model-export-<model-display-name>-<timestamp-of-export-call>`",
+     * where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format,
+     * will be created. Inside, the Model and any of its supporting files
+     * will be written.
+     * This field should only be set when the `exportableContent` field of the
+     * [Model.supported_export_formats] object contains `ARTIFACT`.
+     * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination artifact_destination = 3; + * + * @return The artifactDestination. + */ + com.google.cloud.aiplatform.v1.GcsDestination getArtifactDestination(); + /** + * + * + *
+     * The Cloud Storage location where the Model artifact is to be
+     * written to. Under the directory given as the destination a new one with
+     * name "`model-export-<model-display-name>-<timestamp-of-export-call>`",
+     * where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format,
+     * will be created. Inside, the Model and any of its supporting files
+     * will be written.
+     * This field should only be set when the `exportableContent` field of the
+     * [Model.supported_export_formats] object contains `ARTIFACT`.
+     * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination artifact_destination = 3; + */ + com.google.cloud.aiplatform.v1.GcsDestinationOrBuilder getArtifactDestinationOrBuilder(); + + /** + * + * + *
+     * The Google Container Registry or Artifact Registry uri where the
+     * Model container image will be copied to.
+     * This field should only be set when the `exportableContent` field of the
+     * [Model.supported_export_formats] object contains `IMAGE`.
+     * 
+ * + * .google.cloud.aiplatform.v1.ContainerRegistryDestination image_destination = 4; + * + * @return Whether the imageDestination field is set. + */ + boolean hasImageDestination(); + /** + * + * + *
+     * The Google Container Registry or Artifact Registry uri where the
+     * Model container image will be copied to.
+     * This field should only be set when the `exportableContent` field of the
+     * [Model.supported_export_formats] object contains `IMAGE`.
+     * 
+ * + * .google.cloud.aiplatform.v1.ContainerRegistryDestination image_destination = 4; + * + * @return The imageDestination. + */ + com.google.cloud.aiplatform.v1.ContainerRegistryDestination getImageDestination(); + /** + * + * + *
+     * The Google Container Registry or Artifact Registry uri where the
+     * Model container image will be copied to.
+     * This field should only be set when the `exportableContent` field of the
+     * [Model.supported_export_formats] object contains `IMAGE`.
+     * 
+ * + * .google.cloud.aiplatform.v1.ContainerRegistryDestination image_destination = 4; + */ + com.google.cloud.aiplatform.v1.ContainerRegistryDestinationOrBuilder + getImageDestinationOrBuilder(); + } + /** + * + * + *
+   * Output configuration for the Model export.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig} + */ + public static final class OutputConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig) + OutputConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use OutputConfig.newBuilder() to construct. + private OutputConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private OutputConfig() { + exportFormatId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OutputConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private OutputConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + 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(); + + exportFormatId_ = s; + break; + } + case 26: + { + com.google.cloud.aiplatform.v1.GcsDestination.Builder subBuilder = null; + if (artifactDestination_ != null) { + subBuilder = artifactDestination_.toBuilder(); + } + artifactDestination_ = + input.readMessage( + com.google.cloud.aiplatform.v1.GcsDestination.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(artifactDestination_); + artifactDestination_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + com.google.cloud.aiplatform.v1.ContainerRegistryDestination.Builder subBuilder = + null; + if (imageDestination_ != null) { + subBuilder = imageDestination_.toBuilder(); + } + imageDestination_ = + input.readMessage( + com.google.cloud.aiplatform.v1.ContainerRegistryDestination.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(imageDestination_); + imageDestination_ = 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.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_ExportModelRequest_OutputConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_ExportModelRequest_OutputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig.class, + com.google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig.Builder.class); + } + + public static final int EXPORT_FORMAT_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object exportFormatId_; + /** + * + * + *
+     * The ID of the format in which the Model must be exported. Each Model
+     * lists the [export formats it supports][google.cloud.aiplatform.v1.Model.supported_export_formats].
+     * If no value is provided here, then the first from the list of the Model's
+     * supported formats is used by default.
+     * 
+ * + * string export_format_id = 1; + * + * @return The exportFormatId. + */ + @java.lang.Override + public java.lang.String getExportFormatId() { + java.lang.Object ref = exportFormatId_; + 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(); + exportFormatId_ = s; + return s; + } + } + /** + * + * + *
+     * The ID of the format in which the Model must be exported. Each Model
+     * lists the [export formats it supports][google.cloud.aiplatform.v1.Model.supported_export_formats].
+     * If no value is provided here, then the first from the list of the Model's
+     * supported formats is used by default.
+     * 
+ * + * string export_format_id = 1; + * + * @return The bytes for exportFormatId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getExportFormatIdBytes() { + java.lang.Object ref = exportFormatId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + exportFormatId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ARTIFACT_DESTINATION_FIELD_NUMBER = 3; + private com.google.cloud.aiplatform.v1.GcsDestination artifactDestination_; + /** + * + * + *
+     * The Cloud Storage location where the Model artifact is to be
+     * written to. Under the directory given as the destination a new one with
+     * name "`model-export-<model-display-name>-<timestamp-of-export-call>`",
+     * where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format,
+     * will be created. Inside, the Model and any of its supporting files
+     * will be written.
+     * This field should only be set when the `exportableContent` field of the
+     * [Model.supported_export_formats] object contains `ARTIFACT`.
+     * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination artifact_destination = 3; + * + * @return Whether the artifactDestination field is set. + */ + @java.lang.Override + public boolean hasArtifactDestination() { + return artifactDestination_ != null; + } + /** + * + * + *
+     * The Cloud Storage location where the Model artifact is to be
+     * written to. Under the directory given as the destination a new one with
+     * name "`model-export-<model-display-name>-<timestamp-of-export-call>`",
+     * where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format,
+     * will be created. Inside, the Model and any of its supporting files
+     * will be written.
+     * This field should only be set when the `exportableContent` field of the
+     * [Model.supported_export_formats] object contains `ARTIFACT`.
+     * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination artifact_destination = 3; + * + * @return The artifactDestination. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GcsDestination getArtifactDestination() { + return artifactDestination_ == null + ? com.google.cloud.aiplatform.v1.GcsDestination.getDefaultInstance() + : artifactDestination_; + } + /** + * + * + *
+     * The Cloud Storage location where the Model artifact is to be
+     * written to. Under the directory given as the destination a new one with
+     * name "`model-export-<model-display-name>-<timestamp-of-export-call>`",
+     * where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format,
+     * will be created. Inside, the Model and any of its supporting files
+     * will be written.
+     * This field should only be set when the `exportableContent` field of the
+     * [Model.supported_export_formats] object contains `ARTIFACT`.
+     * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination artifact_destination = 3; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GcsDestinationOrBuilder + getArtifactDestinationOrBuilder() { + return getArtifactDestination(); + } + + public static final int IMAGE_DESTINATION_FIELD_NUMBER = 4; + private com.google.cloud.aiplatform.v1.ContainerRegistryDestination imageDestination_; + /** + * + * + *
+     * The Google Container Registry or Artifact Registry uri where the
+     * Model container image will be copied to.
+     * This field should only be set when the `exportableContent` field of the
+     * [Model.supported_export_formats] object contains `IMAGE`.
+     * 
+ * + * .google.cloud.aiplatform.v1.ContainerRegistryDestination image_destination = 4; + * + * @return Whether the imageDestination field is set. + */ + @java.lang.Override + public boolean hasImageDestination() { + return imageDestination_ != null; + } + /** + * + * + *
+     * The Google Container Registry or Artifact Registry uri where the
+     * Model container image will be copied to.
+     * This field should only be set when the `exportableContent` field of the
+     * [Model.supported_export_formats] object contains `IMAGE`.
+     * 
+ * + * .google.cloud.aiplatform.v1.ContainerRegistryDestination image_destination = 4; + * + * @return The imageDestination. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ContainerRegistryDestination getImageDestination() { + return imageDestination_ == null + ? com.google.cloud.aiplatform.v1.ContainerRegistryDestination.getDefaultInstance() + : imageDestination_; + } + /** + * + * + *
+     * The Google Container Registry or Artifact Registry uri where the
+     * Model container image will be copied to.
+     * This field should only be set when the `exportableContent` field of the
+     * [Model.supported_export_formats] object contains `IMAGE`.
+     * 
+ * + * .google.cloud.aiplatform.v1.ContainerRegistryDestination image_destination = 4; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ContainerRegistryDestinationOrBuilder + getImageDestinationOrBuilder() { + return getImageDestination(); + } + + 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 (!getExportFormatIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, exportFormatId_); + } + if (artifactDestination_ != null) { + output.writeMessage(3, getArtifactDestination()); + } + if (imageDestination_ != null) { + output.writeMessage(4, getImageDestination()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getExportFormatIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, exportFormatId_); + } + if (artifactDestination_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(3, getArtifactDestination()); + } + if (imageDestination_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getImageDestination()); + } + 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.v1.ExportModelRequest.OutputConfig)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig other = + (com.google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig) obj; + + if (!getExportFormatId().equals(other.getExportFormatId())) return false; + if (hasArtifactDestination() != other.hasArtifactDestination()) return false; + if (hasArtifactDestination()) { + if (!getArtifactDestination().equals(other.getArtifactDestination())) return false; + } + if (hasImageDestination() != other.hasImageDestination()) return false; + if (hasImageDestination()) { + if (!getImageDestination().equals(other.getImageDestination())) 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) + EXPORT_FORMAT_ID_FIELD_NUMBER; + hash = (53 * hash) + getExportFormatId().hashCode(); + if (hasArtifactDestination()) { + hash = (37 * hash) + ARTIFACT_DESTINATION_FIELD_NUMBER; + hash = (53 * hash) + getArtifactDestination().hashCode(); + } + if (hasImageDestination()) { + hash = (37 * hash) + IMAGE_DESTINATION_FIELD_NUMBER; + hash = (53 * hash) + getImageDestination().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Output configuration for the Model export.
+     * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig) + com.google.cloud.aiplatform.v1.ExportModelRequest.OutputConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_ExportModelRequest_OutputConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_ExportModelRequest_OutputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig.class, + com.google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + exportFormatId_ = ""; + + if (artifactDestinationBuilder_ == null) { + artifactDestination_ = null; + } else { + artifactDestination_ = null; + artifactDestinationBuilder_ = null; + } + if (imageDestinationBuilder_ == null) { + imageDestination_ = null; + } else { + imageDestination_ = null; + imageDestinationBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_ExportModelRequest_OutputConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig build() { + com.google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig buildPartial() { + com.google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig result = + new com.google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig(this); + result.exportFormatId_ = exportFormatId_; + if (artifactDestinationBuilder_ == null) { + result.artifactDestination_ = artifactDestination_; + } else { + result.artifactDestination_ = artifactDestinationBuilder_.build(); + } + if (imageDestinationBuilder_ == null) { + result.imageDestination_ = imageDestination_; + } else { + result.imageDestination_ = imageDestinationBuilder_.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.v1.ExportModelRequest.OutputConfig) { + return mergeFrom((com.google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig other) { + if (other + == com.google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig.getDefaultInstance()) + return this; + if (!other.getExportFormatId().isEmpty()) { + exportFormatId_ = other.exportFormatId_; + onChanged(); + } + if (other.hasArtifactDestination()) { + mergeArtifactDestination(other.getArtifactDestination()); + } + if (other.hasImageDestination()) { + mergeImageDestination(other.getImageDestination()); + } + 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.v1.ExportModelRequest.OutputConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object exportFormatId_ = ""; + /** + * + * + *
+       * The ID of the format in which the Model must be exported. Each Model
+       * lists the [export formats it supports][google.cloud.aiplatform.v1.Model.supported_export_formats].
+       * If no value is provided here, then the first from the list of the Model's
+       * supported formats is used by default.
+       * 
+ * + * string export_format_id = 1; + * + * @return The exportFormatId. + */ + public java.lang.String getExportFormatId() { + java.lang.Object ref = exportFormatId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + exportFormatId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The ID of the format in which the Model must be exported. Each Model
+       * lists the [export formats it supports][google.cloud.aiplatform.v1.Model.supported_export_formats].
+       * If no value is provided here, then the first from the list of the Model's
+       * supported formats is used by default.
+       * 
+ * + * string export_format_id = 1; + * + * @return The bytes for exportFormatId. + */ + public com.google.protobuf.ByteString getExportFormatIdBytes() { + java.lang.Object ref = exportFormatId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + exportFormatId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The ID of the format in which the Model must be exported. Each Model
+       * lists the [export formats it supports][google.cloud.aiplatform.v1.Model.supported_export_formats].
+       * If no value is provided here, then the first from the list of the Model's
+       * supported formats is used by default.
+       * 
+ * + * string export_format_id = 1; + * + * @param value The exportFormatId to set. + * @return This builder for chaining. + */ + public Builder setExportFormatId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + exportFormatId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The ID of the format in which the Model must be exported. Each Model
+       * lists the [export formats it supports][google.cloud.aiplatform.v1.Model.supported_export_formats].
+       * If no value is provided here, then the first from the list of the Model's
+       * supported formats is used by default.
+       * 
+ * + * string export_format_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearExportFormatId() { + + exportFormatId_ = getDefaultInstance().getExportFormatId(); + onChanged(); + return this; + } + /** + * + * + *
+       * The ID of the format in which the Model must be exported. Each Model
+       * lists the [export formats it supports][google.cloud.aiplatform.v1.Model.supported_export_formats].
+       * If no value is provided here, then the first from the list of the Model's
+       * supported formats is used by default.
+       * 
+ * + * string export_format_id = 1; + * + * @param value The bytes for exportFormatId to set. + * @return This builder for chaining. + */ + public Builder setExportFormatIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + exportFormatId_ = value; + onChanged(); + return this; + } + + private com.google.cloud.aiplatform.v1.GcsDestination artifactDestination_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GcsDestination, + com.google.cloud.aiplatform.v1.GcsDestination.Builder, + com.google.cloud.aiplatform.v1.GcsDestinationOrBuilder> + artifactDestinationBuilder_; + /** + * + * + *
+       * The Cloud Storage location where the Model artifact is to be
+       * written to. Under the directory given as the destination a new one with
+       * name "`model-export-<model-display-name>-<timestamp-of-export-call>`",
+       * where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format,
+       * will be created. Inside, the Model and any of its supporting files
+       * will be written.
+       * This field should only be set when the `exportableContent` field of the
+       * [Model.supported_export_formats] object contains `ARTIFACT`.
+       * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination artifact_destination = 3; + * + * @return Whether the artifactDestination field is set. + */ + public boolean hasArtifactDestination() { + return artifactDestinationBuilder_ != null || artifactDestination_ != null; + } + /** + * + * + *
+       * The Cloud Storage location where the Model artifact is to be
+       * written to. Under the directory given as the destination a new one with
+       * name "`model-export-<model-display-name>-<timestamp-of-export-call>`",
+       * where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format,
+       * will be created. Inside, the Model and any of its supporting files
+       * will be written.
+       * This field should only be set when the `exportableContent` field of the
+       * [Model.supported_export_formats] object contains `ARTIFACT`.
+       * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination artifact_destination = 3; + * + * @return The artifactDestination. + */ + public com.google.cloud.aiplatform.v1.GcsDestination getArtifactDestination() { + if (artifactDestinationBuilder_ == null) { + return artifactDestination_ == null + ? com.google.cloud.aiplatform.v1.GcsDestination.getDefaultInstance() + : artifactDestination_; + } else { + return artifactDestinationBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The Cloud Storage location where the Model artifact is to be
+       * written to. Under the directory given as the destination a new one with
+       * name "`model-export-<model-display-name>-<timestamp-of-export-call>`",
+       * where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format,
+       * will be created. Inside, the Model and any of its supporting files
+       * will be written.
+       * This field should only be set when the `exportableContent` field of the
+       * [Model.supported_export_formats] object contains `ARTIFACT`.
+       * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination artifact_destination = 3; + */ + public Builder setArtifactDestination(com.google.cloud.aiplatform.v1.GcsDestination value) { + if (artifactDestinationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + artifactDestination_ = value; + onChanged(); + } else { + artifactDestinationBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * The Cloud Storage location where the Model artifact is to be
+       * written to. Under the directory given as the destination a new one with
+       * name "`model-export-<model-display-name>-<timestamp-of-export-call>`",
+       * where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format,
+       * will be created. Inside, the Model and any of its supporting files
+       * will be written.
+       * This field should only be set when the `exportableContent` field of the
+       * [Model.supported_export_formats] object contains `ARTIFACT`.
+       * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination artifact_destination = 3; + */ + public Builder setArtifactDestination( + com.google.cloud.aiplatform.v1.GcsDestination.Builder builderForValue) { + if (artifactDestinationBuilder_ == null) { + artifactDestination_ = builderForValue.build(); + onChanged(); + } else { + artifactDestinationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * The Cloud Storage location where the Model artifact is to be
+       * written to. Under the directory given as the destination a new one with
+       * name "`model-export-<model-display-name>-<timestamp-of-export-call>`",
+       * where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format,
+       * will be created. Inside, the Model and any of its supporting files
+       * will be written.
+       * This field should only be set when the `exportableContent` field of the
+       * [Model.supported_export_formats] object contains `ARTIFACT`.
+       * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination artifact_destination = 3; + */ + public Builder mergeArtifactDestination(com.google.cloud.aiplatform.v1.GcsDestination value) { + if (artifactDestinationBuilder_ == null) { + if (artifactDestination_ != null) { + artifactDestination_ = + com.google.cloud.aiplatform.v1.GcsDestination.newBuilder(artifactDestination_) + .mergeFrom(value) + .buildPartial(); + } else { + artifactDestination_ = value; + } + onChanged(); + } else { + artifactDestinationBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * The Cloud Storage location where the Model artifact is to be
+       * written to. Under the directory given as the destination a new one with
+       * name "`model-export-<model-display-name>-<timestamp-of-export-call>`",
+       * where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format,
+       * will be created. Inside, the Model and any of its supporting files
+       * will be written.
+       * This field should only be set when the `exportableContent` field of the
+       * [Model.supported_export_formats] object contains `ARTIFACT`.
+       * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination artifact_destination = 3; + */ + public Builder clearArtifactDestination() { + if (artifactDestinationBuilder_ == null) { + artifactDestination_ = null; + onChanged(); + } else { + artifactDestination_ = null; + artifactDestinationBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * The Cloud Storage location where the Model artifact is to be
+       * written to. Under the directory given as the destination a new one with
+       * name "`model-export-<model-display-name>-<timestamp-of-export-call>`",
+       * where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format,
+       * will be created. Inside, the Model and any of its supporting files
+       * will be written.
+       * This field should only be set when the `exportableContent` field of the
+       * [Model.supported_export_formats] object contains `ARTIFACT`.
+       * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination artifact_destination = 3; + */ + public com.google.cloud.aiplatform.v1.GcsDestination.Builder getArtifactDestinationBuilder() { + + onChanged(); + return getArtifactDestinationFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The Cloud Storage location where the Model artifact is to be
+       * written to. Under the directory given as the destination a new one with
+       * name "`model-export-<model-display-name>-<timestamp-of-export-call>`",
+       * where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format,
+       * will be created. Inside, the Model and any of its supporting files
+       * will be written.
+       * This field should only be set when the `exportableContent` field of the
+       * [Model.supported_export_formats] object contains `ARTIFACT`.
+       * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination artifact_destination = 3; + */ + public com.google.cloud.aiplatform.v1.GcsDestinationOrBuilder + getArtifactDestinationOrBuilder() { + if (artifactDestinationBuilder_ != null) { + return artifactDestinationBuilder_.getMessageOrBuilder(); + } else { + return artifactDestination_ == null + ? com.google.cloud.aiplatform.v1.GcsDestination.getDefaultInstance() + : artifactDestination_; + } + } + /** + * + * + *
+       * The Cloud Storage location where the Model artifact is to be
+       * written to. Under the directory given as the destination a new one with
+       * name "`model-export-<model-display-name>-<timestamp-of-export-call>`",
+       * where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format,
+       * will be created. Inside, the Model and any of its supporting files
+       * will be written.
+       * This field should only be set when the `exportableContent` field of the
+       * [Model.supported_export_formats] object contains `ARTIFACT`.
+       * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination artifact_destination = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GcsDestination, + com.google.cloud.aiplatform.v1.GcsDestination.Builder, + com.google.cloud.aiplatform.v1.GcsDestinationOrBuilder> + getArtifactDestinationFieldBuilder() { + if (artifactDestinationBuilder_ == null) { + artifactDestinationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GcsDestination, + com.google.cloud.aiplatform.v1.GcsDestination.Builder, + com.google.cloud.aiplatform.v1.GcsDestinationOrBuilder>( + getArtifactDestination(), getParentForChildren(), isClean()); + artifactDestination_ = null; + } + return artifactDestinationBuilder_; + } + + private com.google.cloud.aiplatform.v1.ContainerRegistryDestination imageDestination_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.ContainerRegistryDestination, + com.google.cloud.aiplatform.v1.ContainerRegistryDestination.Builder, + com.google.cloud.aiplatform.v1.ContainerRegistryDestinationOrBuilder> + imageDestinationBuilder_; + /** + * + * + *
+       * The Google Container Registry or Artifact Registry uri where the
+       * Model container image will be copied to.
+       * This field should only be set when the `exportableContent` field of the
+       * [Model.supported_export_formats] object contains `IMAGE`.
+       * 
+ * + * .google.cloud.aiplatform.v1.ContainerRegistryDestination image_destination = 4; + * + * + * @return Whether the imageDestination field is set. + */ + public boolean hasImageDestination() { + return imageDestinationBuilder_ != null || imageDestination_ != null; + } + /** + * + * + *
+       * The Google Container Registry or Artifact Registry uri where the
+       * Model container image will be copied to.
+       * This field should only be set when the `exportableContent` field of the
+       * [Model.supported_export_formats] object contains `IMAGE`.
+       * 
+ * + * .google.cloud.aiplatform.v1.ContainerRegistryDestination image_destination = 4; + * + * + * @return The imageDestination. + */ + public com.google.cloud.aiplatform.v1.ContainerRegistryDestination getImageDestination() { + if (imageDestinationBuilder_ == null) { + return imageDestination_ == null + ? com.google.cloud.aiplatform.v1.ContainerRegistryDestination.getDefaultInstance() + : imageDestination_; + } else { + return imageDestinationBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The Google Container Registry or Artifact Registry uri where the
+       * Model container image will be copied to.
+       * This field should only be set when the `exportableContent` field of the
+       * [Model.supported_export_formats] object contains `IMAGE`.
+       * 
+ * + * .google.cloud.aiplatform.v1.ContainerRegistryDestination image_destination = 4; + * + */ + public Builder setImageDestination( + com.google.cloud.aiplatform.v1.ContainerRegistryDestination value) { + if (imageDestinationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + imageDestination_ = value; + onChanged(); + } else { + imageDestinationBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * The Google Container Registry or Artifact Registry uri where the
+       * Model container image will be copied to.
+       * This field should only be set when the `exportableContent` field of the
+       * [Model.supported_export_formats] object contains `IMAGE`.
+       * 
+ * + * .google.cloud.aiplatform.v1.ContainerRegistryDestination image_destination = 4; + * + */ + public Builder setImageDestination( + com.google.cloud.aiplatform.v1.ContainerRegistryDestination.Builder builderForValue) { + if (imageDestinationBuilder_ == null) { + imageDestination_ = builderForValue.build(); + onChanged(); + } else { + imageDestinationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * The Google Container Registry or Artifact Registry uri where the
+       * Model container image will be copied to.
+       * This field should only be set when the `exportableContent` field of the
+       * [Model.supported_export_formats] object contains `IMAGE`.
+       * 
+ * + * .google.cloud.aiplatform.v1.ContainerRegistryDestination image_destination = 4; + * + */ + public Builder mergeImageDestination( + com.google.cloud.aiplatform.v1.ContainerRegistryDestination value) { + if (imageDestinationBuilder_ == null) { + if (imageDestination_ != null) { + imageDestination_ = + com.google.cloud.aiplatform.v1.ContainerRegistryDestination.newBuilder( + imageDestination_) + .mergeFrom(value) + .buildPartial(); + } else { + imageDestination_ = value; + } + onChanged(); + } else { + imageDestinationBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * The Google Container Registry or Artifact Registry uri where the
+       * Model container image will be copied to.
+       * This field should only be set when the `exportableContent` field of the
+       * [Model.supported_export_formats] object contains `IMAGE`.
+       * 
+ * + * .google.cloud.aiplatform.v1.ContainerRegistryDestination image_destination = 4; + * + */ + public Builder clearImageDestination() { + if (imageDestinationBuilder_ == null) { + imageDestination_ = null; + onChanged(); + } else { + imageDestination_ = null; + imageDestinationBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * The Google Container Registry or Artifact Registry uri where the
+       * Model container image will be copied to.
+       * This field should only be set when the `exportableContent` field of the
+       * [Model.supported_export_formats] object contains `IMAGE`.
+       * 
+ * + * .google.cloud.aiplatform.v1.ContainerRegistryDestination image_destination = 4; + * + */ + public com.google.cloud.aiplatform.v1.ContainerRegistryDestination.Builder + getImageDestinationBuilder() { + + onChanged(); + return getImageDestinationFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The Google Container Registry or Artifact Registry uri where the
+       * Model container image will be copied to.
+       * This field should only be set when the `exportableContent` field of the
+       * [Model.supported_export_formats] object contains `IMAGE`.
+       * 
+ * + * .google.cloud.aiplatform.v1.ContainerRegistryDestination image_destination = 4; + * + */ + public com.google.cloud.aiplatform.v1.ContainerRegistryDestinationOrBuilder + getImageDestinationOrBuilder() { + if (imageDestinationBuilder_ != null) { + return imageDestinationBuilder_.getMessageOrBuilder(); + } else { + return imageDestination_ == null + ? com.google.cloud.aiplatform.v1.ContainerRegistryDestination.getDefaultInstance() + : imageDestination_; + } + } + /** + * + * + *
+       * The Google Container Registry or Artifact Registry uri where the
+       * Model container image will be copied to.
+       * This field should only be set when the `exportableContent` field of the
+       * [Model.supported_export_formats] object contains `IMAGE`.
+       * 
+ * + * .google.cloud.aiplatform.v1.ContainerRegistryDestination image_destination = 4; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.ContainerRegistryDestination, + com.google.cloud.aiplatform.v1.ContainerRegistryDestination.Builder, + com.google.cloud.aiplatform.v1.ContainerRegistryDestinationOrBuilder> + getImageDestinationFieldBuilder() { + if (imageDestinationBuilder_ == null) { + imageDestinationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.ContainerRegistryDestination, + com.google.cloud.aiplatform.v1.ContainerRegistryDestination.Builder, + com.google.cloud.aiplatform.v1.ContainerRegistryDestinationOrBuilder>( + getImageDestination(), getParentForChildren(), isClean()); + imageDestination_ = null; + } + return imageDestinationBuilder_; + } + + @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.v1.ExportModelRequest.OutputConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig) + private static final com.google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig(); + } + + public static com.google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OutputConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new OutputConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The resource name of the Model to export.
+   * Format: `projects/{project}/locations/{location}/models/{model}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the Model to export.
+   * Format: `projects/{project}/locations/{location}/models/{model}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OUTPUT_CONFIG_FIELD_NUMBER = 2; + private com.google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig outputConfig_; + /** + * + * + *
+   * Required. The desired output location and configuration.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the outputConfig field is set. + */ + @java.lang.Override + public boolean hasOutputConfig() { + return outputConfig_ != null; + } + /** + * + * + *
+   * Required. The desired output location and configuration.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The outputConfig. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig getOutputConfig() { + return outputConfig_ == null + ? com.google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig.getDefaultInstance() + : outputConfig_; + } + /** + * + * + *
+   * Required. The desired output location and configuration.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ExportModelRequest.OutputConfigOrBuilder + getOutputConfigOrBuilder() { + return getOutputConfig(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (outputConfig_ != null) { + output.writeMessage(2, getOutputConfig()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (outputConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getOutputConfig()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.ExportModelRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ExportModelRequest other = + (com.google.cloud.aiplatform.v1.ExportModelRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (hasOutputConfig() != other.hasOutputConfig()) return false; + if (hasOutputConfig()) { + if (!getOutputConfig().equals(other.getOutputConfig())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasOutputConfig()) { + hash = (37 * hash) + OUTPUT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getOutputConfig().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.ExportModelRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ExportModelRequest 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.v1.ExportModelRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ExportModelRequest 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.v1.ExportModelRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ExportModelRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ExportModelRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ExportModelRequest 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.v1.ExportModelRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ExportModelRequest 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.v1.ExportModelRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ExportModelRequest 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.v1.ExportModelRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [ModelService.ExportModel][google.cloud.aiplatform.v1.ModelService.ExportModel].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ExportModelRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ExportModelRequest) + com.google.cloud.aiplatform.v1.ExportModelRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_ExportModelRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_ExportModelRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ExportModelRequest.class, + com.google.cloud.aiplatform.v1.ExportModelRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ExportModelRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + if (outputConfigBuilder_ == null) { + outputConfig_ = null; + } else { + outputConfig_ = null; + outputConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_ExportModelRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ExportModelRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ExportModelRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ExportModelRequest build() { + com.google.cloud.aiplatform.v1.ExportModelRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ExportModelRequest buildPartial() { + com.google.cloud.aiplatform.v1.ExportModelRequest result = + new com.google.cloud.aiplatform.v1.ExportModelRequest(this); + result.name_ = name_; + if (outputConfigBuilder_ == null) { + result.outputConfig_ = outputConfig_; + } else { + result.outputConfig_ = outputConfigBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.ExportModelRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.ExportModelRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.ExportModelRequest other) { + if (other == com.google.cloud.aiplatform.v1.ExportModelRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasOutputConfig()) { + mergeOutputConfig(other.getOutputConfig()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.aiplatform.v1.ExportModelRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.ExportModelRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The resource name of the Model to export.
+     * Format: `projects/{project}/locations/{location}/models/{model}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Model to export.
+     * Format: `projects/{project}/locations/{location}/models/{model}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Model to export.
+     * Format: `projects/{project}/locations/{location}/models/{model}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Model to export.
+     * Format: `projects/{project}/locations/{location}/models/{model}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Model to export.
+     * Format: `projects/{project}/locations/{location}/models/{model}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private com.google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig outputConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig, + com.google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig.Builder, + com.google.cloud.aiplatform.v1.ExportModelRequest.OutputConfigOrBuilder> + outputConfigBuilder_; + /** + * + * + *
+     * Required. The desired output location and configuration.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the outputConfig field is set. + */ + public boolean hasOutputConfig() { + return outputConfigBuilder_ != null || outputConfig_ != null; + } + /** + * + * + *
+     * Required. The desired output location and configuration.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The outputConfig. + */ + public com.google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig getOutputConfig() { + if (outputConfigBuilder_ == null) { + return outputConfig_ == null + ? com.google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig.getDefaultInstance() + : outputConfig_; + } else { + return outputConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The desired output location and configuration.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setOutputConfig( + com.google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig value) { + if (outputConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + outputConfig_ = value; + onChanged(); + } else { + outputConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The desired output location and configuration.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setOutputConfig( + com.google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig.Builder builderForValue) { + if (outputConfigBuilder_ == null) { + outputConfig_ = builderForValue.build(); + onChanged(); + } else { + outputConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The desired output location and configuration.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeOutputConfig( + com.google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig value) { + if (outputConfigBuilder_ == null) { + if (outputConfig_ != null) { + outputConfig_ = + com.google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig.newBuilder( + outputConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + outputConfig_ = value; + } + onChanged(); + } else { + outputConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The desired output location and configuration.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearOutputConfig() { + if (outputConfigBuilder_ == null) { + outputConfig_ = null; + onChanged(); + } else { + outputConfig_ = null; + outputConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The desired output location and configuration.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig.Builder + getOutputConfigBuilder() { + + onChanged(); + return getOutputConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The desired output location and configuration.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.ExportModelRequest.OutputConfigOrBuilder + getOutputConfigOrBuilder() { + if (outputConfigBuilder_ != null) { + return outputConfigBuilder_.getMessageOrBuilder(); + } else { + return outputConfig_ == null + ? com.google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig.getDefaultInstance() + : outputConfig_; + } + } + /** + * + * + *
+     * Required. The desired output location and configuration.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig, + com.google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig.Builder, + com.google.cloud.aiplatform.v1.ExportModelRequest.OutputConfigOrBuilder> + getOutputConfigFieldBuilder() { + if (outputConfigBuilder_ == null) { + outputConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig, + com.google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig.Builder, + com.google.cloud.aiplatform.v1.ExportModelRequest.OutputConfigOrBuilder>( + getOutputConfig(), getParentForChildren(), isClean()); + outputConfig_ = null; + } + return outputConfigBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.ExportModelRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ExportModelRequest) + private static final com.google.cloud.aiplatform.v1.ExportModelRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ExportModelRequest(); + } + + public static com.google.cloud.aiplatform.v1.ExportModelRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExportModelRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ExportModelRequest(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.v1.ExportModelRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ExportModelRequestOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ExportModelRequestOrBuilder.java new file mode 100644 index 000000000..e6e521135 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ExportModelRequestOrBuilder.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/v1/model_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface ExportModelRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ExportModelRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the Model to export.
+   * Format: `projects/{project}/locations/{location}/models/{model}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The resource name of the Model to export.
+   * Format: `projects/{project}/locations/{location}/models/{model}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The desired output location and configuration.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the outputConfig field is set. + */ + boolean hasOutputConfig(); + /** + * + * + *
+   * Required. The desired output location and configuration.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The outputConfig. + */ + com.google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig getOutputConfig(); + /** + * + * + *
+   * Required. The desired output location and configuration.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1.ExportModelRequest.OutputConfigOrBuilder + getOutputConfigOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ExportModelResponse.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ExportModelResponse.java new file mode 100644 index 000000000..fd7871b4e --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ExportModelResponse.java @@ -0,0 +1,456 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/model_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Response message of [ModelService.ExportModel][google.cloud.aiplatform.v1.ModelService.ExportModel] operation.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ExportModelResponse} + */ +public final class ExportModelResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ExportModelResponse) + ExportModelResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExportModelResponse.newBuilder() to construct. + private ExportModelResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExportModelResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExportModelResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ExportModelResponse( + 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.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_ExportModelResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_ExportModelResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ExportModelResponse.class, + com.google.cloud.aiplatform.v1.ExportModelResponse.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.v1.ExportModelResponse)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ExportModelResponse other = + (com.google.cloud.aiplatform.v1.ExportModelResponse) 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.v1.ExportModelResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ExportModelResponse 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.v1.ExportModelResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ExportModelResponse 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.v1.ExportModelResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ExportModelResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ExportModelResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ExportModelResponse 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.v1.ExportModelResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ExportModelResponse 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.v1.ExportModelResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ExportModelResponse 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.v1.ExportModelResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message of [ModelService.ExportModel][google.cloud.aiplatform.v1.ModelService.ExportModel] operation.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ExportModelResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ExportModelResponse) + com.google.cloud.aiplatform.v1.ExportModelResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_ExportModelResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_ExportModelResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ExportModelResponse.class, + com.google.cloud.aiplatform.v1.ExportModelResponse.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ExportModelResponse.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.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_ExportModelResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ExportModelResponse getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ExportModelResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ExportModelResponse build() { + com.google.cloud.aiplatform.v1.ExportModelResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ExportModelResponse buildPartial() { + com.google.cloud.aiplatform.v1.ExportModelResponse result = + new com.google.cloud.aiplatform.v1.ExportModelResponse(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.v1.ExportModelResponse) { + return mergeFrom((com.google.cloud.aiplatform.v1.ExportModelResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.ExportModelResponse other) { + if (other == com.google.cloud.aiplatform.v1.ExportModelResponse.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.v1.ExportModelResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.ExportModelResponse) 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.v1.ExportModelResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ExportModelResponse) + private static final com.google.cloud.aiplatform.v1.ExportModelResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ExportModelResponse(); + } + + public static com.google.cloud.aiplatform.v1.ExportModelResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExportModelResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ExportModelResponse(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.v1.ExportModelResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ExportModelResponseOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ExportModelResponseOrBuilder.java new file mode 100644 index 000000000..98c1f5daa --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ExportModelResponseOrBuilder.java @@ -0,0 +1,24 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/model_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface ExportModelResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ExportModelResponse) + com.google.protobuf.MessageOrBuilder {} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FilterSplit.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FilterSplit.java new file mode 100644 index 000000000..20e3e0322 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FilterSplit.java @@ -0,0 +1,1107 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/training_pipeline.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Assigns input data to training, validation, and test sets based on the given
+ * filters, data pieces not matched by any filter are ignored. Currently only
+ * supported for Datasets containing DataItems.
+ * If any of the filters in this message are to match nothing, then they can be
+ * set as '-' (the minus sign).
+ * Supported only for unstructured Datasets.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.FilterSplit} + */ +public final class FilterSplit extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.FilterSplit) + FilterSplitOrBuilder { + private static final long serialVersionUID = 0L; + // Use FilterSplit.newBuilder() to construct. + private FilterSplit(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FilterSplit() { + trainingFilter_ = ""; + validationFilter_ = ""; + testFilter_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FilterSplit(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private FilterSplit( + 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(); + + trainingFilter_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + validationFilter_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + testFilter_ = 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.v1.TrainingPipelineProto + .internal_static_google_cloud_aiplatform_v1_FilterSplit_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.TrainingPipelineProto + .internal_static_google_cloud_aiplatform_v1_FilterSplit_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.FilterSplit.class, + com.google.cloud.aiplatform.v1.FilterSplit.Builder.class); + } + + public static final int TRAINING_FILTER_FIELD_NUMBER = 1; + private volatile java.lang.Object trainingFilter_; + /** + * + * + *
+   * Required. A filter on DataItems of the Dataset. DataItems that match
+   * this filter are used to train the Model. A filter with same syntax
+   * as the one used in [DatasetService.ListDataItems][google.cloud.aiplatform.v1.DatasetService.ListDataItems] may be used. If a
+   * single DataItem is matched by more than one of the FilterSplit filters,
+   * then it is assigned to the first set that applies to it in the
+   * training, validation, test order.
+   * 
+ * + * string training_filter = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The trainingFilter. + */ + @java.lang.Override + public java.lang.String getTrainingFilter() { + java.lang.Object ref = trainingFilter_; + 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(); + trainingFilter_ = s; + return s; + } + } + /** + * + * + *
+   * Required. A filter on DataItems of the Dataset. DataItems that match
+   * this filter are used to train the Model. A filter with same syntax
+   * as the one used in [DatasetService.ListDataItems][google.cloud.aiplatform.v1.DatasetService.ListDataItems] may be used. If a
+   * single DataItem is matched by more than one of the FilterSplit filters,
+   * then it is assigned to the first set that applies to it in the
+   * training, validation, test order.
+   * 
+ * + * string training_filter = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for trainingFilter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTrainingFilterBytes() { + java.lang.Object ref = trainingFilter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + trainingFilter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALIDATION_FILTER_FIELD_NUMBER = 2; + private volatile java.lang.Object validationFilter_; + /** + * + * + *
+   * Required. A filter on DataItems of the Dataset. DataItems that match
+   * this filter are used to validate the Model. A filter with same syntax
+   * as the one used in [DatasetService.ListDataItems][google.cloud.aiplatform.v1.DatasetService.ListDataItems] may be used. If a
+   * single DataItem is matched by more than one of the FilterSplit filters,
+   * then it is assigned to the first set that applies to it in the
+   * training, validation, test order.
+   * 
+ * + * string validation_filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The validationFilter. + */ + @java.lang.Override + public java.lang.String getValidationFilter() { + java.lang.Object ref = validationFilter_; + 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(); + validationFilter_ = s; + return s; + } + } + /** + * + * + *
+   * Required. A filter on DataItems of the Dataset. DataItems that match
+   * this filter are used to validate the Model. A filter with same syntax
+   * as the one used in [DatasetService.ListDataItems][google.cloud.aiplatform.v1.DatasetService.ListDataItems] may be used. If a
+   * single DataItem is matched by more than one of the FilterSplit filters,
+   * then it is assigned to the first set that applies to it in the
+   * training, validation, test order.
+   * 
+ * + * string validation_filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for validationFilter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getValidationFilterBytes() { + java.lang.Object ref = validationFilter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + validationFilter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TEST_FILTER_FIELD_NUMBER = 3; + private volatile java.lang.Object testFilter_; + /** + * + * + *
+   * Required. A filter on DataItems of the Dataset. DataItems that match
+   * this filter are used to test the Model. A filter with same syntax
+   * as the one used in [DatasetService.ListDataItems][google.cloud.aiplatform.v1.DatasetService.ListDataItems] may be used. If a
+   * single DataItem is matched by more than one of the FilterSplit filters,
+   * then it is assigned to the first set that applies to it in the
+   * training, validation, test order.
+   * 
+ * + * string test_filter = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The testFilter. + */ + @java.lang.Override + public java.lang.String getTestFilter() { + java.lang.Object ref = testFilter_; + 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(); + testFilter_ = s; + return s; + } + } + /** + * + * + *
+   * Required. A filter on DataItems of the Dataset. DataItems that match
+   * this filter are used to test the Model. A filter with same syntax
+   * as the one used in [DatasetService.ListDataItems][google.cloud.aiplatform.v1.DatasetService.ListDataItems] may be used. If a
+   * single DataItem is matched by more than one of the FilterSplit filters,
+   * then it is assigned to the first set that applies to it in the
+   * training, validation, test order.
+   * 
+ * + * string test_filter = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for testFilter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTestFilterBytes() { + java.lang.Object ref = testFilter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + testFilter_ = 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 (!getTrainingFilterBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, trainingFilter_); + } + if (!getValidationFilterBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, validationFilter_); + } + if (!getTestFilterBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, testFilter_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getTrainingFilterBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, trainingFilter_); + } + if (!getValidationFilterBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, validationFilter_); + } + if (!getTestFilterBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, testFilter_); + } + 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.v1.FilterSplit)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.FilterSplit other = + (com.google.cloud.aiplatform.v1.FilterSplit) obj; + + if (!getTrainingFilter().equals(other.getTrainingFilter())) return false; + if (!getValidationFilter().equals(other.getValidationFilter())) return false; + if (!getTestFilter().equals(other.getTestFilter())) 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) + TRAINING_FILTER_FIELD_NUMBER; + hash = (53 * hash) + getTrainingFilter().hashCode(); + hash = (37 * hash) + VALIDATION_FILTER_FIELD_NUMBER; + hash = (53 * hash) + getValidationFilter().hashCode(); + hash = (37 * hash) + TEST_FILTER_FIELD_NUMBER; + hash = (53 * hash) + getTestFilter().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.FilterSplit parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.FilterSplit 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.v1.FilterSplit parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.FilterSplit 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.v1.FilterSplit parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.FilterSplit parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FilterSplit parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.FilterSplit 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.v1.FilterSplit parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.FilterSplit 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.v1.FilterSplit parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.FilterSplit 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.v1.FilterSplit 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; + } + /** + * + * + *
+   * Assigns input data to training, validation, and test sets based on the given
+   * filters, data pieces not matched by any filter are ignored. Currently only
+   * supported for Datasets containing DataItems.
+   * If any of the filters in this message are to match nothing, then they can be
+   * set as '-' (the minus sign).
+   * Supported only for unstructured Datasets.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.FilterSplit} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.FilterSplit) + com.google.cloud.aiplatform.v1.FilterSplitOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.TrainingPipelineProto + .internal_static_google_cloud_aiplatform_v1_FilterSplit_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.TrainingPipelineProto + .internal_static_google_cloud_aiplatform_v1_FilterSplit_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.FilterSplit.class, + com.google.cloud.aiplatform.v1.FilterSplit.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.FilterSplit.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(); + trainingFilter_ = ""; + + validationFilter_ = ""; + + testFilter_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.TrainingPipelineProto + .internal_static_google_cloud_aiplatform_v1_FilterSplit_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.FilterSplit getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.FilterSplit.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.FilterSplit build() { + com.google.cloud.aiplatform.v1.FilterSplit result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.FilterSplit buildPartial() { + com.google.cloud.aiplatform.v1.FilterSplit result = + new com.google.cloud.aiplatform.v1.FilterSplit(this); + result.trainingFilter_ = trainingFilter_; + result.validationFilter_ = validationFilter_; + result.testFilter_ = testFilter_; + 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.v1.FilterSplit) { + return mergeFrom((com.google.cloud.aiplatform.v1.FilterSplit) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.FilterSplit other) { + if (other == com.google.cloud.aiplatform.v1.FilterSplit.getDefaultInstance()) return this; + if (!other.getTrainingFilter().isEmpty()) { + trainingFilter_ = other.trainingFilter_; + onChanged(); + } + if (!other.getValidationFilter().isEmpty()) { + validationFilter_ = other.validationFilter_; + onChanged(); + } + if (!other.getTestFilter().isEmpty()) { + testFilter_ = other.testFilter_; + 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.v1.FilterSplit parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.aiplatform.v1.FilterSplit) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object trainingFilter_ = ""; + /** + * + * + *
+     * Required. A filter on DataItems of the Dataset. DataItems that match
+     * this filter are used to train the Model. A filter with same syntax
+     * as the one used in [DatasetService.ListDataItems][google.cloud.aiplatform.v1.DatasetService.ListDataItems] may be used. If a
+     * single DataItem is matched by more than one of the FilterSplit filters,
+     * then it is assigned to the first set that applies to it in the
+     * training, validation, test order.
+     * 
+ * + * string training_filter = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The trainingFilter. + */ + public java.lang.String getTrainingFilter() { + java.lang.Object ref = trainingFilter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + trainingFilter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. A filter on DataItems of the Dataset. DataItems that match
+     * this filter are used to train the Model. A filter with same syntax
+     * as the one used in [DatasetService.ListDataItems][google.cloud.aiplatform.v1.DatasetService.ListDataItems] may be used. If a
+     * single DataItem is matched by more than one of the FilterSplit filters,
+     * then it is assigned to the first set that applies to it in the
+     * training, validation, test order.
+     * 
+ * + * string training_filter = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for trainingFilter. + */ + public com.google.protobuf.ByteString getTrainingFilterBytes() { + java.lang.Object ref = trainingFilter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + trainingFilter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. A filter on DataItems of the Dataset. DataItems that match
+     * this filter are used to train the Model. A filter with same syntax
+     * as the one used in [DatasetService.ListDataItems][google.cloud.aiplatform.v1.DatasetService.ListDataItems] may be used. If a
+     * single DataItem is matched by more than one of the FilterSplit filters,
+     * then it is assigned to the first set that applies to it in the
+     * training, validation, test order.
+     * 
+ * + * string training_filter = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The trainingFilter to set. + * @return This builder for chaining. + */ + public Builder setTrainingFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + trainingFilter_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A filter on DataItems of the Dataset. DataItems that match
+     * this filter are used to train the Model. A filter with same syntax
+     * as the one used in [DatasetService.ListDataItems][google.cloud.aiplatform.v1.DatasetService.ListDataItems] may be used. If a
+     * single DataItem is matched by more than one of the FilterSplit filters,
+     * then it is assigned to the first set that applies to it in the
+     * training, validation, test order.
+     * 
+ * + * string training_filter = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearTrainingFilter() { + + trainingFilter_ = getDefaultInstance().getTrainingFilter(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A filter on DataItems of the Dataset. DataItems that match
+     * this filter are used to train the Model. A filter with same syntax
+     * as the one used in [DatasetService.ListDataItems][google.cloud.aiplatform.v1.DatasetService.ListDataItems] may be used. If a
+     * single DataItem is matched by more than one of the FilterSplit filters,
+     * then it is assigned to the first set that applies to it in the
+     * training, validation, test order.
+     * 
+ * + * string training_filter = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for trainingFilter to set. + * @return This builder for chaining. + */ + public Builder setTrainingFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + trainingFilter_ = value; + onChanged(); + return this; + } + + private java.lang.Object validationFilter_ = ""; + /** + * + * + *
+     * Required. A filter on DataItems of the Dataset. DataItems that match
+     * this filter are used to validate the Model. A filter with same syntax
+     * as the one used in [DatasetService.ListDataItems][google.cloud.aiplatform.v1.DatasetService.ListDataItems] may be used. If a
+     * single DataItem is matched by more than one of the FilterSplit filters,
+     * then it is assigned to the first set that applies to it in the
+     * training, validation, test order.
+     * 
+ * + * string validation_filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The validationFilter. + */ + public java.lang.String getValidationFilter() { + java.lang.Object ref = validationFilter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + validationFilter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. A filter on DataItems of the Dataset. DataItems that match
+     * this filter are used to validate the Model. A filter with same syntax
+     * as the one used in [DatasetService.ListDataItems][google.cloud.aiplatform.v1.DatasetService.ListDataItems] may be used. If a
+     * single DataItem is matched by more than one of the FilterSplit filters,
+     * then it is assigned to the first set that applies to it in the
+     * training, validation, test order.
+     * 
+ * + * string validation_filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for validationFilter. + */ + public com.google.protobuf.ByteString getValidationFilterBytes() { + java.lang.Object ref = validationFilter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + validationFilter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. A filter on DataItems of the Dataset. DataItems that match
+     * this filter are used to validate the Model. A filter with same syntax
+     * as the one used in [DatasetService.ListDataItems][google.cloud.aiplatform.v1.DatasetService.ListDataItems] may be used. If a
+     * single DataItem is matched by more than one of the FilterSplit filters,
+     * then it is assigned to the first set that applies to it in the
+     * training, validation, test order.
+     * 
+ * + * string validation_filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The validationFilter to set. + * @return This builder for chaining. + */ + public Builder setValidationFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + validationFilter_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A filter on DataItems of the Dataset. DataItems that match
+     * this filter are used to validate the Model. A filter with same syntax
+     * as the one used in [DatasetService.ListDataItems][google.cloud.aiplatform.v1.DatasetService.ListDataItems] may be used. If a
+     * single DataItem is matched by more than one of the FilterSplit filters,
+     * then it is assigned to the first set that applies to it in the
+     * training, validation, test order.
+     * 
+ * + * string validation_filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearValidationFilter() { + + validationFilter_ = getDefaultInstance().getValidationFilter(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A filter on DataItems of the Dataset. DataItems that match
+     * this filter are used to validate the Model. A filter with same syntax
+     * as the one used in [DatasetService.ListDataItems][google.cloud.aiplatform.v1.DatasetService.ListDataItems] may be used. If a
+     * single DataItem is matched by more than one of the FilterSplit filters,
+     * then it is assigned to the first set that applies to it in the
+     * training, validation, test order.
+     * 
+ * + * string validation_filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for validationFilter to set. + * @return This builder for chaining. + */ + public Builder setValidationFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + validationFilter_ = value; + onChanged(); + return this; + } + + private java.lang.Object testFilter_ = ""; + /** + * + * + *
+     * Required. A filter on DataItems of the Dataset. DataItems that match
+     * this filter are used to test the Model. A filter with same syntax
+     * as the one used in [DatasetService.ListDataItems][google.cloud.aiplatform.v1.DatasetService.ListDataItems] may be used. If a
+     * single DataItem is matched by more than one of the FilterSplit filters,
+     * then it is assigned to the first set that applies to it in the
+     * training, validation, test order.
+     * 
+ * + * string test_filter = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The testFilter. + */ + public java.lang.String getTestFilter() { + java.lang.Object ref = testFilter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + testFilter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. A filter on DataItems of the Dataset. DataItems that match
+     * this filter are used to test the Model. A filter with same syntax
+     * as the one used in [DatasetService.ListDataItems][google.cloud.aiplatform.v1.DatasetService.ListDataItems] may be used. If a
+     * single DataItem is matched by more than one of the FilterSplit filters,
+     * then it is assigned to the first set that applies to it in the
+     * training, validation, test order.
+     * 
+ * + * string test_filter = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for testFilter. + */ + public com.google.protobuf.ByteString getTestFilterBytes() { + java.lang.Object ref = testFilter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + testFilter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. A filter on DataItems of the Dataset. DataItems that match
+     * this filter are used to test the Model. A filter with same syntax
+     * as the one used in [DatasetService.ListDataItems][google.cloud.aiplatform.v1.DatasetService.ListDataItems] may be used. If a
+     * single DataItem is matched by more than one of the FilterSplit filters,
+     * then it is assigned to the first set that applies to it in the
+     * training, validation, test order.
+     * 
+ * + * string test_filter = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The testFilter to set. + * @return This builder for chaining. + */ + public Builder setTestFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + testFilter_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A filter on DataItems of the Dataset. DataItems that match
+     * this filter are used to test the Model. A filter with same syntax
+     * as the one used in [DatasetService.ListDataItems][google.cloud.aiplatform.v1.DatasetService.ListDataItems] may be used. If a
+     * single DataItem is matched by more than one of the FilterSplit filters,
+     * then it is assigned to the first set that applies to it in the
+     * training, validation, test order.
+     * 
+ * + * string test_filter = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearTestFilter() { + + testFilter_ = getDefaultInstance().getTestFilter(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A filter on DataItems of the Dataset. DataItems that match
+     * this filter are used to test the Model. A filter with same syntax
+     * as the one used in [DatasetService.ListDataItems][google.cloud.aiplatform.v1.DatasetService.ListDataItems] may be used. If a
+     * single DataItem is matched by more than one of the FilterSplit filters,
+     * then it is assigned to the first set that applies to it in the
+     * training, validation, test order.
+     * 
+ * + * string test_filter = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for testFilter to set. + * @return This builder for chaining. + */ + public Builder setTestFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + testFilter_ = 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.v1.FilterSplit) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.FilterSplit) + private static final com.google.cloud.aiplatform.v1.FilterSplit DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.FilterSplit(); + } + + public static com.google.cloud.aiplatform.v1.FilterSplit getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FilterSplit parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new FilterSplit(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.v1.FilterSplit getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FilterSplitOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FilterSplitOrBuilder.java new file mode 100644 index 000000000..f73c7c5ad --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FilterSplitOrBuilder.java @@ -0,0 +1,130 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/training_pipeline.proto + +package com.google.cloud.aiplatform.v1; + +public interface FilterSplitOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.FilterSplit) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. A filter on DataItems of the Dataset. DataItems that match
+   * this filter are used to train the Model. A filter with same syntax
+   * as the one used in [DatasetService.ListDataItems][google.cloud.aiplatform.v1.DatasetService.ListDataItems] may be used. If a
+   * single DataItem is matched by more than one of the FilterSplit filters,
+   * then it is assigned to the first set that applies to it in the
+   * training, validation, test order.
+   * 
+ * + * string training_filter = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The trainingFilter. + */ + java.lang.String getTrainingFilter(); + /** + * + * + *
+   * Required. A filter on DataItems of the Dataset. DataItems that match
+   * this filter are used to train the Model. A filter with same syntax
+   * as the one used in [DatasetService.ListDataItems][google.cloud.aiplatform.v1.DatasetService.ListDataItems] may be used. If a
+   * single DataItem is matched by more than one of the FilterSplit filters,
+   * then it is assigned to the first set that applies to it in the
+   * training, validation, test order.
+   * 
+ * + * string training_filter = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for trainingFilter. + */ + com.google.protobuf.ByteString getTrainingFilterBytes(); + + /** + * + * + *
+   * Required. A filter on DataItems of the Dataset. DataItems that match
+   * this filter are used to validate the Model. A filter with same syntax
+   * as the one used in [DatasetService.ListDataItems][google.cloud.aiplatform.v1.DatasetService.ListDataItems] may be used. If a
+   * single DataItem is matched by more than one of the FilterSplit filters,
+   * then it is assigned to the first set that applies to it in the
+   * training, validation, test order.
+   * 
+ * + * string validation_filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The validationFilter. + */ + java.lang.String getValidationFilter(); + /** + * + * + *
+   * Required. A filter on DataItems of the Dataset. DataItems that match
+   * this filter are used to validate the Model. A filter with same syntax
+   * as the one used in [DatasetService.ListDataItems][google.cloud.aiplatform.v1.DatasetService.ListDataItems] may be used. If a
+   * single DataItem is matched by more than one of the FilterSplit filters,
+   * then it is assigned to the first set that applies to it in the
+   * training, validation, test order.
+   * 
+ * + * string validation_filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for validationFilter. + */ + com.google.protobuf.ByteString getValidationFilterBytes(); + + /** + * + * + *
+   * Required. A filter on DataItems of the Dataset. DataItems that match
+   * this filter are used to test the Model. A filter with same syntax
+   * as the one used in [DatasetService.ListDataItems][google.cloud.aiplatform.v1.DatasetService.ListDataItems] may be used. If a
+   * single DataItem is matched by more than one of the FilterSplit filters,
+   * then it is assigned to the first set that applies to it in the
+   * training, validation, test order.
+   * 
+ * + * string test_filter = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The testFilter. + */ + java.lang.String getTestFilter(); + /** + * + * + *
+   * Required. A filter on DataItems of the Dataset. DataItems that match
+   * this filter are used to test the Model. A filter with same syntax
+   * as the one used in [DatasetService.ListDataItems][google.cloud.aiplatform.v1.DatasetService.ListDataItems] may be used. If a
+   * single DataItem is matched by more than one of the FilterSplit filters,
+   * then it is assigned to the first set that applies to it in the
+   * training, validation, test order.
+   * 
+ * + * string test_filter = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for testFilter. + */ + com.google.protobuf.ByteString getTestFilterBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FractionSplit.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FractionSplit.java new file mode 100644 index 000000000..b05181f9f --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FractionSplit.java @@ -0,0 +1,746 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/training_pipeline.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Assigns the input data to training, validation, and test sets as per the
+ * given fractions. Any of `training_fraction`, `validation_fraction` and
+ * `test_fraction` may optionally be provided, they must sum to up to 1. If the
+ * provided ones sum to less than 1, the remainder is assigned to sets as
+ * decided by AI Platform. If none of the fractions are set, by default roughly
+ * 80% of data is used for training, 10% for validation, and 10% for test.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.FractionSplit} + */ +public final class FractionSplit extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.FractionSplit) + FractionSplitOrBuilder { + private static final long serialVersionUID = 0L; + // Use FractionSplit.newBuilder() to construct. + private FractionSplit(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FractionSplit() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FractionSplit(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private FractionSplit( + 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 9: + { + trainingFraction_ = input.readDouble(); + break; + } + case 17: + { + validationFraction_ = input.readDouble(); + break; + } + case 25: + { + testFraction_ = input.readDouble(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.TrainingPipelineProto + .internal_static_google_cloud_aiplatform_v1_FractionSplit_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.TrainingPipelineProto + .internal_static_google_cloud_aiplatform_v1_FractionSplit_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.FractionSplit.class, + com.google.cloud.aiplatform.v1.FractionSplit.Builder.class); + } + + public static final int TRAINING_FRACTION_FIELD_NUMBER = 1; + private double trainingFraction_; + /** + * + * + *
+   * The fraction of the input data that is to be used to train the Model.
+   * 
+ * + * double training_fraction = 1; + * + * @return The trainingFraction. + */ + @java.lang.Override + public double getTrainingFraction() { + return trainingFraction_; + } + + public static final int VALIDATION_FRACTION_FIELD_NUMBER = 2; + private double validationFraction_; + /** + * + * + *
+   * The fraction of the input data that is to be used to validate the Model.
+   * 
+ * + * double validation_fraction = 2; + * + * @return The validationFraction. + */ + @java.lang.Override + public double getValidationFraction() { + return validationFraction_; + } + + public static final int TEST_FRACTION_FIELD_NUMBER = 3; + private double testFraction_; + /** + * + * + *
+   * The fraction of the input data that is to be used to evaluate the Model.
+   * 
+ * + * double test_fraction = 3; + * + * @return The testFraction. + */ + @java.lang.Override + public double getTestFraction() { + return testFraction_; + } + + 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 (trainingFraction_ != 0D) { + output.writeDouble(1, trainingFraction_); + } + if (validationFraction_ != 0D) { + output.writeDouble(2, validationFraction_); + } + if (testFraction_ != 0D) { + output.writeDouble(3, testFraction_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (trainingFraction_ != 0D) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(1, trainingFraction_); + } + if (validationFraction_ != 0D) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(2, validationFraction_); + } + if (testFraction_ != 0D) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(3, testFraction_); + } + 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.v1.FractionSplit)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.FractionSplit other = + (com.google.cloud.aiplatform.v1.FractionSplit) obj; + + if (java.lang.Double.doubleToLongBits(getTrainingFraction()) + != java.lang.Double.doubleToLongBits(other.getTrainingFraction())) return false; + if (java.lang.Double.doubleToLongBits(getValidationFraction()) + != java.lang.Double.doubleToLongBits(other.getValidationFraction())) return false; + if (java.lang.Double.doubleToLongBits(getTestFraction()) + != java.lang.Double.doubleToLongBits(other.getTestFraction())) 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) + TRAINING_FRACTION_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getTrainingFraction())); + hash = (37 * hash) + VALIDATION_FRACTION_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getValidationFraction())); + hash = (37 * hash) + TEST_FRACTION_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getTestFraction())); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.FractionSplit parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.FractionSplit 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.v1.FractionSplit parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.FractionSplit 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.v1.FractionSplit parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.FractionSplit parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.FractionSplit parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.FractionSplit 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.v1.FractionSplit parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.FractionSplit 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.v1.FractionSplit parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.FractionSplit 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.v1.FractionSplit 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; + } + /** + * + * + *
+   * Assigns the input data to training, validation, and test sets as per the
+   * given fractions. Any of `training_fraction`, `validation_fraction` and
+   * `test_fraction` may optionally be provided, they must sum to up to 1. If the
+   * provided ones sum to less than 1, the remainder is assigned to sets as
+   * decided by AI Platform. If none of the fractions are set, by default roughly
+   * 80% of data is used for training, 10% for validation, and 10% for test.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.FractionSplit} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.FractionSplit) + com.google.cloud.aiplatform.v1.FractionSplitOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.TrainingPipelineProto + .internal_static_google_cloud_aiplatform_v1_FractionSplit_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.TrainingPipelineProto + .internal_static_google_cloud_aiplatform_v1_FractionSplit_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.FractionSplit.class, + com.google.cloud.aiplatform.v1.FractionSplit.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.FractionSplit.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(); + trainingFraction_ = 0D; + + validationFraction_ = 0D; + + testFraction_ = 0D; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.TrainingPipelineProto + .internal_static_google_cloud_aiplatform_v1_FractionSplit_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.FractionSplit getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.FractionSplit.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.FractionSplit build() { + com.google.cloud.aiplatform.v1.FractionSplit result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.FractionSplit buildPartial() { + com.google.cloud.aiplatform.v1.FractionSplit result = + new com.google.cloud.aiplatform.v1.FractionSplit(this); + result.trainingFraction_ = trainingFraction_; + result.validationFraction_ = validationFraction_; + result.testFraction_ = testFraction_; + 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.v1.FractionSplit) { + return mergeFrom((com.google.cloud.aiplatform.v1.FractionSplit) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.FractionSplit other) { + if (other == com.google.cloud.aiplatform.v1.FractionSplit.getDefaultInstance()) return this; + if (other.getTrainingFraction() != 0D) { + setTrainingFraction(other.getTrainingFraction()); + } + if (other.getValidationFraction() != 0D) { + setValidationFraction(other.getValidationFraction()); + } + if (other.getTestFraction() != 0D) { + setTestFraction(other.getTestFraction()); + } + 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.v1.FractionSplit parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.aiplatform.v1.FractionSplit) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private double trainingFraction_; + /** + * + * + *
+     * The fraction of the input data that is to be used to train the Model.
+     * 
+ * + * double training_fraction = 1; + * + * @return The trainingFraction. + */ + @java.lang.Override + public double getTrainingFraction() { + return trainingFraction_; + } + /** + * + * + *
+     * The fraction of the input data that is to be used to train the Model.
+     * 
+ * + * double training_fraction = 1; + * + * @param value The trainingFraction to set. + * @return This builder for chaining. + */ + public Builder setTrainingFraction(double value) { + + trainingFraction_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The fraction of the input data that is to be used to train the Model.
+     * 
+ * + * double training_fraction = 1; + * + * @return This builder for chaining. + */ + public Builder clearTrainingFraction() { + + trainingFraction_ = 0D; + onChanged(); + return this; + } + + private double validationFraction_; + /** + * + * + *
+     * The fraction of the input data that is to be used to validate the Model.
+     * 
+ * + * double validation_fraction = 2; + * + * @return The validationFraction. + */ + @java.lang.Override + public double getValidationFraction() { + return validationFraction_; + } + /** + * + * + *
+     * The fraction of the input data that is to be used to validate the Model.
+     * 
+ * + * double validation_fraction = 2; + * + * @param value The validationFraction to set. + * @return This builder for chaining. + */ + public Builder setValidationFraction(double value) { + + validationFraction_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The fraction of the input data that is to be used to validate the Model.
+     * 
+ * + * double validation_fraction = 2; + * + * @return This builder for chaining. + */ + public Builder clearValidationFraction() { + + validationFraction_ = 0D; + onChanged(); + return this; + } + + private double testFraction_; + /** + * + * + *
+     * The fraction of the input data that is to be used to evaluate the Model.
+     * 
+ * + * double test_fraction = 3; + * + * @return The testFraction. + */ + @java.lang.Override + public double getTestFraction() { + return testFraction_; + } + /** + * + * + *
+     * The fraction of the input data that is to be used to evaluate the Model.
+     * 
+ * + * double test_fraction = 3; + * + * @param value The testFraction to set. + * @return This builder for chaining. + */ + public Builder setTestFraction(double value) { + + testFraction_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The fraction of the input data that is to be used to evaluate the Model.
+     * 
+ * + * double test_fraction = 3; + * + * @return This builder for chaining. + */ + public Builder clearTestFraction() { + + testFraction_ = 0D; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.FractionSplit) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.FractionSplit) + private static final com.google.cloud.aiplatform.v1.FractionSplit DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.FractionSplit(); + } + + public static com.google.cloud.aiplatform.v1.FractionSplit getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FractionSplit parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new FractionSplit(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.v1.FractionSplit getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FractionSplitOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FractionSplitOrBuilder.java new file mode 100644 index 000000000..732052e3d --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/FractionSplitOrBuilder.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/v1/training_pipeline.proto + +package com.google.cloud.aiplatform.v1; + +public interface FractionSplitOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.FractionSplit) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The fraction of the input data that is to be used to train the Model.
+   * 
+ * + * double training_fraction = 1; + * + * @return The trainingFraction. + */ + double getTrainingFraction(); + + /** + * + * + *
+   * The fraction of the input data that is to be used to validate the Model.
+   * 
+ * + * double validation_fraction = 2; + * + * @return The validationFraction. + */ + double getValidationFraction(); + + /** + * + * + *
+   * The fraction of the input data that is to be used to evaluate the Model.
+   * 
+ * + * double test_fraction = 3; + * + * @return The testFraction. + */ + double getTestFraction(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GcsDestination.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GcsDestination.java new file mode 100644 index 000000000..6b3c368f6 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GcsDestination.java @@ -0,0 +1,648 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/io.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * The Google Cloud Storage location where the output is to be written to.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.GcsDestination} + */ +public final class GcsDestination extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.GcsDestination) + GcsDestinationOrBuilder { + private static final long serialVersionUID = 0L; + // Use GcsDestination.newBuilder() to construct. + private GcsDestination(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GcsDestination() { + outputUriPrefix_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GcsDestination(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GcsDestination( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + outputUriPrefix_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.IoProto + .internal_static_google_cloud_aiplatform_v1_GcsDestination_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.IoProto + .internal_static_google_cloud_aiplatform_v1_GcsDestination_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.GcsDestination.class, + com.google.cloud.aiplatform.v1.GcsDestination.Builder.class); + } + + public static final int OUTPUT_URI_PREFIX_FIELD_NUMBER = 1; + private volatile java.lang.Object outputUriPrefix_; + /** + * + * + *
+   * Required. Google Cloud Storage URI to output directory. If the uri doesn't end with
+   * '/', a '/' will be automatically appended. The directory is created if it
+   * doesn't exist.
+   * 
+ * + * string output_uri_prefix = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The outputUriPrefix. + */ + @java.lang.Override + public java.lang.String getOutputUriPrefix() { + java.lang.Object ref = outputUriPrefix_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + outputUriPrefix_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Google Cloud Storage URI to output directory. If the uri doesn't end with
+   * '/', a '/' will be automatically appended. The directory is created if it
+   * doesn't exist.
+   * 
+ * + * string output_uri_prefix = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for outputUriPrefix. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOutputUriPrefixBytes() { + java.lang.Object ref = outputUriPrefix_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + outputUriPrefix_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getOutputUriPrefixBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, outputUriPrefix_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getOutputUriPrefixBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, outputUriPrefix_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.GcsDestination)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.GcsDestination other = + (com.google.cloud.aiplatform.v1.GcsDestination) obj; + + if (!getOutputUriPrefix().equals(other.getOutputUriPrefix())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + OUTPUT_URI_PREFIX_FIELD_NUMBER; + hash = (53 * hash) + getOutputUriPrefix().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.GcsDestination parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GcsDestination parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GcsDestination parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GcsDestination parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GcsDestination parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GcsDestination parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GcsDestination parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.GcsDestination parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GcsDestination parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.GcsDestination parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GcsDestination parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.GcsDestination parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1.GcsDestination prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The Google Cloud Storage location where the output is to be written to.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.GcsDestination} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.GcsDestination) + com.google.cloud.aiplatform.v1.GcsDestinationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.IoProto + .internal_static_google_cloud_aiplatform_v1_GcsDestination_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.IoProto + .internal_static_google_cloud_aiplatform_v1_GcsDestination_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.GcsDestination.class, + com.google.cloud.aiplatform.v1.GcsDestination.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.GcsDestination.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + outputUriPrefix_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.IoProto + .internal_static_google_cloud_aiplatform_v1_GcsDestination_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GcsDestination getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.GcsDestination.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GcsDestination build() { + com.google.cloud.aiplatform.v1.GcsDestination result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GcsDestination buildPartial() { + com.google.cloud.aiplatform.v1.GcsDestination result = + new com.google.cloud.aiplatform.v1.GcsDestination(this); + result.outputUriPrefix_ = outputUriPrefix_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.GcsDestination) { + return mergeFrom((com.google.cloud.aiplatform.v1.GcsDestination) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.GcsDestination other) { + if (other == com.google.cloud.aiplatform.v1.GcsDestination.getDefaultInstance()) return this; + if (!other.getOutputUriPrefix().isEmpty()) { + outputUriPrefix_ = other.outputUriPrefix_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.aiplatform.v1.GcsDestination parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.aiplatform.v1.GcsDestination) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object outputUriPrefix_ = ""; + /** + * + * + *
+     * Required. Google Cloud Storage URI to output directory. If the uri doesn't end with
+     * '/', a '/' will be automatically appended. The directory is created if it
+     * doesn't exist.
+     * 
+ * + * string output_uri_prefix = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The outputUriPrefix. + */ + public java.lang.String getOutputUriPrefix() { + java.lang.Object ref = outputUriPrefix_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + outputUriPrefix_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Google Cloud Storage URI to output directory. If the uri doesn't end with
+     * '/', a '/' will be automatically appended. The directory is created if it
+     * doesn't exist.
+     * 
+ * + * string output_uri_prefix = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for outputUriPrefix. + */ + public com.google.protobuf.ByteString getOutputUriPrefixBytes() { + java.lang.Object ref = outputUriPrefix_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + outputUriPrefix_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Google Cloud Storage URI to output directory. If the uri doesn't end with
+     * '/', a '/' will be automatically appended. The directory is created if it
+     * doesn't exist.
+     * 
+ * + * string output_uri_prefix = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The outputUriPrefix to set. + * @return This builder for chaining. + */ + public Builder setOutputUriPrefix(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + outputUriPrefix_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Google Cloud Storage URI to output directory. If the uri doesn't end with
+     * '/', a '/' will be automatically appended. The directory is created if it
+     * doesn't exist.
+     * 
+ * + * string output_uri_prefix = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearOutputUriPrefix() { + + outputUriPrefix_ = getDefaultInstance().getOutputUriPrefix(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Google Cloud Storage URI to output directory. If the uri doesn't end with
+     * '/', a '/' will be automatically appended. The directory is created if it
+     * doesn't exist.
+     * 
+ * + * string output_uri_prefix = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for outputUriPrefix to set. + * @return This builder for chaining. + */ + public Builder setOutputUriPrefixBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + outputUriPrefix_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.GcsDestination) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.GcsDestination) + private static final com.google.cloud.aiplatform.v1.GcsDestination DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.GcsDestination(); + } + + public static com.google.cloud.aiplatform.v1.GcsDestination getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GcsDestination parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GcsDestination(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GcsDestination getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GcsDestinationOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GcsDestinationOrBuilder.java new file mode 100644 index 000000000..3c0aae727 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GcsDestinationOrBuilder.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/v1/io.proto + +package com.google.cloud.aiplatform.v1; + +public interface GcsDestinationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.GcsDestination) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Google Cloud Storage URI to output directory. If the uri doesn't end with
+   * '/', a '/' will be automatically appended. The directory is created if it
+   * doesn't exist.
+   * 
+ * + * string output_uri_prefix = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The outputUriPrefix. + */ + java.lang.String getOutputUriPrefix(); + /** + * + * + *
+   * Required. Google Cloud Storage URI to output directory. If the uri doesn't end with
+   * '/', a '/' will be automatically appended. The directory is created if it
+   * doesn't exist.
+   * 
+ * + * string output_uri_prefix = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for outputUriPrefix. + */ + com.google.protobuf.ByteString getOutputUriPrefixBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GcsSource.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GcsSource.java new file mode 100644 index 000000000..0efda0233 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GcsSource.java @@ -0,0 +1,760 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/io.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * The Google Cloud Storage location for the input content.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.GcsSource} + */ +public final class GcsSource extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.GcsSource) + GcsSourceOrBuilder { + private static final long serialVersionUID = 0L; + // Use GcsSource.newBuilder() to construct. + private GcsSource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GcsSource() { + uris_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GcsSource(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GcsSource( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + uris_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + uris_.add(s); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + uris_ = uris_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.IoProto + .internal_static_google_cloud_aiplatform_v1_GcsSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.IoProto + .internal_static_google_cloud_aiplatform_v1_GcsSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.GcsSource.class, + com.google.cloud.aiplatform.v1.GcsSource.Builder.class); + } + + public static final int URIS_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList uris_; + /** + * + * + *
+   * Required. Google Cloud Storage URI(-s) to the input file(s). May contain
+   * wildcards. For more information on wildcards, see
+   * https://cloud.google.com/storage/docs/gsutil/addlhelp/WildcardNames.
+   * 
+ * + * repeated string uris = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the uris. + */ + public com.google.protobuf.ProtocolStringList getUrisList() { + return uris_; + } + /** + * + * + *
+   * Required. Google Cloud Storage URI(-s) to the input file(s). May contain
+   * wildcards. For more information on wildcards, see
+   * https://cloud.google.com/storage/docs/gsutil/addlhelp/WildcardNames.
+   * 
+ * + * repeated string uris = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of uris. + */ + public int getUrisCount() { + return uris_.size(); + } + /** + * + * + *
+   * Required. Google Cloud Storage URI(-s) to the input file(s). May contain
+   * wildcards. For more information on wildcards, see
+   * https://cloud.google.com/storage/docs/gsutil/addlhelp/WildcardNames.
+   * 
+ * + * repeated string uris = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The uris at the given index. + */ + public java.lang.String getUris(int index) { + return uris_.get(index); + } + /** + * + * + *
+   * Required. Google Cloud Storage URI(-s) to the input file(s). May contain
+   * wildcards. For more information on wildcards, see
+   * https://cloud.google.com/storage/docs/gsutil/addlhelp/WildcardNames.
+   * 
+ * + * repeated string uris = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the uris at the given index. + */ + public com.google.protobuf.ByteString getUrisBytes(int index) { + return uris_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < uris_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uris_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < uris_.size(); i++) { + dataSize += computeStringSizeNoTag(uris_.getRaw(i)); + } + size += dataSize; + size += 1 * getUrisList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.GcsSource)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.GcsSource other = (com.google.cloud.aiplatform.v1.GcsSource) obj; + + if (!getUrisList().equals(other.getUrisList())) 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 (getUrisCount() > 0) { + hash = (37 * hash) + URIS_FIELD_NUMBER; + hash = (53 * hash) + getUrisList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.GcsSource parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GcsSource parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GcsSource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GcsSource parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GcsSource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GcsSource parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GcsSource parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.GcsSource parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GcsSource parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.GcsSource parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GcsSource parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.GcsSource parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1.GcsSource prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The Google Cloud Storage location for the input content.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.GcsSource} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.GcsSource) + com.google.cloud.aiplatform.v1.GcsSourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.IoProto + .internal_static_google_cloud_aiplatform_v1_GcsSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.IoProto + .internal_static_google_cloud_aiplatform_v1_GcsSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.GcsSource.class, + com.google.cloud.aiplatform.v1.GcsSource.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.GcsSource.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + uris_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.IoProto + .internal_static_google_cloud_aiplatform_v1_GcsSource_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GcsSource getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.GcsSource.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GcsSource build() { + com.google.cloud.aiplatform.v1.GcsSource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GcsSource buildPartial() { + com.google.cloud.aiplatform.v1.GcsSource result = + new com.google.cloud.aiplatform.v1.GcsSource(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + uris_ = uris_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.uris_ = uris_; + 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.v1.GcsSource) { + return mergeFrom((com.google.cloud.aiplatform.v1.GcsSource) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.GcsSource other) { + if (other == com.google.cloud.aiplatform.v1.GcsSource.getDefaultInstance()) return this; + if (!other.uris_.isEmpty()) { + if (uris_.isEmpty()) { + uris_ = other.uris_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureUrisIsMutable(); + uris_.addAll(other.uris_); + } + 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.v1.GcsSource parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.aiplatform.v1.GcsSource) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringList uris_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureUrisIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + uris_ = new com.google.protobuf.LazyStringArrayList(uris_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * Required. Google Cloud Storage URI(-s) to the input file(s). May contain
+     * wildcards. For more information on wildcards, see
+     * https://cloud.google.com/storage/docs/gsutil/addlhelp/WildcardNames.
+     * 
+ * + * repeated string uris = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the uris. + */ + public com.google.protobuf.ProtocolStringList getUrisList() { + return uris_.getUnmodifiableView(); + } + /** + * + * + *
+     * Required. Google Cloud Storage URI(-s) to the input file(s). May contain
+     * wildcards. For more information on wildcards, see
+     * https://cloud.google.com/storage/docs/gsutil/addlhelp/WildcardNames.
+     * 
+ * + * repeated string uris = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of uris. + */ + public int getUrisCount() { + return uris_.size(); + } + /** + * + * + *
+     * Required. Google Cloud Storage URI(-s) to the input file(s). May contain
+     * wildcards. For more information on wildcards, see
+     * https://cloud.google.com/storage/docs/gsutil/addlhelp/WildcardNames.
+     * 
+ * + * repeated string uris = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The uris at the given index. + */ + public java.lang.String getUris(int index) { + return uris_.get(index); + } + /** + * + * + *
+     * Required. Google Cloud Storage URI(-s) to the input file(s). May contain
+     * wildcards. For more information on wildcards, see
+     * https://cloud.google.com/storage/docs/gsutil/addlhelp/WildcardNames.
+     * 
+ * + * repeated string uris = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the uris at the given index. + */ + public com.google.protobuf.ByteString getUrisBytes(int index) { + return uris_.getByteString(index); + } + /** + * + * + *
+     * Required. Google Cloud Storage URI(-s) to the input file(s). May contain
+     * wildcards. For more information on wildcards, see
+     * https://cloud.google.com/storage/docs/gsutil/addlhelp/WildcardNames.
+     * 
+ * + * repeated string uris = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index to set the value at. + * @param value The uris to set. + * @return This builder for chaining. + */ + public Builder setUris(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUrisIsMutable(); + uris_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Google Cloud Storage URI(-s) to the input file(s). May contain
+     * wildcards. For more information on wildcards, see
+     * https://cloud.google.com/storage/docs/gsutil/addlhelp/WildcardNames.
+     * 
+ * + * repeated string uris = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The uris to add. + * @return This builder for chaining. + */ + public Builder addUris(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUrisIsMutable(); + uris_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Google Cloud Storage URI(-s) to the input file(s). May contain
+     * wildcards. For more information on wildcards, see
+     * https://cloud.google.com/storage/docs/gsutil/addlhelp/WildcardNames.
+     * 
+ * + * repeated string uris = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param values The uris to add. + * @return This builder for chaining. + */ + public Builder addAllUris(java.lang.Iterable values) { + ensureUrisIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, uris_); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Google Cloud Storage URI(-s) to the input file(s). May contain
+     * wildcards. For more information on wildcards, see
+     * https://cloud.google.com/storage/docs/gsutil/addlhelp/WildcardNames.
+     * 
+ * + * repeated string uris = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearUris() { + uris_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Google Cloud Storage URI(-s) to the input file(s). May contain
+     * wildcards. For more information on wildcards, see
+     * https://cloud.google.com/storage/docs/gsutil/addlhelp/WildcardNames.
+     * 
+ * + * repeated string uris = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes of the uris to add. + * @return This builder for chaining. + */ + public Builder addUrisBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUrisIsMutable(); + uris_.add(value); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.GcsSource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.GcsSource) + private static final com.google.cloud.aiplatform.v1.GcsSource DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.GcsSource(); + } + + public static com.google.cloud.aiplatform.v1.GcsSource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GcsSource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GcsSource(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GcsSource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GcsSourceOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GcsSourceOrBuilder.java new file mode 100644 index 000000000..5923d5845 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GcsSourceOrBuilder.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/v1/io.proto + +package com.google.cloud.aiplatform.v1; + +public interface GcsSourceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.GcsSource) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Google Cloud Storage URI(-s) to the input file(s). May contain
+   * wildcards. For more information on wildcards, see
+   * https://cloud.google.com/storage/docs/gsutil/addlhelp/WildcardNames.
+   * 
+ * + * repeated string uris = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the uris. + */ + java.util.List getUrisList(); + /** + * + * + *
+   * Required. Google Cloud Storage URI(-s) to the input file(s). May contain
+   * wildcards. For more information on wildcards, see
+   * https://cloud.google.com/storage/docs/gsutil/addlhelp/WildcardNames.
+   * 
+ * + * repeated string uris = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of uris. + */ + int getUrisCount(); + /** + * + * + *
+   * Required. Google Cloud Storage URI(-s) to the input file(s). May contain
+   * wildcards. For more information on wildcards, see
+   * https://cloud.google.com/storage/docs/gsutil/addlhelp/WildcardNames.
+   * 
+ * + * repeated string uris = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The uris at the given index. + */ + java.lang.String getUris(int index); + /** + * + * + *
+   * Required. Google Cloud Storage URI(-s) to the input file(s). May contain
+   * wildcards. For more information on wildcards, see
+   * https://cloud.google.com/storage/docs/gsutil/addlhelp/WildcardNames.
+   * 
+ * + * repeated string uris = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the uris at the given index. + */ + com.google.protobuf.ByteString getUrisBytes(int index); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GenericOperationMetadata.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GenericOperationMetadata.java new file mode 100644 index 000000000..ed30e5a6a --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GenericOperationMetadata.java @@ -0,0 +1,1670 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/operation.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Generic Metadata shared by all operations.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.GenericOperationMetadata} + */ +public final class GenericOperationMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.GenericOperationMetadata) + GenericOperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use GenericOperationMetadata.newBuilder() to construct. + private GenericOperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GenericOperationMetadata() { + partialFailures_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GenericOperationMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GenericOperationMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + partialFailures_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + partialFailures_.add( + input.readMessage(com.google.rpc.Status.parser(), extensionRegistry)); + break; + } + case 18: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + 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)) { + partialFailures_ = java.util.Collections.unmodifiableList(partialFailures_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.OperationProto + .internal_static_google_cloud_aiplatform_v1_GenericOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.OperationProto + .internal_static_google_cloud_aiplatform_v1_GenericOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.GenericOperationMetadata.class, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder.class); + } + + public static final int PARTIAL_FAILURES_FIELD_NUMBER = 1; + private java.util.List partialFailures_; + /** + * + * + *
+   * Output only. Partial failures encountered.
+   * E.g. single files that couldn't be read.
+   * This field should never exceed 20 entries.
+   * Status details field will contain standard GCP error details.
+   * 
+ * + * + * repeated .google.rpc.Status partial_failures = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List getPartialFailuresList() { + return partialFailures_; + } + /** + * + * + *
+   * Output only. Partial failures encountered.
+   * E.g. single files that couldn't be read.
+   * This field should never exceed 20 entries.
+   * Status details field will contain standard GCP error details.
+   * 
+ * + * + * repeated .google.rpc.Status partial_failures = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getPartialFailuresOrBuilderList() { + return partialFailures_; + } + /** + * + * + *
+   * Output only. Partial failures encountered.
+   * E.g. single files that couldn't be read.
+   * This field should never exceed 20 entries.
+   * Status details field will contain standard GCP error details.
+   * 
+ * + * + * repeated .google.rpc.Status partial_failures = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getPartialFailuresCount() { + return partialFailures_.size(); + } + /** + * + * + *
+   * Output only. Partial failures encountered.
+   * E.g. single files that couldn't be read.
+   * This field should never exceed 20 entries.
+   * Status details field will contain standard GCP error details.
+   * 
+ * + * + * repeated .google.rpc.Status partial_failures = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.rpc.Status getPartialFailures(int index) { + return partialFailures_.get(index); + } + /** + * + * + *
+   * Output only. Partial failures encountered.
+   * E.g. single files that couldn't be read.
+   * This field should never exceed 20 entries.
+   * Status details field will contain standard GCP error details.
+   * 
+ * + * + * repeated .google.rpc.Status partial_failures = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getPartialFailuresOrBuilder(int index) { + return partialFailures_.get(index); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. Time when the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. Time when the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. Time when the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. Time when the operation was updated for the last time.
+   * If the operation has finished (successfully or not), this is the finish
+   * time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. Time when the operation was updated for the last time.
+   * If the operation has finished (successfully or not), this is the finish
+   * time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. Time when the operation was updated for the last time.
+   * If the operation has finished (successfully or not), this is the finish
+   * time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < partialFailures_.size(); i++) { + output.writeMessage(1, partialFailures_.get(i)); + } + if (createTime_ != null) { + output.writeMessage(2, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(3, getUpdateTime()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < partialFailures_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, partialFailures_.get(i)); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateTime()); + } + 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.v1.GenericOperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.GenericOperationMetadata other = + (com.google.cloud.aiplatform.v1.GenericOperationMetadata) obj; + + if (!getPartialFailuresList().equals(other.getPartialFailuresList())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!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 (getPartialFailuresCount() > 0) { + hash = (37 * hash) + PARTIAL_FAILURES_FIELD_NUMBER; + hash = (53 * hash) + getPartialFailuresList().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.GenericOperationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GenericOperationMetadata 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.v1.GenericOperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GenericOperationMetadata 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.v1.GenericOperationMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GenericOperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GenericOperationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.GenericOperationMetadata 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.v1.GenericOperationMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.GenericOperationMetadata 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.v1.GenericOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.GenericOperationMetadata 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.v1.GenericOperationMetadata 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; + } + /** + * + * + *
+   * Generic Metadata shared by all operations.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.GenericOperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.GenericOperationMetadata) + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.OperationProto + .internal_static_google_cloud_aiplatform_v1_GenericOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.OperationProto + .internal_static_google_cloud_aiplatform_v1_GenericOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.GenericOperationMetadata.class, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.GenericOperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPartialFailuresFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (partialFailuresBuilder_ == null) { + partialFailures_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + partialFailuresBuilder_.clear(); + } + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.OperationProto + .internal_static_google_cloud_aiplatform_v1_GenericOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GenericOperationMetadata getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GenericOperationMetadata build() { + com.google.cloud.aiplatform.v1.GenericOperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GenericOperationMetadata buildPartial() { + com.google.cloud.aiplatform.v1.GenericOperationMetadata result = + new com.google.cloud.aiplatform.v1.GenericOperationMetadata(this); + int from_bitField0_ = bitField0_; + if (partialFailuresBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + partialFailures_ = java.util.Collections.unmodifiableList(partialFailures_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.partialFailures_ = partialFailures_; + } else { + result.partialFailures_ = partialFailuresBuilder_.build(); + } + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + 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.v1.GenericOperationMetadata) { + return mergeFrom((com.google.cloud.aiplatform.v1.GenericOperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.GenericOperationMetadata other) { + if (other == com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance()) + return this; + if (partialFailuresBuilder_ == null) { + if (!other.partialFailures_.isEmpty()) { + if (partialFailures_.isEmpty()) { + partialFailures_ = other.partialFailures_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePartialFailuresIsMutable(); + partialFailures_.addAll(other.partialFailures_); + } + onChanged(); + } + } else { + if (!other.partialFailures_.isEmpty()) { + if (partialFailuresBuilder_.isEmpty()) { + partialFailuresBuilder_.dispose(); + partialFailuresBuilder_ = null; + partialFailures_ = other.partialFailures_; + bitField0_ = (bitField0_ & ~0x00000001); + partialFailuresBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPartialFailuresFieldBuilder() + : null; + } else { + partialFailuresBuilder_.addAllMessages(other.partialFailures_); + } + } + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + 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.v1.GenericOperationMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.GenericOperationMetadata) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List partialFailures_ = + java.util.Collections.emptyList(); + + private void ensurePartialFailuresIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + partialFailures_ = new java.util.ArrayList(partialFailures_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + partialFailuresBuilder_; + + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * This field should never exceed 20 entries.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * + * repeated .google.rpc.Status partial_failures = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List getPartialFailuresList() { + if (partialFailuresBuilder_ == null) { + return java.util.Collections.unmodifiableList(partialFailures_); + } else { + return partialFailuresBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * This field should never exceed 20 entries.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * + * repeated .google.rpc.Status partial_failures = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getPartialFailuresCount() { + if (partialFailuresBuilder_ == null) { + return partialFailures_.size(); + } else { + return partialFailuresBuilder_.getCount(); + } + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * This field should never exceed 20 entries.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * + * repeated .google.rpc.Status partial_failures = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.rpc.Status getPartialFailures(int index) { + if (partialFailuresBuilder_ == null) { + return partialFailures_.get(index); + } else { + return partialFailuresBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * This field should never exceed 20 entries.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * + * repeated .google.rpc.Status partial_failures = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setPartialFailures(int index, com.google.rpc.Status value) { + if (partialFailuresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartialFailuresIsMutable(); + partialFailures_.set(index, value); + onChanged(); + } else { + partialFailuresBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * This field should never exceed 20 entries.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * + * repeated .google.rpc.Status partial_failures = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setPartialFailures(int index, com.google.rpc.Status.Builder builderForValue) { + if (partialFailuresBuilder_ == null) { + ensurePartialFailuresIsMutable(); + partialFailures_.set(index, builderForValue.build()); + onChanged(); + } else { + partialFailuresBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * This field should never exceed 20 entries.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * + * repeated .google.rpc.Status partial_failures = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addPartialFailures(com.google.rpc.Status value) { + if (partialFailuresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartialFailuresIsMutable(); + partialFailures_.add(value); + onChanged(); + } else { + partialFailuresBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * This field should never exceed 20 entries.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * + * repeated .google.rpc.Status partial_failures = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addPartialFailures(int index, com.google.rpc.Status value) { + if (partialFailuresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartialFailuresIsMutable(); + partialFailures_.add(index, value); + onChanged(); + } else { + partialFailuresBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * This field should never exceed 20 entries.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * + * repeated .google.rpc.Status partial_failures = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addPartialFailures(com.google.rpc.Status.Builder builderForValue) { + if (partialFailuresBuilder_ == null) { + ensurePartialFailuresIsMutable(); + partialFailures_.add(builderForValue.build()); + onChanged(); + } else { + partialFailuresBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * This field should never exceed 20 entries.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * + * repeated .google.rpc.Status partial_failures = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addPartialFailures(int index, com.google.rpc.Status.Builder builderForValue) { + if (partialFailuresBuilder_ == null) { + ensurePartialFailuresIsMutable(); + partialFailures_.add(index, builderForValue.build()); + onChanged(); + } else { + partialFailuresBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * This field should never exceed 20 entries.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * + * repeated .google.rpc.Status partial_failures = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllPartialFailures( + java.lang.Iterable values) { + if (partialFailuresBuilder_ == null) { + ensurePartialFailuresIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, partialFailures_); + onChanged(); + } else { + partialFailuresBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * This field should never exceed 20 entries.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * + * repeated .google.rpc.Status partial_failures = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearPartialFailures() { + if (partialFailuresBuilder_ == null) { + partialFailures_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + partialFailuresBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * This field should never exceed 20 entries.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * + * repeated .google.rpc.Status partial_failures = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removePartialFailures(int index) { + if (partialFailuresBuilder_ == null) { + ensurePartialFailuresIsMutable(); + partialFailures_.remove(index); + onChanged(); + } else { + partialFailuresBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * This field should never exceed 20 entries.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * + * repeated .google.rpc.Status partial_failures = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.rpc.Status.Builder getPartialFailuresBuilder(int index) { + return getPartialFailuresFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * This field should never exceed 20 entries.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * + * repeated .google.rpc.Status partial_failures = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.rpc.StatusOrBuilder getPartialFailuresOrBuilder(int index) { + if (partialFailuresBuilder_ == null) { + return partialFailures_.get(index); + } else { + return partialFailuresBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * This field should never exceed 20 entries.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * + * repeated .google.rpc.Status partial_failures = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getPartialFailuresOrBuilderList() { + if (partialFailuresBuilder_ != null) { + return partialFailuresBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(partialFailures_); + } + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * This field should never exceed 20 entries.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * + * repeated .google.rpc.Status partial_failures = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.rpc.Status.Builder addPartialFailuresBuilder() { + return getPartialFailuresFieldBuilder() + .addBuilder(com.google.rpc.Status.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * This field should never exceed 20 entries.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * + * repeated .google.rpc.Status partial_failures = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.rpc.Status.Builder addPartialFailuresBuilder(int index) { + return getPartialFailuresFieldBuilder() + .addBuilder(index, com.google.rpc.Status.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * This field should never exceed 20 entries.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * + * repeated .google.rpc.Status partial_failures = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List getPartialFailuresBuilderList() { + return getPartialFailuresFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getPartialFailuresFieldBuilder() { + if (partialFailuresBuilder_ == null) { + partialFailuresBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.rpc.Status, + com.google.rpc.Status.Builder, + com.google.rpc.StatusOrBuilder>( + partialFailures_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + partialFailures_ = null; + } + return partialFailuresBuilder_; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. Time when the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * Output only. Time when the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time when the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time when the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. Time when the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. Time when the operation was updated for the last time.
+     * If the operation has finished (successfully or not), this is the finish
+     * time.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + * + * + *
+     * Output only. Time when the operation was updated for the last time.
+     * If the operation has finished (successfully or not), this is the finish
+     * time.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time when the operation was updated for the last time.
+     * If the operation has finished (successfully or not), this is the finish
+     * time.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the operation was updated for the last time.
+     * If the operation has finished (successfully or not), this is the finish
+     * time.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the operation was updated for the last time.
+     * If the operation has finished (successfully or not), this is the finish
+     * time.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the operation was updated for the last time.
+     * If the operation has finished (successfully or not), this is the finish
+     * time.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the operation was updated for the last time.
+     * If the operation has finished (successfully or not), this is the finish
+     * time.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time when the operation was updated for the last time.
+     * If the operation has finished (successfully or not), this is the finish
+     * time.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. Time when the operation was updated for the last time.
+     * If the operation has finished (successfully or not), this is the finish
+     * time.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.GenericOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.GenericOperationMetadata) + private static final com.google.cloud.aiplatform.v1.GenericOperationMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.GenericOperationMetadata(); + } + + public static com.google.cloud.aiplatform.v1.GenericOperationMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GenericOperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GenericOperationMetadata(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.v1.GenericOperationMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GenericOperationMetadataOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GenericOperationMetadataOrBuilder.java new file mode 100644 index 000000000..b6090c861 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GenericOperationMetadataOrBuilder.java @@ -0,0 +1,183 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/operation.proto + +package com.google.cloud.aiplatform.v1; + +public interface GenericOperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.GenericOperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Partial failures encountered.
+   * E.g. single files that couldn't be read.
+   * This field should never exceed 20 entries.
+   * Status details field will contain standard GCP error details.
+   * 
+ * + * + * repeated .google.rpc.Status partial_failures = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getPartialFailuresList(); + /** + * + * + *
+   * Output only. Partial failures encountered.
+   * E.g. single files that couldn't be read.
+   * This field should never exceed 20 entries.
+   * Status details field will contain standard GCP error details.
+   * 
+ * + * + * repeated .google.rpc.Status partial_failures = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.rpc.Status getPartialFailures(int index); + /** + * + * + *
+   * Output only. Partial failures encountered.
+   * E.g. single files that couldn't be read.
+   * This field should never exceed 20 entries.
+   * Status details field will contain standard GCP error details.
+   * 
+ * + * + * repeated .google.rpc.Status partial_failures = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getPartialFailuresCount(); + /** + * + * + *
+   * Output only. Partial failures encountered.
+   * E.g. single files that couldn't be read.
+   * This field should never exceed 20 entries.
+   * Status details field will contain standard GCP error details.
+   * 
+ * + * + * repeated .google.rpc.Status partial_failures = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getPartialFailuresOrBuilderList(); + /** + * + * + *
+   * Output only. Partial failures encountered.
+   * E.g. single files that couldn't be read.
+   * This field should never exceed 20 entries.
+   * Status details field will contain standard GCP error details.
+   * 
+ * + * + * repeated .google.rpc.Status partial_failures = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.rpc.StatusOrBuilder getPartialFailuresOrBuilder(int index); + + /** + * + * + *
+   * Output only. Time when the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Time when the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Time when the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Time when the operation was updated for the last time.
+   * If the operation has finished (successfully or not), this is the finish
+   * time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. Time when the operation was updated for the last time.
+   * If the operation has finished (successfully or not), this is the finish
+   * time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. Time when the operation was updated for the last time.
+   * If the operation has finished (successfully or not), this is the finish
+   * time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetAnnotationSpecRequest.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetAnnotationSpecRequest.java new file mode 100644 index 000000000..f64e47c2f --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetAnnotationSpecRequest.java @@ -0,0 +1,933 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/dataset_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for [DatasetService.GetAnnotationSpec][google.cloud.aiplatform.v1.DatasetService.GetAnnotationSpec].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.GetAnnotationSpecRequest} + */ +public final class GetAnnotationSpecRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.GetAnnotationSpecRequest) + GetAnnotationSpecRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetAnnotationSpecRequest.newBuilder() to construct. + private GetAnnotationSpecRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetAnnotationSpecRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetAnnotationSpecRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetAnnotationSpecRequest( + 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(); + + name_ = s; + break; + } + case 18: + { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (readMask_ != null) { + subBuilder = readMask_.toBuilder(); + } + readMask_ = + input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(readMask_); + readMask_ = 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.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_GetAnnotationSpecRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_GetAnnotationSpecRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.GetAnnotationSpecRequest.class, + com.google.cloud.aiplatform.v1.GetAnnotationSpecRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the AnnotationSpec resource.
+   * Format:
+   * `projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the AnnotationSpec resource.
+   * Format:
+   * `projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int READ_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask readMask_; + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 2; + * + * @return Whether the readMask field is set. + */ + @java.lang.Override + public boolean hasReadMask() { + return readMask_ != null; + } + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 2; + * + * @return The readMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getReadMask() { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 2; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder() { + return getReadMask(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (readMask_ != null) { + output.writeMessage(2, getReadMask()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (readMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getReadMask()); + } + 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.v1.GetAnnotationSpecRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.GetAnnotationSpecRequest other = + (com.google.cloud.aiplatform.v1.GetAnnotationSpecRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (hasReadMask() != other.hasReadMask()) return false; + if (hasReadMask()) { + if (!getReadMask().equals(other.getReadMask())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasReadMask()) { + hash = (37 * hash) + READ_MASK_FIELD_NUMBER; + hash = (53 * hash) + getReadMask().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.GetAnnotationSpecRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GetAnnotationSpecRequest 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.v1.GetAnnotationSpecRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GetAnnotationSpecRequest 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.v1.GetAnnotationSpecRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GetAnnotationSpecRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GetAnnotationSpecRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.GetAnnotationSpecRequest 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.v1.GetAnnotationSpecRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.GetAnnotationSpecRequest 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.v1.GetAnnotationSpecRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.GetAnnotationSpecRequest 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.v1.GetAnnotationSpecRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [DatasetService.GetAnnotationSpec][google.cloud.aiplatform.v1.DatasetService.GetAnnotationSpec].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.GetAnnotationSpecRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.GetAnnotationSpecRequest) + com.google.cloud.aiplatform.v1.GetAnnotationSpecRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_GetAnnotationSpecRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_GetAnnotationSpecRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.GetAnnotationSpecRequest.class, + com.google.cloud.aiplatform.v1.GetAnnotationSpecRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.GetAnnotationSpecRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + if (readMaskBuilder_ == null) { + readMask_ = null; + } else { + readMask_ = null; + readMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_GetAnnotationSpecRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetAnnotationSpecRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.GetAnnotationSpecRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetAnnotationSpecRequest build() { + com.google.cloud.aiplatform.v1.GetAnnotationSpecRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetAnnotationSpecRequest buildPartial() { + com.google.cloud.aiplatform.v1.GetAnnotationSpecRequest result = + new com.google.cloud.aiplatform.v1.GetAnnotationSpecRequest(this); + result.name_ = name_; + if (readMaskBuilder_ == null) { + result.readMask_ = readMask_; + } else { + result.readMask_ = readMaskBuilder_.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.v1.GetAnnotationSpecRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.GetAnnotationSpecRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.GetAnnotationSpecRequest other) { + if (other == com.google.cloud.aiplatform.v1.GetAnnotationSpecRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasReadMask()) { + mergeReadMask(other.getReadMask()); + } + 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.v1.GetAnnotationSpecRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.GetAnnotationSpecRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the AnnotationSpec resource.
+     * Format:
+     * `projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the AnnotationSpec resource.
+     * Format:
+     * `projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the AnnotationSpec resource.
+     * Format:
+     * `projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the AnnotationSpec resource.
+     * Format:
+     * `projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the AnnotationSpec resource.
+     * Format:
+     * `projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.FieldMask readMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + readMaskBuilder_; + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 2; + * + * @return Whether the readMask field is set. + */ + public boolean hasReadMask() { + return readMaskBuilder_ != null || readMask_ != null; + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 2; + * + * @return The readMask. + */ + public com.google.protobuf.FieldMask getReadMask() { + if (readMaskBuilder_ == null) { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } else { + return readMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 2; + */ + public Builder setReadMask(com.google.protobuf.FieldMask value) { + if (readMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + readMask_ = value; + onChanged(); + } else { + readMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 2; + */ + public Builder setReadMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (readMaskBuilder_ == null) { + readMask_ = builderForValue.build(); + onChanged(); + } else { + readMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 2; + */ + public Builder mergeReadMask(com.google.protobuf.FieldMask value) { + if (readMaskBuilder_ == null) { + if (readMask_ != null) { + readMask_ = + com.google.protobuf.FieldMask.newBuilder(readMask_).mergeFrom(value).buildPartial(); + } else { + readMask_ = value; + } + onChanged(); + } else { + readMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 2; + */ + public Builder clearReadMask() { + if (readMaskBuilder_ == null) { + readMask_ = null; + onChanged(); + } else { + readMask_ = null; + readMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 2; + */ + public com.google.protobuf.FieldMask.Builder getReadMaskBuilder() { + + onChanged(); + return getReadMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 2; + */ + public com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder() { + if (readMaskBuilder_ != null) { + return readMaskBuilder_.getMessageOrBuilder(); + } else { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getReadMaskFieldBuilder() { + if (readMaskBuilder_ == null) { + readMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getReadMask(), getParentForChildren(), isClean()); + readMask_ = null; + } + return readMaskBuilder_; + } + + @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.v1.GetAnnotationSpecRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.GetAnnotationSpecRequest) + private static final com.google.cloud.aiplatform.v1.GetAnnotationSpecRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.GetAnnotationSpecRequest(); + } + + public static com.google.cloud.aiplatform.v1.GetAnnotationSpecRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetAnnotationSpecRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetAnnotationSpecRequest(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.v1.GetAnnotationSpecRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetAnnotationSpecRequestOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetAnnotationSpecRequestOrBuilder.java new file mode 100644 index 000000000..88d96a45a --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetAnnotationSpecRequestOrBuilder.java @@ -0,0 +1,93 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/dataset_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface GetAnnotationSpecRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.GetAnnotationSpecRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the AnnotationSpec resource.
+   * Format:
+   * `projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the AnnotationSpec resource.
+   * Format:
+   * `projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 2; + * + * @return Whether the readMask field is set. + */ + boolean hasReadMask(); + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 2; + * + * @return The readMask. + */ + com.google.protobuf.FieldMask getReadMask(); + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 2; + */ + com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetBatchPredictionJobRequest.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetBatchPredictionJobRequest.java new file mode 100644 index 000000000..3b77b054a --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetBatchPredictionJobRequest.java @@ -0,0 +1,665 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/job_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for [JobService.GetBatchPredictionJob][google.cloud.aiplatform.v1.JobService.GetBatchPredictionJob].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.GetBatchPredictionJobRequest} + */ +public final class GetBatchPredictionJobRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.GetBatchPredictionJobRequest) + GetBatchPredictionJobRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetBatchPredictionJobRequest.newBuilder() to construct. + private GetBatchPredictionJobRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetBatchPredictionJobRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetBatchPredictionJobRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetBatchPredictionJobRequest( + 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(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_GetBatchPredictionJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_GetBatchPredictionJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.GetBatchPredictionJobRequest.class, + com.google.cloud.aiplatform.v1.GetBatchPredictionJobRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the BatchPredictionJob resource.
+   * Format:
+   * `projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the BatchPredictionJob resource.
+   * Format:
+   * `projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.GetBatchPredictionJobRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.GetBatchPredictionJobRequest other = + (com.google.cloud.aiplatform.v1.GetBatchPredictionJobRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.GetBatchPredictionJobRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GetBatchPredictionJobRequest 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.v1.GetBatchPredictionJobRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GetBatchPredictionJobRequest 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.v1.GetBatchPredictionJobRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GetBatchPredictionJobRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GetBatchPredictionJobRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.GetBatchPredictionJobRequest 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.v1.GetBatchPredictionJobRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.GetBatchPredictionJobRequest 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.v1.GetBatchPredictionJobRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.GetBatchPredictionJobRequest 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.v1.GetBatchPredictionJobRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [JobService.GetBatchPredictionJob][google.cloud.aiplatform.v1.JobService.GetBatchPredictionJob].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.GetBatchPredictionJobRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.GetBatchPredictionJobRequest) + com.google.cloud.aiplatform.v1.GetBatchPredictionJobRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_GetBatchPredictionJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_GetBatchPredictionJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.GetBatchPredictionJobRequest.class, + com.google.cloud.aiplatform.v1.GetBatchPredictionJobRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.GetBatchPredictionJobRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_GetBatchPredictionJobRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetBatchPredictionJobRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.GetBatchPredictionJobRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetBatchPredictionJobRequest build() { + com.google.cloud.aiplatform.v1.GetBatchPredictionJobRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetBatchPredictionJobRequest buildPartial() { + com.google.cloud.aiplatform.v1.GetBatchPredictionJobRequest result = + new com.google.cloud.aiplatform.v1.GetBatchPredictionJobRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.GetBatchPredictionJobRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.GetBatchPredictionJobRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.GetBatchPredictionJobRequest other) { + if (other == com.google.cloud.aiplatform.v1.GetBatchPredictionJobRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.aiplatform.v1.GetBatchPredictionJobRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.GetBatchPredictionJobRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the BatchPredictionJob resource.
+     * Format:
+     * `projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the BatchPredictionJob resource.
+     * Format:
+     * `projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the BatchPredictionJob resource.
+     * Format:
+     * `projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the BatchPredictionJob resource.
+     * Format:
+     * `projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the BatchPredictionJob resource.
+     * Format:
+     * `projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.GetBatchPredictionJobRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.GetBatchPredictionJobRequest) + private static final com.google.cloud.aiplatform.v1.GetBatchPredictionJobRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.GetBatchPredictionJobRequest(); + } + + public static com.google.cloud.aiplatform.v1.GetBatchPredictionJobRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetBatchPredictionJobRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetBatchPredictionJobRequest(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.v1.GetBatchPredictionJobRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetBatchPredictionJobRequestOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetBatchPredictionJobRequestOrBuilder.java new file mode 100644 index 000000000..eebb7424f --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetBatchPredictionJobRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/job_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface GetBatchPredictionJobRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.GetBatchPredictionJobRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the BatchPredictionJob resource.
+   * Format:
+   * `projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the BatchPredictionJob resource.
+   * Format:
+   * `projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetCustomJobRequest.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetCustomJobRequest.java new file mode 100644 index 000000000..2efa12dd8 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetCustomJobRequest.java @@ -0,0 +1,664 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/job_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for [JobService.GetCustomJob][google.cloud.aiplatform.v1.JobService.GetCustomJob].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.GetCustomJobRequest} + */ +public final class GetCustomJobRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.GetCustomJobRequest) + GetCustomJobRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetCustomJobRequest.newBuilder() to construct. + private GetCustomJobRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetCustomJobRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetCustomJobRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetCustomJobRequest( + 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(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_GetCustomJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_GetCustomJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.GetCustomJobRequest.class, + com.google.cloud.aiplatform.v1.GetCustomJobRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the CustomJob resource.
+   * Format:
+   * `projects/{project}/locations/{location}/customJobs/{custom_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the CustomJob resource.
+   * Format:
+   * `projects/{project}/locations/{location}/customJobs/{custom_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.GetCustomJobRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.GetCustomJobRequest other = + (com.google.cloud.aiplatform.v1.GetCustomJobRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.GetCustomJobRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GetCustomJobRequest 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.v1.GetCustomJobRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GetCustomJobRequest 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.v1.GetCustomJobRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GetCustomJobRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GetCustomJobRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.GetCustomJobRequest 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.v1.GetCustomJobRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.GetCustomJobRequest 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.v1.GetCustomJobRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.GetCustomJobRequest 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.v1.GetCustomJobRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [JobService.GetCustomJob][google.cloud.aiplatform.v1.JobService.GetCustomJob].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.GetCustomJobRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.GetCustomJobRequest) + com.google.cloud.aiplatform.v1.GetCustomJobRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_GetCustomJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_GetCustomJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.GetCustomJobRequest.class, + com.google.cloud.aiplatform.v1.GetCustomJobRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.GetCustomJobRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_GetCustomJobRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetCustomJobRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.GetCustomJobRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetCustomJobRequest build() { + com.google.cloud.aiplatform.v1.GetCustomJobRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetCustomJobRequest buildPartial() { + com.google.cloud.aiplatform.v1.GetCustomJobRequest result = + new com.google.cloud.aiplatform.v1.GetCustomJobRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.GetCustomJobRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.GetCustomJobRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.GetCustomJobRequest other) { + if (other == com.google.cloud.aiplatform.v1.GetCustomJobRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.aiplatform.v1.GetCustomJobRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.GetCustomJobRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the CustomJob resource.
+     * Format:
+     * `projects/{project}/locations/{location}/customJobs/{custom_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the CustomJob resource.
+     * Format:
+     * `projects/{project}/locations/{location}/customJobs/{custom_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the CustomJob resource.
+     * Format:
+     * `projects/{project}/locations/{location}/customJobs/{custom_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the CustomJob resource.
+     * Format:
+     * `projects/{project}/locations/{location}/customJobs/{custom_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the CustomJob resource.
+     * Format:
+     * `projects/{project}/locations/{location}/customJobs/{custom_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.GetCustomJobRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.GetCustomJobRequest) + private static final com.google.cloud.aiplatform.v1.GetCustomJobRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.GetCustomJobRequest(); + } + + public static com.google.cloud.aiplatform.v1.GetCustomJobRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetCustomJobRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetCustomJobRequest(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.v1.GetCustomJobRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetCustomJobRequestOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetCustomJobRequestOrBuilder.java new file mode 100644 index 000000000..da51c6d36 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetCustomJobRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/job_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface GetCustomJobRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.GetCustomJobRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the CustomJob resource.
+   * Format:
+   * `projects/{project}/locations/{location}/customJobs/{custom_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the CustomJob resource.
+   * Format:
+   * `projects/{project}/locations/{location}/customJobs/{custom_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetDataLabelingJobRequest.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetDataLabelingJobRequest.java new file mode 100644 index 000000000..e75f5d75f --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetDataLabelingJobRequest.java @@ -0,0 +1,665 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/job_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for [DataLabelingJobService.GetDataLabelingJob][].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.GetDataLabelingJobRequest} + */ +public final class GetDataLabelingJobRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.GetDataLabelingJobRequest) + GetDataLabelingJobRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetDataLabelingJobRequest.newBuilder() to construct. + private GetDataLabelingJobRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetDataLabelingJobRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetDataLabelingJobRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetDataLabelingJobRequest( + 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(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_GetDataLabelingJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_GetDataLabelingJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.GetDataLabelingJobRequest.class, + com.google.cloud.aiplatform.v1.GetDataLabelingJobRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the DataLabelingJob.
+   * Format:
+   * `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the DataLabelingJob.
+   * Format:
+   * `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.GetDataLabelingJobRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.GetDataLabelingJobRequest other = + (com.google.cloud.aiplatform.v1.GetDataLabelingJobRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.GetDataLabelingJobRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GetDataLabelingJobRequest 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.v1.GetDataLabelingJobRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GetDataLabelingJobRequest 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.v1.GetDataLabelingJobRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GetDataLabelingJobRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GetDataLabelingJobRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.GetDataLabelingJobRequest 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.v1.GetDataLabelingJobRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.GetDataLabelingJobRequest 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.v1.GetDataLabelingJobRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.GetDataLabelingJobRequest 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.v1.GetDataLabelingJobRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [DataLabelingJobService.GetDataLabelingJob][].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.GetDataLabelingJobRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.GetDataLabelingJobRequest) + com.google.cloud.aiplatform.v1.GetDataLabelingJobRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_GetDataLabelingJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_GetDataLabelingJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.GetDataLabelingJobRequest.class, + com.google.cloud.aiplatform.v1.GetDataLabelingJobRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.GetDataLabelingJobRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_GetDataLabelingJobRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetDataLabelingJobRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.GetDataLabelingJobRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetDataLabelingJobRequest build() { + com.google.cloud.aiplatform.v1.GetDataLabelingJobRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetDataLabelingJobRequest buildPartial() { + com.google.cloud.aiplatform.v1.GetDataLabelingJobRequest result = + new com.google.cloud.aiplatform.v1.GetDataLabelingJobRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.GetDataLabelingJobRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.GetDataLabelingJobRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.GetDataLabelingJobRequest other) { + if (other == com.google.cloud.aiplatform.v1.GetDataLabelingJobRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.aiplatform.v1.GetDataLabelingJobRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.GetDataLabelingJobRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the DataLabelingJob.
+     * Format:
+     * `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the DataLabelingJob.
+     * Format:
+     * `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the DataLabelingJob.
+     * Format:
+     * `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the DataLabelingJob.
+     * Format:
+     * `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the DataLabelingJob.
+     * Format:
+     * `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.GetDataLabelingJobRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.GetDataLabelingJobRequest) + private static final com.google.cloud.aiplatform.v1.GetDataLabelingJobRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.GetDataLabelingJobRequest(); + } + + public static com.google.cloud.aiplatform.v1.GetDataLabelingJobRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetDataLabelingJobRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetDataLabelingJobRequest(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.v1.GetDataLabelingJobRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetDataLabelingJobRequestOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetDataLabelingJobRequestOrBuilder.java new file mode 100644 index 000000000..c857ab888 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetDataLabelingJobRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/job_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface GetDataLabelingJobRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.GetDataLabelingJobRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the DataLabelingJob.
+   * Format:
+   * `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the DataLabelingJob.
+   * Format:
+   * `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetDatasetRequest.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetDatasetRequest.java new file mode 100644 index 000000000..0f291ed2c --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetDatasetRequest.java @@ -0,0 +1,917 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/dataset_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for [DatasetService.GetDataset][google.cloud.aiplatform.v1.DatasetService.GetDataset].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.GetDatasetRequest} + */ +public final class GetDatasetRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.GetDatasetRequest) + GetDatasetRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetDatasetRequest.newBuilder() to construct. + private GetDatasetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetDatasetRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetDatasetRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetDatasetRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (readMask_ != null) { + subBuilder = readMask_.toBuilder(); + } + readMask_ = + input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(readMask_); + readMask_ = 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.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_GetDatasetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_GetDatasetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.GetDatasetRequest.class, + com.google.cloud.aiplatform.v1.GetDatasetRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the Dataset resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the Dataset resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int READ_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask readMask_; + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 2; + * + * @return Whether the readMask field is set. + */ + @java.lang.Override + public boolean hasReadMask() { + return readMask_ != null; + } + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 2; + * + * @return The readMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getReadMask() { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 2; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder() { + return getReadMask(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (readMask_ != null) { + output.writeMessage(2, getReadMask()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (readMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getReadMask()); + } + 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.v1.GetDatasetRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.GetDatasetRequest other = + (com.google.cloud.aiplatform.v1.GetDatasetRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (hasReadMask() != other.hasReadMask()) return false; + if (hasReadMask()) { + if (!getReadMask().equals(other.getReadMask())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasReadMask()) { + hash = (37 * hash) + READ_MASK_FIELD_NUMBER; + hash = (53 * hash) + getReadMask().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.GetDatasetRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GetDatasetRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GetDatasetRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GetDatasetRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GetDatasetRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GetDatasetRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GetDatasetRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.GetDatasetRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GetDatasetRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.GetDatasetRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GetDatasetRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.GetDatasetRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1.GetDatasetRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [DatasetService.GetDataset][google.cloud.aiplatform.v1.DatasetService.GetDataset].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.GetDatasetRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.GetDatasetRequest) + com.google.cloud.aiplatform.v1.GetDatasetRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_GetDatasetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_GetDatasetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.GetDatasetRequest.class, + com.google.cloud.aiplatform.v1.GetDatasetRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.GetDatasetRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + if (readMaskBuilder_ == null) { + readMask_ = null; + } else { + readMask_ = null; + readMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_GetDatasetRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetDatasetRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.GetDatasetRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetDatasetRequest build() { + com.google.cloud.aiplatform.v1.GetDatasetRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetDatasetRequest buildPartial() { + com.google.cloud.aiplatform.v1.GetDatasetRequest result = + new com.google.cloud.aiplatform.v1.GetDatasetRequest(this); + result.name_ = name_; + if (readMaskBuilder_ == null) { + result.readMask_ = readMask_; + } else { + result.readMask_ = readMaskBuilder_.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.v1.GetDatasetRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.GetDatasetRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.GetDatasetRequest other) { + if (other == com.google.cloud.aiplatform.v1.GetDatasetRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasReadMask()) { + mergeReadMask(other.getReadMask()); + } + 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.v1.GetDatasetRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.aiplatform.v1.GetDatasetRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the Dataset resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the Dataset resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the Dataset resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the Dataset resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the Dataset resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.FieldMask readMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + readMaskBuilder_; + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 2; + * + * @return Whether the readMask field is set. + */ + public boolean hasReadMask() { + return readMaskBuilder_ != null || readMask_ != null; + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 2; + * + * @return The readMask. + */ + public com.google.protobuf.FieldMask getReadMask() { + if (readMaskBuilder_ == null) { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } else { + return readMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 2; + */ + public Builder setReadMask(com.google.protobuf.FieldMask value) { + if (readMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + readMask_ = value; + onChanged(); + } else { + readMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 2; + */ + public Builder setReadMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (readMaskBuilder_ == null) { + readMask_ = builderForValue.build(); + onChanged(); + } else { + readMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 2; + */ + public Builder mergeReadMask(com.google.protobuf.FieldMask value) { + if (readMaskBuilder_ == null) { + if (readMask_ != null) { + readMask_ = + com.google.protobuf.FieldMask.newBuilder(readMask_).mergeFrom(value).buildPartial(); + } else { + readMask_ = value; + } + onChanged(); + } else { + readMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 2; + */ + public Builder clearReadMask() { + if (readMaskBuilder_ == null) { + readMask_ = null; + onChanged(); + } else { + readMask_ = null; + readMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 2; + */ + public com.google.protobuf.FieldMask.Builder getReadMaskBuilder() { + + onChanged(); + return getReadMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 2; + */ + public com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder() { + if (readMaskBuilder_ != null) { + return readMaskBuilder_.getMessageOrBuilder(); + } else { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getReadMaskFieldBuilder() { + if (readMaskBuilder_ == null) { + readMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getReadMask(), getParentForChildren(), isClean()); + readMask_ = null; + } + return readMaskBuilder_; + } + + @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.v1.GetDatasetRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.GetDatasetRequest) + private static final com.google.cloud.aiplatform.v1.GetDatasetRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.GetDatasetRequest(); + } + + public static com.google.cloud.aiplatform.v1.GetDatasetRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetDatasetRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetDatasetRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetDatasetRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetDatasetRequestOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetDatasetRequestOrBuilder.java new file mode 100644 index 000000000..81e7de818 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetDatasetRequestOrBuilder.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/v1/dataset_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface GetDatasetRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.GetDatasetRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the Dataset resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the Dataset resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 2; + * + * @return Whether the readMask field is set. + */ + boolean hasReadMask(); + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 2; + * + * @return The readMask. + */ + com.google.protobuf.FieldMask getReadMask(); + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 2; + */ + com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetEndpointRequest.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetEndpointRequest.java new file mode 100644 index 000000000..5fee3293f --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetEndpointRequest.java @@ -0,0 +1,664 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/endpoint_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for [EndpointService.GetEndpoint][google.cloud.aiplatform.v1.EndpointService.GetEndpoint]
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.GetEndpointRequest} + */ +public final class GetEndpointRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.GetEndpointRequest) + GetEndpointRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetEndpointRequest.newBuilder() to construct. + private GetEndpointRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetEndpointRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetEndpointRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetEndpointRequest( + 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(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.EndpointServiceProto + .internal_static_google_cloud_aiplatform_v1_GetEndpointRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.EndpointServiceProto + .internal_static_google_cloud_aiplatform_v1_GetEndpointRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.GetEndpointRequest.class, + com.google.cloud.aiplatform.v1.GetEndpointRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the Endpoint resource.
+   * Format:
+   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the Endpoint resource.
+   * Format:
+   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.GetEndpointRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.GetEndpointRequest other = + (com.google.cloud.aiplatform.v1.GetEndpointRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.GetEndpointRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GetEndpointRequest 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.v1.GetEndpointRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GetEndpointRequest 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.v1.GetEndpointRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GetEndpointRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GetEndpointRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.GetEndpointRequest 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.v1.GetEndpointRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.GetEndpointRequest 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.v1.GetEndpointRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.GetEndpointRequest 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.v1.GetEndpointRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [EndpointService.GetEndpoint][google.cloud.aiplatform.v1.EndpointService.GetEndpoint]
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.GetEndpointRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.GetEndpointRequest) + com.google.cloud.aiplatform.v1.GetEndpointRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.EndpointServiceProto + .internal_static_google_cloud_aiplatform_v1_GetEndpointRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.EndpointServiceProto + .internal_static_google_cloud_aiplatform_v1_GetEndpointRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.GetEndpointRequest.class, + com.google.cloud.aiplatform.v1.GetEndpointRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.GetEndpointRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.EndpointServiceProto + .internal_static_google_cloud_aiplatform_v1_GetEndpointRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetEndpointRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.GetEndpointRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetEndpointRequest build() { + com.google.cloud.aiplatform.v1.GetEndpointRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetEndpointRequest buildPartial() { + com.google.cloud.aiplatform.v1.GetEndpointRequest result = + new com.google.cloud.aiplatform.v1.GetEndpointRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.GetEndpointRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.GetEndpointRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.GetEndpointRequest other) { + if (other == com.google.cloud.aiplatform.v1.GetEndpointRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.aiplatform.v1.GetEndpointRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.GetEndpointRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the Endpoint resource.
+     * Format:
+     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the Endpoint resource.
+     * Format:
+     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the Endpoint resource.
+     * Format:
+     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the Endpoint resource.
+     * Format:
+     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the Endpoint resource.
+     * Format:
+     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.GetEndpointRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.GetEndpointRequest) + private static final com.google.cloud.aiplatform.v1.GetEndpointRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.GetEndpointRequest(); + } + + public static com.google.cloud.aiplatform.v1.GetEndpointRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetEndpointRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetEndpointRequest(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.v1.GetEndpointRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetEndpointRequestOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetEndpointRequestOrBuilder.java new file mode 100644 index 000000000..7782b5a6e --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetEndpointRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/endpoint_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface GetEndpointRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.GetEndpointRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the Endpoint resource.
+   * Format:
+   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the Endpoint resource.
+   * Format:
+   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetHyperparameterTuningJobRequest.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetHyperparameterTuningJobRequest.java new file mode 100644 index 000000000..9e7bae7d5 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetHyperparameterTuningJobRequest.java @@ -0,0 +1,673 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/job_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for [JobService.GetHyperparameterTuningJob][google.cloud.aiplatform.v1.JobService.GetHyperparameterTuningJob].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.GetHyperparameterTuningJobRequest} + */ +public final class GetHyperparameterTuningJobRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.GetHyperparameterTuningJobRequest) + GetHyperparameterTuningJobRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetHyperparameterTuningJobRequest.newBuilder() to construct. + private GetHyperparameterTuningJobRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetHyperparameterTuningJobRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetHyperparameterTuningJobRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetHyperparameterTuningJobRequest( + 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(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_GetHyperparameterTuningJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_GetHyperparameterTuningJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.GetHyperparameterTuningJobRequest.class, + com.google.cloud.aiplatform.v1.GetHyperparameterTuningJobRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the HyperparameterTuningJob resource.
+   * Format:
+   * `projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the HyperparameterTuningJob resource.
+   * Format:
+   * `projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.GetHyperparameterTuningJobRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.GetHyperparameterTuningJobRequest other = + (com.google.cloud.aiplatform.v1.GetHyperparameterTuningJobRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.GetHyperparameterTuningJobRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GetHyperparameterTuningJobRequest 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.v1.GetHyperparameterTuningJobRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GetHyperparameterTuningJobRequest 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.v1.GetHyperparameterTuningJobRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GetHyperparameterTuningJobRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GetHyperparameterTuningJobRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.GetHyperparameterTuningJobRequest 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.v1.GetHyperparameterTuningJobRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.GetHyperparameterTuningJobRequest 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.v1.GetHyperparameterTuningJobRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.GetHyperparameterTuningJobRequest 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.v1.GetHyperparameterTuningJobRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [JobService.GetHyperparameterTuningJob][google.cloud.aiplatform.v1.JobService.GetHyperparameterTuningJob].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.GetHyperparameterTuningJobRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.GetHyperparameterTuningJobRequest) + com.google.cloud.aiplatform.v1.GetHyperparameterTuningJobRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_GetHyperparameterTuningJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_GetHyperparameterTuningJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.GetHyperparameterTuningJobRequest.class, + com.google.cloud.aiplatform.v1.GetHyperparameterTuningJobRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.GetHyperparameterTuningJobRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_GetHyperparameterTuningJobRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetHyperparameterTuningJobRequest + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.GetHyperparameterTuningJobRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetHyperparameterTuningJobRequest build() { + com.google.cloud.aiplatform.v1.GetHyperparameterTuningJobRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetHyperparameterTuningJobRequest buildPartial() { + com.google.cloud.aiplatform.v1.GetHyperparameterTuningJobRequest result = + new com.google.cloud.aiplatform.v1.GetHyperparameterTuningJobRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.GetHyperparameterTuningJobRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.GetHyperparameterTuningJobRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.GetHyperparameterTuningJobRequest other) { + if (other + == com.google.cloud.aiplatform.v1.GetHyperparameterTuningJobRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.aiplatform.v1.GetHyperparameterTuningJobRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.GetHyperparameterTuningJobRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the HyperparameterTuningJob resource.
+     * Format:
+     * `projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the HyperparameterTuningJob resource.
+     * Format:
+     * `projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the HyperparameterTuningJob resource.
+     * Format:
+     * `projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the HyperparameterTuningJob resource.
+     * Format:
+     * `projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the HyperparameterTuningJob resource.
+     * Format:
+     * `projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.GetHyperparameterTuningJobRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.GetHyperparameterTuningJobRequest) + private static final com.google.cloud.aiplatform.v1.GetHyperparameterTuningJobRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.GetHyperparameterTuningJobRequest(); + } + + public static com.google.cloud.aiplatform.v1.GetHyperparameterTuningJobRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetHyperparameterTuningJobRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetHyperparameterTuningJobRequest(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.v1.GetHyperparameterTuningJobRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetHyperparameterTuningJobRequestOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetHyperparameterTuningJobRequestOrBuilder.java new file mode 100644 index 000000000..559e0e227 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetHyperparameterTuningJobRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/job_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface GetHyperparameterTuningJobRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.GetHyperparameterTuningJobRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the HyperparameterTuningJob resource.
+   * Format:
+   * `projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the HyperparameterTuningJob resource.
+   * Format:
+   * `projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetModelEvaluationRequest.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetModelEvaluationRequest.java new file mode 100644 index 000000000..3f2d80b53 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetModelEvaluationRequest.java @@ -0,0 +1,665 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/model_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for [ModelService.GetModelEvaluation][google.cloud.aiplatform.v1.ModelService.GetModelEvaluation].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.GetModelEvaluationRequest} + */ +public final class GetModelEvaluationRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.GetModelEvaluationRequest) + GetModelEvaluationRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetModelEvaluationRequest.newBuilder() to construct. + private GetModelEvaluationRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetModelEvaluationRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetModelEvaluationRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetModelEvaluationRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_GetModelEvaluationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_GetModelEvaluationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.GetModelEvaluationRequest.class, + com.google.cloud.aiplatform.v1.GetModelEvaluationRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the ModelEvaluation resource.
+   * Format:
+   * `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the ModelEvaluation resource.
+   * Format:
+   * `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.GetModelEvaluationRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.GetModelEvaluationRequest other = + (com.google.cloud.aiplatform.v1.GetModelEvaluationRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.GetModelEvaluationRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GetModelEvaluationRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GetModelEvaluationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GetModelEvaluationRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GetModelEvaluationRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GetModelEvaluationRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GetModelEvaluationRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.GetModelEvaluationRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GetModelEvaluationRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.GetModelEvaluationRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GetModelEvaluationRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.GetModelEvaluationRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.GetModelEvaluationRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [ModelService.GetModelEvaluation][google.cloud.aiplatform.v1.ModelService.GetModelEvaluation].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.GetModelEvaluationRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.GetModelEvaluationRequest) + com.google.cloud.aiplatform.v1.GetModelEvaluationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_GetModelEvaluationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_GetModelEvaluationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.GetModelEvaluationRequest.class, + com.google.cloud.aiplatform.v1.GetModelEvaluationRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.GetModelEvaluationRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_GetModelEvaluationRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetModelEvaluationRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.GetModelEvaluationRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetModelEvaluationRequest build() { + com.google.cloud.aiplatform.v1.GetModelEvaluationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetModelEvaluationRequest buildPartial() { + com.google.cloud.aiplatform.v1.GetModelEvaluationRequest result = + new com.google.cloud.aiplatform.v1.GetModelEvaluationRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.GetModelEvaluationRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.GetModelEvaluationRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.GetModelEvaluationRequest other) { + if (other == com.google.cloud.aiplatform.v1.GetModelEvaluationRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.aiplatform.v1.GetModelEvaluationRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.GetModelEvaluationRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the ModelEvaluation resource.
+     * Format:
+     * `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the ModelEvaluation resource.
+     * Format:
+     * `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the ModelEvaluation resource.
+     * Format:
+     * `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the ModelEvaluation resource.
+     * Format:
+     * `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the ModelEvaluation resource.
+     * Format:
+     * `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.GetModelEvaluationRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.GetModelEvaluationRequest) + private static final com.google.cloud.aiplatform.v1.GetModelEvaluationRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.GetModelEvaluationRequest(); + } + + public static com.google.cloud.aiplatform.v1.GetModelEvaluationRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetModelEvaluationRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetModelEvaluationRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetModelEvaluationRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetModelEvaluationRequestOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetModelEvaluationRequestOrBuilder.java new file mode 100644 index 000000000..a72c3c84e --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetModelEvaluationRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/model_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface GetModelEvaluationRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.GetModelEvaluationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the ModelEvaluation resource.
+   * Format:
+   * `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the ModelEvaluation resource.
+   * Format:
+   * `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetModelEvaluationSliceRequest.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetModelEvaluationSliceRequest.java new file mode 100644 index 000000000..7555dfc5d --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetModelEvaluationSliceRequest.java @@ -0,0 +1,670 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/model_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for [ModelService.GetModelEvaluationSlice][google.cloud.aiplatform.v1.ModelService.GetModelEvaluationSlice].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.GetModelEvaluationSliceRequest} + */ +public final class GetModelEvaluationSliceRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.GetModelEvaluationSliceRequest) + GetModelEvaluationSliceRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetModelEvaluationSliceRequest.newBuilder() to construct. + private GetModelEvaluationSliceRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetModelEvaluationSliceRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetModelEvaluationSliceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetModelEvaluationSliceRequest( + 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(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_GetModelEvaluationSliceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_GetModelEvaluationSliceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.GetModelEvaluationSliceRequest.class, + com.google.cloud.aiplatform.v1.GetModelEvaluationSliceRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the ModelEvaluationSlice resource.
+   * Format:
+   * `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}/slices/{slice}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the ModelEvaluationSlice resource.
+   * Format:
+   * `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}/slices/{slice}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.GetModelEvaluationSliceRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.GetModelEvaluationSliceRequest other = + (com.google.cloud.aiplatform.v1.GetModelEvaluationSliceRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.GetModelEvaluationSliceRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GetModelEvaluationSliceRequest 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.v1.GetModelEvaluationSliceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GetModelEvaluationSliceRequest 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.v1.GetModelEvaluationSliceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GetModelEvaluationSliceRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GetModelEvaluationSliceRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.GetModelEvaluationSliceRequest 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.v1.GetModelEvaluationSliceRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.GetModelEvaluationSliceRequest 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.v1.GetModelEvaluationSliceRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.GetModelEvaluationSliceRequest 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.v1.GetModelEvaluationSliceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [ModelService.GetModelEvaluationSlice][google.cloud.aiplatform.v1.ModelService.GetModelEvaluationSlice].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.GetModelEvaluationSliceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.GetModelEvaluationSliceRequest) + com.google.cloud.aiplatform.v1.GetModelEvaluationSliceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_GetModelEvaluationSliceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_GetModelEvaluationSliceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.GetModelEvaluationSliceRequest.class, + com.google.cloud.aiplatform.v1.GetModelEvaluationSliceRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.GetModelEvaluationSliceRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_GetModelEvaluationSliceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetModelEvaluationSliceRequest + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.GetModelEvaluationSliceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetModelEvaluationSliceRequest build() { + com.google.cloud.aiplatform.v1.GetModelEvaluationSliceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetModelEvaluationSliceRequest buildPartial() { + com.google.cloud.aiplatform.v1.GetModelEvaluationSliceRequest result = + new com.google.cloud.aiplatform.v1.GetModelEvaluationSliceRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.GetModelEvaluationSliceRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.GetModelEvaluationSliceRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.GetModelEvaluationSliceRequest other) { + if (other + == com.google.cloud.aiplatform.v1.GetModelEvaluationSliceRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.aiplatform.v1.GetModelEvaluationSliceRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.GetModelEvaluationSliceRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the ModelEvaluationSlice resource.
+     * Format:
+     * `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}/slices/{slice}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the ModelEvaluationSlice resource.
+     * Format:
+     * `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}/slices/{slice}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the ModelEvaluationSlice resource.
+     * Format:
+     * `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}/slices/{slice}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the ModelEvaluationSlice resource.
+     * Format:
+     * `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}/slices/{slice}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the ModelEvaluationSlice resource.
+     * Format:
+     * `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}/slices/{slice}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.GetModelEvaluationSliceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.GetModelEvaluationSliceRequest) + private static final com.google.cloud.aiplatform.v1.GetModelEvaluationSliceRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.GetModelEvaluationSliceRequest(); + } + + public static com.google.cloud.aiplatform.v1.GetModelEvaluationSliceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetModelEvaluationSliceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetModelEvaluationSliceRequest(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.v1.GetModelEvaluationSliceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetModelEvaluationSliceRequestOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetModelEvaluationSliceRequestOrBuilder.java new file mode 100644 index 000000000..2e1659c2e --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetModelEvaluationSliceRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/model_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface GetModelEvaluationSliceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.GetModelEvaluationSliceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the ModelEvaluationSlice resource.
+   * Format:
+   * `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}/slices/{slice}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the ModelEvaluationSlice resource.
+   * Format:
+   * `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}/slices/{slice}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetModelRequest.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetModelRequest.java new file mode 100644 index 000000000..95161aaaf --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetModelRequest.java @@ -0,0 +1,655 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/model_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for [ModelService.GetModel][google.cloud.aiplatform.v1.ModelService.GetModel].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.GetModelRequest} + */ +public final class GetModelRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.GetModelRequest) + GetModelRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetModelRequest.newBuilder() to construct. + private GetModelRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetModelRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetModelRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetModelRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_GetModelRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_GetModelRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.GetModelRequest.class, + com.google.cloud.aiplatform.v1.GetModelRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the Model resource.
+   * Format: `projects/{project}/locations/{location}/models/{model}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the Model resource.
+   * Format: `projects/{project}/locations/{location}/models/{model}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.GetModelRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.GetModelRequest other = + (com.google.cloud.aiplatform.v1.GetModelRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.GetModelRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GetModelRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GetModelRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GetModelRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GetModelRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GetModelRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GetModelRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.GetModelRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GetModelRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.GetModelRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GetModelRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.GetModelRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1.GetModelRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [ModelService.GetModel][google.cloud.aiplatform.v1.ModelService.GetModel].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.GetModelRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.GetModelRequest) + com.google.cloud.aiplatform.v1.GetModelRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_GetModelRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_GetModelRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.GetModelRequest.class, + com.google.cloud.aiplatform.v1.GetModelRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.GetModelRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_GetModelRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetModelRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.GetModelRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetModelRequest build() { + com.google.cloud.aiplatform.v1.GetModelRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetModelRequest buildPartial() { + com.google.cloud.aiplatform.v1.GetModelRequest result = + new com.google.cloud.aiplatform.v1.GetModelRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.GetModelRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.GetModelRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.GetModelRequest other) { + if (other == com.google.cloud.aiplatform.v1.GetModelRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.aiplatform.v1.GetModelRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.aiplatform.v1.GetModelRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the Model resource.
+     * Format: `projects/{project}/locations/{location}/models/{model}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the Model resource.
+     * Format: `projects/{project}/locations/{location}/models/{model}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the Model resource.
+     * Format: `projects/{project}/locations/{location}/models/{model}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the Model resource.
+     * Format: `projects/{project}/locations/{location}/models/{model}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the Model resource.
+     * Format: `projects/{project}/locations/{location}/models/{model}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.GetModelRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.GetModelRequest) + private static final com.google.cloud.aiplatform.v1.GetModelRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.GetModelRequest(); + } + + public static com.google.cloud.aiplatform.v1.GetModelRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetModelRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetModelRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetModelRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetModelRequestOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetModelRequestOrBuilder.java new file mode 100644 index 000000000..8fd7a304a --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetModelRequestOrBuilder.java @@ -0,0 +1,56 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/model_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface GetModelRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.GetModelRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the Model resource.
+   * Format: `projects/{project}/locations/{location}/models/{model}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the Model resource.
+   * Format: `projects/{project}/locations/{location}/models/{model}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetSpecialistPoolRequest.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetSpecialistPoolRequest.java new file mode 100644 index 000000000..d513f8166 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetSpecialistPoolRequest.java @@ -0,0 +1,665 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/specialist_pool_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for [SpecialistPoolService.GetSpecialistPool][google.cloud.aiplatform.v1.SpecialistPoolService.GetSpecialistPool].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.GetSpecialistPoolRequest} + */ +public final class GetSpecialistPoolRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.GetSpecialistPoolRequest) + GetSpecialistPoolRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetSpecialistPoolRequest.newBuilder() to construct. + private GetSpecialistPoolRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetSpecialistPoolRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetSpecialistPoolRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetSpecialistPoolRequest( + 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(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.SpecialistPoolServiceProto + .internal_static_google_cloud_aiplatform_v1_GetSpecialistPoolRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.SpecialistPoolServiceProto + .internal_static_google_cloud_aiplatform_v1_GetSpecialistPoolRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.GetSpecialistPoolRequest.class, + com.google.cloud.aiplatform.v1.GetSpecialistPoolRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the SpecialistPool resource.
+   * The form is
+   * `projects/{project}/locations/{location}/specialistPools/{specialist_pool}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the SpecialistPool resource.
+   * The form is
+   * `projects/{project}/locations/{location}/specialistPools/{specialist_pool}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.GetSpecialistPoolRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.GetSpecialistPoolRequest other = + (com.google.cloud.aiplatform.v1.GetSpecialistPoolRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.GetSpecialistPoolRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GetSpecialistPoolRequest 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.v1.GetSpecialistPoolRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GetSpecialistPoolRequest 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.v1.GetSpecialistPoolRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GetSpecialistPoolRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GetSpecialistPoolRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.GetSpecialistPoolRequest 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.v1.GetSpecialistPoolRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.GetSpecialistPoolRequest 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.v1.GetSpecialistPoolRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.GetSpecialistPoolRequest 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.v1.GetSpecialistPoolRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [SpecialistPoolService.GetSpecialistPool][google.cloud.aiplatform.v1.SpecialistPoolService.GetSpecialistPool].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.GetSpecialistPoolRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.GetSpecialistPoolRequest) + com.google.cloud.aiplatform.v1.GetSpecialistPoolRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.SpecialistPoolServiceProto + .internal_static_google_cloud_aiplatform_v1_GetSpecialistPoolRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.SpecialistPoolServiceProto + .internal_static_google_cloud_aiplatform_v1_GetSpecialistPoolRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.GetSpecialistPoolRequest.class, + com.google.cloud.aiplatform.v1.GetSpecialistPoolRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.GetSpecialistPoolRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.SpecialistPoolServiceProto + .internal_static_google_cloud_aiplatform_v1_GetSpecialistPoolRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetSpecialistPoolRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.GetSpecialistPoolRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetSpecialistPoolRequest build() { + com.google.cloud.aiplatform.v1.GetSpecialistPoolRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetSpecialistPoolRequest buildPartial() { + com.google.cloud.aiplatform.v1.GetSpecialistPoolRequest result = + new com.google.cloud.aiplatform.v1.GetSpecialistPoolRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.GetSpecialistPoolRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.GetSpecialistPoolRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.GetSpecialistPoolRequest other) { + if (other == com.google.cloud.aiplatform.v1.GetSpecialistPoolRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.aiplatform.v1.GetSpecialistPoolRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.GetSpecialistPoolRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the SpecialistPool resource.
+     * The form is
+     * `projects/{project}/locations/{location}/specialistPools/{specialist_pool}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the SpecialistPool resource.
+     * The form is
+     * `projects/{project}/locations/{location}/specialistPools/{specialist_pool}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the SpecialistPool resource.
+     * The form is
+     * `projects/{project}/locations/{location}/specialistPools/{specialist_pool}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the SpecialistPool resource.
+     * The form is
+     * `projects/{project}/locations/{location}/specialistPools/{specialist_pool}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the SpecialistPool resource.
+     * The form is
+     * `projects/{project}/locations/{location}/specialistPools/{specialist_pool}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.GetSpecialistPoolRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.GetSpecialistPoolRequest) + private static final com.google.cloud.aiplatform.v1.GetSpecialistPoolRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.GetSpecialistPoolRequest(); + } + + public static com.google.cloud.aiplatform.v1.GetSpecialistPoolRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetSpecialistPoolRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetSpecialistPoolRequest(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.v1.GetSpecialistPoolRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetSpecialistPoolRequestOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetSpecialistPoolRequestOrBuilder.java new file mode 100644 index 000000000..51f6a5358 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetSpecialistPoolRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/specialist_pool_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface GetSpecialistPoolRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.GetSpecialistPoolRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the SpecialistPool resource.
+   * The form is
+   * `projects/{project}/locations/{location}/specialistPools/{specialist_pool}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the SpecialistPool resource.
+   * The form is
+   * `projects/{project}/locations/{location}/specialistPools/{specialist_pool}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetTrainingPipelineRequest.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetTrainingPipelineRequest.java new file mode 100644 index 000000000..ca1e7a979 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetTrainingPipelineRequest.java @@ -0,0 +1,665 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/pipeline_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for [PipelineService.GetTrainingPipeline][google.cloud.aiplatform.v1.PipelineService.GetTrainingPipeline].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.GetTrainingPipelineRequest} + */ +public final class GetTrainingPipelineRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.GetTrainingPipelineRequest) + GetTrainingPipelineRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetTrainingPipelineRequest.newBuilder() to construct. + private GetTrainingPipelineRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetTrainingPipelineRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetTrainingPipelineRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetTrainingPipelineRequest( + 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(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.PipelineServiceProto + .internal_static_google_cloud_aiplatform_v1_GetTrainingPipelineRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.PipelineServiceProto + .internal_static_google_cloud_aiplatform_v1_GetTrainingPipelineRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.GetTrainingPipelineRequest.class, + com.google.cloud.aiplatform.v1.GetTrainingPipelineRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the TrainingPipeline resource.
+   * Format:
+   * `projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the TrainingPipeline resource.
+   * Format:
+   * `projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.GetTrainingPipelineRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.GetTrainingPipelineRequest other = + (com.google.cloud.aiplatform.v1.GetTrainingPipelineRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.GetTrainingPipelineRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GetTrainingPipelineRequest 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.v1.GetTrainingPipelineRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GetTrainingPipelineRequest 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.v1.GetTrainingPipelineRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GetTrainingPipelineRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.GetTrainingPipelineRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.GetTrainingPipelineRequest 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.v1.GetTrainingPipelineRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.GetTrainingPipelineRequest 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.v1.GetTrainingPipelineRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.GetTrainingPipelineRequest 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.v1.GetTrainingPipelineRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [PipelineService.GetTrainingPipeline][google.cloud.aiplatform.v1.PipelineService.GetTrainingPipeline].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.GetTrainingPipelineRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.GetTrainingPipelineRequest) + com.google.cloud.aiplatform.v1.GetTrainingPipelineRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.PipelineServiceProto + .internal_static_google_cloud_aiplatform_v1_GetTrainingPipelineRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.PipelineServiceProto + .internal_static_google_cloud_aiplatform_v1_GetTrainingPipelineRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.GetTrainingPipelineRequest.class, + com.google.cloud.aiplatform.v1.GetTrainingPipelineRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.GetTrainingPipelineRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.PipelineServiceProto + .internal_static_google_cloud_aiplatform_v1_GetTrainingPipelineRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetTrainingPipelineRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.GetTrainingPipelineRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetTrainingPipelineRequest build() { + com.google.cloud.aiplatform.v1.GetTrainingPipelineRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetTrainingPipelineRequest buildPartial() { + com.google.cloud.aiplatform.v1.GetTrainingPipelineRequest result = + new com.google.cloud.aiplatform.v1.GetTrainingPipelineRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.GetTrainingPipelineRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.GetTrainingPipelineRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.GetTrainingPipelineRequest other) { + if (other == com.google.cloud.aiplatform.v1.GetTrainingPipelineRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.aiplatform.v1.GetTrainingPipelineRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.GetTrainingPipelineRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the TrainingPipeline resource.
+     * Format:
+     * `projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the TrainingPipeline resource.
+     * Format:
+     * `projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the TrainingPipeline resource.
+     * Format:
+     * `projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the TrainingPipeline resource.
+     * Format:
+     * `projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the TrainingPipeline resource.
+     * Format:
+     * `projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.GetTrainingPipelineRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.GetTrainingPipelineRequest) + private static final com.google.cloud.aiplatform.v1.GetTrainingPipelineRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.GetTrainingPipelineRequest(); + } + + public static com.google.cloud.aiplatform.v1.GetTrainingPipelineRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetTrainingPipelineRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetTrainingPipelineRequest(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.v1.GetTrainingPipelineRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetTrainingPipelineRequestOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetTrainingPipelineRequestOrBuilder.java new file mode 100644 index 000000000..7049e0012 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetTrainingPipelineRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/pipeline_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface GetTrainingPipelineRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.GetTrainingPipelineRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the TrainingPipeline resource.
+   * Format:
+   * `projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the TrainingPipeline resource.
+   * Format:
+   * `projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/HyperparameterTuningJob.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/HyperparameterTuningJob.java new file mode 100644 index 000000000..2e6760ef4 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/HyperparameterTuningJob.java @@ -0,0 +1,4550 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/hyperparameter_tuning_job.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Represents a HyperparameterTuningJob. A HyperparameterTuningJob
+ * has a Study specification and multiple CustomJobs with identical
+ * CustomJob specification.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.HyperparameterTuningJob} + */ +public final class HyperparameterTuningJob extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.HyperparameterTuningJob) + HyperparameterTuningJobOrBuilder { + private static final long serialVersionUID = 0L; + // Use HyperparameterTuningJob.newBuilder() to construct. + private HyperparameterTuningJob(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private HyperparameterTuningJob() { + name_ = ""; + displayName_ = ""; + trials_ = java.util.Collections.emptyList(); + state_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new HyperparameterTuningJob(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private HyperparameterTuningJob( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 34: + { + com.google.cloud.aiplatform.v1.StudySpec.Builder subBuilder = null; + if (studySpec_ != null) { + subBuilder = studySpec_.toBuilder(); + } + studySpec_ = + input.readMessage( + com.google.cloud.aiplatform.v1.StudySpec.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(studySpec_); + studySpec_ = subBuilder.buildPartial(); + } + + break; + } + case 40: + { + maxTrialCount_ = input.readInt32(); + break; + } + case 48: + { + parallelTrialCount_ = input.readInt32(); + break; + } + case 56: + { + maxFailedTrialCount_ = input.readInt32(); + break; + } + case 66: + { + com.google.cloud.aiplatform.v1.CustomJobSpec.Builder subBuilder = null; + if (trialJobSpec_ != null) { + subBuilder = trialJobSpec_.toBuilder(); + } + trialJobSpec_ = + input.readMessage( + com.google.cloud.aiplatform.v1.CustomJobSpec.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(trialJobSpec_); + trialJobSpec_ = subBuilder.buildPartial(); + } + + break; + } + case 74: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + trials_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + trials_.add( + input.readMessage( + com.google.cloud.aiplatform.v1.Trial.parser(), extensionRegistry)); + break; + } + case 80: + { + int rawValue = input.readEnum(); + + state_ = rawValue; + break; + } + case 90: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 98: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (startTime_ != null) { + subBuilder = startTime_.toBuilder(); + } + startTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(startTime_); + startTime_ = subBuilder.buildPartial(); + } + + break; + } + case 106: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (endTime_ != null) { + subBuilder = endTime_.toBuilder(); + } + endTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(endTime_); + endTime_ = subBuilder.buildPartial(); + } + + break; + } + case 114: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + case 122: + { + com.google.rpc.Status.Builder subBuilder = null; + if (error_ != null) { + subBuilder = error_.toBuilder(); + } + error_ = input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(error_); + error_ = subBuilder.buildPartial(); + } + + break; + } + case 130: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + labels_ = + com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000002; + } + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); + break; + } + case 138: + { + com.google.cloud.aiplatform.v1.EncryptionSpec.Builder subBuilder = null; + if (encryptionSpec_ != null) { + subBuilder = encryptionSpec_.toBuilder(); + } + encryptionSpec_ = + input.readMessage( + com.google.cloud.aiplatform.v1.EncryptionSpec.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(encryptionSpec_); + encryptionSpec_ = 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)) { + trials_ = java.util.Collections.unmodifiableList(trials_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.HyperparameterTuningJobProto + .internal_static_google_cloud_aiplatform_v1_HyperparameterTuningJob_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 16: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.HyperparameterTuningJobProto + .internal_static_google_cloud_aiplatform_v1_HyperparameterTuningJob_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.HyperparameterTuningJob.class, + com.google.cloud.aiplatform.v1.HyperparameterTuningJob.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Output only. Resource name of the HyperparameterTuningJob.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Resource name of the HyperparameterTuningJob.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * Required. The display name of the HyperparameterTuningJob.
+   * The name can be up to 128 characters long and can be consist of any UTF-8
+   * characters.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+   * Required. The display name of the HyperparameterTuningJob.
+   * The name can be up to 128 characters long and can be consist of any UTF-8
+   * characters.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 STUDY_SPEC_FIELD_NUMBER = 4; + private com.google.cloud.aiplatform.v1.StudySpec studySpec_; + /** + * + * + *
+   * Required. Study configuration of the HyperparameterTuningJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec study_spec = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the studySpec field is set. + */ + @java.lang.Override + public boolean hasStudySpec() { + return studySpec_ != null; + } + /** + * + * + *
+   * Required. Study configuration of the HyperparameterTuningJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec study_spec = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The studySpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec getStudySpec() { + return studySpec_ == null + ? com.google.cloud.aiplatform.v1.StudySpec.getDefaultInstance() + : studySpec_; + } + /** + * + * + *
+   * Required. Study configuration of the HyperparameterTuningJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec study_spec = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpecOrBuilder getStudySpecOrBuilder() { + return getStudySpec(); + } + + public static final int MAX_TRIAL_COUNT_FIELD_NUMBER = 5; + private int maxTrialCount_; + /** + * + * + *
+   * Required. The desired total number of Trials.
+   * 
+ * + * int32 max_trial_count = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The maxTrialCount. + */ + @java.lang.Override + public int getMaxTrialCount() { + return maxTrialCount_; + } + + public static final int PARALLEL_TRIAL_COUNT_FIELD_NUMBER = 6; + private int parallelTrialCount_; + /** + * + * + *
+   * Required. The desired number of Trials to run in parallel.
+   * 
+ * + * int32 parallel_trial_count = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parallelTrialCount. + */ + @java.lang.Override + public int getParallelTrialCount() { + return parallelTrialCount_; + } + + public static final int MAX_FAILED_TRIAL_COUNT_FIELD_NUMBER = 7; + private int maxFailedTrialCount_; + /** + * + * + *
+   * The number of failed Trials that need to be seen before failing
+   * the HyperparameterTuningJob.
+   * If set to 0, AI Platform decides how many Trials must fail
+   * before the whole job fails.
+   * 
+ * + * int32 max_failed_trial_count = 7; + * + * @return The maxFailedTrialCount. + */ + @java.lang.Override + public int getMaxFailedTrialCount() { + return maxFailedTrialCount_; + } + + public static final int TRIAL_JOB_SPEC_FIELD_NUMBER = 8; + private com.google.cloud.aiplatform.v1.CustomJobSpec trialJobSpec_; + /** + * + * + *
+   * Required. The spec of a trial job. The same spec applies to the CustomJobs created
+   * in all the trials.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJobSpec trial_job_spec = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the trialJobSpec field is set. + */ + @java.lang.Override + public boolean hasTrialJobSpec() { + return trialJobSpec_ != null; + } + /** + * + * + *
+   * Required. The spec of a trial job. The same spec applies to the CustomJobs created
+   * in all the trials.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJobSpec trial_job_spec = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The trialJobSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.CustomJobSpec getTrialJobSpec() { + return trialJobSpec_ == null + ? com.google.cloud.aiplatform.v1.CustomJobSpec.getDefaultInstance() + : trialJobSpec_; + } + /** + * + * + *
+   * Required. The spec of a trial job. The same spec applies to the CustomJobs created
+   * in all the trials.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJobSpec trial_job_spec = 8 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.CustomJobSpecOrBuilder getTrialJobSpecOrBuilder() { + return getTrialJobSpec(); + } + + public static final int TRIALS_FIELD_NUMBER = 9; + private java.util.List trials_; + /** + * + * + *
+   * Output only. Trials of the HyperparameterTuningJob.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Trial trials = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List getTrialsList() { + return trials_; + } + /** + * + * + *
+   * Output only. Trials of the HyperparameterTuningJob.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Trial trials = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getTrialsOrBuilderList() { + return trials_; + } + /** + * + * + *
+   * Output only. Trials of the HyperparameterTuningJob.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Trial trials = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getTrialsCount() { + return trials_.size(); + } + /** + * + * + *
+   * Output only. Trials of the HyperparameterTuningJob.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Trial trials = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.Trial getTrials(int index) { + return trials_.get(index); + } + /** + * + * + *
+   * Output only. Trials of the HyperparameterTuningJob.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Trial trials = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.TrialOrBuilder getTrialsOrBuilder(int index) { + return trials_.get(index); + } + + public static final int STATE_FIELD_NUMBER = 10; + private int state_; + /** + * + * + *
+   * Output only. The detailed state of the job.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.JobState state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * Output only. The detailed state of the job.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.JobState state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.JobState getState() { + @SuppressWarnings("deprecation") + com.google.cloud.aiplatform.v1.JobState result = + com.google.cloud.aiplatform.v1.JobState.valueOf(state_); + return result == null ? com.google.cloud.aiplatform.v1.JobState.UNRECOGNIZED : result; + } + + public static final int CREATE_TIME_FIELD_NUMBER = 11; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. Time when the HyperparameterTuningJob was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. Time when the HyperparameterTuningJob was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. Time when the HyperparameterTuningJob was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int START_TIME_FIELD_NUMBER = 12; + private com.google.protobuf.Timestamp startTime_; + /** + * + * + *
+   * Output only. Time when the HyperparameterTuningJob for the first time entered the
+   * `JOB_STATE_RUNNING` state.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return startTime_ != null; + } + /** + * + * + *
+   * Output only. Time when the HyperparameterTuningJob for the first time entered the
+   * `JOB_STATE_RUNNING` state.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + /** + * + * + *
+   * Output only. Time when the HyperparameterTuningJob for the first time entered the
+   * `JOB_STATE_RUNNING` state.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return getStartTime(); + } + + public static final int END_TIME_FIELD_NUMBER = 13; + private com.google.protobuf.Timestamp endTime_; + /** + * + * + *
+   * Output only. Time when the HyperparameterTuningJob entered any of the following states:
+   * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + * + * + *
+   * Output only. Time when the HyperparameterTuningJob entered any of the following states:
+   * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + * + * + *
+   * Output only. Time when the HyperparameterTuningJob entered any of the following states:
+   * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return getEndTime(); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 14; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. Time when the HyperparameterTuningJob was most recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. Time when the HyperparameterTuningJob was most recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. Time when the HyperparameterTuningJob was most recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + public static final int ERROR_FIELD_NUMBER = 15; + private com.google.rpc.Status error_; + /** + * + * + *
+   * Output only. Only populated when job's state is JOB_STATE_FAILED or
+   * JOB_STATE_CANCELLED.
+   * 
+ * + * .google.rpc.Status error = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the error field is set. + */ + @java.lang.Override + public boolean hasError() { + return error_ != null; + } + /** + * + * + *
+   * Output only. Only populated when job's state is JOB_STATE_FAILED or
+   * JOB_STATE_CANCELLED.
+   * 
+ * + * .google.rpc.Status error = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The error. + */ + @java.lang.Override + public com.google.rpc.Status getError() { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } + /** + * + * + *
+   * Output only. Only populated when job's state is JOB_STATE_FAILED or
+   * JOB_STATE_CANCELLED.
+   * 
+ * + * .google.rpc.Status error = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + return getError(); + } + + public static final int LABELS_FIELD_NUMBER = 16; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.aiplatform.v1.HyperparameterTuningJobProto + .internal_static_google_cloud_aiplatform_v1_HyperparameterTuningJob_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * The labels with user-defined metadata to organize HyperparameterTuningJobs.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 16; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * The labels with user-defined metadata to organize HyperparameterTuningJobs.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 16; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * The labels with user-defined metadata to organize HyperparameterTuningJobs.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 16; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * The labels with user-defined metadata to organize HyperparameterTuningJobs.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 16; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int ENCRYPTION_SPEC_FIELD_NUMBER = 17; + private com.google.cloud.aiplatform.v1.EncryptionSpec encryptionSpec_; + /** + * + * + *
+   * Customer-managed encryption key options for a HyperparameterTuningJob.
+   * If this is set, then all resources created by the HyperparameterTuningJob
+   * will be encrypted with the provided encryption key.
+   * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 17; + * + * @return Whether the encryptionSpec field is set. + */ + @java.lang.Override + public boolean hasEncryptionSpec() { + return encryptionSpec_ != null; + } + /** + * + * + *
+   * Customer-managed encryption key options for a HyperparameterTuningJob.
+   * If this is set, then all resources created by the HyperparameterTuningJob
+   * will be encrypted with the provided encryption key.
+   * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 17; + * + * @return The encryptionSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.EncryptionSpec getEncryptionSpec() { + return encryptionSpec_ == null + ? com.google.cloud.aiplatform.v1.EncryptionSpec.getDefaultInstance() + : encryptionSpec_; + } + /** + * + * + *
+   * Customer-managed encryption key options for a HyperparameterTuningJob.
+   * If this is set, then all resources created by the HyperparameterTuningJob
+   * will be encrypted with the provided encryption key.
+   * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 17; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.EncryptionSpecOrBuilder getEncryptionSpecOrBuilder() { + return getEncryptionSpec(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + if (studySpec_ != null) { + output.writeMessage(4, getStudySpec()); + } + if (maxTrialCount_ != 0) { + output.writeInt32(5, maxTrialCount_); + } + if (parallelTrialCount_ != 0) { + output.writeInt32(6, parallelTrialCount_); + } + if (maxFailedTrialCount_ != 0) { + output.writeInt32(7, maxFailedTrialCount_); + } + if (trialJobSpec_ != null) { + output.writeMessage(8, getTrialJobSpec()); + } + for (int i = 0; i < trials_.size(); i++) { + output.writeMessage(9, trials_.get(i)); + } + if (state_ != com.google.cloud.aiplatform.v1.JobState.JOB_STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(10, state_); + } + if (createTime_ != null) { + output.writeMessage(11, getCreateTime()); + } + if (startTime_ != null) { + output.writeMessage(12, getStartTime()); + } + if (endTime_ != null) { + output.writeMessage(13, getEndTime()); + } + if (updateTime_ != null) { + output.writeMessage(14, getUpdateTime()); + } + if (error_ != null) { + output.writeMessage(15, getError()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 16); + if (encryptionSpec_ != null) { + output.writeMessage(17, getEncryptionSpec()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + if (studySpec_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getStudySpec()); + } + if (maxTrialCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(5, maxTrialCount_); + } + if (parallelTrialCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(6, parallelTrialCount_); + } + if (maxFailedTrialCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(7, maxFailedTrialCount_); + } + if (trialJobSpec_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getTrialJobSpec()); + } + for (int i = 0; i < trials_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, trials_.get(i)); + } + if (state_ != com.google.cloud.aiplatform.v1.JobState.JOB_STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(10, state_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getCreateTime()); + } + if (startTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getStartTime()); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getEndTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, getUpdateTime()); + } + if (error_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(15, getError()); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(16, labels__); + } + if (encryptionSpec_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(17, getEncryptionSpec()); + } + 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.v1.HyperparameterTuningJob)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.HyperparameterTuningJob other = + (com.google.cloud.aiplatform.v1.HyperparameterTuningJob) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (hasStudySpec() != other.hasStudySpec()) return false; + if (hasStudySpec()) { + if (!getStudySpec().equals(other.getStudySpec())) return false; + } + if (getMaxTrialCount() != other.getMaxTrialCount()) return false; + if (getParallelTrialCount() != other.getParallelTrialCount()) return false; + if (getMaxFailedTrialCount() != other.getMaxFailedTrialCount()) return false; + if (hasTrialJobSpec() != other.hasTrialJobSpec()) return false; + if (hasTrialJobSpec()) { + if (!getTrialJobSpec().equals(other.getTrialJobSpec())) return false; + } + if (!getTrialsList().equals(other.getTrialsList())) return false; + if (state_ != other.state_) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime().equals(other.getStartTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (hasError() != other.hasError()) return false; + if (hasError()) { + if (!getError().equals(other.getError())) return false; + } + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (hasEncryptionSpec() != other.hasEncryptionSpec()) return false; + if (hasEncryptionSpec()) { + if (!getEncryptionSpec().equals(other.getEncryptionSpec())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + if (hasStudySpec()) { + hash = (37 * hash) + STUDY_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getStudySpec().hashCode(); + } + hash = (37 * hash) + MAX_TRIAL_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getMaxTrialCount(); + hash = (37 * hash) + PARALLEL_TRIAL_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getParallelTrialCount(); + hash = (37 * hash) + MAX_FAILED_TRIAL_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getMaxFailedTrialCount(); + if (hasTrialJobSpec()) { + hash = (37 * hash) + TRIAL_JOB_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getTrialJobSpec().hashCode(); + } + if (getTrialsCount() > 0) { + hash = (37 * hash) + TRIALS_FIELD_NUMBER; + hash = (53 * hash) + getTrialsList().hashCode(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (hasError()) { + hash = (37 * hash) + ERROR_FIELD_NUMBER; + hash = (53 * hash) + getError().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + if (hasEncryptionSpec()) { + hash = (37 * hash) + ENCRYPTION_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getEncryptionSpec().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.HyperparameterTuningJob parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.HyperparameterTuningJob 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.v1.HyperparameterTuningJob parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.HyperparameterTuningJob 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.v1.HyperparameterTuningJob parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.HyperparameterTuningJob parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.HyperparameterTuningJob parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.HyperparameterTuningJob 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.v1.HyperparameterTuningJob parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.HyperparameterTuningJob 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.v1.HyperparameterTuningJob parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.HyperparameterTuningJob 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.v1.HyperparameterTuningJob 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 HyperparameterTuningJob. A HyperparameterTuningJob
+   * has a Study specification and multiple CustomJobs with identical
+   * CustomJob specification.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.HyperparameterTuningJob} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.HyperparameterTuningJob) + com.google.cloud.aiplatform.v1.HyperparameterTuningJobOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.HyperparameterTuningJobProto + .internal_static_google_cloud_aiplatform_v1_HyperparameterTuningJob_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 16: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 16: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.HyperparameterTuningJobProto + .internal_static_google_cloud_aiplatform_v1_HyperparameterTuningJob_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.HyperparameterTuningJob.class, + com.google.cloud.aiplatform.v1.HyperparameterTuningJob.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.HyperparameterTuningJob.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getTrialsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + displayName_ = ""; + + if (studySpecBuilder_ == null) { + studySpec_ = null; + } else { + studySpec_ = null; + studySpecBuilder_ = null; + } + maxTrialCount_ = 0; + + parallelTrialCount_ = 0; + + maxFailedTrialCount_ = 0; + + if (trialJobSpecBuilder_ == null) { + trialJobSpec_ = null; + } else { + trialJobSpec_ = null; + trialJobSpecBuilder_ = null; + } + if (trialsBuilder_ == null) { + trials_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + trialsBuilder_.clear(); + } + state_ = 0; + + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (startTimeBuilder_ == null) { + startTime_ = null; + } else { + startTime_ = null; + startTimeBuilder_ = null; + } + if (endTimeBuilder_ == null) { + endTime_ = null; + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + if (errorBuilder_ == null) { + error_ = null; + } else { + error_ = null; + errorBuilder_ = null; + } + internalGetMutableLabels().clear(); + if (encryptionSpecBuilder_ == null) { + encryptionSpec_ = null; + } else { + encryptionSpec_ = null; + encryptionSpecBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.HyperparameterTuningJobProto + .internal_static_google_cloud_aiplatform_v1_HyperparameterTuningJob_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.HyperparameterTuningJob getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.HyperparameterTuningJob.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.HyperparameterTuningJob build() { + com.google.cloud.aiplatform.v1.HyperparameterTuningJob result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.HyperparameterTuningJob buildPartial() { + com.google.cloud.aiplatform.v1.HyperparameterTuningJob result = + new com.google.cloud.aiplatform.v1.HyperparameterTuningJob(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.displayName_ = displayName_; + if (studySpecBuilder_ == null) { + result.studySpec_ = studySpec_; + } else { + result.studySpec_ = studySpecBuilder_.build(); + } + result.maxTrialCount_ = maxTrialCount_; + result.parallelTrialCount_ = parallelTrialCount_; + result.maxFailedTrialCount_ = maxFailedTrialCount_; + if (trialJobSpecBuilder_ == null) { + result.trialJobSpec_ = trialJobSpec_; + } else { + result.trialJobSpec_ = trialJobSpecBuilder_.build(); + } + if (trialsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + trials_ = java.util.Collections.unmodifiableList(trials_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.trials_ = trials_; + } else { + result.trials_ = trialsBuilder_.build(); + } + result.state_ = state_; + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (startTimeBuilder_ == null) { + result.startTime_ = startTime_; + } else { + result.startTime_ = startTimeBuilder_.build(); + } + if (endTimeBuilder_ == null) { + result.endTime_ = endTime_; + } else { + result.endTime_ = endTimeBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + if (errorBuilder_ == null) { + result.error_ = error_; + } else { + result.error_ = errorBuilder_.build(); + } + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + if (encryptionSpecBuilder_ == null) { + result.encryptionSpec_ = encryptionSpec_; + } else { + result.encryptionSpec_ = encryptionSpecBuilder_.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.v1.HyperparameterTuningJob) { + return mergeFrom((com.google.cloud.aiplatform.v1.HyperparameterTuningJob) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.HyperparameterTuningJob other) { + if (other == com.google.cloud.aiplatform.v1.HyperparameterTuningJob.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (other.hasStudySpec()) { + mergeStudySpec(other.getStudySpec()); + } + if (other.getMaxTrialCount() != 0) { + setMaxTrialCount(other.getMaxTrialCount()); + } + if (other.getParallelTrialCount() != 0) { + setParallelTrialCount(other.getParallelTrialCount()); + } + if (other.getMaxFailedTrialCount() != 0) { + setMaxFailedTrialCount(other.getMaxFailedTrialCount()); + } + if (other.hasTrialJobSpec()) { + mergeTrialJobSpec(other.getTrialJobSpec()); + } + if (trialsBuilder_ == null) { + if (!other.trials_.isEmpty()) { + if (trials_.isEmpty()) { + trials_ = other.trials_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTrialsIsMutable(); + trials_.addAll(other.trials_); + } + onChanged(); + } + } else { + if (!other.trials_.isEmpty()) { + if (trialsBuilder_.isEmpty()) { + trialsBuilder_.dispose(); + trialsBuilder_ = null; + trials_ = other.trials_; + bitField0_ = (bitField0_ & ~0x00000001); + trialsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getTrialsFieldBuilder() + : null; + } else { + trialsBuilder_.addAllMessages(other.trials_); + } + } + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.hasError()) { + mergeError(other.getError()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + if (other.hasEncryptionSpec()) { + mergeEncryptionSpec(other.getEncryptionSpec()); + } + 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.v1.HyperparameterTuningJob parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.HyperparameterTuningJob) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. Resource name of the HyperparameterTuningJob.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Resource name of the HyperparameterTuningJob.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Resource name of the HyperparameterTuningJob.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Resource name of the HyperparameterTuningJob.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Resource name of the HyperparameterTuningJob.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Required. The display name of the HyperparameterTuningJob.
+     * The name can be up to 128 characters long and can be consist of any UTF-8
+     * characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+     * Required. The display name of the HyperparameterTuningJob.
+     * The name can be up to 128 characters long and can be consist of any UTF-8
+     * characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+     * Required. The display name of the HyperparameterTuningJob.
+     * The name can be up to 128 characters long and can be consist of any UTF-8
+     * characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + /** + * + * + *
+     * Required. The display name of the HyperparameterTuningJob.
+     * The name can be up to 128 characters long and can be consist of any UTF-8
+     * characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The display name of the HyperparameterTuningJob.
+     * The name can be up to 128 characters long and can be consist of any UTF-8
+     * characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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.cloud.aiplatform.v1.StudySpec studySpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.StudySpec, + com.google.cloud.aiplatform.v1.StudySpec.Builder, + com.google.cloud.aiplatform.v1.StudySpecOrBuilder> + studySpecBuilder_; + /** + * + * + *
+     * Required. Study configuration of the HyperparameterTuningJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec study_spec = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the studySpec field is set. + */ + public boolean hasStudySpec() { + return studySpecBuilder_ != null || studySpec_ != null; + } + /** + * + * + *
+     * Required. Study configuration of the HyperparameterTuningJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec study_spec = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The studySpec. + */ + public com.google.cloud.aiplatform.v1.StudySpec getStudySpec() { + if (studySpecBuilder_ == null) { + return studySpec_ == null + ? com.google.cloud.aiplatform.v1.StudySpec.getDefaultInstance() + : studySpec_; + } else { + return studySpecBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Study configuration of the HyperparameterTuningJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec study_spec = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setStudySpec(com.google.cloud.aiplatform.v1.StudySpec value) { + if (studySpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + studySpec_ = value; + onChanged(); + } else { + studySpecBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. Study configuration of the HyperparameterTuningJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec study_spec = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setStudySpec(com.google.cloud.aiplatform.v1.StudySpec.Builder builderForValue) { + if (studySpecBuilder_ == null) { + studySpec_ = builderForValue.build(); + onChanged(); + } else { + studySpecBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. Study configuration of the HyperparameterTuningJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec study_spec = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeStudySpec(com.google.cloud.aiplatform.v1.StudySpec value) { + if (studySpecBuilder_ == null) { + if (studySpec_ != null) { + studySpec_ = + com.google.cloud.aiplatform.v1.StudySpec.newBuilder(studySpec_) + .mergeFrom(value) + .buildPartial(); + } else { + studySpec_ = value; + } + onChanged(); + } else { + studySpecBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. Study configuration of the HyperparameterTuningJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec study_spec = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearStudySpec() { + if (studySpecBuilder_ == null) { + studySpec_ = null; + onChanged(); + } else { + studySpec_ = null; + studySpecBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. Study configuration of the HyperparameterTuningJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec study_spec = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.StudySpec.Builder getStudySpecBuilder() { + + onChanged(); + return getStudySpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Study configuration of the HyperparameterTuningJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec study_spec = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.StudySpecOrBuilder getStudySpecOrBuilder() { + if (studySpecBuilder_ != null) { + return studySpecBuilder_.getMessageOrBuilder(); + } else { + return studySpec_ == null + ? com.google.cloud.aiplatform.v1.StudySpec.getDefaultInstance() + : studySpec_; + } + } + /** + * + * + *
+     * Required. Study configuration of the HyperparameterTuningJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec study_spec = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.StudySpec, + com.google.cloud.aiplatform.v1.StudySpec.Builder, + com.google.cloud.aiplatform.v1.StudySpecOrBuilder> + getStudySpecFieldBuilder() { + if (studySpecBuilder_ == null) { + studySpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.StudySpec, + com.google.cloud.aiplatform.v1.StudySpec.Builder, + com.google.cloud.aiplatform.v1.StudySpecOrBuilder>( + getStudySpec(), getParentForChildren(), isClean()); + studySpec_ = null; + } + return studySpecBuilder_; + } + + private int maxTrialCount_; + /** + * + * + *
+     * Required. The desired total number of Trials.
+     * 
+ * + * int32 max_trial_count = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The maxTrialCount. + */ + @java.lang.Override + public int getMaxTrialCount() { + return maxTrialCount_; + } + /** + * + * + *
+     * Required. The desired total number of Trials.
+     * 
+ * + * int32 max_trial_count = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The maxTrialCount to set. + * @return This builder for chaining. + */ + public Builder setMaxTrialCount(int value) { + + maxTrialCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The desired total number of Trials.
+     * 
+ * + * int32 max_trial_count = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearMaxTrialCount() { + + maxTrialCount_ = 0; + onChanged(); + return this; + } + + private int parallelTrialCount_; + /** + * + * + *
+     * Required. The desired number of Trials to run in parallel.
+     * 
+ * + * int32 parallel_trial_count = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parallelTrialCount. + */ + @java.lang.Override + public int getParallelTrialCount() { + return parallelTrialCount_; + } + /** + * + * + *
+     * Required. The desired number of Trials to run in parallel.
+     * 
+ * + * int32 parallel_trial_count = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The parallelTrialCount to set. + * @return This builder for chaining. + */ + public Builder setParallelTrialCount(int value) { + + parallelTrialCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The desired number of Trials to run in parallel.
+     * 
+ * + * int32 parallel_trial_count = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearParallelTrialCount() { + + parallelTrialCount_ = 0; + onChanged(); + return this; + } + + private int maxFailedTrialCount_; + /** + * + * + *
+     * The number of failed Trials that need to be seen before failing
+     * the HyperparameterTuningJob.
+     * If set to 0, AI Platform decides how many Trials must fail
+     * before the whole job fails.
+     * 
+ * + * int32 max_failed_trial_count = 7; + * + * @return The maxFailedTrialCount. + */ + @java.lang.Override + public int getMaxFailedTrialCount() { + return maxFailedTrialCount_; + } + /** + * + * + *
+     * The number of failed Trials that need to be seen before failing
+     * the HyperparameterTuningJob.
+     * If set to 0, AI Platform decides how many Trials must fail
+     * before the whole job fails.
+     * 
+ * + * int32 max_failed_trial_count = 7; + * + * @param value The maxFailedTrialCount to set. + * @return This builder for chaining. + */ + public Builder setMaxFailedTrialCount(int value) { + + maxFailedTrialCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The number of failed Trials that need to be seen before failing
+     * the HyperparameterTuningJob.
+     * If set to 0, AI Platform decides how many Trials must fail
+     * before the whole job fails.
+     * 
+ * + * int32 max_failed_trial_count = 7; + * + * @return This builder for chaining. + */ + public Builder clearMaxFailedTrialCount() { + + maxFailedTrialCount_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.aiplatform.v1.CustomJobSpec trialJobSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.CustomJobSpec, + com.google.cloud.aiplatform.v1.CustomJobSpec.Builder, + com.google.cloud.aiplatform.v1.CustomJobSpecOrBuilder> + trialJobSpecBuilder_; + /** + * + * + *
+     * Required. The spec of a trial job. The same spec applies to the CustomJobs created
+     * in all the trials.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJobSpec trial_job_spec = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the trialJobSpec field is set. + */ + public boolean hasTrialJobSpec() { + return trialJobSpecBuilder_ != null || trialJobSpec_ != null; + } + /** + * + * + *
+     * Required. The spec of a trial job. The same spec applies to the CustomJobs created
+     * in all the trials.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJobSpec trial_job_spec = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The trialJobSpec. + */ + public com.google.cloud.aiplatform.v1.CustomJobSpec getTrialJobSpec() { + if (trialJobSpecBuilder_ == null) { + return trialJobSpec_ == null + ? com.google.cloud.aiplatform.v1.CustomJobSpec.getDefaultInstance() + : trialJobSpec_; + } else { + return trialJobSpecBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The spec of a trial job. The same spec applies to the CustomJobs created
+     * in all the trials.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJobSpec trial_job_spec = 8 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTrialJobSpec(com.google.cloud.aiplatform.v1.CustomJobSpec value) { + if (trialJobSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + trialJobSpec_ = value; + onChanged(); + } else { + trialJobSpecBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The spec of a trial job. The same spec applies to the CustomJobs created
+     * in all the trials.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJobSpec trial_job_spec = 8 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTrialJobSpec( + com.google.cloud.aiplatform.v1.CustomJobSpec.Builder builderForValue) { + if (trialJobSpecBuilder_ == null) { + trialJobSpec_ = builderForValue.build(); + onChanged(); + } else { + trialJobSpecBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The spec of a trial job. The same spec applies to the CustomJobs created
+     * in all the trials.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJobSpec trial_job_spec = 8 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeTrialJobSpec(com.google.cloud.aiplatform.v1.CustomJobSpec value) { + if (trialJobSpecBuilder_ == null) { + if (trialJobSpec_ != null) { + trialJobSpec_ = + com.google.cloud.aiplatform.v1.CustomJobSpec.newBuilder(trialJobSpec_) + .mergeFrom(value) + .buildPartial(); + } else { + trialJobSpec_ = value; + } + onChanged(); + } else { + trialJobSpecBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The spec of a trial job. The same spec applies to the CustomJobs created
+     * in all the trials.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJobSpec trial_job_spec = 8 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearTrialJobSpec() { + if (trialJobSpecBuilder_ == null) { + trialJobSpec_ = null; + onChanged(); + } else { + trialJobSpec_ = null; + trialJobSpecBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The spec of a trial job. The same spec applies to the CustomJobs created
+     * in all the trials.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJobSpec trial_job_spec = 8 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.CustomJobSpec.Builder getTrialJobSpecBuilder() { + + onChanged(); + return getTrialJobSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The spec of a trial job. The same spec applies to the CustomJobs created
+     * in all the trials.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJobSpec trial_job_spec = 8 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.CustomJobSpecOrBuilder getTrialJobSpecOrBuilder() { + if (trialJobSpecBuilder_ != null) { + return trialJobSpecBuilder_.getMessageOrBuilder(); + } else { + return trialJobSpec_ == null + ? com.google.cloud.aiplatform.v1.CustomJobSpec.getDefaultInstance() + : trialJobSpec_; + } + } + /** + * + * + *
+     * Required. The spec of a trial job. The same spec applies to the CustomJobs created
+     * in all the trials.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJobSpec trial_job_spec = 8 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.CustomJobSpec, + com.google.cloud.aiplatform.v1.CustomJobSpec.Builder, + com.google.cloud.aiplatform.v1.CustomJobSpecOrBuilder> + getTrialJobSpecFieldBuilder() { + if (trialJobSpecBuilder_ == null) { + trialJobSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.CustomJobSpec, + com.google.cloud.aiplatform.v1.CustomJobSpec.Builder, + com.google.cloud.aiplatform.v1.CustomJobSpecOrBuilder>( + getTrialJobSpec(), getParentForChildren(), isClean()); + trialJobSpec_ = null; + } + return trialJobSpecBuilder_; + } + + private java.util.List trials_ = + java.util.Collections.emptyList(); + + private void ensureTrialsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + trials_ = new java.util.ArrayList(trials_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.Trial, + com.google.cloud.aiplatform.v1.Trial.Builder, + com.google.cloud.aiplatform.v1.TrialOrBuilder> + trialsBuilder_; + + /** + * + * + *
+     * Output only. Trials of the HyperparameterTuningJob.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Trial trials = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List getTrialsList() { + if (trialsBuilder_ == null) { + return java.util.Collections.unmodifiableList(trials_); + } else { + return trialsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Output only. Trials of the HyperparameterTuningJob.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Trial trials = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getTrialsCount() { + if (trialsBuilder_ == null) { + return trials_.size(); + } else { + return trialsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Output only. Trials of the HyperparameterTuningJob.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Trial trials = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.Trial getTrials(int index) { + if (trialsBuilder_ == null) { + return trials_.get(index); + } else { + return trialsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Output only. Trials of the HyperparameterTuningJob.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Trial trials = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setTrials(int index, com.google.cloud.aiplatform.v1.Trial value) { + if (trialsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTrialsIsMutable(); + trials_.set(index, value); + onChanged(); + } else { + trialsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. Trials of the HyperparameterTuningJob.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Trial trials = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setTrials( + int index, com.google.cloud.aiplatform.v1.Trial.Builder builderForValue) { + if (trialsBuilder_ == null) { + ensureTrialsIsMutable(); + trials_.set(index, builderForValue.build()); + onChanged(); + } else { + trialsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Trials of the HyperparameterTuningJob.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Trial trials = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addTrials(com.google.cloud.aiplatform.v1.Trial value) { + if (trialsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTrialsIsMutable(); + trials_.add(value); + onChanged(); + } else { + trialsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Output only. Trials of the HyperparameterTuningJob.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Trial trials = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addTrials(int index, com.google.cloud.aiplatform.v1.Trial value) { + if (trialsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTrialsIsMutable(); + trials_.add(index, value); + onChanged(); + } else { + trialsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. Trials of the HyperparameterTuningJob.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Trial trials = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addTrials(com.google.cloud.aiplatform.v1.Trial.Builder builderForValue) { + if (trialsBuilder_ == null) { + ensureTrialsIsMutable(); + trials_.add(builderForValue.build()); + onChanged(); + } else { + trialsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Trials of the HyperparameterTuningJob.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Trial trials = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addTrials( + int index, com.google.cloud.aiplatform.v1.Trial.Builder builderForValue) { + if (trialsBuilder_ == null) { + ensureTrialsIsMutable(); + trials_.add(index, builderForValue.build()); + onChanged(); + } else { + trialsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Trials of the HyperparameterTuningJob.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Trial trials = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllTrials( + java.lang.Iterable values) { + if (trialsBuilder_ == null) { + ensureTrialsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, trials_); + onChanged(); + } else { + trialsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Output only. Trials of the HyperparameterTuningJob.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Trial trials = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearTrials() { + if (trialsBuilder_ == null) { + trials_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + trialsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. Trials of the HyperparameterTuningJob.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Trial trials = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeTrials(int index) { + if (trialsBuilder_ == null) { + ensureTrialsIsMutable(); + trials_.remove(index); + onChanged(); + } else { + trialsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Output only. Trials of the HyperparameterTuningJob.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Trial trials = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.Trial.Builder getTrialsBuilder(int index) { + return getTrialsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Output only. Trials of the HyperparameterTuningJob.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Trial trials = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.TrialOrBuilder getTrialsOrBuilder(int index) { + if (trialsBuilder_ == null) { + return trials_.get(index); + } else { + return trialsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Output only. Trials of the HyperparameterTuningJob.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Trial trials = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getTrialsOrBuilderList() { + if (trialsBuilder_ != null) { + return trialsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(trials_); + } + } + /** + * + * + *
+     * Output only. Trials of the HyperparameterTuningJob.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Trial trials = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.Trial.Builder addTrialsBuilder() { + return getTrialsFieldBuilder() + .addBuilder(com.google.cloud.aiplatform.v1.Trial.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. Trials of the HyperparameterTuningJob.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Trial trials = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.Trial.Builder addTrialsBuilder(int index) { + return getTrialsFieldBuilder() + .addBuilder(index, com.google.cloud.aiplatform.v1.Trial.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. Trials of the HyperparameterTuningJob.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Trial trials = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List getTrialsBuilderList() { + return getTrialsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.Trial, + com.google.cloud.aiplatform.v1.Trial.Builder, + com.google.cloud.aiplatform.v1.TrialOrBuilder> + getTrialsFieldBuilder() { + if (trialsBuilder_ == null) { + trialsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.Trial, + com.google.cloud.aiplatform.v1.Trial.Builder, + com.google.cloud.aiplatform.v1.TrialOrBuilder>( + trials_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + trials_ = null; + } + return trialsBuilder_; + } + + private int state_ = 0; + /** + * + * + *
+     * Output only. The detailed state of the job.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.JobState state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Output only. The detailed state of the job.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.JobState state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + + state_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The detailed state of the job.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.JobState state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.JobState getState() { + @SuppressWarnings("deprecation") + com.google.cloud.aiplatform.v1.JobState result = + com.google.cloud.aiplatform.v1.JobState.valueOf(state_); + return result == null ? com.google.cloud.aiplatform.v1.JobState.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Output only. The detailed state of the job.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.JobState state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.aiplatform.v1.JobState value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The detailed state of the job.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.JobState state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + + state_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. Time when the HyperparameterTuningJob was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * Output only. Time when the HyperparameterTuningJob was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time when the HyperparameterTuningJob was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the HyperparameterTuningJob was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the HyperparameterTuningJob was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the HyperparameterTuningJob was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the HyperparameterTuningJob was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time when the HyperparameterTuningJob was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. Time when the HyperparameterTuningJob was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + startTimeBuilder_; + /** + * + * + *
+     * Output only. Time when the HyperparameterTuningJob for the first time entered the
+     * `JOB_STATE_RUNNING` state.
+     * 
+ * + * + * .google.protobuf.Timestamp start_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return startTimeBuilder_ != null || startTime_ != null; + } + /** + * + * + *
+     * Output only. Time when the HyperparameterTuningJob for the first time entered the
+     * `JOB_STATE_RUNNING` state.
+     * 
+ * + * + * .google.protobuf.Timestamp start_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time when the HyperparameterTuningJob for the first time entered the
+     * `JOB_STATE_RUNNING` state.
+     * 
+ * + * + * .google.protobuf.Timestamp start_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + onChanged(); + } else { + startTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the HyperparameterTuningJob for the first time entered the
+     * `JOB_STATE_RUNNING` state.
+     * 
+ * + * + * .google.protobuf.Timestamp start_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + onChanged(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the HyperparameterTuningJob for the first time entered the
+     * `JOB_STATE_RUNNING` state.
+     * 
+ * + * + * .google.protobuf.Timestamp start_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (startTime_ != null) { + startTime_ = + com.google.protobuf.Timestamp.newBuilder(startTime_).mergeFrom(value).buildPartial(); + } else { + startTime_ = value; + } + onChanged(); + } else { + startTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the HyperparameterTuningJob for the first time entered the
+     * `JOB_STATE_RUNNING` state.
+     * 
+ * + * + * .google.protobuf.Timestamp start_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearStartTime() { + if (startTimeBuilder_ == null) { + startTime_ = null; + onChanged(); + } else { + startTime_ = null; + startTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the HyperparameterTuningJob for the first time entered the
+     * `JOB_STATE_RUNNING` state.
+     * 
+ * + * + * .google.protobuf.Timestamp start_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + + onChanged(); + return getStartTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time when the HyperparameterTuningJob for the first time entered the
+     * `JOB_STATE_RUNNING` state.
+     * 
+ * + * + * .google.protobuf.Timestamp start_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + } + /** + * + * + *
+     * Output only. Time when the HyperparameterTuningJob for the first time entered the
+     * `JOB_STATE_RUNNING` state.
+     * 
+ * + * + * .google.protobuf.Timestamp start_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getStartTime(), getParentForChildren(), isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + /** + * + * + *
+     * Output only. Time when the HyperparameterTuningJob entered any of the following states:
+     * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return endTimeBuilder_ != null || endTime_ != null; + } + /** + * + * + *
+     * Output only. Time when the HyperparameterTuningJob entered any of the following states:
+     * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time when the HyperparameterTuningJob entered any of the following states:
+     * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + onChanged(); + } else { + endTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the HyperparameterTuningJob entered any of the following states:
+     * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + onChanged(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the HyperparameterTuningJob entered any of the following states:
+     * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (endTime_ != null) { + endTime_ = + com.google.protobuf.Timestamp.newBuilder(endTime_).mergeFrom(value).buildPartial(); + } else { + endTime_ = value; + } + onChanged(); + } else { + endTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the HyperparameterTuningJob entered any of the following states:
+     * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearEndTime() { + if (endTimeBuilder_ == null) { + endTime_ = null; + onChanged(); + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the HyperparameterTuningJob entered any of the following states:
+     * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time when the HyperparameterTuningJob entered any of the following states:
+     * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + * + * + *
+     * Output only. Time when the HyperparameterTuningJob entered any of the following states:
+     * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. Time when the HyperparameterTuningJob was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + * + * + *
+     * Output only. Time when the HyperparameterTuningJob was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time when the HyperparameterTuningJob was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the HyperparameterTuningJob was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the HyperparameterTuningJob was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the HyperparameterTuningJob was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the HyperparameterTuningJob was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time when the HyperparameterTuningJob was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. Time when the HyperparameterTuningJob was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.rpc.Status error_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + errorBuilder_; + /** + * + * + *
+     * Output only. Only populated when job's state is JOB_STATE_FAILED or
+     * JOB_STATE_CANCELLED.
+     * 
+ * + * .google.rpc.Status error = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the error field is set. + */ + public boolean hasError() { + return errorBuilder_ != null || error_ != null; + } + /** + * + * + *
+     * Output only. Only populated when job's state is JOB_STATE_FAILED or
+     * JOB_STATE_CANCELLED.
+     * 
+ * + * .google.rpc.Status error = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The error. + */ + public com.google.rpc.Status getError() { + if (errorBuilder_ == null) { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } else { + return errorBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Only populated when job's state is JOB_STATE_FAILED or
+     * JOB_STATE_CANCELLED.
+     * 
+ * + * .google.rpc.Status error = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + error_ = value; + onChanged(); + } else { + errorBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Only populated when job's state is JOB_STATE_FAILED or
+     * JOB_STATE_CANCELLED.
+     * 
+ * + * .google.rpc.Status error = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setError(com.google.rpc.Status.Builder builderForValue) { + if (errorBuilder_ == null) { + error_ = builderForValue.build(); + onChanged(); + } else { + errorBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Only populated when job's state is JOB_STATE_FAILED or
+     * JOB_STATE_CANCELLED.
+     * 
+ * + * .google.rpc.Status error = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (error_ != null) { + error_ = com.google.rpc.Status.newBuilder(error_).mergeFrom(value).buildPartial(); + } else { + error_ = value; + } + onChanged(); + } else { + errorBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Only populated when job's state is JOB_STATE_FAILED or
+     * JOB_STATE_CANCELLED.
+     * 
+ * + * .google.rpc.Status error = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearError() { + if (errorBuilder_ == null) { + error_ = null; + onChanged(); + } else { + error_ = null; + errorBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Only populated when job's state is JOB_STATE_FAILED or
+     * JOB_STATE_CANCELLED.
+     * 
+ * + * .google.rpc.Status error = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.rpc.Status.Builder getErrorBuilder() { + + onChanged(); + return getErrorFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Only populated when job's state is JOB_STATE_FAILED or
+     * JOB_STATE_CANCELLED.
+     * 
+ * + * .google.rpc.Status error = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + if (errorBuilder_ != null) { + return errorBuilder_.getMessageOrBuilder(); + } else { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } + } + /** + * + * + *
+     * Output only. Only populated when job's state is JOB_STATE_FAILED or
+     * JOB_STATE_CANCELLED.
+     * 
+ * + * .google.rpc.Status error = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getErrorFieldBuilder() { + if (errorBuilder_ == null) { + errorBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, + com.google.rpc.Status.Builder, + com.google.rpc.StatusOrBuilder>(getError(), getParentForChildren(), isClean()); + error_ = null; + } + return errorBuilder_; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + onChanged(); + ; + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * The labels with user-defined metadata to organize HyperparameterTuningJobs.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 16; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * The labels with user-defined metadata to organize HyperparameterTuningJobs.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 16; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * The labels with user-defined metadata to organize HyperparameterTuningJobs.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 16; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * The labels with user-defined metadata to organize HyperparameterTuningJobs.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 16; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * The labels with user-defined metadata to organize HyperparameterTuningJobs.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 16; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * The labels with user-defined metadata to organize HyperparameterTuningJobs.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 16; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * The labels with user-defined metadata to organize HyperparameterTuningJobs.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 16; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + return this; + } + + private com.google.cloud.aiplatform.v1.EncryptionSpec encryptionSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.EncryptionSpec, + com.google.cloud.aiplatform.v1.EncryptionSpec.Builder, + com.google.cloud.aiplatform.v1.EncryptionSpecOrBuilder> + encryptionSpecBuilder_; + /** + * + * + *
+     * Customer-managed encryption key options for a HyperparameterTuningJob.
+     * If this is set, then all resources created by the HyperparameterTuningJob
+     * will be encrypted with the provided encryption key.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 17; + * + * @return Whether the encryptionSpec field is set. + */ + public boolean hasEncryptionSpec() { + return encryptionSpecBuilder_ != null || encryptionSpec_ != null; + } + /** + * + * + *
+     * Customer-managed encryption key options for a HyperparameterTuningJob.
+     * If this is set, then all resources created by the HyperparameterTuningJob
+     * will be encrypted with the provided encryption key.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 17; + * + * @return The encryptionSpec. + */ + public com.google.cloud.aiplatform.v1.EncryptionSpec getEncryptionSpec() { + if (encryptionSpecBuilder_ == null) { + return encryptionSpec_ == null + ? com.google.cloud.aiplatform.v1.EncryptionSpec.getDefaultInstance() + : encryptionSpec_; + } else { + return encryptionSpecBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Customer-managed encryption key options for a HyperparameterTuningJob.
+     * If this is set, then all resources created by the HyperparameterTuningJob
+     * will be encrypted with the provided encryption key.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 17; + */ + public Builder setEncryptionSpec(com.google.cloud.aiplatform.v1.EncryptionSpec value) { + if (encryptionSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + encryptionSpec_ = value; + onChanged(); + } else { + encryptionSpecBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Customer-managed encryption key options for a HyperparameterTuningJob.
+     * If this is set, then all resources created by the HyperparameterTuningJob
+     * will be encrypted with the provided encryption key.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 17; + */ + public Builder setEncryptionSpec( + com.google.cloud.aiplatform.v1.EncryptionSpec.Builder builderForValue) { + if (encryptionSpecBuilder_ == null) { + encryptionSpec_ = builderForValue.build(); + onChanged(); + } else { + encryptionSpecBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Customer-managed encryption key options for a HyperparameterTuningJob.
+     * If this is set, then all resources created by the HyperparameterTuningJob
+     * will be encrypted with the provided encryption key.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 17; + */ + public Builder mergeEncryptionSpec(com.google.cloud.aiplatform.v1.EncryptionSpec value) { + if (encryptionSpecBuilder_ == null) { + if (encryptionSpec_ != null) { + encryptionSpec_ = + com.google.cloud.aiplatform.v1.EncryptionSpec.newBuilder(encryptionSpec_) + .mergeFrom(value) + .buildPartial(); + } else { + encryptionSpec_ = value; + } + onChanged(); + } else { + encryptionSpecBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Customer-managed encryption key options for a HyperparameterTuningJob.
+     * If this is set, then all resources created by the HyperparameterTuningJob
+     * will be encrypted with the provided encryption key.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 17; + */ + public Builder clearEncryptionSpec() { + if (encryptionSpecBuilder_ == null) { + encryptionSpec_ = null; + onChanged(); + } else { + encryptionSpec_ = null; + encryptionSpecBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Customer-managed encryption key options for a HyperparameterTuningJob.
+     * If this is set, then all resources created by the HyperparameterTuningJob
+     * will be encrypted with the provided encryption key.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 17; + */ + public com.google.cloud.aiplatform.v1.EncryptionSpec.Builder getEncryptionSpecBuilder() { + + onChanged(); + return getEncryptionSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Customer-managed encryption key options for a HyperparameterTuningJob.
+     * If this is set, then all resources created by the HyperparameterTuningJob
+     * will be encrypted with the provided encryption key.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 17; + */ + public com.google.cloud.aiplatform.v1.EncryptionSpecOrBuilder getEncryptionSpecOrBuilder() { + if (encryptionSpecBuilder_ != null) { + return encryptionSpecBuilder_.getMessageOrBuilder(); + } else { + return encryptionSpec_ == null + ? com.google.cloud.aiplatform.v1.EncryptionSpec.getDefaultInstance() + : encryptionSpec_; + } + } + /** + * + * + *
+     * Customer-managed encryption key options for a HyperparameterTuningJob.
+     * If this is set, then all resources created by the HyperparameterTuningJob
+     * will be encrypted with the provided encryption key.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 17; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.EncryptionSpec, + com.google.cloud.aiplatform.v1.EncryptionSpec.Builder, + com.google.cloud.aiplatform.v1.EncryptionSpecOrBuilder> + getEncryptionSpecFieldBuilder() { + if (encryptionSpecBuilder_ == null) { + encryptionSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.EncryptionSpec, + com.google.cloud.aiplatform.v1.EncryptionSpec.Builder, + com.google.cloud.aiplatform.v1.EncryptionSpecOrBuilder>( + getEncryptionSpec(), getParentForChildren(), isClean()); + encryptionSpec_ = null; + } + return encryptionSpecBuilder_; + } + + @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.v1.HyperparameterTuningJob) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.HyperparameterTuningJob) + private static final com.google.cloud.aiplatform.v1.HyperparameterTuningJob DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.HyperparameterTuningJob(); + } + + public static com.google.cloud.aiplatform.v1.HyperparameterTuningJob getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public HyperparameterTuningJob parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new HyperparameterTuningJob(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.v1.HyperparameterTuningJob getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/HyperparameterTuningJobName.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/HyperparameterTuningJobName.java new file mode 100644 index 000000000..a3e0f7659 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/HyperparameterTuningJobName.java @@ -0,0 +1,240 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class HyperparameterTuningJobName implements ResourceName { + 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; + } + + public String getLocation() { + return location; + } + + public String getHyperparameterTuningJob() { + return hyperparameterTuningJob; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static HyperparameterTuningJobName of( + String project, String location, String hyperparameterTuningJob) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setHyperparameterTuningJob(hyperparameterTuningJob) + .build(); + } + + public static String format(String project, String location, String hyperparameterTuningJob) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setHyperparameterTuningJob(hyperparameterTuningJob) + .build() + .toString(); + } + + public static HyperparameterTuningJobName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_HYPERPARAMETER_TUNING_JOB.validatedMatch( + formattedString, + "HyperparameterTuningJobName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("hyperparameter_tuning_job")); + } + + 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 (HyperparameterTuningJobName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String 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(); + 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(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_HYPERPARAMETER_TUNING_JOB.instantiate( + "project", + project, + "location", + location, + "hyperparameter_tuning_job", + hyperparameterTuningJob); + } + + @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; + } + + public String getLocation() { + return location; + } + + public String getHyperparameterTuningJob() { + return hyperparameterTuningJob; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setHyperparameterTuningJob(String hyperparameterTuningJob) { + this.hyperparameterTuningJob = hyperparameterTuningJob; + return this; + } + + private Builder(HyperparameterTuningJobName hyperparameterTuningJobName) { + project = hyperparameterTuningJobName.project; + location = hyperparameterTuningJobName.location; + hyperparameterTuningJob = hyperparameterTuningJobName.hyperparameterTuningJob; + } + + public HyperparameterTuningJobName build() { + return new HyperparameterTuningJobName(this); + } + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/HyperparameterTuningJobOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/HyperparameterTuningJobOrBuilder.java new file mode 100644 index 000000000..bd88b07cc --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/HyperparameterTuningJobOrBuilder.java @@ -0,0 +1,607 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/hyperparameter_tuning_job.proto + +package com.google.cloud.aiplatform.v1; + +public interface HyperparameterTuningJobOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.HyperparameterTuningJob) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Resource name of the HyperparameterTuningJob.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. Resource name of the HyperparameterTuningJob.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The display name of the HyperparameterTuningJob.
+   * The name can be up to 128 characters long and can be consist of any UTF-8
+   * characters.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Required. The display name of the HyperparameterTuningJob.
+   * The name can be up to 128 characters long and can be consist of any UTF-8
+   * characters.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Required. Study configuration of the HyperparameterTuningJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec study_spec = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the studySpec field is set. + */ + boolean hasStudySpec(); + /** + * + * + *
+   * Required. Study configuration of the HyperparameterTuningJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec study_spec = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The studySpec. + */ + com.google.cloud.aiplatform.v1.StudySpec getStudySpec(); + /** + * + * + *
+   * Required. Study configuration of the HyperparameterTuningJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec study_spec = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1.StudySpecOrBuilder getStudySpecOrBuilder(); + + /** + * + * + *
+   * Required. The desired total number of Trials.
+   * 
+ * + * int32 max_trial_count = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The maxTrialCount. + */ + int getMaxTrialCount(); + + /** + * + * + *
+   * Required. The desired number of Trials to run in parallel.
+   * 
+ * + * int32 parallel_trial_count = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parallelTrialCount. + */ + int getParallelTrialCount(); + + /** + * + * + *
+   * The number of failed Trials that need to be seen before failing
+   * the HyperparameterTuningJob.
+   * If set to 0, AI Platform decides how many Trials must fail
+   * before the whole job fails.
+   * 
+ * + * int32 max_failed_trial_count = 7; + * + * @return The maxFailedTrialCount. + */ + int getMaxFailedTrialCount(); + + /** + * + * + *
+   * Required. The spec of a trial job. The same spec applies to the CustomJobs created
+   * in all the trials.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJobSpec trial_job_spec = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the trialJobSpec field is set. + */ + boolean hasTrialJobSpec(); + /** + * + * + *
+   * Required. The spec of a trial job. The same spec applies to the CustomJobs created
+   * in all the trials.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJobSpec trial_job_spec = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The trialJobSpec. + */ + com.google.cloud.aiplatform.v1.CustomJobSpec getTrialJobSpec(); + /** + * + * + *
+   * Required. The spec of a trial job. The same spec applies to the CustomJobs created
+   * in all the trials.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJobSpec trial_job_spec = 8 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1.CustomJobSpecOrBuilder getTrialJobSpecOrBuilder(); + + /** + * + * + *
+   * Output only. Trials of the HyperparameterTuningJob.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Trial trials = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getTrialsList(); + /** + * + * + *
+   * Output only. Trials of the HyperparameterTuningJob.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Trial trials = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1.Trial getTrials(int index); + /** + * + * + *
+   * Output only. Trials of the HyperparameterTuningJob.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Trial trials = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getTrialsCount(); + /** + * + * + *
+   * Output only. Trials of the HyperparameterTuningJob.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Trial trials = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getTrialsOrBuilderList(); + /** + * + * + *
+   * Output only. Trials of the HyperparameterTuningJob.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Trial trials = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1.TrialOrBuilder getTrialsOrBuilder(int index); + + /** + * + * + *
+   * Output only. The detailed state of the job.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.JobState state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Output only. The detailed state of the job.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.JobState state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.aiplatform.v1.JobState getState(); + + /** + * + * + *
+   * Output only. Time when the HyperparameterTuningJob was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Time when the HyperparameterTuningJob was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Time when the HyperparameterTuningJob was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Time when the HyperparameterTuningJob for the first time entered the
+   * `JOB_STATE_RUNNING` state.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + /** + * + * + *
+   * Output only. Time when the HyperparameterTuningJob for the first time entered the
+   * `JOB_STATE_RUNNING` state.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + /** + * + * + *
+   * Output only. Time when the HyperparameterTuningJob for the first time entered the
+   * `JOB_STATE_RUNNING` state.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Time when the HyperparameterTuningJob entered any of the following states:
+   * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + * + * + *
+   * Output only. Time when the HyperparameterTuningJob entered any of the following states:
+   * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + * + * + *
+   * Output only. Time when the HyperparameterTuningJob entered any of the following states:
+   * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Time when the HyperparameterTuningJob was most recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. Time when the HyperparameterTuningJob was most recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. Time when the HyperparameterTuningJob was most recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Only populated when job's state is JOB_STATE_FAILED or
+   * JOB_STATE_CANCELLED.
+   * 
+ * + * .google.rpc.Status error = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the error field is set. + */ + boolean hasError(); + /** + * + * + *
+   * Output only. Only populated when job's state is JOB_STATE_FAILED or
+   * JOB_STATE_CANCELLED.
+   * 
+ * + * .google.rpc.Status error = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The error. + */ + com.google.rpc.Status getError(); + /** + * + * + *
+   * Output only. Only populated when job's state is JOB_STATE_FAILED or
+   * JOB_STATE_CANCELLED.
+   * 
+ * + * .google.rpc.Status error = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.rpc.StatusOrBuilder getErrorOrBuilder(); + + /** + * + * + *
+   * The labels with user-defined metadata to organize HyperparameterTuningJobs.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 16; + */ + int getLabelsCount(); + /** + * + * + *
+   * The labels with user-defined metadata to organize HyperparameterTuningJobs.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 16; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * The labels with user-defined metadata to organize HyperparameterTuningJobs.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 16; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * The labels with user-defined metadata to organize HyperparameterTuningJobs.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 16; + */ + java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * The labels with user-defined metadata to organize HyperparameterTuningJobs.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 16; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Customer-managed encryption key options for a HyperparameterTuningJob.
+   * If this is set, then all resources created by the HyperparameterTuningJob
+   * will be encrypted with the provided encryption key.
+   * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 17; + * + * @return Whether the encryptionSpec field is set. + */ + boolean hasEncryptionSpec(); + /** + * + * + *
+   * Customer-managed encryption key options for a HyperparameterTuningJob.
+   * If this is set, then all resources created by the HyperparameterTuningJob
+   * will be encrypted with the provided encryption key.
+   * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 17; + * + * @return The encryptionSpec. + */ + com.google.cloud.aiplatform.v1.EncryptionSpec getEncryptionSpec(); + /** + * + * + *
+   * Customer-managed encryption key options for a HyperparameterTuningJob.
+   * If this is set, then all resources created by the HyperparameterTuningJob
+   * will be encrypted with the provided encryption key.
+   * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 17; + */ + com.google.cloud.aiplatform.v1.EncryptionSpecOrBuilder getEncryptionSpecOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/HyperparameterTuningJobProto.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/HyperparameterTuningJobProto.java new file mode 100644 index 000000000..5074db162 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/HyperparameterTuningJobProto.java @@ -0,0 +1,153 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/hyperparameter_tuning_job.proto + +package com.google.cloud.aiplatform.v1; + +public final class HyperparameterTuningJobProto { + private HyperparameterTuningJobProto() {} + + 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_v1_HyperparameterTuningJob_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_HyperparameterTuningJob_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_HyperparameterTuningJob_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_HyperparameterTuningJob_LabelsEntry_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n:google/cloud/aiplatform/v1/hyperparame" + + "ter_tuning_job.proto\022\032google.cloud.aipla" + + "tform.v1\032\037google/api/field_behavior.prot" + + "o\032\031google/api/resource.proto\032+google/clo" + + "ud/aiplatform/v1/custom_job.proto\0320googl" + + "e/cloud/aiplatform/v1/encryption_spec.pr" + + "oto\032*google/cloud/aiplatform/v1/job_stat" + + "e.proto\032&google/cloud/aiplatform/v1/stud" + + "y.proto\032\037google/protobuf/timestamp.proto" + + "\032\027google/rpc/status.proto\032\034google/api/an" + + "notations.proto\"\373\007\n\027HyperparameterTuning" + + "Job\022\021\n\004name\030\001 \001(\tB\003\340A\003\022\031\n\014display_name\030\002" + + " \001(\tB\003\340A\002\022>\n\nstudy_spec\030\004 \001(\0132%.google.c" + + "loud.aiplatform.v1.StudySpecB\003\340A\002\022\034\n\017max" + + "_trial_count\030\005 \001(\005B\003\340A\002\022!\n\024parallel_tria" + + "l_count\030\006 \001(\005B\003\340A\002\022\036\n\026max_failed_trial_c" + + "ount\030\007 \001(\005\022F\n\016trial_job_spec\030\010 \001(\0132).goo" + + "gle.cloud.aiplatform.v1.CustomJobSpecB\003\340" + + "A\002\0226\n\006trials\030\t \003(\0132!.google.cloud.aiplat" + + "form.v1.TrialB\003\340A\003\0228\n\005state\030\n \001(\0162$.goog" + + "le.cloud.aiplatform.v1.JobStateB\003\340A\003\0224\n\013" + + "create_time\030\013 \001(\0132\032.google.protobuf.Time" + + "stampB\003\340A\003\0223\n\nstart_time\030\014 \001(\0132\032.google." + + "protobuf.TimestampB\003\340A\003\0221\n\010end_time\030\r \001(" + + "\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n\013up" + + "date_time\030\016 \001(\0132\032.google.protobuf.Timest" + + "ampB\003\340A\003\022&\n\005error\030\017 \001(\0132\022.google.rpc.Sta" + + "tusB\003\340A\003\022O\n\006labels\030\020 \003(\0132?.google.cloud." + + "aiplatform.v1.HyperparameterTuningJob.La" + + "belsEntry\022C\n\017encryption_spec\030\021 \001(\0132*.goo" + + "gle.cloud.aiplatform.v1.EncryptionSpec\032-" + + "\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(" + + "\t:\0028\001:\225\001\352A\221\001\n1aiplatform.googleapis.com/" + + "HyperparameterTuningJob\022\\projects/{proje" + + "ct}/locations/{location}/hyperparameterT" + + "uningJobs/{hyperparameter_tuning_job}B\206\001" + + "\n\036com.google.cloud.aiplatform.v1B\034Hyperp" + + "arameterTuningJobProtoP\001ZDgoogle.golang." + + "org/genproto/googleapis/cloud/aiplatform" + + "/v1;aiplatformb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.aiplatform.v1.CustomJobProto.getDescriptor(), + com.google.cloud.aiplatform.v1.EncryptionSpecProto.getDescriptor(), + com.google.cloud.aiplatform.v1.JobStateProto.getDescriptor(), + com.google.cloud.aiplatform.v1.StudyProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.rpc.StatusProto.getDescriptor(), + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1_HyperparameterTuningJob_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_HyperparameterTuningJob_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_HyperparameterTuningJob_descriptor, + new java.lang.String[] { + "Name", + "DisplayName", + "StudySpec", + "MaxTrialCount", + "ParallelTrialCount", + "MaxFailedTrialCount", + "TrialJobSpec", + "Trials", + "State", + "CreateTime", + "StartTime", + "EndTime", + "UpdateTime", + "Error", + "Labels", + "EncryptionSpec", + }); + internal_static_google_cloud_aiplatform_v1_HyperparameterTuningJob_LabelsEntry_descriptor = + internal_static_google_cloud_aiplatform_v1_HyperparameterTuningJob_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_aiplatform_v1_HyperparameterTuningJob_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_HyperparameterTuningJob_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.aiplatform.v1.CustomJobProto.getDescriptor(); + com.google.cloud.aiplatform.v1.EncryptionSpecProto.getDescriptor(); + com.google.cloud.aiplatform.v1.JobStateProto.getDescriptor(); + com.google.cloud.aiplatform.v1.StudyProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.rpc.StatusProto.getDescriptor(); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ImportDataConfig.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ImportDataConfig.java new file mode 100644 index 000000000..e35c48f85 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ImportDataConfig.java @@ -0,0 +1,1473 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/dataset.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Describes the location from where we import data into a Dataset, together
+ * with the labels that will be applied to the DataItems and the Annotations.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ImportDataConfig} + */ +public final class ImportDataConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ImportDataConfig) + ImportDataConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImportDataConfig.newBuilder() to construct. + private ImportDataConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImportDataConfig() { + importSchemaUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ImportDataConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ImportDataConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.aiplatform.v1.GcsSource.Builder subBuilder = null; + if (sourceCase_ == 1) { + subBuilder = ((com.google.cloud.aiplatform.v1.GcsSource) source_).toBuilder(); + } + source_ = + input.readMessage( + com.google.cloud.aiplatform.v1.GcsSource.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.aiplatform.v1.GcsSource) source_); + source_ = subBuilder.buildPartial(); + } + sourceCase_ = 1; + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + dataItemLabels_ = + com.google.protobuf.MapField.newMapField( + DataItemLabelsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry dataItemLabels__ = + input.readMessage( + DataItemLabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + dataItemLabels_ + .getMutableMap() + .put(dataItemLabels__.getKey(), dataItemLabels__.getValue()); + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + importSchemaUri_ = 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.v1.DatasetProto + .internal_static_google_cloud_aiplatform_v1_ImportDataConfig_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 2: + return internalGetDataItemLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.DatasetProto + .internal_static_google_cloud_aiplatform_v1_ImportDataConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ImportDataConfig.class, + com.google.cloud.aiplatform.v1.ImportDataConfig.Builder.class); + } + + private int sourceCase_ = 0; + private java.lang.Object source_; + + public enum SourceCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + GCS_SOURCE(1), + SOURCE_NOT_SET(0); + private final int value; + + private SourceCase(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 SourceCase valueOf(int value) { + return forNumber(value); + } + + public static SourceCase forNumber(int value) { + switch (value) { + case 1: + return GCS_SOURCE; + case 0: + return SOURCE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public SourceCase getSourceCase() { + return SourceCase.forNumber(sourceCase_); + } + + public static final int GCS_SOURCE_FIELD_NUMBER = 1; + /** + * + * + *
+   * The Google Cloud Storage location for the input content.
+   * 
+ * + * .google.cloud.aiplatform.v1.GcsSource gcs_source = 1; + * + * @return Whether the gcsSource field is set. + */ + @java.lang.Override + public boolean hasGcsSource() { + return sourceCase_ == 1; + } + /** + * + * + *
+   * The Google Cloud Storage location for the input content.
+   * 
+ * + * .google.cloud.aiplatform.v1.GcsSource gcs_source = 1; + * + * @return The gcsSource. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GcsSource getGcsSource() { + if (sourceCase_ == 1) { + return (com.google.cloud.aiplatform.v1.GcsSource) source_; + } + return com.google.cloud.aiplatform.v1.GcsSource.getDefaultInstance(); + } + /** + * + * + *
+   * The Google Cloud Storage location for the input content.
+   * 
+ * + * .google.cloud.aiplatform.v1.GcsSource gcs_source = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GcsSourceOrBuilder getGcsSourceOrBuilder() { + if (sourceCase_ == 1) { + return (com.google.cloud.aiplatform.v1.GcsSource) source_; + } + return com.google.cloud.aiplatform.v1.GcsSource.getDefaultInstance(); + } + + public static final int DATA_ITEM_LABELS_FIELD_NUMBER = 2; + + private static final class DataItemLabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.aiplatform.v1.DatasetProto + .internal_static_google_cloud_aiplatform_v1_ImportDataConfig_DataItemLabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField dataItemLabels_; + + private com.google.protobuf.MapField + internalGetDataItemLabels() { + if (dataItemLabels_ == null) { + return com.google.protobuf.MapField.emptyMapField( + DataItemLabelsDefaultEntryHolder.defaultEntry); + } + return dataItemLabels_; + } + + public int getDataItemLabelsCount() { + return internalGetDataItemLabels().getMap().size(); + } + /** + * + * + *
+   * Labels that will be applied to newly imported DataItems. If an identical
+   * DataItem as one being imported already exists in the Dataset, then these
+   * labels will be appended to these of the already existing one, and if labels
+   * with identical key is imported before, the old label value will be
+   * overwritten. If two DataItems are identical in the same import data
+   * operation, the labels will be combined and if key collision happens in this
+   * case, one of the values will be picked randomly. Two DataItems are
+   * considered identical if their content bytes are identical (e.g. image bytes
+   * or pdf bytes).
+   * These labels will be overridden by Annotation labels specified inside index
+   * file referenced by [import_schema_uri][google.cloud.aiplatform.v1.ImportDataConfig.import_schema_uri], e.g. jsonl file.
+   * 
+ * + * map<string, string> data_item_labels = 2; + */ + @java.lang.Override + public boolean containsDataItemLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetDataItemLabels().getMap().containsKey(key); + } + /** Use {@link #getDataItemLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getDataItemLabels() { + return getDataItemLabelsMap(); + } + /** + * + * + *
+   * Labels that will be applied to newly imported DataItems. If an identical
+   * DataItem as one being imported already exists in the Dataset, then these
+   * labels will be appended to these of the already existing one, and if labels
+   * with identical key is imported before, the old label value will be
+   * overwritten. If two DataItems are identical in the same import data
+   * operation, the labels will be combined and if key collision happens in this
+   * case, one of the values will be picked randomly. Two DataItems are
+   * considered identical if their content bytes are identical (e.g. image bytes
+   * or pdf bytes).
+   * These labels will be overridden by Annotation labels specified inside index
+   * file referenced by [import_schema_uri][google.cloud.aiplatform.v1.ImportDataConfig.import_schema_uri], e.g. jsonl file.
+   * 
+ * + * map<string, string> data_item_labels = 2; + */ + @java.lang.Override + public java.util.Map getDataItemLabelsMap() { + return internalGetDataItemLabels().getMap(); + } + /** + * + * + *
+   * Labels that will be applied to newly imported DataItems. If an identical
+   * DataItem as one being imported already exists in the Dataset, then these
+   * labels will be appended to these of the already existing one, and if labels
+   * with identical key is imported before, the old label value will be
+   * overwritten. If two DataItems are identical in the same import data
+   * operation, the labels will be combined and if key collision happens in this
+   * case, one of the values will be picked randomly. Two DataItems are
+   * considered identical if their content bytes are identical (e.g. image bytes
+   * or pdf bytes).
+   * These labels will be overridden by Annotation labels specified inside index
+   * file referenced by [import_schema_uri][google.cloud.aiplatform.v1.ImportDataConfig.import_schema_uri], e.g. jsonl file.
+   * 
+ * + * map<string, string> data_item_labels = 2; + */ + @java.lang.Override + public java.lang.String getDataItemLabelsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetDataItemLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Labels that will be applied to newly imported DataItems. If an identical
+   * DataItem as one being imported already exists in the Dataset, then these
+   * labels will be appended to these of the already existing one, and if labels
+   * with identical key is imported before, the old label value will be
+   * overwritten. If two DataItems are identical in the same import data
+   * operation, the labels will be combined and if key collision happens in this
+   * case, one of the values will be picked randomly. Two DataItems are
+   * considered identical if their content bytes are identical (e.g. image bytes
+   * or pdf bytes).
+   * These labels will be overridden by Annotation labels specified inside index
+   * file referenced by [import_schema_uri][google.cloud.aiplatform.v1.ImportDataConfig.import_schema_uri], e.g. jsonl file.
+   * 
+ * + * map<string, string> data_item_labels = 2; + */ + @java.lang.Override + public java.lang.String getDataItemLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetDataItemLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int IMPORT_SCHEMA_URI_FIELD_NUMBER = 4; + private volatile java.lang.Object importSchemaUri_; + /** + * + * + *
+   * Required. Points to a YAML file stored on Google Cloud Storage describing the import
+   * format. Validation will be done against the schema. The schema is defined
+   * as an [OpenAPI 3.0.2 Schema Object](https://tinyurl.com/y538mdwt).
+   * 
+ * + * string import_schema_uri = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The importSchemaUri. + */ + @java.lang.Override + public java.lang.String getImportSchemaUri() { + java.lang.Object ref = importSchemaUri_; + 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(); + importSchemaUri_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Points to a YAML file stored on Google Cloud Storage describing the import
+   * format. Validation will be done against the schema. The schema is defined
+   * as an [OpenAPI 3.0.2 Schema Object](https://tinyurl.com/y538mdwt).
+   * 
+ * + * string import_schema_uri = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for importSchemaUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getImportSchemaUriBytes() { + java.lang.Object ref = importSchemaUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + importSchemaUri_ = 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 (sourceCase_ == 1) { + output.writeMessage(1, (com.google.cloud.aiplatform.v1.GcsSource) source_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetDataItemLabels(), DataItemLabelsDefaultEntryHolder.defaultEntry, 2); + if (!getImportSchemaUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, importSchemaUri_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (sourceCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.cloud.aiplatform.v1.GcsSource) source_); + } + for (java.util.Map.Entry entry : + internalGetDataItemLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry dataItemLabels__ = + DataItemLabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, dataItemLabels__); + } + if (!getImportSchemaUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, importSchemaUri_); + } + 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.v1.ImportDataConfig)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ImportDataConfig other = + (com.google.cloud.aiplatform.v1.ImportDataConfig) obj; + + if (!internalGetDataItemLabels().equals(other.internalGetDataItemLabels())) return false; + if (!getImportSchemaUri().equals(other.getImportSchemaUri())) return false; + if (!getSourceCase().equals(other.getSourceCase())) return false; + switch (sourceCase_) { + case 1: + if (!getGcsSource().equals(other.getGcsSource())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (!internalGetDataItemLabels().getMap().isEmpty()) { + hash = (37 * hash) + DATA_ITEM_LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetDataItemLabels().hashCode(); + } + hash = (37 * hash) + IMPORT_SCHEMA_URI_FIELD_NUMBER; + hash = (53 * hash) + getImportSchemaUri().hashCode(); + switch (sourceCase_) { + case 1: + hash = (37 * hash) + GCS_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getGcsSource().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.ImportDataConfig parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ImportDataConfig 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.v1.ImportDataConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ImportDataConfig 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.v1.ImportDataConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ImportDataConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ImportDataConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ImportDataConfig 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.v1.ImportDataConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ImportDataConfig 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.v1.ImportDataConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ImportDataConfig 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.v1.ImportDataConfig 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; + } + /** + * + * + *
+   * Describes the location from where we import data into a Dataset, together
+   * with the labels that will be applied to the DataItems and the Annotations.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ImportDataConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ImportDataConfig) + com.google.cloud.aiplatform.v1.ImportDataConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.DatasetProto + .internal_static_google_cloud_aiplatform_v1_ImportDataConfig_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 2: + return internalGetDataItemLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 2: + return internalGetMutableDataItemLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.DatasetProto + .internal_static_google_cloud_aiplatform_v1_ImportDataConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ImportDataConfig.class, + com.google.cloud.aiplatform.v1.ImportDataConfig.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ImportDataConfig.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(); + internalGetMutableDataItemLabels().clear(); + importSchemaUri_ = ""; + + sourceCase_ = 0; + source_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.DatasetProto + .internal_static_google_cloud_aiplatform_v1_ImportDataConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ImportDataConfig getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ImportDataConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ImportDataConfig build() { + com.google.cloud.aiplatform.v1.ImportDataConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ImportDataConfig buildPartial() { + com.google.cloud.aiplatform.v1.ImportDataConfig result = + new com.google.cloud.aiplatform.v1.ImportDataConfig(this); + int from_bitField0_ = bitField0_; + if (sourceCase_ == 1) { + if (gcsSourceBuilder_ == null) { + result.source_ = source_; + } else { + result.source_ = gcsSourceBuilder_.build(); + } + } + result.dataItemLabels_ = internalGetDataItemLabels(); + result.dataItemLabels_.makeImmutable(); + result.importSchemaUri_ = importSchemaUri_; + result.sourceCase_ = sourceCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.ImportDataConfig) { + return mergeFrom((com.google.cloud.aiplatform.v1.ImportDataConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.ImportDataConfig other) { + if (other == com.google.cloud.aiplatform.v1.ImportDataConfig.getDefaultInstance()) + return this; + internalGetMutableDataItemLabels().mergeFrom(other.internalGetDataItemLabels()); + if (!other.getImportSchemaUri().isEmpty()) { + importSchemaUri_ = other.importSchemaUri_; + onChanged(); + } + switch (other.getSourceCase()) { + case GCS_SOURCE: + { + mergeGcsSource(other.getGcsSource()); + break; + } + case SOURCE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.aiplatform.v1.ImportDataConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.aiplatform.v1.ImportDataConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int sourceCase_ = 0; + private java.lang.Object source_; + + public SourceCase getSourceCase() { + return SourceCase.forNumber(sourceCase_); + } + + public Builder clearSource() { + sourceCase_ = 0; + source_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GcsSource, + com.google.cloud.aiplatform.v1.GcsSource.Builder, + com.google.cloud.aiplatform.v1.GcsSourceOrBuilder> + gcsSourceBuilder_; + /** + * + * + *
+     * The Google Cloud Storage location for the input content.
+     * 
+ * + * .google.cloud.aiplatform.v1.GcsSource gcs_source = 1; + * + * @return Whether the gcsSource field is set. + */ + @java.lang.Override + public boolean hasGcsSource() { + return sourceCase_ == 1; + } + /** + * + * + *
+     * The Google Cloud Storage location for the input content.
+     * 
+ * + * .google.cloud.aiplatform.v1.GcsSource gcs_source = 1; + * + * @return The gcsSource. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GcsSource getGcsSource() { + if (gcsSourceBuilder_ == null) { + if (sourceCase_ == 1) { + return (com.google.cloud.aiplatform.v1.GcsSource) source_; + } + return com.google.cloud.aiplatform.v1.GcsSource.getDefaultInstance(); + } else { + if (sourceCase_ == 1) { + return gcsSourceBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1.GcsSource.getDefaultInstance(); + } + } + /** + * + * + *
+     * The Google Cloud Storage location for the input content.
+     * 
+ * + * .google.cloud.aiplatform.v1.GcsSource gcs_source = 1; + */ + public Builder setGcsSource(com.google.cloud.aiplatform.v1.GcsSource value) { + if (gcsSourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + onChanged(); + } else { + gcsSourceBuilder_.setMessage(value); + } + sourceCase_ = 1; + return this; + } + /** + * + * + *
+     * The Google Cloud Storage location for the input content.
+     * 
+ * + * .google.cloud.aiplatform.v1.GcsSource gcs_source = 1; + */ + public Builder setGcsSource(com.google.cloud.aiplatform.v1.GcsSource.Builder builderForValue) { + if (gcsSourceBuilder_ == null) { + source_ = builderForValue.build(); + onChanged(); + } else { + gcsSourceBuilder_.setMessage(builderForValue.build()); + } + sourceCase_ = 1; + return this; + } + /** + * + * + *
+     * The Google Cloud Storage location for the input content.
+     * 
+ * + * .google.cloud.aiplatform.v1.GcsSource gcs_source = 1; + */ + public Builder mergeGcsSource(com.google.cloud.aiplatform.v1.GcsSource value) { + if (gcsSourceBuilder_ == null) { + if (sourceCase_ == 1 + && source_ != com.google.cloud.aiplatform.v1.GcsSource.getDefaultInstance()) { + source_ = + com.google.cloud.aiplatform.v1.GcsSource.newBuilder( + (com.google.cloud.aiplatform.v1.GcsSource) source_) + .mergeFrom(value) + .buildPartial(); + } else { + source_ = value; + } + onChanged(); + } else { + if (sourceCase_ == 1) { + gcsSourceBuilder_.mergeFrom(value); + } + gcsSourceBuilder_.setMessage(value); + } + sourceCase_ = 1; + return this; + } + /** + * + * + *
+     * The Google Cloud Storage location for the input content.
+     * 
+ * + * .google.cloud.aiplatform.v1.GcsSource gcs_source = 1; + */ + public Builder clearGcsSource() { + if (gcsSourceBuilder_ == null) { + if (sourceCase_ == 1) { + sourceCase_ = 0; + source_ = null; + onChanged(); + } + } else { + if (sourceCase_ == 1) { + sourceCase_ = 0; + source_ = null; + } + gcsSourceBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The Google Cloud Storage location for the input content.
+     * 
+ * + * .google.cloud.aiplatform.v1.GcsSource gcs_source = 1; + */ + public com.google.cloud.aiplatform.v1.GcsSource.Builder getGcsSourceBuilder() { + return getGcsSourceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The Google Cloud Storage location for the input content.
+     * 
+ * + * .google.cloud.aiplatform.v1.GcsSource gcs_source = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GcsSourceOrBuilder getGcsSourceOrBuilder() { + if ((sourceCase_ == 1) && (gcsSourceBuilder_ != null)) { + return gcsSourceBuilder_.getMessageOrBuilder(); + } else { + if (sourceCase_ == 1) { + return (com.google.cloud.aiplatform.v1.GcsSource) source_; + } + return com.google.cloud.aiplatform.v1.GcsSource.getDefaultInstance(); + } + } + /** + * + * + *
+     * The Google Cloud Storage location for the input content.
+     * 
+ * + * .google.cloud.aiplatform.v1.GcsSource gcs_source = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GcsSource, + com.google.cloud.aiplatform.v1.GcsSource.Builder, + com.google.cloud.aiplatform.v1.GcsSourceOrBuilder> + getGcsSourceFieldBuilder() { + if (gcsSourceBuilder_ == null) { + if (!(sourceCase_ == 1)) { + source_ = com.google.cloud.aiplatform.v1.GcsSource.getDefaultInstance(); + } + gcsSourceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GcsSource, + com.google.cloud.aiplatform.v1.GcsSource.Builder, + com.google.cloud.aiplatform.v1.GcsSourceOrBuilder>( + (com.google.cloud.aiplatform.v1.GcsSource) source_, + getParentForChildren(), + isClean()); + source_ = null; + } + sourceCase_ = 1; + onChanged(); + ; + return gcsSourceBuilder_; + } + + private com.google.protobuf.MapField dataItemLabels_; + + private com.google.protobuf.MapField + internalGetDataItemLabels() { + if (dataItemLabels_ == null) { + return com.google.protobuf.MapField.emptyMapField( + DataItemLabelsDefaultEntryHolder.defaultEntry); + } + return dataItemLabels_; + } + + private com.google.protobuf.MapField + internalGetMutableDataItemLabels() { + onChanged(); + ; + if (dataItemLabels_ == null) { + dataItemLabels_ = + com.google.protobuf.MapField.newMapField(DataItemLabelsDefaultEntryHolder.defaultEntry); + } + if (!dataItemLabels_.isMutable()) { + dataItemLabels_ = dataItemLabels_.copy(); + } + return dataItemLabels_; + } + + public int getDataItemLabelsCount() { + return internalGetDataItemLabels().getMap().size(); + } + /** + * + * + *
+     * Labels that will be applied to newly imported DataItems. If an identical
+     * DataItem as one being imported already exists in the Dataset, then these
+     * labels will be appended to these of the already existing one, and if labels
+     * with identical key is imported before, the old label value will be
+     * overwritten. If two DataItems are identical in the same import data
+     * operation, the labels will be combined and if key collision happens in this
+     * case, one of the values will be picked randomly. Two DataItems are
+     * considered identical if their content bytes are identical (e.g. image bytes
+     * or pdf bytes).
+     * These labels will be overridden by Annotation labels specified inside index
+     * file referenced by [import_schema_uri][google.cloud.aiplatform.v1.ImportDataConfig.import_schema_uri], e.g. jsonl file.
+     * 
+ * + * map<string, string> data_item_labels = 2; + */ + @java.lang.Override + public boolean containsDataItemLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetDataItemLabels().getMap().containsKey(key); + } + /** Use {@link #getDataItemLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getDataItemLabels() { + return getDataItemLabelsMap(); + } + /** + * + * + *
+     * Labels that will be applied to newly imported DataItems. If an identical
+     * DataItem as one being imported already exists in the Dataset, then these
+     * labels will be appended to these of the already existing one, and if labels
+     * with identical key is imported before, the old label value will be
+     * overwritten. If two DataItems are identical in the same import data
+     * operation, the labels will be combined and if key collision happens in this
+     * case, one of the values will be picked randomly. Two DataItems are
+     * considered identical if their content bytes are identical (e.g. image bytes
+     * or pdf bytes).
+     * These labels will be overridden by Annotation labels specified inside index
+     * file referenced by [import_schema_uri][google.cloud.aiplatform.v1.ImportDataConfig.import_schema_uri], e.g. jsonl file.
+     * 
+ * + * map<string, string> data_item_labels = 2; + */ + @java.lang.Override + public java.util.Map getDataItemLabelsMap() { + return internalGetDataItemLabels().getMap(); + } + /** + * + * + *
+     * Labels that will be applied to newly imported DataItems. If an identical
+     * DataItem as one being imported already exists in the Dataset, then these
+     * labels will be appended to these of the already existing one, and if labels
+     * with identical key is imported before, the old label value will be
+     * overwritten. If two DataItems are identical in the same import data
+     * operation, the labels will be combined and if key collision happens in this
+     * case, one of the values will be picked randomly. Two DataItems are
+     * considered identical if their content bytes are identical (e.g. image bytes
+     * or pdf bytes).
+     * These labels will be overridden by Annotation labels specified inside index
+     * file referenced by [import_schema_uri][google.cloud.aiplatform.v1.ImportDataConfig.import_schema_uri], e.g. jsonl file.
+     * 
+ * + * map<string, string> data_item_labels = 2; + */ + @java.lang.Override + public java.lang.String getDataItemLabelsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetDataItemLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Labels that will be applied to newly imported DataItems. If an identical
+     * DataItem as one being imported already exists in the Dataset, then these
+     * labels will be appended to these of the already existing one, and if labels
+     * with identical key is imported before, the old label value will be
+     * overwritten. If two DataItems are identical in the same import data
+     * operation, the labels will be combined and if key collision happens in this
+     * case, one of the values will be picked randomly. Two DataItems are
+     * considered identical if their content bytes are identical (e.g. image bytes
+     * or pdf bytes).
+     * These labels will be overridden by Annotation labels specified inside index
+     * file referenced by [import_schema_uri][google.cloud.aiplatform.v1.ImportDataConfig.import_schema_uri], e.g. jsonl file.
+     * 
+ * + * map<string, string> data_item_labels = 2; + */ + @java.lang.Override + public java.lang.String getDataItemLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetDataItemLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearDataItemLabels() { + internalGetMutableDataItemLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Labels that will be applied to newly imported DataItems. If an identical
+     * DataItem as one being imported already exists in the Dataset, then these
+     * labels will be appended to these of the already existing one, and if labels
+     * with identical key is imported before, the old label value will be
+     * overwritten. If two DataItems are identical in the same import data
+     * operation, the labels will be combined and if key collision happens in this
+     * case, one of the values will be picked randomly. Two DataItems are
+     * considered identical if their content bytes are identical (e.g. image bytes
+     * or pdf bytes).
+     * These labels will be overridden by Annotation labels specified inside index
+     * file referenced by [import_schema_uri][google.cloud.aiplatform.v1.ImportDataConfig.import_schema_uri], e.g. jsonl file.
+     * 
+ * + * map<string, string> data_item_labels = 2; + */ + public Builder removeDataItemLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableDataItemLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableDataItemLabels() { + return internalGetMutableDataItemLabels().getMutableMap(); + } + /** + * + * + *
+     * Labels that will be applied to newly imported DataItems. If an identical
+     * DataItem as one being imported already exists in the Dataset, then these
+     * labels will be appended to these of the already existing one, and if labels
+     * with identical key is imported before, the old label value will be
+     * overwritten. If two DataItems are identical in the same import data
+     * operation, the labels will be combined and if key collision happens in this
+     * case, one of the values will be picked randomly. Two DataItems are
+     * considered identical if their content bytes are identical (e.g. image bytes
+     * or pdf bytes).
+     * These labels will be overridden by Annotation labels specified inside index
+     * file referenced by [import_schema_uri][google.cloud.aiplatform.v1.ImportDataConfig.import_schema_uri], e.g. jsonl file.
+     * 
+ * + * map<string, string> data_item_labels = 2; + */ + public Builder putDataItemLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableDataItemLabels().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Labels that will be applied to newly imported DataItems. If an identical
+     * DataItem as one being imported already exists in the Dataset, then these
+     * labels will be appended to these of the already existing one, and if labels
+     * with identical key is imported before, the old label value will be
+     * overwritten. If two DataItems are identical in the same import data
+     * operation, the labels will be combined and if key collision happens in this
+     * case, one of the values will be picked randomly. Two DataItems are
+     * considered identical if their content bytes are identical (e.g. image bytes
+     * or pdf bytes).
+     * These labels will be overridden by Annotation labels specified inside index
+     * file referenced by [import_schema_uri][google.cloud.aiplatform.v1.ImportDataConfig.import_schema_uri], e.g. jsonl file.
+     * 
+ * + * map<string, string> data_item_labels = 2; + */ + public Builder putAllDataItemLabels(java.util.Map values) { + internalGetMutableDataItemLabels().getMutableMap().putAll(values); + return this; + } + + private java.lang.Object importSchemaUri_ = ""; + /** + * + * + *
+     * Required. Points to a YAML file stored on Google Cloud Storage describing the import
+     * format. Validation will be done against the schema. The schema is defined
+     * as an [OpenAPI 3.0.2 Schema Object](https://tinyurl.com/y538mdwt).
+     * 
+ * + * string import_schema_uri = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The importSchemaUri. + */ + public java.lang.String getImportSchemaUri() { + java.lang.Object ref = importSchemaUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + importSchemaUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Points to a YAML file stored on Google Cloud Storage describing the import
+     * format. Validation will be done against the schema. The schema is defined
+     * as an [OpenAPI 3.0.2 Schema Object](https://tinyurl.com/y538mdwt).
+     * 
+ * + * string import_schema_uri = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for importSchemaUri. + */ + public com.google.protobuf.ByteString getImportSchemaUriBytes() { + java.lang.Object ref = importSchemaUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + importSchemaUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Points to a YAML file stored on Google Cloud Storage describing the import
+     * format. Validation will be done against the schema. The schema is defined
+     * as an [OpenAPI 3.0.2 Schema Object](https://tinyurl.com/y538mdwt).
+     * 
+ * + * string import_schema_uri = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The importSchemaUri to set. + * @return This builder for chaining. + */ + public Builder setImportSchemaUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + importSchemaUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Points to a YAML file stored on Google Cloud Storage describing the import
+     * format. Validation will be done against the schema. The schema is defined
+     * as an [OpenAPI 3.0.2 Schema Object](https://tinyurl.com/y538mdwt).
+     * 
+ * + * string import_schema_uri = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearImportSchemaUri() { + + importSchemaUri_ = getDefaultInstance().getImportSchemaUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Points to a YAML file stored on Google Cloud Storage describing the import
+     * format. Validation will be done against the schema. The schema is defined
+     * as an [OpenAPI 3.0.2 Schema Object](https://tinyurl.com/y538mdwt).
+     * 
+ * + * string import_schema_uri = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for importSchemaUri to set. + * @return This builder for chaining. + */ + public Builder setImportSchemaUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + importSchemaUri_ = 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.v1.ImportDataConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ImportDataConfig) + private static final com.google.cloud.aiplatform.v1.ImportDataConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ImportDataConfig(); + } + + public static com.google.cloud.aiplatform.v1.ImportDataConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImportDataConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImportDataConfig(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.v1.ImportDataConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ImportDataConfigOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ImportDataConfigOrBuilder.java new file mode 100644 index 000000000..9889b209d --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ImportDataConfigOrBuilder.java @@ -0,0 +1,195 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/dataset.proto + +package com.google.cloud.aiplatform.v1; + +public interface ImportDataConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ImportDataConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The Google Cloud Storage location for the input content.
+   * 
+ * + * .google.cloud.aiplatform.v1.GcsSource gcs_source = 1; + * + * @return Whether the gcsSource field is set. + */ + boolean hasGcsSource(); + /** + * + * + *
+   * The Google Cloud Storage location for the input content.
+   * 
+ * + * .google.cloud.aiplatform.v1.GcsSource gcs_source = 1; + * + * @return The gcsSource. + */ + com.google.cloud.aiplatform.v1.GcsSource getGcsSource(); + /** + * + * + *
+   * The Google Cloud Storage location for the input content.
+   * 
+ * + * .google.cloud.aiplatform.v1.GcsSource gcs_source = 1; + */ + com.google.cloud.aiplatform.v1.GcsSourceOrBuilder getGcsSourceOrBuilder(); + + /** + * + * + *
+   * Labels that will be applied to newly imported DataItems. If an identical
+   * DataItem as one being imported already exists in the Dataset, then these
+   * labels will be appended to these of the already existing one, and if labels
+   * with identical key is imported before, the old label value will be
+   * overwritten. If two DataItems are identical in the same import data
+   * operation, the labels will be combined and if key collision happens in this
+   * case, one of the values will be picked randomly. Two DataItems are
+   * considered identical if their content bytes are identical (e.g. image bytes
+   * or pdf bytes).
+   * These labels will be overridden by Annotation labels specified inside index
+   * file referenced by [import_schema_uri][google.cloud.aiplatform.v1.ImportDataConfig.import_schema_uri], e.g. jsonl file.
+   * 
+ * + * map<string, string> data_item_labels = 2; + */ + int getDataItemLabelsCount(); + /** + * + * + *
+   * Labels that will be applied to newly imported DataItems. If an identical
+   * DataItem as one being imported already exists in the Dataset, then these
+   * labels will be appended to these of the already existing one, and if labels
+   * with identical key is imported before, the old label value will be
+   * overwritten. If two DataItems are identical in the same import data
+   * operation, the labels will be combined and if key collision happens in this
+   * case, one of the values will be picked randomly. Two DataItems are
+   * considered identical if their content bytes are identical (e.g. image bytes
+   * or pdf bytes).
+   * These labels will be overridden by Annotation labels specified inside index
+   * file referenced by [import_schema_uri][google.cloud.aiplatform.v1.ImportDataConfig.import_schema_uri], e.g. jsonl file.
+   * 
+ * + * map<string, string> data_item_labels = 2; + */ + boolean containsDataItemLabels(java.lang.String key); + /** Use {@link #getDataItemLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getDataItemLabels(); + /** + * + * + *
+   * Labels that will be applied to newly imported DataItems. If an identical
+   * DataItem as one being imported already exists in the Dataset, then these
+   * labels will be appended to these of the already existing one, and if labels
+   * with identical key is imported before, the old label value will be
+   * overwritten. If two DataItems are identical in the same import data
+   * operation, the labels will be combined and if key collision happens in this
+   * case, one of the values will be picked randomly. Two DataItems are
+   * considered identical if their content bytes are identical (e.g. image bytes
+   * or pdf bytes).
+   * These labels will be overridden by Annotation labels specified inside index
+   * file referenced by [import_schema_uri][google.cloud.aiplatform.v1.ImportDataConfig.import_schema_uri], e.g. jsonl file.
+   * 
+ * + * map<string, string> data_item_labels = 2; + */ + java.util.Map getDataItemLabelsMap(); + /** + * + * + *
+   * Labels that will be applied to newly imported DataItems. If an identical
+   * DataItem as one being imported already exists in the Dataset, then these
+   * labels will be appended to these of the already existing one, and if labels
+   * with identical key is imported before, the old label value will be
+   * overwritten. If two DataItems are identical in the same import data
+   * operation, the labels will be combined and if key collision happens in this
+   * case, one of the values will be picked randomly. Two DataItems are
+   * considered identical if their content bytes are identical (e.g. image bytes
+   * or pdf bytes).
+   * These labels will be overridden by Annotation labels specified inside index
+   * file referenced by [import_schema_uri][google.cloud.aiplatform.v1.ImportDataConfig.import_schema_uri], e.g. jsonl file.
+   * 
+ * + * map<string, string> data_item_labels = 2; + */ + java.lang.String getDataItemLabelsOrDefault(java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * Labels that will be applied to newly imported DataItems. If an identical
+   * DataItem as one being imported already exists in the Dataset, then these
+   * labels will be appended to these of the already existing one, and if labels
+   * with identical key is imported before, the old label value will be
+   * overwritten. If two DataItems are identical in the same import data
+   * operation, the labels will be combined and if key collision happens in this
+   * case, one of the values will be picked randomly. Two DataItems are
+   * considered identical if their content bytes are identical (e.g. image bytes
+   * or pdf bytes).
+   * These labels will be overridden by Annotation labels specified inside index
+   * file referenced by [import_schema_uri][google.cloud.aiplatform.v1.ImportDataConfig.import_schema_uri], e.g. jsonl file.
+   * 
+ * + * map<string, string> data_item_labels = 2; + */ + java.lang.String getDataItemLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Required. Points to a YAML file stored on Google Cloud Storage describing the import
+   * format. Validation will be done against the schema. The schema is defined
+   * as an [OpenAPI 3.0.2 Schema Object](https://tinyurl.com/y538mdwt).
+   * 
+ * + * string import_schema_uri = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The importSchemaUri. + */ + java.lang.String getImportSchemaUri(); + /** + * + * + *
+   * Required. Points to a YAML file stored on Google Cloud Storage describing the import
+   * format. Validation will be done against the schema. The schema is defined
+   * as an [OpenAPI 3.0.2 Schema Object](https://tinyurl.com/y538mdwt).
+   * 
+ * + * string import_schema_uri = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for importSchemaUri. + */ + com.google.protobuf.ByteString getImportSchemaUriBytes(); + + public com.google.cloud.aiplatform.v1.ImportDataConfig.SourceCase getSourceCase(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ImportDataOperationMetadata.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ImportDataOperationMetadata.java new file mode 100644 index 000000000..0e1327432 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ImportDataOperationMetadata.java @@ -0,0 +1,741 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/dataset_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Runtime operation information for [DatasetService.ImportData][google.cloud.aiplatform.v1.DatasetService.ImportData].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ImportDataOperationMetadata} + */ +public final class ImportDataOperationMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ImportDataOperationMetadata) + ImportDataOperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImportDataOperationMetadata.newBuilder() to construct. + private ImportDataOperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImportDataOperationMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ImportDataOperationMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ImportDataOperationMetadata( + 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.v1.GenericOperationMetadata.Builder subBuilder = null; + if (genericMetadata_ != null) { + subBuilder = genericMetadata_.toBuilder(); + } + genericMetadata_ = + input.readMessage( + com.google.cloud.aiplatform.v1.GenericOperationMetadata.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(genericMetadata_); + genericMetadata_ = 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.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_ImportDataOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_ImportDataOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ImportDataOperationMetadata.class, + com.google.cloud.aiplatform.v1.ImportDataOperationMetadata.Builder.class); + } + + public static final int GENERIC_METADATA_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1.GenericOperationMetadata genericMetadata_; + /** + * + * + *
+   * The common part of the operation metadata.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + @java.lang.Override + public boolean hasGenericMetadata() { + return genericMetadata_ != null; + } + /** + * + * + *
+   * The common part of the operation metadata.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata() { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + /** + * + * + *
+   * The common part of the operation metadata.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder() { + return getGenericMetadata(); + } + + 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 (genericMetadata_ != null) { + output.writeMessage(1, getGenericMetadata()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (genericMetadata_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getGenericMetadata()); + } + 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.v1.ImportDataOperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ImportDataOperationMetadata other = + (com.google.cloud.aiplatform.v1.ImportDataOperationMetadata) obj; + + if (hasGenericMetadata() != other.hasGenericMetadata()) return false; + if (hasGenericMetadata()) { + if (!getGenericMetadata().equals(other.getGenericMetadata())) 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 (hasGenericMetadata()) { + hash = (37 * hash) + GENERIC_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getGenericMetadata().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.ImportDataOperationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ImportDataOperationMetadata 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.v1.ImportDataOperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ImportDataOperationMetadata 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.v1.ImportDataOperationMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ImportDataOperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ImportDataOperationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ImportDataOperationMetadata 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.v1.ImportDataOperationMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ImportDataOperationMetadata 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.v1.ImportDataOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ImportDataOperationMetadata 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.v1.ImportDataOperationMetadata 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; + } + /** + * + * + *
+   * Runtime operation information for [DatasetService.ImportData][google.cloud.aiplatform.v1.DatasetService.ImportData].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ImportDataOperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ImportDataOperationMetadata) + com.google.cloud.aiplatform.v1.ImportDataOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_ImportDataOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_ImportDataOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ImportDataOperationMetadata.class, + com.google.cloud.aiplatform.v1.ImportDataOperationMetadata.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ImportDataOperationMetadata.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 (genericMetadataBuilder_ == null) { + genericMetadata_ = null; + } else { + genericMetadata_ = null; + genericMetadataBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_ImportDataOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ImportDataOperationMetadata getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ImportDataOperationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ImportDataOperationMetadata build() { + com.google.cloud.aiplatform.v1.ImportDataOperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ImportDataOperationMetadata buildPartial() { + com.google.cloud.aiplatform.v1.ImportDataOperationMetadata result = + new com.google.cloud.aiplatform.v1.ImportDataOperationMetadata(this); + if (genericMetadataBuilder_ == null) { + result.genericMetadata_ = genericMetadata_; + } else { + result.genericMetadata_ = genericMetadataBuilder_.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.v1.ImportDataOperationMetadata) { + return mergeFrom((com.google.cloud.aiplatform.v1.ImportDataOperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.ImportDataOperationMetadata other) { + if (other == com.google.cloud.aiplatform.v1.ImportDataOperationMetadata.getDefaultInstance()) + return this; + if (other.hasGenericMetadata()) { + mergeGenericMetadata(other.getGenericMetadata()); + } + 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.v1.ImportDataOperationMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.ImportDataOperationMetadata) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.aiplatform.v1.GenericOperationMetadata genericMetadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder> + genericMetadataBuilder_; + /** + * + * + *
+     * The common part of the operation metadata.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + public boolean hasGenericMetadata() { + return genericMetadataBuilder_ != null || genericMetadata_ != null; + } + /** + * + * + *
+     * The common part of the operation metadata.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata() { + if (genericMetadataBuilder_ == null) { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } else { + return genericMetadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The common part of the operation metadata.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder setGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata value) { + if (genericMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + genericMetadata_ = value; + onChanged(); + } else { + genericMetadataBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The common part of the operation metadata.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder setGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder builderForValue) { + if (genericMetadataBuilder_ == null) { + genericMetadata_ = builderForValue.build(); + onChanged(); + } else { + genericMetadataBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The common part of the operation metadata.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder mergeGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata value) { + if (genericMetadataBuilder_ == null) { + if (genericMetadata_ != null) { + genericMetadata_ = + com.google.cloud.aiplatform.v1.GenericOperationMetadata.newBuilder(genericMetadata_) + .mergeFrom(value) + .buildPartial(); + } else { + genericMetadata_ = value; + } + onChanged(); + } else { + genericMetadataBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The common part of the operation metadata.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder clearGenericMetadata() { + if (genericMetadataBuilder_ == null) { + genericMetadata_ = null; + onChanged(); + } else { + genericMetadata_ = null; + genericMetadataBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The common part of the operation metadata.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder + getGenericMetadataBuilder() { + + onChanged(); + return getGenericMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The common part of the operation metadata.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder() { + if (genericMetadataBuilder_ != null) { + return genericMetadataBuilder_.getMessageOrBuilder(); + } else { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + } + /** + * + * + *
+     * The common part of the operation metadata.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder> + getGenericMetadataFieldBuilder() { + if (genericMetadataBuilder_ == null) { + genericMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder>( + getGenericMetadata(), getParentForChildren(), isClean()); + genericMetadata_ = null; + } + return genericMetadataBuilder_; + } + + @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.v1.ImportDataOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ImportDataOperationMetadata) + private static final com.google.cloud.aiplatform.v1.ImportDataOperationMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ImportDataOperationMetadata(); + } + + public static com.google.cloud.aiplatform.v1.ImportDataOperationMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImportDataOperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImportDataOperationMetadata(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.v1.ImportDataOperationMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ImportDataOperationMetadataOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ImportDataOperationMetadataOrBuilder.java new file mode 100644 index 000000000..3c1e346d9 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ImportDataOperationMetadataOrBuilder.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/v1/dataset_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface ImportDataOperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ImportDataOperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The common part of the operation metadata.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + boolean hasGenericMetadata(); + /** + * + * + *
+   * The common part of the operation metadata.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata(); + /** + * + * + *
+   * The common part of the operation metadata.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder getGenericMetadataOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ImportDataRequest.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ImportDataRequest.java new file mode 100644 index 000000000..4da97aed3 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ImportDataRequest.java @@ -0,0 +1,1237 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/dataset_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for [DatasetService.ImportData][google.cloud.aiplatform.v1.DatasetService.ImportData].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ImportDataRequest} + */ +public final class ImportDataRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ImportDataRequest) + ImportDataRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImportDataRequest.newBuilder() to construct. + private ImportDataRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImportDataRequest() { + name_ = ""; + importConfigs_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ImportDataRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ImportDataRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + importConfigs_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + importConfigs_.add( + input.readMessage( + com.google.cloud.aiplatform.v1.ImportDataConfig.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)) { + importConfigs_ = java.util.Collections.unmodifiableList(importConfigs_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_ImportDataRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_ImportDataRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ImportDataRequest.class, + com.google.cloud.aiplatform.v1.ImportDataRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the Dataset resource.
+   * Format:
+   * `projects/{project}/locations/{location}/datasets/{dataset}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the Dataset resource.
+   * Format:
+   * `projects/{project}/locations/{location}/datasets/{dataset}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IMPORT_CONFIGS_FIELD_NUMBER = 2; + private java.util.List importConfigs_; + /** + * + * + *
+   * Required. The desired input locations. The contents of all input locations will be
+   * imported in one batch.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ImportDataConfig import_configs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List getImportConfigsList() { + return importConfigs_; + } + /** + * + * + *
+   * Required. The desired input locations. The contents of all input locations will be
+   * imported in one batch.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ImportDataConfig import_configs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getImportConfigsOrBuilderList() { + return importConfigs_; + } + /** + * + * + *
+   * Required. The desired input locations. The contents of all input locations will be
+   * imported in one batch.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ImportDataConfig import_configs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getImportConfigsCount() { + return importConfigs_.size(); + } + /** + * + * + *
+   * Required. The desired input locations. The contents of all input locations will be
+   * imported in one batch.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ImportDataConfig import_configs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ImportDataConfig getImportConfigs(int index) { + return importConfigs_.get(index); + } + /** + * + * + *
+   * Required. The desired input locations. The contents of all input locations will be
+   * imported in one batch.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ImportDataConfig import_configs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ImportDataConfigOrBuilder getImportConfigsOrBuilder( + int index) { + return importConfigs_.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 (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + for (int i = 0; i < importConfigs_.size(); i++) { + output.writeMessage(2, importConfigs_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + for (int i = 0; i < importConfigs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, importConfigs_.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.v1.ImportDataRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ImportDataRequest other = + (com.google.cloud.aiplatform.v1.ImportDataRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getImportConfigsList().equals(other.getImportConfigsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (getImportConfigsCount() > 0) { + hash = (37 * hash) + IMPORT_CONFIGS_FIELD_NUMBER; + hash = (53 * hash) + getImportConfigsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.ImportDataRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ImportDataRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ImportDataRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ImportDataRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ImportDataRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ImportDataRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ImportDataRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ImportDataRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ImportDataRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ImportDataRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ImportDataRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ImportDataRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1.ImportDataRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [DatasetService.ImportData][google.cloud.aiplatform.v1.DatasetService.ImportData].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ImportDataRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ImportDataRequest) + com.google.cloud.aiplatform.v1.ImportDataRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_ImportDataRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_ImportDataRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ImportDataRequest.class, + com.google.cloud.aiplatform.v1.ImportDataRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ImportDataRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getImportConfigsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + if (importConfigsBuilder_ == null) { + importConfigs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + importConfigsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_ImportDataRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ImportDataRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ImportDataRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ImportDataRequest build() { + com.google.cloud.aiplatform.v1.ImportDataRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ImportDataRequest buildPartial() { + com.google.cloud.aiplatform.v1.ImportDataRequest result = + new com.google.cloud.aiplatform.v1.ImportDataRequest(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + if (importConfigsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + importConfigs_ = java.util.Collections.unmodifiableList(importConfigs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.importConfigs_ = importConfigs_; + } else { + result.importConfigs_ = importConfigsBuilder_.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.v1.ImportDataRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.ImportDataRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.ImportDataRequest other) { + if (other == com.google.cloud.aiplatform.v1.ImportDataRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (importConfigsBuilder_ == null) { + if (!other.importConfigs_.isEmpty()) { + if (importConfigs_.isEmpty()) { + importConfigs_ = other.importConfigs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureImportConfigsIsMutable(); + importConfigs_.addAll(other.importConfigs_); + } + onChanged(); + } + } else { + if (!other.importConfigs_.isEmpty()) { + if (importConfigsBuilder_.isEmpty()) { + importConfigsBuilder_.dispose(); + importConfigsBuilder_ = null; + importConfigs_ = other.importConfigs_; + bitField0_ = (bitField0_ & ~0x00000001); + importConfigsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getImportConfigsFieldBuilder() + : null; + } else { + importConfigsBuilder_.addAllMessages(other.importConfigs_); + } + } + } + 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.v1.ImportDataRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.aiplatform.v1.ImportDataRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the Dataset resource.
+     * Format:
+     * `projects/{project}/locations/{location}/datasets/{dataset}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the Dataset resource.
+     * Format:
+     * `projects/{project}/locations/{location}/datasets/{dataset}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the Dataset resource.
+     * Format:
+     * `projects/{project}/locations/{location}/datasets/{dataset}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the Dataset resource.
+     * Format:
+     * `projects/{project}/locations/{location}/datasets/{dataset}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the Dataset resource.
+     * Format:
+     * `projects/{project}/locations/{location}/datasets/{dataset}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.util.List importConfigs_ = + java.util.Collections.emptyList(); + + private void ensureImportConfigsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + importConfigs_ = + new java.util.ArrayList( + importConfigs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.ImportDataConfig, + com.google.cloud.aiplatform.v1.ImportDataConfig.Builder, + com.google.cloud.aiplatform.v1.ImportDataConfigOrBuilder> + importConfigsBuilder_; + + /** + * + * + *
+     * Required. The desired input locations. The contents of all input locations will be
+     * imported in one batch.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ImportDataConfig import_configs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List getImportConfigsList() { + if (importConfigsBuilder_ == null) { + return java.util.Collections.unmodifiableList(importConfigs_); + } else { + return importConfigsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Required. The desired input locations. The contents of all input locations will be
+     * imported in one batch.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ImportDataConfig import_configs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getImportConfigsCount() { + if (importConfigsBuilder_ == null) { + return importConfigs_.size(); + } else { + return importConfigsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Required. The desired input locations. The contents of all input locations will be
+     * imported in one batch.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ImportDataConfig import_configs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.ImportDataConfig getImportConfigs(int index) { + if (importConfigsBuilder_ == null) { + return importConfigs_.get(index); + } else { + return importConfigsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Required. The desired input locations. The contents of all input locations will be
+     * imported in one batch.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ImportDataConfig import_configs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setImportConfigs( + int index, com.google.cloud.aiplatform.v1.ImportDataConfig value) { + if (importConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureImportConfigsIsMutable(); + importConfigs_.set(index, value); + onChanged(); + } else { + importConfigsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. The desired input locations. The contents of all input locations will be
+     * imported in one batch.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ImportDataConfig import_configs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setImportConfigs( + int index, com.google.cloud.aiplatform.v1.ImportDataConfig.Builder builderForValue) { + if (importConfigsBuilder_ == null) { + ensureImportConfigsIsMutable(); + importConfigs_.set(index, builderForValue.build()); + onChanged(); + } else { + importConfigsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The desired input locations. The contents of all input locations will be
+     * imported in one batch.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ImportDataConfig import_configs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addImportConfigs(com.google.cloud.aiplatform.v1.ImportDataConfig value) { + if (importConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureImportConfigsIsMutable(); + importConfigs_.add(value); + onChanged(); + } else { + importConfigsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Required. The desired input locations. The contents of all input locations will be
+     * imported in one batch.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ImportDataConfig import_configs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addImportConfigs( + int index, com.google.cloud.aiplatform.v1.ImportDataConfig value) { + if (importConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureImportConfigsIsMutable(); + importConfigs_.add(index, value); + onChanged(); + } else { + importConfigsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. The desired input locations. The contents of all input locations will be
+     * imported in one batch.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ImportDataConfig import_configs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addImportConfigs( + com.google.cloud.aiplatform.v1.ImportDataConfig.Builder builderForValue) { + if (importConfigsBuilder_ == null) { + ensureImportConfigsIsMutable(); + importConfigs_.add(builderForValue.build()); + onChanged(); + } else { + importConfigsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The desired input locations. The contents of all input locations will be
+     * imported in one batch.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ImportDataConfig import_configs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addImportConfigs( + int index, com.google.cloud.aiplatform.v1.ImportDataConfig.Builder builderForValue) { + if (importConfigsBuilder_ == null) { + ensureImportConfigsIsMutable(); + importConfigs_.add(index, builderForValue.build()); + onChanged(); + } else { + importConfigsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The desired input locations. The contents of all input locations will be
+     * imported in one batch.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ImportDataConfig import_configs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllImportConfigs( + java.lang.Iterable values) { + if (importConfigsBuilder_ == null) { + ensureImportConfigsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, importConfigs_); + onChanged(); + } else { + importConfigsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Required. The desired input locations. The contents of all input locations will be
+     * imported in one batch.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ImportDataConfig import_configs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearImportConfigs() { + if (importConfigsBuilder_ == null) { + importConfigs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + importConfigsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Required. The desired input locations. The contents of all input locations will be
+     * imported in one batch.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ImportDataConfig import_configs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeImportConfigs(int index) { + if (importConfigsBuilder_ == null) { + ensureImportConfigsIsMutable(); + importConfigs_.remove(index); + onChanged(); + } else { + importConfigsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Required. The desired input locations. The contents of all input locations will be
+     * imported in one batch.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ImportDataConfig import_configs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.ImportDataConfig.Builder getImportConfigsBuilder( + int index) { + return getImportConfigsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Required. The desired input locations. The contents of all input locations will be
+     * imported in one batch.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ImportDataConfig import_configs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.ImportDataConfigOrBuilder getImportConfigsOrBuilder( + int index) { + if (importConfigsBuilder_ == null) { + return importConfigs_.get(index); + } else { + return importConfigsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Required. The desired input locations. The contents of all input locations will be
+     * imported in one batch.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ImportDataConfig import_configs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getImportConfigsOrBuilderList() { + if (importConfigsBuilder_ != null) { + return importConfigsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(importConfigs_); + } + } + /** + * + * + *
+     * Required. The desired input locations. The contents of all input locations will be
+     * imported in one batch.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ImportDataConfig import_configs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.ImportDataConfig.Builder addImportConfigsBuilder() { + return getImportConfigsFieldBuilder() + .addBuilder(com.google.cloud.aiplatform.v1.ImportDataConfig.getDefaultInstance()); + } + /** + * + * + *
+     * Required. The desired input locations. The contents of all input locations will be
+     * imported in one batch.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ImportDataConfig import_configs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.ImportDataConfig.Builder addImportConfigsBuilder( + int index) { + return getImportConfigsFieldBuilder() + .addBuilder(index, com.google.cloud.aiplatform.v1.ImportDataConfig.getDefaultInstance()); + } + /** + * + * + *
+     * Required. The desired input locations. The contents of all input locations will be
+     * imported in one batch.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ImportDataConfig import_configs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getImportConfigsBuilderList() { + return getImportConfigsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.ImportDataConfig, + com.google.cloud.aiplatform.v1.ImportDataConfig.Builder, + com.google.cloud.aiplatform.v1.ImportDataConfigOrBuilder> + getImportConfigsFieldBuilder() { + if (importConfigsBuilder_ == null) { + importConfigsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.ImportDataConfig, + com.google.cloud.aiplatform.v1.ImportDataConfig.Builder, + com.google.cloud.aiplatform.v1.ImportDataConfigOrBuilder>( + importConfigs_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + importConfigs_ = null; + } + return importConfigsBuilder_; + } + + @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.v1.ImportDataRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ImportDataRequest) + private static final com.google.cloud.aiplatform.v1.ImportDataRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ImportDataRequest(); + } + + public static com.google.cloud.aiplatform.v1.ImportDataRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImportDataRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImportDataRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ImportDataRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ImportDataRequestOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ImportDataRequestOrBuilder.java new file mode 100644 index 000000000..e2cf39325 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ImportDataRequestOrBuilder.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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/dataset_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface ImportDataRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ImportDataRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the Dataset resource.
+   * Format:
+   * `projects/{project}/locations/{location}/datasets/{dataset}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the Dataset resource.
+   * Format:
+   * `projects/{project}/locations/{location}/datasets/{dataset}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The desired input locations. The contents of all input locations will be
+   * imported in one batch.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ImportDataConfig import_configs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List getImportConfigsList(); + /** + * + * + *
+   * Required. The desired input locations. The contents of all input locations will be
+   * imported in one batch.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ImportDataConfig import_configs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1.ImportDataConfig getImportConfigs(int index); + /** + * + * + *
+   * Required. The desired input locations. The contents of all input locations will be
+   * imported in one batch.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ImportDataConfig import_configs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getImportConfigsCount(); + /** + * + * + *
+   * Required. The desired input locations. The contents of all input locations will be
+   * imported in one batch.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ImportDataConfig import_configs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getImportConfigsOrBuilderList(); + /** + * + * + *
+   * Required. The desired input locations. The contents of all input locations will be
+   * imported in one batch.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ImportDataConfig import_configs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1.ImportDataConfigOrBuilder getImportConfigsOrBuilder(int index); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ImportDataResponse.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ImportDataResponse.java new file mode 100644 index 000000000..cc2317b5d --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ImportDataResponse.java @@ -0,0 +1,456 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/dataset_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Response message for [DatasetService.ImportData][google.cloud.aiplatform.v1.DatasetService.ImportData].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ImportDataResponse} + */ +public final class ImportDataResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ImportDataResponse) + ImportDataResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImportDataResponse.newBuilder() to construct. + private ImportDataResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImportDataResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ImportDataResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ImportDataResponse( + 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.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_ImportDataResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_ImportDataResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ImportDataResponse.class, + com.google.cloud.aiplatform.v1.ImportDataResponse.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.v1.ImportDataResponse)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ImportDataResponse other = + (com.google.cloud.aiplatform.v1.ImportDataResponse) 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.v1.ImportDataResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ImportDataResponse 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.v1.ImportDataResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ImportDataResponse 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.v1.ImportDataResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ImportDataResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ImportDataResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ImportDataResponse 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.v1.ImportDataResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ImportDataResponse 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.v1.ImportDataResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ImportDataResponse 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.v1.ImportDataResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for [DatasetService.ImportData][google.cloud.aiplatform.v1.DatasetService.ImportData].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ImportDataResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ImportDataResponse) + com.google.cloud.aiplatform.v1.ImportDataResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_ImportDataResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_ImportDataResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ImportDataResponse.class, + com.google.cloud.aiplatform.v1.ImportDataResponse.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ImportDataResponse.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.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_ImportDataResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ImportDataResponse getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ImportDataResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ImportDataResponse build() { + com.google.cloud.aiplatform.v1.ImportDataResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ImportDataResponse buildPartial() { + com.google.cloud.aiplatform.v1.ImportDataResponse result = + new com.google.cloud.aiplatform.v1.ImportDataResponse(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.v1.ImportDataResponse) { + return mergeFrom((com.google.cloud.aiplatform.v1.ImportDataResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.ImportDataResponse other) { + if (other == com.google.cloud.aiplatform.v1.ImportDataResponse.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.v1.ImportDataResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.ImportDataResponse) 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.v1.ImportDataResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ImportDataResponse) + private static final com.google.cloud.aiplatform.v1.ImportDataResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ImportDataResponse(); + } + + public static com.google.cloud.aiplatform.v1.ImportDataResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImportDataResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImportDataResponse(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.v1.ImportDataResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ImportDataResponseOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ImportDataResponseOrBuilder.java new file mode 100644 index 000000000..06cd43280 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ImportDataResponseOrBuilder.java @@ -0,0 +1,24 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/dataset_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface ImportDataResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ImportDataResponse) + com.google.protobuf.MessageOrBuilder {} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/InputDataConfig.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/InputDataConfig.java new file mode 100644 index 000000000..5b0809265 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/InputDataConfig.java @@ -0,0 +1,3561 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/training_pipeline.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Specifies AI Platform owned input data to be used for training, and
+ * possibly evaluating, the Model.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.InputDataConfig} + */ +public final class InputDataConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.InputDataConfig) + InputDataConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use InputDataConfig.newBuilder() to construct. + private InputDataConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private InputDataConfig() { + datasetId_ = ""; + annotationsFilter_ = ""; + annotationSchemaUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new InputDataConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private InputDataConfig( + 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(); + + datasetId_ = s; + break; + } + case 18: + { + com.google.cloud.aiplatform.v1.FractionSplit.Builder subBuilder = null; + if (splitCase_ == 2) { + subBuilder = ((com.google.cloud.aiplatform.v1.FractionSplit) split_).toBuilder(); + } + split_ = + input.readMessage( + com.google.cloud.aiplatform.v1.FractionSplit.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.aiplatform.v1.FractionSplit) split_); + split_ = subBuilder.buildPartial(); + } + splitCase_ = 2; + break; + } + case 26: + { + com.google.cloud.aiplatform.v1.FilterSplit.Builder subBuilder = null; + if (splitCase_ == 3) { + subBuilder = ((com.google.cloud.aiplatform.v1.FilterSplit) split_).toBuilder(); + } + split_ = + input.readMessage( + com.google.cloud.aiplatform.v1.FilterSplit.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.aiplatform.v1.FilterSplit) split_); + split_ = subBuilder.buildPartial(); + } + splitCase_ = 3; + break; + } + case 34: + { + com.google.cloud.aiplatform.v1.PredefinedSplit.Builder subBuilder = null; + if (splitCase_ == 4) { + subBuilder = ((com.google.cloud.aiplatform.v1.PredefinedSplit) split_).toBuilder(); + } + split_ = + input.readMessage( + com.google.cloud.aiplatform.v1.PredefinedSplit.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.aiplatform.v1.PredefinedSplit) split_); + split_ = subBuilder.buildPartial(); + } + splitCase_ = 4; + break; + } + case 42: + { + com.google.cloud.aiplatform.v1.TimestampSplit.Builder subBuilder = null; + if (splitCase_ == 5) { + subBuilder = ((com.google.cloud.aiplatform.v1.TimestampSplit) split_).toBuilder(); + } + split_ = + input.readMessage( + com.google.cloud.aiplatform.v1.TimestampSplit.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.aiplatform.v1.TimestampSplit) split_); + split_ = subBuilder.buildPartial(); + } + splitCase_ = 5; + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + annotationsFilter_ = s; + break; + } + case 66: + { + com.google.cloud.aiplatform.v1.GcsDestination.Builder subBuilder = null; + if (destinationCase_ == 8) { + subBuilder = + ((com.google.cloud.aiplatform.v1.GcsDestination) destination_).toBuilder(); + } + destination_ = + input.readMessage( + com.google.cloud.aiplatform.v1.GcsDestination.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.aiplatform.v1.GcsDestination) destination_); + destination_ = subBuilder.buildPartial(); + } + destinationCase_ = 8; + break; + } + case 74: + { + java.lang.String s = input.readStringRequireUtf8(); + + annotationSchemaUri_ = s; + break; + } + case 82: + { + com.google.cloud.aiplatform.v1.BigQueryDestination.Builder subBuilder = null; + if (destinationCase_ == 10) { + subBuilder = + ((com.google.cloud.aiplatform.v1.BigQueryDestination) destination_).toBuilder(); + } + destination_ = + input.readMessage( + com.google.cloud.aiplatform.v1.BigQueryDestination.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.aiplatform.v1.BigQueryDestination) destination_); + destination_ = subBuilder.buildPartial(); + } + destinationCase_ = 10; + 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.v1.TrainingPipelineProto + .internal_static_google_cloud_aiplatform_v1_InputDataConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.TrainingPipelineProto + .internal_static_google_cloud_aiplatform_v1_InputDataConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.InputDataConfig.class, + com.google.cloud.aiplatform.v1.InputDataConfig.Builder.class); + } + + private int splitCase_ = 0; + private java.lang.Object split_; + + public enum SplitCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + FRACTION_SPLIT(2), + FILTER_SPLIT(3), + PREDEFINED_SPLIT(4), + TIMESTAMP_SPLIT(5), + SPLIT_NOT_SET(0); + private final int value; + + private SplitCase(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 SplitCase valueOf(int value) { + return forNumber(value); + } + + public static SplitCase forNumber(int value) { + switch (value) { + case 2: + return FRACTION_SPLIT; + case 3: + return FILTER_SPLIT; + case 4: + return PREDEFINED_SPLIT; + case 5: + return TIMESTAMP_SPLIT; + case 0: + return SPLIT_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public SplitCase getSplitCase() { + return SplitCase.forNumber(splitCase_); + } + + private int destinationCase_ = 0; + private java.lang.Object destination_; + + public enum DestinationCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + GCS_DESTINATION(8), + BIGQUERY_DESTINATION(10), + DESTINATION_NOT_SET(0); + private final int value; + + private DestinationCase(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 DestinationCase valueOf(int value) { + return forNumber(value); + } + + public static DestinationCase forNumber(int value) { + switch (value) { + case 8: + return GCS_DESTINATION; + case 10: + return BIGQUERY_DESTINATION; + case 0: + return DESTINATION_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public DestinationCase getDestinationCase() { + return DestinationCase.forNumber(destinationCase_); + } + + public static final int FRACTION_SPLIT_FIELD_NUMBER = 2; + /** + * + * + *
+   * Split based on fractions defining the size of each set.
+   * 
+ * + * .google.cloud.aiplatform.v1.FractionSplit fraction_split = 2; + * + * @return Whether the fractionSplit field is set. + */ + @java.lang.Override + public boolean hasFractionSplit() { + return splitCase_ == 2; + } + /** + * + * + *
+   * Split based on fractions defining the size of each set.
+   * 
+ * + * .google.cloud.aiplatform.v1.FractionSplit fraction_split = 2; + * + * @return The fractionSplit. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.FractionSplit getFractionSplit() { + if (splitCase_ == 2) { + return (com.google.cloud.aiplatform.v1.FractionSplit) split_; + } + return com.google.cloud.aiplatform.v1.FractionSplit.getDefaultInstance(); + } + /** + * + * + *
+   * Split based on fractions defining the size of each set.
+   * 
+ * + * .google.cloud.aiplatform.v1.FractionSplit fraction_split = 2; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.FractionSplitOrBuilder getFractionSplitOrBuilder() { + if (splitCase_ == 2) { + return (com.google.cloud.aiplatform.v1.FractionSplit) split_; + } + return com.google.cloud.aiplatform.v1.FractionSplit.getDefaultInstance(); + } + + public static final int FILTER_SPLIT_FIELD_NUMBER = 3; + /** + * + * + *
+   * Split based on the provided filters for each set.
+   * 
+ * + * .google.cloud.aiplatform.v1.FilterSplit filter_split = 3; + * + * @return Whether the filterSplit field is set. + */ + @java.lang.Override + public boolean hasFilterSplit() { + return splitCase_ == 3; + } + /** + * + * + *
+   * Split based on the provided filters for each set.
+   * 
+ * + * .google.cloud.aiplatform.v1.FilterSplit filter_split = 3; + * + * @return The filterSplit. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.FilterSplit getFilterSplit() { + if (splitCase_ == 3) { + return (com.google.cloud.aiplatform.v1.FilterSplit) split_; + } + return com.google.cloud.aiplatform.v1.FilterSplit.getDefaultInstance(); + } + /** + * + * + *
+   * Split based on the provided filters for each set.
+   * 
+ * + * .google.cloud.aiplatform.v1.FilterSplit filter_split = 3; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.FilterSplitOrBuilder getFilterSplitOrBuilder() { + if (splitCase_ == 3) { + return (com.google.cloud.aiplatform.v1.FilterSplit) split_; + } + return com.google.cloud.aiplatform.v1.FilterSplit.getDefaultInstance(); + } + + public static final int PREDEFINED_SPLIT_FIELD_NUMBER = 4; + /** + * + * + *
+   * Supported only for tabular Datasets.
+   * Split based on a predefined key.
+   * 
+ * + * .google.cloud.aiplatform.v1.PredefinedSplit predefined_split = 4; + * + * @return Whether the predefinedSplit field is set. + */ + @java.lang.Override + public boolean hasPredefinedSplit() { + return splitCase_ == 4; + } + /** + * + * + *
+   * Supported only for tabular Datasets.
+   * Split based on a predefined key.
+   * 
+ * + * .google.cloud.aiplatform.v1.PredefinedSplit predefined_split = 4; + * + * @return The predefinedSplit. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.PredefinedSplit getPredefinedSplit() { + if (splitCase_ == 4) { + return (com.google.cloud.aiplatform.v1.PredefinedSplit) split_; + } + return com.google.cloud.aiplatform.v1.PredefinedSplit.getDefaultInstance(); + } + /** + * + * + *
+   * Supported only for tabular Datasets.
+   * Split based on a predefined key.
+   * 
+ * + * .google.cloud.aiplatform.v1.PredefinedSplit predefined_split = 4; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.PredefinedSplitOrBuilder getPredefinedSplitOrBuilder() { + if (splitCase_ == 4) { + return (com.google.cloud.aiplatform.v1.PredefinedSplit) split_; + } + return com.google.cloud.aiplatform.v1.PredefinedSplit.getDefaultInstance(); + } + + public static final int TIMESTAMP_SPLIT_FIELD_NUMBER = 5; + /** + * + * + *
+   * Supported only for tabular Datasets.
+   * Split based on the timestamp of the input data pieces.
+   * 
+ * + * .google.cloud.aiplatform.v1.TimestampSplit timestamp_split = 5; + * + * @return Whether the timestampSplit field is set. + */ + @java.lang.Override + public boolean hasTimestampSplit() { + return splitCase_ == 5; + } + /** + * + * + *
+   * Supported only for tabular Datasets.
+   * Split based on the timestamp of the input data pieces.
+   * 
+ * + * .google.cloud.aiplatform.v1.TimestampSplit timestamp_split = 5; + * + * @return The timestampSplit. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.TimestampSplit getTimestampSplit() { + if (splitCase_ == 5) { + return (com.google.cloud.aiplatform.v1.TimestampSplit) split_; + } + return com.google.cloud.aiplatform.v1.TimestampSplit.getDefaultInstance(); + } + /** + * + * + *
+   * Supported only for tabular Datasets.
+   * Split based on the timestamp of the input data pieces.
+   * 
+ * + * .google.cloud.aiplatform.v1.TimestampSplit timestamp_split = 5; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.TimestampSplitOrBuilder getTimestampSplitOrBuilder() { + if (splitCase_ == 5) { + return (com.google.cloud.aiplatform.v1.TimestampSplit) split_; + } + return com.google.cloud.aiplatform.v1.TimestampSplit.getDefaultInstance(); + } + + public static final int GCS_DESTINATION_FIELD_NUMBER = 8; + /** + * + * + *
+   * The Cloud Storage location where the training data is to be
+   * written to. In the given directory a new directory is created with
+   * name:
+   * `dataset-<dataset-id>-<annotation-type>-<timestamp-of-training-call>`
+   * where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format.
+   * All training input data is written into that directory.
+   * The AI Platform environment variables representing Cloud Storage
+   * data URIs are represented in the Cloud Storage wildcard
+   * format to support sharded data. e.g.: "gs://.../training-*.jsonl"
+   * * AIP_DATA_FORMAT = "jsonl" for non-tabular data, "csv" for tabular data
+   * * AIP_TRAINING_DATA_URI =
+   * "gcs_destination/dataset-<dataset-id>-<annotation-type>-<time>/training-*.${AIP_DATA_FORMAT}"
+   * * AIP_VALIDATION_DATA_URI =
+   * "gcs_destination/dataset-<dataset-id>-<annotation-type>-<time>/validation-*.${AIP_DATA_FORMAT}"
+   * * AIP_TEST_DATA_URI =
+   * "gcs_destination/dataset-<dataset-id>-<annotation-type>-<time>/test-*.${AIP_DATA_FORMAT}"
+   * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination gcs_destination = 8; + * + * @return Whether the gcsDestination field is set. + */ + @java.lang.Override + public boolean hasGcsDestination() { + return destinationCase_ == 8; + } + /** + * + * + *
+   * The Cloud Storage location where the training data is to be
+   * written to. In the given directory a new directory is created with
+   * name:
+   * `dataset-<dataset-id>-<annotation-type>-<timestamp-of-training-call>`
+   * where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format.
+   * All training input data is written into that directory.
+   * The AI Platform environment variables representing Cloud Storage
+   * data URIs are represented in the Cloud Storage wildcard
+   * format to support sharded data. e.g.: "gs://.../training-*.jsonl"
+   * * AIP_DATA_FORMAT = "jsonl" for non-tabular data, "csv" for tabular data
+   * * AIP_TRAINING_DATA_URI =
+   * "gcs_destination/dataset-<dataset-id>-<annotation-type>-<time>/training-*.${AIP_DATA_FORMAT}"
+   * * AIP_VALIDATION_DATA_URI =
+   * "gcs_destination/dataset-<dataset-id>-<annotation-type>-<time>/validation-*.${AIP_DATA_FORMAT}"
+   * * AIP_TEST_DATA_URI =
+   * "gcs_destination/dataset-<dataset-id>-<annotation-type>-<time>/test-*.${AIP_DATA_FORMAT}"
+   * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination gcs_destination = 8; + * + * @return The gcsDestination. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GcsDestination getGcsDestination() { + if (destinationCase_ == 8) { + return (com.google.cloud.aiplatform.v1.GcsDestination) destination_; + } + return com.google.cloud.aiplatform.v1.GcsDestination.getDefaultInstance(); + } + /** + * + * + *
+   * The Cloud Storage location where the training data is to be
+   * written to. In the given directory a new directory is created with
+   * name:
+   * `dataset-<dataset-id>-<annotation-type>-<timestamp-of-training-call>`
+   * where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format.
+   * All training input data is written into that directory.
+   * The AI Platform environment variables representing Cloud Storage
+   * data URIs are represented in the Cloud Storage wildcard
+   * format to support sharded data. e.g.: "gs://.../training-*.jsonl"
+   * * AIP_DATA_FORMAT = "jsonl" for non-tabular data, "csv" for tabular data
+   * * AIP_TRAINING_DATA_URI =
+   * "gcs_destination/dataset-<dataset-id>-<annotation-type>-<time>/training-*.${AIP_DATA_FORMAT}"
+   * * AIP_VALIDATION_DATA_URI =
+   * "gcs_destination/dataset-<dataset-id>-<annotation-type>-<time>/validation-*.${AIP_DATA_FORMAT}"
+   * * AIP_TEST_DATA_URI =
+   * "gcs_destination/dataset-<dataset-id>-<annotation-type>-<time>/test-*.${AIP_DATA_FORMAT}"
+   * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination gcs_destination = 8; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GcsDestinationOrBuilder getGcsDestinationOrBuilder() { + if (destinationCase_ == 8) { + return (com.google.cloud.aiplatform.v1.GcsDestination) destination_; + } + return com.google.cloud.aiplatform.v1.GcsDestination.getDefaultInstance(); + } + + public static final int BIGQUERY_DESTINATION_FIELD_NUMBER = 10; + /** + * + * + *
+   * Only applicable to custom training with tabular Dataset with BigQuery
+   * source.
+   * The BigQuery project location where the training data is to be written
+   * to. In the given project a new dataset is created with name
+   * `dataset_<dataset-id>_<annotation-type>_<timestamp-of-training-call>`
+   * where timestamp is in YYYY_MM_DDThh_mm_ss_sssZ format. All training
+   * input data is written into that dataset. In the dataset three
+   * tables are created, `training`, `validation` and `test`.
+   * * AIP_DATA_FORMAT = "bigquery".
+   * * AIP_TRAINING_DATA_URI  =
+   * "bigquery_destination.dataset_<dataset-id>_<annotation-type>_<time>.training"
+   * * AIP_VALIDATION_DATA_URI =
+   * "bigquery_destination.dataset_<dataset-id>_<annotation-type>_<time>.validation"
+   * * AIP_TEST_DATA_URI =
+   * "bigquery_destination.dataset_<dataset-id>_<annotation-type>_<time>.test"
+   * 
+ * + * .google.cloud.aiplatform.v1.BigQueryDestination bigquery_destination = 10; + * + * @return Whether the bigqueryDestination field is set. + */ + @java.lang.Override + public boolean hasBigqueryDestination() { + return destinationCase_ == 10; + } + /** + * + * + *
+   * Only applicable to custom training with tabular Dataset with BigQuery
+   * source.
+   * The BigQuery project location where the training data is to be written
+   * to. In the given project a new dataset is created with name
+   * `dataset_<dataset-id>_<annotation-type>_<timestamp-of-training-call>`
+   * where timestamp is in YYYY_MM_DDThh_mm_ss_sssZ format. All training
+   * input data is written into that dataset. In the dataset three
+   * tables are created, `training`, `validation` and `test`.
+   * * AIP_DATA_FORMAT = "bigquery".
+   * * AIP_TRAINING_DATA_URI  =
+   * "bigquery_destination.dataset_<dataset-id>_<annotation-type>_<time>.training"
+   * * AIP_VALIDATION_DATA_URI =
+   * "bigquery_destination.dataset_<dataset-id>_<annotation-type>_<time>.validation"
+   * * AIP_TEST_DATA_URI =
+   * "bigquery_destination.dataset_<dataset-id>_<annotation-type>_<time>.test"
+   * 
+ * + * .google.cloud.aiplatform.v1.BigQueryDestination bigquery_destination = 10; + * + * @return The bigqueryDestination. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.BigQueryDestination getBigqueryDestination() { + if (destinationCase_ == 10) { + return (com.google.cloud.aiplatform.v1.BigQueryDestination) destination_; + } + return com.google.cloud.aiplatform.v1.BigQueryDestination.getDefaultInstance(); + } + /** + * + * + *
+   * Only applicable to custom training with tabular Dataset with BigQuery
+   * source.
+   * The BigQuery project location where the training data is to be written
+   * to. In the given project a new dataset is created with name
+   * `dataset_<dataset-id>_<annotation-type>_<timestamp-of-training-call>`
+   * where timestamp is in YYYY_MM_DDThh_mm_ss_sssZ format. All training
+   * input data is written into that dataset. In the dataset three
+   * tables are created, `training`, `validation` and `test`.
+   * * AIP_DATA_FORMAT = "bigquery".
+   * * AIP_TRAINING_DATA_URI  =
+   * "bigquery_destination.dataset_<dataset-id>_<annotation-type>_<time>.training"
+   * * AIP_VALIDATION_DATA_URI =
+   * "bigquery_destination.dataset_<dataset-id>_<annotation-type>_<time>.validation"
+   * * AIP_TEST_DATA_URI =
+   * "bigquery_destination.dataset_<dataset-id>_<annotation-type>_<time>.test"
+   * 
+ * + * .google.cloud.aiplatform.v1.BigQueryDestination bigquery_destination = 10; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.BigQueryDestinationOrBuilder + getBigqueryDestinationOrBuilder() { + if (destinationCase_ == 10) { + return (com.google.cloud.aiplatform.v1.BigQueryDestination) destination_; + } + return com.google.cloud.aiplatform.v1.BigQueryDestination.getDefaultInstance(); + } + + public static final int DATASET_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object datasetId_; + /** + * + * + *
+   * Required. The ID of the Dataset in the same Project and Location which data will be
+   * used to train the Model. The Dataset must use schema compatible with
+   * Model being trained, and what is compatible should be described in the
+   * used TrainingPipeline's [training_task_definition]
+   * [google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition].
+   * For tabular Datasets, all their data is exported to training, to pick
+   * and choose from.
+   * 
+ * + * string dataset_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The datasetId. + */ + @java.lang.Override + public java.lang.String getDatasetId() { + java.lang.Object ref = datasetId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + datasetId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The ID of the Dataset in the same Project and Location which data will be
+   * used to train the Model. The Dataset must use schema compatible with
+   * Model being trained, and what is compatible should be described in the
+   * used TrainingPipeline's [training_task_definition]
+   * [google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition].
+   * For tabular Datasets, all their data is exported to training, to pick
+   * and choose from.
+   * 
+ * + * string dataset_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for datasetId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDatasetIdBytes() { + java.lang.Object ref = datasetId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + datasetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ANNOTATIONS_FILTER_FIELD_NUMBER = 6; + private volatile java.lang.Object annotationsFilter_; + /** + * + * + *
+   * Applicable only to Datasets that have DataItems and Annotations.
+   * A filter on Annotations of the Dataset. Only Annotations that both
+   * match this filter and belong to DataItems not ignored by the split method
+   * are used in respectively training, validation or test role, depending on
+   * the role of the DataItem they are on (for the auto-assigned that role is
+   * decided by AI Platform). A filter with same syntax as the one used in
+   * [ListAnnotations][google.cloud.aiplatform.v1.DatasetService.ListAnnotations] may be used, but note
+   * here it filters across all Annotations of the Dataset, and not just within
+   * a single DataItem.
+   * 
+ * + * string annotations_filter = 6; + * + * @return The annotationsFilter. + */ + @java.lang.Override + public java.lang.String getAnnotationsFilter() { + java.lang.Object ref = annotationsFilter_; + 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(); + annotationsFilter_ = s; + return s; + } + } + /** + * + * + *
+   * Applicable only to Datasets that have DataItems and Annotations.
+   * A filter on Annotations of the Dataset. Only Annotations that both
+   * match this filter and belong to DataItems not ignored by the split method
+   * are used in respectively training, validation or test role, depending on
+   * the role of the DataItem they are on (for the auto-assigned that role is
+   * decided by AI Platform). A filter with same syntax as the one used in
+   * [ListAnnotations][google.cloud.aiplatform.v1.DatasetService.ListAnnotations] may be used, but note
+   * here it filters across all Annotations of the Dataset, and not just within
+   * a single DataItem.
+   * 
+ * + * string annotations_filter = 6; + * + * @return The bytes for annotationsFilter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAnnotationsFilterBytes() { + java.lang.Object ref = annotationsFilter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + annotationsFilter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ANNOTATION_SCHEMA_URI_FIELD_NUMBER = 9; + private volatile java.lang.Object annotationSchemaUri_; + /** + * + * + *
+   * Applicable only to custom training with Datasets that have DataItems and
+   * Annotations.
+   * Cloud Storage URI that points to a YAML file describing the annotation
+   * schema. The schema is defined as an OpenAPI 3.0.2
+   * [Schema Object](https://tinyurl.com/y538mdwt#schema-object).
+   * The schema files that can be used here are found in
+   * gs://google-cloud-aiplatform/schema/dataset/annotation/ , note that the
+   * chosen schema must be consistent with
+   * [metadata][google.cloud.aiplatform.v1.Dataset.metadata_schema_uri] of the Dataset specified by
+   * [dataset_id][google.cloud.aiplatform.v1.InputDataConfig.dataset_id].
+   * Only Annotations that both match this schema and belong to DataItems not
+   * ignored by the split method are used in respectively training, validation
+   * or test role, depending on the role of the DataItem they are on.
+   * When used in conjunction with [annotations_filter][google.cloud.aiplatform.v1.InputDataConfig.annotations_filter], the Annotations used
+   * for training are filtered by both [annotations_filter][google.cloud.aiplatform.v1.InputDataConfig.annotations_filter] and
+   * [annotation_schema_uri][google.cloud.aiplatform.v1.InputDataConfig.annotation_schema_uri].
+   * 
+ * + * string annotation_schema_uri = 9; + * + * @return The annotationSchemaUri. + */ + @java.lang.Override + public java.lang.String getAnnotationSchemaUri() { + java.lang.Object ref = annotationSchemaUri_; + 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(); + annotationSchemaUri_ = s; + return s; + } + } + /** + * + * + *
+   * Applicable only to custom training with Datasets that have DataItems and
+   * Annotations.
+   * Cloud Storage URI that points to a YAML file describing the annotation
+   * schema. The schema is defined as an OpenAPI 3.0.2
+   * [Schema Object](https://tinyurl.com/y538mdwt#schema-object).
+   * The schema files that can be used here are found in
+   * gs://google-cloud-aiplatform/schema/dataset/annotation/ , note that the
+   * chosen schema must be consistent with
+   * [metadata][google.cloud.aiplatform.v1.Dataset.metadata_schema_uri] of the Dataset specified by
+   * [dataset_id][google.cloud.aiplatform.v1.InputDataConfig.dataset_id].
+   * Only Annotations that both match this schema and belong to DataItems not
+   * ignored by the split method are used in respectively training, validation
+   * or test role, depending on the role of the DataItem they are on.
+   * When used in conjunction with [annotations_filter][google.cloud.aiplatform.v1.InputDataConfig.annotations_filter], the Annotations used
+   * for training are filtered by both [annotations_filter][google.cloud.aiplatform.v1.InputDataConfig.annotations_filter] and
+   * [annotation_schema_uri][google.cloud.aiplatform.v1.InputDataConfig.annotation_schema_uri].
+   * 
+ * + * string annotation_schema_uri = 9; + * + * @return The bytes for annotationSchemaUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAnnotationSchemaUriBytes() { + java.lang.Object ref = annotationSchemaUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + annotationSchemaUri_ = 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 (!getDatasetIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, datasetId_); + } + if (splitCase_ == 2) { + output.writeMessage(2, (com.google.cloud.aiplatform.v1.FractionSplit) split_); + } + if (splitCase_ == 3) { + output.writeMessage(3, (com.google.cloud.aiplatform.v1.FilterSplit) split_); + } + if (splitCase_ == 4) { + output.writeMessage(4, (com.google.cloud.aiplatform.v1.PredefinedSplit) split_); + } + if (splitCase_ == 5) { + output.writeMessage(5, (com.google.cloud.aiplatform.v1.TimestampSplit) split_); + } + if (!getAnnotationsFilterBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, annotationsFilter_); + } + if (destinationCase_ == 8) { + output.writeMessage(8, (com.google.cloud.aiplatform.v1.GcsDestination) destination_); + } + if (!getAnnotationSchemaUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, annotationSchemaUri_); + } + if (destinationCase_ == 10) { + output.writeMessage(10, (com.google.cloud.aiplatform.v1.BigQueryDestination) destination_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getDatasetIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, datasetId_); + } + if (splitCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.aiplatform.v1.FractionSplit) split_); + } + if (splitCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.cloud.aiplatform.v1.FilterSplit) split_); + } + if (splitCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, (com.google.cloud.aiplatform.v1.PredefinedSplit) split_); + } + if (splitCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, (com.google.cloud.aiplatform.v1.TimestampSplit) split_); + } + if (!getAnnotationsFilterBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, annotationsFilter_); + } + if (destinationCase_ == 8) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 8, (com.google.cloud.aiplatform.v1.GcsDestination) destination_); + } + if (!getAnnotationSchemaUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, annotationSchemaUri_); + } + if (destinationCase_ == 10) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 10, (com.google.cloud.aiplatform.v1.BigQueryDestination) destination_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.InputDataConfig)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.InputDataConfig other = + (com.google.cloud.aiplatform.v1.InputDataConfig) obj; + + if (!getDatasetId().equals(other.getDatasetId())) return false; + if (!getAnnotationsFilter().equals(other.getAnnotationsFilter())) return false; + if (!getAnnotationSchemaUri().equals(other.getAnnotationSchemaUri())) return false; + if (!getSplitCase().equals(other.getSplitCase())) return false; + switch (splitCase_) { + case 2: + if (!getFractionSplit().equals(other.getFractionSplit())) return false; + break; + case 3: + if (!getFilterSplit().equals(other.getFilterSplit())) return false; + break; + case 4: + if (!getPredefinedSplit().equals(other.getPredefinedSplit())) return false; + break; + case 5: + if (!getTimestampSplit().equals(other.getTimestampSplit())) return false; + break; + case 0: + default: + } + if (!getDestinationCase().equals(other.getDestinationCase())) return false; + switch (destinationCase_) { + case 8: + if (!getGcsDestination().equals(other.getGcsDestination())) return false; + break; + case 10: + if (!getBigqueryDestination().equals(other.getBigqueryDestination())) 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) + DATASET_ID_FIELD_NUMBER; + hash = (53 * hash) + getDatasetId().hashCode(); + hash = (37 * hash) + ANNOTATIONS_FILTER_FIELD_NUMBER; + hash = (53 * hash) + getAnnotationsFilter().hashCode(); + hash = (37 * hash) + ANNOTATION_SCHEMA_URI_FIELD_NUMBER; + hash = (53 * hash) + getAnnotationSchemaUri().hashCode(); + switch (splitCase_) { + case 2: + hash = (37 * hash) + FRACTION_SPLIT_FIELD_NUMBER; + hash = (53 * hash) + getFractionSplit().hashCode(); + break; + case 3: + hash = (37 * hash) + FILTER_SPLIT_FIELD_NUMBER; + hash = (53 * hash) + getFilterSplit().hashCode(); + break; + case 4: + hash = (37 * hash) + PREDEFINED_SPLIT_FIELD_NUMBER; + hash = (53 * hash) + getPredefinedSplit().hashCode(); + break; + case 5: + hash = (37 * hash) + TIMESTAMP_SPLIT_FIELD_NUMBER; + hash = (53 * hash) + getTimestampSplit().hashCode(); + break; + case 0: + default: + } + switch (destinationCase_) { + case 8: + hash = (37 * hash) + GCS_DESTINATION_FIELD_NUMBER; + hash = (53 * hash) + getGcsDestination().hashCode(); + break; + case 10: + hash = (37 * hash) + BIGQUERY_DESTINATION_FIELD_NUMBER; + hash = (53 * hash) + getBigqueryDestination().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.InputDataConfig parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.InputDataConfig 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.v1.InputDataConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.InputDataConfig 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.v1.InputDataConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.InputDataConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.InputDataConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.InputDataConfig 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.v1.InputDataConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.InputDataConfig 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.v1.InputDataConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.InputDataConfig 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.v1.InputDataConfig 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; + } + /** + * + * + *
+   * Specifies AI Platform owned input data to be used for training, and
+   * possibly evaluating, the Model.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.InputDataConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.InputDataConfig) + com.google.cloud.aiplatform.v1.InputDataConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.TrainingPipelineProto + .internal_static_google_cloud_aiplatform_v1_InputDataConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.TrainingPipelineProto + .internal_static_google_cloud_aiplatform_v1_InputDataConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.InputDataConfig.class, + com.google.cloud.aiplatform.v1.InputDataConfig.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.InputDataConfig.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(); + datasetId_ = ""; + + annotationsFilter_ = ""; + + annotationSchemaUri_ = ""; + + splitCase_ = 0; + split_ = null; + destinationCase_ = 0; + destination_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.TrainingPipelineProto + .internal_static_google_cloud_aiplatform_v1_InputDataConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.InputDataConfig getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.InputDataConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.InputDataConfig build() { + com.google.cloud.aiplatform.v1.InputDataConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.InputDataConfig buildPartial() { + com.google.cloud.aiplatform.v1.InputDataConfig result = + new com.google.cloud.aiplatform.v1.InputDataConfig(this); + if (splitCase_ == 2) { + if (fractionSplitBuilder_ == null) { + result.split_ = split_; + } else { + result.split_ = fractionSplitBuilder_.build(); + } + } + if (splitCase_ == 3) { + if (filterSplitBuilder_ == null) { + result.split_ = split_; + } else { + result.split_ = filterSplitBuilder_.build(); + } + } + if (splitCase_ == 4) { + if (predefinedSplitBuilder_ == null) { + result.split_ = split_; + } else { + result.split_ = predefinedSplitBuilder_.build(); + } + } + if (splitCase_ == 5) { + if (timestampSplitBuilder_ == null) { + result.split_ = split_; + } else { + result.split_ = timestampSplitBuilder_.build(); + } + } + if (destinationCase_ == 8) { + if (gcsDestinationBuilder_ == null) { + result.destination_ = destination_; + } else { + result.destination_ = gcsDestinationBuilder_.build(); + } + } + if (destinationCase_ == 10) { + if (bigqueryDestinationBuilder_ == null) { + result.destination_ = destination_; + } else { + result.destination_ = bigqueryDestinationBuilder_.build(); + } + } + result.datasetId_ = datasetId_; + result.annotationsFilter_ = annotationsFilter_; + result.annotationSchemaUri_ = annotationSchemaUri_; + result.splitCase_ = splitCase_; + result.destinationCase_ = destinationCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.InputDataConfig) { + return mergeFrom((com.google.cloud.aiplatform.v1.InputDataConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.InputDataConfig other) { + if (other == com.google.cloud.aiplatform.v1.InputDataConfig.getDefaultInstance()) return this; + if (!other.getDatasetId().isEmpty()) { + datasetId_ = other.datasetId_; + onChanged(); + } + if (!other.getAnnotationsFilter().isEmpty()) { + annotationsFilter_ = other.annotationsFilter_; + onChanged(); + } + if (!other.getAnnotationSchemaUri().isEmpty()) { + annotationSchemaUri_ = other.annotationSchemaUri_; + onChanged(); + } + switch (other.getSplitCase()) { + case FRACTION_SPLIT: + { + mergeFractionSplit(other.getFractionSplit()); + break; + } + case FILTER_SPLIT: + { + mergeFilterSplit(other.getFilterSplit()); + break; + } + case PREDEFINED_SPLIT: + { + mergePredefinedSplit(other.getPredefinedSplit()); + break; + } + case TIMESTAMP_SPLIT: + { + mergeTimestampSplit(other.getTimestampSplit()); + break; + } + case SPLIT_NOT_SET: + { + break; + } + } + switch (other.getDestinationCase()) { + case GCS_DESTINATION: + { + mergeGcsDestination(other.getGcsDestination()); + break; + } + case BIGQUERY_DESTINATION: + { + mergeBigqueryDestination(other.getBigqueryDestination()); + break; + } + case DESTINATION_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.aiplatform.v1.InputDataConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.aiplatform.v1.InputDataConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int splitCase_ = 0; + private java.lang.Object split_; + + public SplitCase getSplitCase() { + return SplitCase.forNumber(splitCase_); + } + + public Builder clearSplit() { + splitCase_ = 0; + split_ = null; + onChanged(); + return this; + } + + private int destinationCase_ = 0; + private java.lang.Object destination_; + + public DestinationCase getDestinationCase() { + return DestinationCase.forNumber(destinationCase_); + } + + public Builder clearDestination() { + destinationCase_ = 0; + destination_ = null; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.FractionSplit, + com.google.cloud.aiplatform.v1.FractionSplit.Builder, + com.google.cloud.aiplatform.v1.FractionSplitOrBuilder> + fractionSplitBuilder_; + /** + * + * + *
+     * Split based on fractions defining the size of each set.
+     * 
+ * + * .google.cloud.aiplatform.v1.FractionSplit fraction_split = 2; + * + * @return Whether the fractionSplit field is set. + */ + @java.lang.Override + public boolean hasFractionSplit() { + return splitCase_ == 2; + } + /** + * + * + *
+     * Split based on fractions defining the size of each set.
+     * 
+ * + * .google.cloud.aiplatform.v1.FractionSplit fraction_split = 2; + * + * @return The fractionSplit. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.FractionSplit getFractionSplit() { + if (fractionSplitBuilder_ == null) { + if (splitCase_ == 2) { + return (com.google.cloud.aiplatform.v1.FractionSplit) split_; + } + return com.google.cloud.aiplatform.v1.FractionSplit.getDefaultInstance(); + } else { + if (splitCase_ == 2) { + return fractionSplitBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1.FractionSplit.getDefaultInstance(); + } + } + /** + * + * + *
+     * Split based on fractions defining the size of each set.
+     * 
+ * + * .google.cloud.aiplatform.v1.FractionSplit fraction_split = 2; + */ + public Builder setFractionSplit(com.google.cloud.aiplatform.v1.FractionSplit value) { + if (fractionSplitBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + split_ = value; + onChanged(); + } else { + fractionSplitBuilder_.setMessage(value); + } + splitCase_ = 2; + return this; + } + /** + * + * + *
+     * Split based on fractions defining the size of each set.
+     * 
+ * + * .google.cloud.aiplatform.v1.FractionSplit fraction_split = 2; + */ + public Builder setFractionSplit( + com.google.cloud.aiplatform.v1.FractionSplit.Builder builderForValue) { + if (fractionSplitBuilder_ == null) { + split_ = builderForValue.build(); + onChanged(); + } else { + fractionSplitBuilder_.setMessage(builderForValue.build()); + } + splitCase_ = 2; + return this; + } + /** + * + * + *
+     * Split based on fractions defining the size of each set.
+     * 
+ * + * .google.cloud.aiplatform.v1.FractionSplit fraction_split = 2; + */ + public Builder mergeFractionSplit(com.google.cloud.aiplatform.v1.FractionSplit value) { + if (fractionSplitBuilder_ == null) { + if (splitCase_ == 2 + && split_ != com.google.cloud.aiplatform.v1.FractionSplit.getDefaultInstance()) { + split_ = + com.google.cloud.aiplatform.v1.FractionSplit.newBuilder( + (com.google.cloud.aiplatform.v1.FractionSplit) split_) + .mergeFrom(value) + .buildPartial(); + } else { + split_ = value; + } + onChanged(); + } else { + if (splitCase_ == 2) { + fractionSplitBuilder_.mergeFrom(value); + } + fractionSplitBuilder_.setMessage(value); + } + splitCase_ = 2; + return this; + } + /** + * + * + *
+     * Split based on fractions defining the size of each set.
+     * 
+ * + * .google.cloud.aiplatform.v1.FractionSplit fraction_split = 2; + */ + public Builder clearFractionSplit() { + if (fractionSplitBuilder_ == null) { + if (splitCase_ == 2) { + splitCase_ = 0; + split_ = null; + onChanged(); + } + } else { + if (splitCase_ == 2) { + splitCase_ = 0; + split_ = null; + } + fractionSplitBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Split based on fractions defining the size of each set.
+     * 
+ * + * .google.cloud.aiplatform.v1.FractionSplit fraction_split = 2; + */ + public com.google.cloud.aiplatform.v1.FractionSplit.Builder getFractionSplitBuilder() { + return getFractionSplitFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Split based on fractions defining the size of each set.
+     * 
+ * + * .google.cloud.aiplatform.v1.FractionSplit fraction_split = 2; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.FractionSplitOrBuilder getFractionSplitOrBuilder() { + if ((splitCase_ == 2) && (fractionSplitBuilder_ != null)) { + return fractionSplitBuilder_.getMessageOrBuilder(); + } else { + if (splitCase_ == 2) { + return (com.google.cloud.aiplatform.v1.FractionSplit) split_; + } + return com.google.cloud.aiplatform.v1.FractionSplit.getDefaultInstance(); + } + } + /** + * + * + *
+     * Split based on fractions defining the size of each set.
+     * 
+ * + * .google.cloud.aiplatform.v1.FractionSplit fraction_split = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.FractionSplit, + com.google.cloud.aiplatform.v1.FractionSplit.Builder, + com.google.cloud.aiplatform.v1.FractionSplitOrBuilder> + getFractionSplitFieldBuilder() { + if (fractionSplitBuilder_ == null) { + if (!(splitCase_ == 2)) { + split_ = com.google.cloud.aiplatform.v1.FractionSplit.getDefaultInstance(); + } + fractionSplitBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.FractionSplit, + com.google.cloud.aiplatform.v1.FractionSplit.Builder, + com.google.cloud.aiplatform.v1.FractionSplitOrBuilder>( + (com.google.cloud.aiplatform.v1.FractionSplit) split_, + getParentForChildren(), + isClean()); + split_ = null; + } + splitCase_ = 2; + onChanged(); + ; + return fractionSplitBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.FilterSplit, + com.google.cloud.aiplatform.v1.FilterSplit.Builder, + com.google.cloud.aiplatform.v1.FilterSplitOrBuilder> + filterSplitBuilder_; + /** + * + * + *
+     * Split based on the provided filters for each set.
+     * 
+ * + * .google.cloud.aiplatform.v1.FilterSplit filter_split = 3; + * + * @return Whether the filterSplit field is set. + */ + @java.lang.Override + public boolean hasFilterSplit() { + return splitCase_ == 3; + } + /** + * + * + *
+     * Split based on the provided filters for each set.
+     * 
+ * + * .google.cloud.aiplatform.v1.FilterSplit filter_split = 3; + * + * @return The filterSplit. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.FilterSplit getFilterSplit() { + if (filterSplitBuilder_ == null) { + if (splitCase_ == 3) { + return (com.google.cloud.aiplatform.v1.FilterSplit) split_; + } + return com.google.cloud.aiplatform.v1.FilterSplit.getDefaultInstance(); + } else { + if (splitCase_ == 3) { + return filterSplitBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1.FilterSplit.getDefaultInstance(); + } + } + /** + * + * + *
+     * Split based on the provided filters for each set.
+     * 
+ * + * .google.cloud.aiplatform.v1.FilterSplit filter_split = 3; + */ + public Builder setFilterSplit(com.google.cloud.aiplatform.v1.FilterSplit value) { + if (filterSplitBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + split_ = value; + onChanged(); + } else { + filterSplitBuilder_.setMessage(value); + } + splitCase_ = 3; + return this; + } + /** + * + * + *
+     * Split based on the provided filters for each set.
+     * 
+ * + * .google.cloud.aiplatform.v1.FilterSplit filter_split = 3; + */ + public Builder setFilterSplit( + com.google.cloud.aiplatform.v1.FilterSplit.Builder builderForValue) { + if (filterSplitBuilder_ == null) { + split_ = builderForValue.build(); + onChanged(); + } else { + filterSplitBuilder_.setMessage(builderForValue.build()); + } + splitCase_ = 3; + return this; + } + /** + * + * + *
+     * Split based on the provided filters for each set.
+     * 
+ * + * .google.cloud.aiplatform.v1.FilterSplit filter_split = 3; + */ + public Builder mergeFilterSplit(com.google.cloud.aiplatform.v1.FilterSplit value) { + if (filterSplitBuilder_ == null) { + if (splitCase_ == 3 + && split_ != com.google.cloud.aiplatform.v1.FilterSplit.getDefaultInstance()) { + split_ = + com.google.cloud.aiplatform.v1.FilterSplit.newBuilder( + (com.google.cloud.aiplatform.v1.FilterSplit) split_) + .mergeFrom(value) + .buildPartial(); + } else { + split_ = value; + } + onChanged(); + } else { + if (splitCase_ == 3) { + filterSplitBuilder_.mergeFrom(value); + } + filterSplitBuilder_.setMessage(value); + } + splitCase_ = 3; + return this; + } + /** + * + * + *
+     * Split based on the provided filters for each set.
+     * 
+ * + * .google.cloud.aiplatform.v1.FilterSplit filter_split = 3; + */ + public Builder clearFilterSplit() { + if (filterSplitBuilder_ == null) { + if (splitCase_ == 3) { + splitCase_ = 0; + split_ = null; + onChanged(); + } + } else { + if (splitCase_ == 3) { + splitCase_ = 0; + split_ = null; + } + filterSplitBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Split based on the provided filters for each set.
+     * 
+ * + * .google.cloud.aiplatform.v1.FilterSplit filter_split = 3; + */ + public com.google.cloud.aiplatform.v1.FilterSplit.Builder getFilterSplitBuilder() { + return getFilterSplitFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Split based on the provided filters for each set.
+     * 
+ * + * .google.cloud.aiplatform.v1.FilterSplit filter_split = 3; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.FilterSplitOrBuilder getFilterSplitOrBuilder() { + if ((splitCase_ == 3) && (filterSplitBuilder_ != null)) { + return filterSplitBuilder_.getMessageOrBuilder(); + } else { + if (splitCase_ == 3) { + return (com.google.cloud.aiplatform.v1.FilterSplit) split_; + } + return com.google.cloud.aiplatform.v1.FilterSplit.getDefaultInstance(); + } + } + /** + * + * + *
+     * Split based on the provided filters for each set.
+     * 
+ * + * .google.cloud.aiplatform.v1.FilterSplit filter_split = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.FilterSplit, + com.google.cloud.aiplatform.v1.FilterSplit.Builder, + com.google.cloud.aiplatform.v1.FilterSplitOrBuilder> + getFilterSplitFieldBuilder() { + if (filterSplitBuilder_ == null) { + if (!(splitCase_ == 3)) { + split_ = com.google.cloud.aiplatform.v1.FilterSplit.getDefaultInstance(); + } + filterSplitBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.FilterSplit, + com.google.cloud.aiplatform.v1.FilterSplit.Builder, + com.google.cloud.aiplatform.v1.FilterSplitOrBuilder>( + (com.google.cloud.aiplatform.v1.FilterSplit) split_, + getParentForChildren(), + isClean()); + split_ = null; + } + splitCase_ = 3; + onChanged(); + ; + return filterSplitBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.PredefinedSplit, + com.google.cloud.aiplatform.v1.PredefinedSplit.Builder, + com.google.cloud.aiplatform.v1.PredefinedSplitOrBuilder> + predefinedSplitBuilder_; + /** + * + * + *
+     * Supported only for tabular Datasets.
+     * Split based on a predefined key.
+     * 
+ * + * .google.cloud.aiplatform.v1.PredefinedSplit predefined_split = 4; + * + * @return Whether the predefinedSplit field is set. + */ + @java.lang.Override + public boolean hasPredefinedSplit() { + return splitCase_ == 4; + } + /** + * + * + *
+     * Supported only for tabular Datasets.
+     * Split based on a predefined key.
+     * 
+ * + * .google.cloud.aiplatform.v1.PredefinedSplit predefined_split = 4; + * + * @return The predefinedSplit. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.PredefinedSplit getPredefinedSplit() { + if (predefinedSplitBuilder_ == null) { + if (splitCase_ == 4) { + return (com.google.cloud.aiplatform.v1.PredefinedSplit) split_; + } + return com.google.cloud.aiplatform.v1.PredefinedSplit.getDefaultInstance(); + } else { + if (splitCase_ == 4) { + return predefinedSplitBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1.PredefinedSplit.getDefaultInstance(); + } + } + /** + * + * + *
+     * Supported only for tabular Datasets.
+     * Split based on a predefined key.
+     * 
+ * + * .google.cloud.aiplatform.v1.PredefinedSplit predefined_split = 4; + */ + public Builder setPredefinedSplit(com.google.cloud.aiplatform.v1.PredefinedSplit value) { + if (predefinedSplitBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + split_ = value; + onChanged(); + } else { + predefinedSplitBuilder_.setMessage(value); + } + splitCase_ = 4; + return this; + } + /** + * + * + *
+     * Supported only for tabular Datasets.
+     * Split based on a predefined key.
+     * 
+ * + * .google.cloud.aiplatform.v1.PredefinedSplit predefined_split = 4; + */ + public Builder setPredefinedSplit( + com.google.cloud.aiplatform.v1.PredefinedSplit.Builder builderForValue) { + if (predefinedSplitBuilder_ == null) { + split_ = builderForValue.build(); + onChanged(); + } else { + predefinedSplitBuilder_.setMessage(builderForValue.build()); + } + splitCase_ = 4; + return this; + } + /** + * + * + *
+     * Supported only for tabular Datasets.
+     * Split based on a predefined key.
+     * 
+ * + * .google.cloud.aiplatform.v1.PredefinedSplit predefined_split = 4; + */ + public Builder mergePredefinedSplit(com.google.cloud.aiplatform.v1.PredefinedSplit value) { + if (predefinedSplitBuilder_ == null) { + if (splitCase_ == 4 + && split_ != com.google.cloud.aiplatform.v1.PredefinedSplit.getDefaultInstance()) { + split_ = + com.google.cloud.aiplatform.v1.PredefinedSplit.newBuilder( + (com.google.cloud.aiplatform.v1.PredefinedSplit) split_) + .mergeFrom(value) + .buildPartial(); + } else { + split_ = value; + } + onChanged(); + } else { + if (splitCase_ == 4) { + predefinedSplitBuilder_.mergeFrom(value); + } + predefinedSplitBuilder_.setMessage(value); + } + splitCase_ = 4; + return this; + } + /** + * + * + *
+     * Supported only for tabular Datasets.
+     * Split based on a predefined key.
+     * 
+ * + * .google.cloud.aiplatform.v1.PredefinedSplit predefined_split = 4; + */ + public Builder clearPredefinedSplit() { + if (predefinedSplitBuilder_ == null) { + if (splitCase_ == 4) { + splitCase_ = 0; + split_ = null; + onChanged(); + } + } else { + if (splitCase_ == 4) { + splitCase_ = 0; + split_ = null; + } + predefinedSplitBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Supported only for tabular Datasets.
+     * Split based on a predefined key.
+     * 
+ * + * .google.cloud.aiplatform.v1.PredefinedSplit predefined_split = 4; + */ + public com.google.cloud.aiplatform.v1.PredefinedSplit.Builder getPredefinedSplitBuilder() { + return getPredefinedSplitFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Supported only for tabular Datasets.
+     * Split based on a predefined key.
+     * 
+ * + * .google.cloud.aiplatform.v1.PredefinedSplit predefined_split = 4; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.PredefinedSplitOrBuilder getPredefinedSplitOrBuilder() { + if ((splitCase_ == 4) && (predefinedSplitBuilder_ != null)) { + return predefinedSplitBuilder_.getMessageOrBuilder(); + } else { + if (splitCase_ == 4) { + return (com.google.cloud.aiplatform.v1.PredefinedSplit) split_; + } + return com.google.cloud.aiplatform.v1.PredefinedSplit.getDefaultInstance(); + } + } + /** + * + * + *
+     * Supported only for tabular Datasets.
+     * Split based on a predefined key.
+     * 
+ * + * .google.cloud.aiplatform.v1.PredefinedSplit predefined_split = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.PredefinedSplit, + com.google.cloud.aiplatform.v1.PredefinedSplit.Builder, + com.google.cloud.aiplatform.v1.PredefinedSplitOrBuilder> + getPredefinedSplitFieldBuilder() { + if (predefinedSplitBuilder_ == null) { + if (!(splitCase_ == 4)) { + split_ = com.google.cloud.aiplatform.v1.PredefinedSplit.getDefaultInstance(); + } + predefinedSplitBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.PredefinedSplit, + com.google.cloud.aiplatform.v1.PredefinedSplit.Builder, + com.google.cloud.aiplatform.v1.PredefinedSplitOrBuilder>( + (com.google.cloud.aiplatform.v1.PredefinedSplit) split_, + getParentForChildren(), + isClean()); + split_ = null; + } + splitCase_ = 4; + onChanged(); + ; + return predefinedSplitBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.TimestampSplit, + com.google.cloud.aiplatform.v1.TimestampSplit.Builder, + com.google.cloud.aiplatform.v1.TimestampSplitOrBuilder> + timestampSplitBuilder_; + /** + * + * + *
+     * Supported only for tabular Datasets.
+     * Split based on the timestamp of the input data pieces.
+     * 
+ * + * .google.cloud.aiplatform.v1.TimestampSplit timestamp_split = 5; + * + * @return Whether the timestampSplit field is set. + */ + @java.lang.Override + public boolean hasTimestampSplit() { + return splitCase_ == 5; + } + /** + * + * + *
+     * Supported only for tabular Datasets.
+     * Split based on the timestamp of the input data pieces.
+     * 
+ * + * .google.cloud.aiplatform.v1.TimestampSplit timestamp_split = 5; + * + * @return The timestampSplit. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.TimestampSplit getTimestampSplit() { + if (timestampSplitBuilder_ == null) { + if (splitCase_ == 5) { + return (com.google.cloud.aiplatform.v1.TimestampSplit) split_; + } + return com.google.cloud.aiplatform.v1.TimestampSplit.getDefaultInstance(); + } else { + if (splitCase_ == 5) { + return timestampSplitBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1.TimestampSplit.getDefaultInstance(); + } + } + /** + * + * + *
+     * Supported only for tabular Datasets.
+     * Split based on the timestamp of the input data pieces.
+     * 
+ * + * .google.cloud.aiplatform.v1.TimestampSplit timestamp_split = 5; + */ + public Builder setTimestampSplit(com.google.cloud.aiplatform.v1.TimestampSplit value) { + if (timestampSplitBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + split_ = value; + onChanged(); + } else { + timestampSplitBuilder_.setMessage(value); + } + splitCase_ = 5; + return this; + } + /** + * + * + *
+     * Supported only for tabular Datasets.
+     * Split based on the timestamp of the input data pieces.
+     * 
+ * + * .google.cloud.aiplatform.v1.TimestampSplit timestamp_split = 5; + */ + public Builder setTimestampSplit( + com.google.cloud.aiplatform.v1.TimestampSplit.Builder builderForValue) { + if (timestampSplitBuilder_ == null) { + split_ = builderForValue.build(); + onChanged(); + } else { + timestampSplitBuilder_.setMessage(builderForValue.build()); + } + splitCase_ = 5; + return this; + } + /** + * + * + *
+     * Supported only for tabular Datasets.
+     * Split based on the timestamp of the input data pieces.
+     * 
+ * + * .google.cloud.aiplatform.v1.TimestampSplit timestamp_split = 5; + */ + public Builder mergeTimestampSplit(com.google.cloud.aiplatform.v1.TimestampSplit value) { + if (timestampSplitBuilder_ == null) { + if (splitCase_ == 5 + && split_ != com.google.cloud.aiplatform.v1.TimestampSplit.getDefaultInstance()) { + split_ = + com.google.cloud.aiplatform.v1.TimestampSplit.newBuilder( + (com.google.cloud.aiplatform.v1.TimestampSplit) split_) + .mergeFrom(value) + .buildPartial(); + } else { + split_ = value; + } + onChanged(); + } else { + if (splitCase_ == 5) { + timestampSplitBuilder_.mergeFrom(value); + } + timestampSplitBuilder_.setMessage(value); + } + splitCase_ = 5; + return this; + } + /** + * + * + *
+     * Supported only for tabular Datasets.
+     * Split based on the timestamp of the input data pieces.
+     * 
+ * + * .google.cloud.aiplatform.v1.TimestampSplit timestamp_split = 5; + */ + public Builder clearTimestampSplit() { + if (timestampSplitBuilder_ == null) { + if (splitCase_ == 5) { + splitCase_ = 0; + split_ = null; + onChanged(); + } + } else { + if (splitCase_ == 5) { + splitCase_ = 0; + split_ = null; + } + timestampSplitBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Supported only for tabular Datasets.
+     * Split based on the timestamp of the input data pieces.
+     * 
+ * + * .google.cloud.aiplatform.v1.TimestampSplit timestamp_split = 5; + */ + public com.google.cloud.aiplatform.v1.TimestampSplit.Builder getTimestampSplitBuilder() { + return getTimestampSplitFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Supported only for tabular Datasets.
+     * Split based on the timestamp of the input data pieces.
+     * 
+ * + * .google.cloud.aiplatform.v1.TimestampSplit timestamp_split = 5; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.TimestampSplitOrBuilder getTimestampSplitOrBuilder() { + if ((splitCase_ == 5) && (timestampSplitBuilder_ != null)) { + return timestampSplitBuilder_.getMessageOrBuilder(); + } else { + if (splitCase_ == 5) { + return (com.google.cloud.aiplatform.v1.TimestampSplit) split_; + } + return com.google.cloud.aiplatform.v1.TimestampSplit.getDefaultInstance(); + } + } + /** + * + * + *
+     * Supported only for tabular Datasets.
+     * Split based on the timestamp of the input data pieces.
+     * 
+ * + * .google.cloud.aiplatform.v1.TimestampSplit timestamp_split = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.TimestampSplit, + com.google.cloud.aiplatform.v1.TimestampSplit.Builder, + com.google.cloud.aiplatform.v1.TimestampSplitOrBuilder> + getTimestampSplitFieldBuilder() { + if (timestampSplitBuilder_ == null) { + if (!(splitCase_ == 5)) { + split_ = com.google.cloud.aiplatform.v1.TimestampSplit.getDefaultInstance(); + } + timestampSplitBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.TimestampSplit, + com.google.cloud.aiplatform.v1.TimestampSplit.Builder, + com.google.cloud.aiplatform.v1.TimestampSplitOrBuilder>( + (com.google.cloud.aiplatform.v1.TimestampSplit) split_, + getParentForChildren(), + isClean()); + split_ = null; + } + splitCase_ = 5; + onChanged(); + ; + return timestampSplitBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GcsDestination, + com.google.cloud.aiplatform.v1.GcsDestination.Builder, + com.google.cloud.aiplatform.v1.GcsDestinationOrBuilder> + gcsDestinationBuilder_; + /** + * + * + *
+     * The Cloud Storage location where the training data is to be
+     * written to. In the given directory a new directory is created with
+     * name:
+     * `dataset-<dataset-id>-<annotation-type>-<timestamp-of-training-call>`
+     * where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format.
+     * All training input data is written into that directory.
+     * The AI Platform environment variables representing Cloud Storage
+     * data URIs are represented in the Cloud Storage wildcard
+     * format to support sharded data. e.g.: "gs://.../training-*.jsonl"
+     * * AIP_DATA_FORMAT = "jsonl" for non-tabular data, "csv" for tabular data
+     * * AIP_TRAINING_DATA_URI =
+     * "gcs_destination/dataset-<dataset-id>-<annotation-type>-<time>/training-*.${AIP_DATA_FORMAT}"
+     * * AIP_VALIDATION_DATA_URI =
+     * "gcs_destination/dataset-<dataset-id>-<annotation-type>-<time>/validation-*.${AIP_DATA_FORMAT}"
+     * * AIP_TEST_DATA_URI =
+     * "gcs_destination/dataset-<dataset-id>-<annotation-type>-<time>/test-*.${AIP_DATA_FORMAT}"
+     * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination gcs_destination = 8; + * + * @return Whether the gcsDestination field is set. + */ + @java.lang.Override + public boolean hasGcsDestination() { + return destinationCase_ == 8; + } + /** + * + * + *
+     * The Cloud Storage location where the training data is to be
+     * written to. In the given directory a new directory is created with
+     * name:
+     * `dataset-<dataset-id>-<annotation-type>-<timestamp-of-training-call>`
+     * where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format.
+     * All training input data is written into that directory.
+     * The AI Platform environment variables representing Cloud Storage
+     * data URIs are represented in the Cloud Storage wildcard
+     * format to support sharded data. e.g.: "gs://.../training-*.jsonl"
+     * * AIP_DATA_FORMAT = "jsonl" for non-tabular data, "csv" for tabular data
+     * * AIP_TRAINING_DATA_URI =
+     * "gcs_destination/dataset-<dataset-id>-<annotation-type>-<time>/training-*.${AIP_DATA_FORMAT}"
+     * * AIP_VALIDATION_DATA_URI =
+     * "gcs_destination/dataset-<dataset-id>-<annotation-type>-<time>/validation-*.${AIP_DATA_FORMAT}"
+     * * AIP_TEST_DATA_URI =
+     * "gcs_destination/dataset-<dataset-id>-<annotation-type>-<time>/test-*.${AIP_DATA_FORMAT}"
+     * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination gcs_destination = 8; + * + * @return The gcsDestination. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GcsDestination getGcsDestination() { + if (gcsDestinationBuilder_ == null) { + if (destinationCase_ == 8) { + return (com.google.cloud.aiplatform.v1.GcsDestination) destination_; + } + return com.google.cloud.aiplatform.v1.GcsDestination.getDefaultInstance(); + } else { + if (destinationCase_ == 8) { + return gcsDestinationBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1.GcsDestination.getDefaultInstance(); + } + } + /** + * + * + *
+     * The Cloud Storage location where the training data is to be
+     * written to. In the given directory a new directory is created with
+     * name:
+     * `dataset-<dataset-id>-<annotation-type>-<timestamp-of-training-call>`
+     * where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format.
+     * All training input data is written into that directory.
+     * The AI Platform environment variables representing Cloud Storage
+     * data URIs are represented in the Cloud Storage wildcard
+     * format to support sharded data. e.g.: "gs://.../training-*.jsonl"
+     * * AIP_DATA_FORMAT = "jsonl" for non-tabular data, "csv" for tabular data
+     * * AIP_TRAINING_DATA_URI =
+     * "gcs_destination/dataset-<dataset-id>-<annotation-type>-<time>/training-*.${AIP_DATA_FORMAT}"
+     * * AIP_VALIDATION_DATA_URI =
+     * "gcs_destination/dataset-<dataset-id>-<annotation-type>-<time>/validation-*.${AIP_DATA_FORMAT}"
+     * * AIP_TEST_DATA_URI =
+     * "gcs_destination/dataset-<dataset-id>-<annotation-type>-<time>/test-*.${AIP_DATA_FORMAT}"
+     * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination gcs_destination = 8; + */ + public Builder setGcsDestination(com.google.cloud.aiplatform.v1.GcsDestination value) { + if (gcsDestinationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + destination_ = value; + onChanged(); + } else { + gcsDestinationBuilder_.setMessage(value); + } + destinationCase_ = 8; + return this; + } + /** + * + * + *
+     * The Cloud Storage location where the training data is to be
+     * written to. In the given directory a new directory is created with
+     * name:
+     * `dataset-<dataset-id>-<annotation-type>-<timestamp-of-training-call>`
+     * where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format.
+     * All training input data is written into that directory.
+     * The AI Platform environment variables representing Cloud Storage
+     * data URIs are represented in the Cloud Storage wildcard
+     * format to support sharded data. e.g.: "gs://.../training-*.jsonl"
+     * * AIP_DATA_FORMAT = "jsonl" for non-tabular data, "csv" for tabular data
+     * * AIP_TRAINING_DATA_URI =
+     * "gcs_destination/dataset-<dataset-id>-<annotation-type>-<time>/training-*.${AIP_DATA_FORMAT}"
+     * * AIP_VALIDATION_DATA_URI =
+     * "gcs_destination/dataset-<dataset-id>-<annotation-type>-<time>/validation-*.${AIP_DATA_FORMAT}"
+     * * AIP_TEST_DATA_URI =
+     * "gcs_destination/dataset-<dataset-id>-<annotation-type>-<time>/test-*.${AIP_DATA_FORMAT}"
+     * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination gcs_destination = 8; + */ + public Builder setGcsDestination( + com.google.cloud.aiplatform.v1.GcsDestination.Builder builderForValue) { + if (gcsDestinationBuilder_ == null) { + destination_ = builderForValue.build(); + onChanged(); + } else { + gcsDestinationBuilder_.setMessage(builderForValue.build()); + } + destinationCase_ = 8; + return this; + } + /** + * + * + *
+     * The Cloud Storage location where the training data is to be
+     * written to. In the given directory a new directory is created with
+     * name:
+     * `dataset-<dataset-id>-<annotation-type>-<timestamp-of-training-call>`
+     * where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format.
+     * All training input data is written into that directory.
+     * The AI Platform environment variables representing Cloud Storage
+     * data URIs are represented in the Cloud Storage wildcard
+     * format to support sharded data. e.g.: "gs://.../training-*.jsonl"
+     * * AIP_DATA_FORMAT = "jsonl" for non-tabular data, "csv" for tabular data
+     * * AIP_TRAINING_DATA_URI =
+     * "gcs_destination/dataset-<dataset-id>-<annotation-type>-<time>/training-*.${AIP_DATA_FORMAT}"
+     * * AIP_VALIDATION_DATA_URI =
+     * "gcs_destination/dataset-<dataset-id>-<annotation-type>-<time>/validation-*.${AIP_DATA_FORMAT}"
+     * * AIP_TEST_DATA_URI =
+     * "gcs_destination/dataset-<dataset-id>-<annotation-type>-<time>/test-*.${AIP_DATA_FORMAT}"
+     * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination gcs_destination = 8; + */ + public Builder mergeGcsDestination(com.google.cloud.aiplatform.v1.GcsDestination value) { + if (gcsDestinationBuilder_ == null) { + if (destinationCase_ == 8 + && destination_ != com.google.cloud.aiplatform.v1.GcsDestination.getDefaultInstance()) { + destination_ = + com.google.cloud.aiplatform.v1.GcsDestination.newBuilder( + (com.google.cloud.aiplatform.v1.GcsDestination) destination_) + .mergeFrom(value) + .buildPartial(); + } else { + destination_ = value; + } + onChanged(); + } else { + if (destinationCase_ == 8) { + gcsDestinationBuilder_.mergeFrom(value); + } + gcsDestinationBuilder_.setMessage(value); + } + destinationCase_ = 8; + return this; + } + /** + * + * + *
+     * The Cloud Storage location where the training data is to be
+     * written to. In the given directory a new directory is created with
+     * name:
+     * `dataset-<dataset-id>-<annotation-type>-<timestamp-of-training-call>`
+     * where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format.
+     * All training input data is written into that directory.
+     * The AI Platform environment variables representing Cloud Storage
+     * data URIs are represented in the Cloud Storage wildcard
+     * format to support sharded data. e.g.: "gs://.../training-*.jsonl"
+     * * AIP_DATA_FORMAT = "jsonl" for non-tabular data, "csv" for tabular data
+     * * AIP_TRAINING_DATA_URI =
+     * "gcs_destination/dataset-<dataset-id>-<annotation-type>-<time>/training-*.${AIP_DATA_FORMAT}"
+     * * AIP_VALIDATION_DATA_URI =
+     * "gcs_destination/dataset-<dataset-id>-<annotation-type>-<time>/validation-*.${AIP_DATA_FORMAT}"
+     * * AIP_TEST_DATA_URI =
+     * "gcs_destination/dataset-<dataset-id>-<annotation-type>-<time>/test-*.${AIP_DATA_FORMAT}"
+     * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination gcs_destination = 8; + */ + public Builder clearGcsDestination() { + if (gcsDestinationBuilder_ == null) { + if (destinationCase_ == 8) { + destinationCase_ = 0; + destination_ = null; + onChanged(); + } + } else { + if (destinationCase_ == 8) { + destinationCase_ = 0; + destination_ = null; + } + gcsDestinationBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The Cloud Storage location where the training data is to be
+     * written to. In the given directory a new directory is created with
+     * name:
+     * `dataset-<dataset-id>-<annotation-type>-<timestamp-of-training-call>`
+     * where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format.
+     * All training input data is written into that directory.
+     * The AI Platform environment variables representing Cloud Storage
+     * data URIs are represented in the Cloud Storage wildcard
+     * format to support sharded data. e.g.: "gs://.../training-*.jsonl"
+     * * AIP_DATA_FORMAT = "jsonl" for non-tabular data, "csv" for tabular data
+     * * AIP_TRAINING_DATA_URI =
+     * "gcs_destination/dataset-<dataset-id>-<annotation-type>-<time>/training-*.${AIP_DATA_FORMAT}"
+     * * AIP_VALIDATION_DATA_URI =
+     * "gcs_destination/dataset-<dataset-id>-<annotation-type>-<time>/validation-*.${AIP_DATA_FORMAT}"
+     * * AIP_TEST_DATA_URI =
+     * "gcs_destination/dataset-<dataset-id>-<annotation-type>-<time>/test-*.${AIP_DATA_FORMAT}"
+     * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination gcs_destination = 8; + */ + public com.google.cloud.aiplatform.v1.GcsDestination.Builder getGcsDestinationBuilder() { + return getGcsDestinationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The Cloud Storage location where the training data is to be
+     * written to. In the given directory a new directory is created with
+     * name:
+     * `dataset-<dataset-id>-<annotation-type>-<timestamp-of-training-call>`
+     * where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format.
+     * All training input data is written into that directory.
+     * The AI Platform environment variables representing Cloud Storage
+     * data URIs are represented in the Cloud Storage wildcard
+     * format to support sharded data. e.g.: "gs://.../training-*.jsonl"
+     * * AIP_DATA_FORMAT = "jsonl" for non-tabular data, "csv" for tabular data
+     * * AIP_TRAINING_DATA_URI =
+     * "gcs_destination/dataset-<dataset-id>-<annotation-type>-<time>/training-*.${AIP_DATA_FORMAT}"
+     * * AIP_VALIDATION_DATA_URI =
+     * "gcs_destination/dataset-<dataset-id>-<annotation-type>-<time>/validation-*.${AIP_DATA_FORMAT}"
+     * * AIP_TEST_DATA_URI =
+     * "gcs_destination/dataset-<dataset-id>-<annotation-type>-<time>/test-*.${AIP_DATA_FORMAT}"
+     * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination gcs_destination = 8; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GcsDestinationOrBuilder getGcsDestinationOrBuilder() { + if ((destinationCase_ == 8) && (gcsDestinationBuilder_ != null)) { + return gcsDestinationBuilder_.getMessageOrBuilder(); + } else { + if (destinationCase_ == 8) { + return (com.google.cloud.aiplatform.v1.GcsDestination) destination_; + } + return com.google.cloud.aiplatform.v1.GcsDestination.getDefaultInstance(); + } + } + /** + * + * + *
+     * The Cloud Storage location where the training data is to be
+     * written to. In the given directory a new directory is created with
+     * name:
+     * `dataset-<dataset-id>-<annotation-type>-<timestamp-of-training-call>`
+     * where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format.
+     * All training input data is written into that directory.
+     * The AI Platform environment variables representing Cloud Storage
+     * data URIs are represented in the Cloud Storage wildcard
+     * format to support sharded data. e.g.: "gs://.../training-*.jsonl"
+     * * AIP_DATA_FORMAT = "jsonl" for non-tabular data, "csv" for tabular data
+     * * AIP_TRAINING_DATA_URI =
+     * "gcs_destination/dataset-<dataset-id>-<annotation-type>-<time>/training-*.${AIP_DATA_FORMAT}"
+     * * AIP_VALIDATION_DATA_URI =
+     * "gcs_destination/dataset-<dataset-id>-<annotation-type>-<time>/validation-*.${AIP_DATA_FORMAT}"
+     * * AIP_TEST_DATA_URI =
+     * "gcs_destination/dataset-<dataset-id>-<annotation-type>-<time>/test-*.${AIP_DATA_FORMAT}"
+     * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination gcs_destination = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GcsDestination, + com.google.cloud.aiplatform.v1.GcsDestination.Builder, + com.google.cloud.aiplatform.v1.GcsDestinationOrBuilder> + getGcsDestinationFieldBuilder() { + if (gcsDestinationBuilder_ == null) { + if (!(destinationCase_ == 8)) { + destination_ = com.google.cloud.aiplatform.v1.GcsDestination.getDefaultInstance(); + } + gcsDestinationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GcsDestination, + com.google.cloud.aiplatform.v1.GcsDestination.Builder, + com.google.cloud.aiplatform.v1.GcsDestinationOrBuilder>( + (com.google.cloud.aiplatform.v1.GcsDestination) destination_, + getParentForChildren(), + isClean()); + destination_ = null; + } + destinationCase_ = 8; + onChanged(); + ; + return gcsDestinationBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.BigQueryDestination, + com.google.cloud.aiplatform.v1.BigQueryDestination.Builder, + com.google.cloud.aiplatform.v1.BigQueryDestinationOrBuilder> + bigqueryDestinationBuilder_; + /** + * + * + *
+     * Only applicable to custom training with tabular Dataset with BigQuery
+     * source.
+     * The BigQuery project location where the training data is to be written
+     * to. In the given project a new dataset is created with name
+     * `dataset_<dataset-id>_<annotation-type>_<timestamp-of-training-call>`
+     * where timestamp is in YYYY_MM_DDThh_mm_ss_sssZ format. All training
+     * input data is written into that dataset. In the dataset three
+     * tables are created, `training`, `validation` and `test`.
+     * * AIP_DATA_FORMAT = "bigquery".
+     * * AIP_TRAINING_DATA_URI  =
+     * "bigquery_destination.dataset_<dataset-id>_<annotation-type>_<time>.training"
+     * * AIP_VALIDATION_DATA_URI =
+     * "bigquery_destination.dataset_<dataset-id>_<annotation-type>_<time>.validation"
+     * * AIP_TEST_DATA_URI =
+     * "bigquery_destination.dataset_<dataset-id>_<annotation-type>_<time>.test"
+     * 
+ * + * .google.cloud.aiplatform.v1.BigQueryDestination bigquery_destination = 10; + * + * @return Whether the bigqueryDestination field is set. + */ + @java.lang.Override + public boolean hasBigqueryDestination() { + return destinationCase_ == 10; + } + /** + * + * + *
+     * Only applicable to custom training with tabular Dataset with BigQuery
+     * source.
+     * The BigQuery project location where the training data is to be written
+     * to. In the given project a new dataset is created with name
+     * `dataset_<dataset-id>_<annotation-type>_<timestamp-of-training-call>`
+     * where timestamp is in YYYY_MM_DDThh_mm_ss_sssZ format. All training
+     * input data is written into that dataset. In the dataset three
+     * tables are created, `training`, `validation` and `test`.
+     * * AIP_DATA_FORMAT = "bigquery".
+     * * AIP_TRAINING_DATA_URI  =
+     * "bigquery_destination.dataset_<dataset-id>_<annotation-type>_<time>.training"
+     * * AIP_VALIDATION_DATA_URI =
+     * "bigquery_destination.dataset_<dataset-id>_<annotation-type>_<time>.validation"
+     * * AIP_TEST_DATA_URI =
+     * "bigquery_destination.dataset_<dataset-id>_<annotation-type>_<time>.test"
+     * 
+ * + * .google.cloud.aiplatform.v1.BigQueryDestination bigquery_destination = 10; + * + * @return The bigqueryDestination. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.BigQueryDestination getBigqueryDestination() { + if (bigqueryDestinationBuilder_ == null) { + if (destinationCase_ == 10) { + return (com.google.cloud.aiplatform.v1.BigQueryDestination) destination_; + } + return com.google.cloud.aiplatform.v1.BigQueryDestination.getDefaultInstance(); + } else { + if (destinationCase_ == 10) { + return bigqueryDestinationBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1.BigQueryDestination.getDefaultInstance(); + } + } + /** + * + * + *
+     * Only applicable to custom training with tabular Dataset with BigQuery
+     * source.
+     * The BigQuery project location where the training data is to be written
+     * to. In the given project a new dataset is created with name
+     * `dataset_<dataset-id>_<annotation-type>_<timestamp-of-training-call>`
+     * where timestamp is in YYYY_MM_DDThh_mm_ss_sssZ format. All training
+     * input data is written into that dataset. In the dataset three
+     * tables are created, `training`, `validation` and `test`.
+     * * AIP_DATA_FORMAT = "bigquery".
+     * * AIP_TRAINING_DATA_URI  =
+     * "bigquery_destination.dataset_<dataset-id>_<annotation-type>_<time>.training"
+     * * AIP_VALIDATION_DATA_URI =
+     * "bigquery_destination.dataset_<dataset-id>_<annotation-type>_<time>.validation"
+     * * AIP_TEST_DATA_URI =
+     * "bigquery_destination.dataset_<dataset-id>_<annotation-type>_<time>.test"
+     * 
+ * + * .google.cloud.aiplatform.v1.BigQueryDestination bigquery_destination = 10; + */ + public Builder setBigqueryDestination( + com.google.cloud.aiplatform.v1.BigQueryDestination value) { + if (bigqueryDestinationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + destination_ = value; + onChanged(); + } else { + bigqueryDestinationBuilder_.setMessage(value); + } + destinationCase_ = 10; + return this; + } + /** + * + * + *
+     * Only applicable to custom training with tabular Dataset with BigQuery
+     * source.
+     * The BigQuery project location where the training data is to be written
+     * to. In the given project a new dataset is created with name
+     * `dataset_<dataset-id>_<annotation-type>_<timestamp-of-training-call>`
+     * where timestamp is in YYYY_MM_DDThh_mm_ss_sssZ format. All training
+     * input data is written into that dataset. In the dataset three
+     * tables are created, `training`, `validation` and `test`.
+     * * AIP_DATA_FORMAT = "bigquery".
+     * * AIP_TRAINING_DATA_URI  =
+     * "bigquery_destination.dataset_<dataset-id>_<annotation-type>_<time>.training"
+     * * AIP_VALIDATION_DATA_URI =
+     * "bigquery_destination.dataset_<dataset-id>_<annotation-type>_<time>.validation"
+     * * AIP_TEST_DATA_URI =
+     * "bigquery_destination.dataset_<dataset-id>_<annotation-type>_<time>.test"
+     * 
+ * + * .google.cloud.aiplatform.v1.BigQueryDestination bigquery_destination = 10; + */ + public Builder setBigqueryDestination( + com.google.cloud.aiplatform.v1.BigQueryDestination.Builder builderForValue) { + if (bigqueryDestinationBuilder_ == null) { + destination_ = builderForValue.build(); + onChanged(); + } else { + bigqueryDestinationBuilder_.setMessage(builderForValue.build()); + } + destinationCase_ = 10; + return this; + } + /** + * + * + *
+     * Only applicable to custom training with tabular Dataset with BigQuery
+     * source.
+     * The BigQuery project location where the training data is to be written
+     * to. In the given project a new dataset is created with name
+     * `dataset_<dataset-id>_<annotation-type>_<timestamp-of-training-call>`
+     * where timestamp is in YYYY_MM_DDThh_mm_ss_sssZ format. All training
+     * input data is written into that dataset. In the dataset three
+     * tables are created, `training`, `validation` and `test`.
+     * * AIP_DATA_FORMAT = "bigquery".
+     * * AIP_TRAINING_DATA_URI  =
+     * "bigquery_destination.dataset_<dataset-id>_<annotation-type>_<time>.training"
+     * * AIP_VALIDATION_DATA_URI =
+     * "bigquery_destination.dataset_<dataset-id>_<annotation-type>_<time>.validation"
+     * * AIP_TEST_DATA_URI =
+     * "bigquery_destination.dataset_<dataset-id>_<annotation-type>_<time>.test"
+     * 
+ * + * .google.cloud.aiplatform.v1.BigQueryDestination bigquery_destination = 10; + */ + public Builder mergeBigqueryDestination( + com.google.cloud.aiplatform.v1.BigQueryDestination value) { + if (bigqueryDestinationBuilder_ == null) { + if (destinationCase_ == 10 + && destination_ + != com.google.cloud.aiplatform.v1.BigQueryDestination.getDefaultInstance()) { + destination_ = + com.google.cloud.aiplatform.v1.BigQueryDestination.newBuilder( + (com.google.cloud.aiplatform.v1.BigQueryDestination) destination_) + .mergeFrom(value) + .buildPartial(); + } else { + destination_ = value; + } + onChanged(); + } else { + if (destinationCase_ == 10) { + bigqueryDestinationBuilder_.mergeFrom(value); + } + bigqueryDestinationBuilder_.setMessage(value); + } + destinationCase_ = 10; + return this; + } + /** + * + * + *
+     * Only applicable to custom training with tabular Dataset with BigQuery
+     * source.
+     * The BigQuery project location where the training data is to be written
+     * to. In the given project a new dataset is created with name
+     * `dataset_<dataset-id>_<annotation-type>_<timestamp-of-training-call>`
+     * where timestamp is in YYYY_MM_DDThh_mm_ss_sssZ format. All training
+     * input data is written into that dataset. In the dataset three
+     * tables are created, `training`, `validation` and `test`.
+     * * AIP_DATA_FORMAT = "bigquery".
+     * * AIP_TRAINING_DATA_URI  =
+     * "bigquery_destination.dataset_<dataset-id>_<annotation-type>_<time>.training"
+     * * AIP_VALIDATION_DATA_URI =
+     * "bigquery_destination.dataset_<dataset-id>_<annotation-type>_<time>.validation"
+     * * AIP_TEST_DATA_URI =
+     * "bigquery_destination.dataset_<dataset-id>_<annotation-type>_<time>.test"
+     * 
+ * + * .google.cloud.aiplatform.v1.BigQueryDestination bigquery_destination = 10; + */ + public Builder clearBigqueryDestination() { + if (bigqueryDestinationBuilder_ == null) { + if (destinationCase_ == 10) { + destinationCase_ = 0; + destination_ = null; + onChanged(); + } + } else { + if (destinationCase_ == 10) { + destinationCase_ = 0; + destination_ = null; + } + bigqueryDestinationBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Only applicable to custom training with tabular Dataset with BigQuery
+     * source.
+     * The BigQuery project location where the training data is to be written
+     * to. In the given project a new dataset is created with name
+     * `dataset_<dataset-id>_<annotation-type>_<timestamp-of-training-call>`
+     * where timestamp is in YYYY_MM_DDThh_mm_ss_sssZ format. All training
+     * input data is written into that dataset. In the dataset three
+     * tables are created, `training`, `validation` and `test`.
+     * * AIP_DATA_FORMAT = "bigquery".
+     * * AIP_TRAINING_DATA_URI  =
+     * "bigquery_destination.dataset_<dataset-id>_<annotation-type>_<time>.training"
+     * * AIP_VALIDATION_DATA_URI =
+     * "bigquery_destination.dataset_<dataset-id>_<annotation-type>_<time>.validation"
+     * * AIP_TEST_DATA_URI =
+     * "bigquery_destination.dataset_<dataset-id>_<annotation-type>_<time>.test"
+     * 
+ * + * .google.cloud.aiplatform.v1.BigQueryDestination bigquery_destination = 10; + */ + public com.google.cloud.aiplatform.v1.BigQueryDestination.Builder + getBigqueryDestinationBuilder() { + return getBigqueryDestinationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Only applicable to custom training with tabular Dataset with BigQuery
+     * source.
+     * The BigQuery project location where the training data is to be written
+     * to. In the given project a new dataset is created with name
+     * `dataset_<dataset-id>_<annotation-type>_<timestamp-of-training-call>`
+     * where timestamp is in YYYY_MM_DDThh_mm_ss_sssZ format. All training
+     * input data is written into that dataset. In the dataset three
+     * tables are created, `training`, `validation` and `test`.
+     * * AIP_DATA_FORMAT = "bigquery".
+     * * AIP_TRAINING_DATA_URI  =
+     * "bigquery_destination.dataset_<dataset-id>_<annotation-type>_<time>.training"
+     * * AIP_VALIDATION_DATA_URI =
+     * "bigquery_destination.dataset_<dataset-id>_<annotation-type>_<time>.validation"
+     * * AIP_TEST_DATA_URI =
+     * "bigquery_destination.dataset_<dataset-id>_<annotation-type>_<time>.test"
+     * 
+ * + * .google.cloud.aiplatform.v1.BigQueryDestination bigquery_destination = 10; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.BigQueryDestinationOrBuilder + getBigqueryDestinationOrBuilder() { + if ((destinationCase_ == 10) && (bigqueryDestinationBuilder_ != null)) { + return bigqueryDestinationBuilder_.getMessageOrBuilder(); + } else { + if (destinationCase_ == 10) { + return (com.google.cloud.aiplatform.v1.BigQueryDestination) destination_; + } + return com.google.cloud.aiplatform.v1.BigQueryDestination.getDefaultInstance(); + } + } + /** + * + * + *
+     * Only applicable to custom training with tabular Dataset with BigQuery
+     * source.
+     * The BigQuery project location where the training data is to be written
+     * to. In the given project a new dataset is created with name
+     * `dataset_<dataset-id>_<annotation-type>_<timestamp-of-training-call>`
+     * where timestamp is in YYYY_MM_DDThh_mm_ss_sssZ format. All training
+     * input data is written into that dataset. In the dataset three
+     * tables are created, `training`, `validation` and `test`.
+     * * AIP_DATA_FORMAT = "bigquery".
+     * * AIP_TRAINING_DATA_URI  =
+     * "bigquery_destination.dataset_<dataset-id>_<annotation-type>_<time>.training"
+     * * AIP_VALIDATION_DATA_URI =
+     * "bigquery_destination.dataset_<dataset-id>_<annotation-type>_<time>.validation"
+     * * AIP_TEST_DATA_URI =
+     * "bigquery_destination.dataset_<dataset-id>_<annotation-type>_<time>.test"
+     * 
+ * + * .google.cloud.aiplatform.v1.BigQueryDestination bigquery_destination = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.BigQueryDestination, + com.google.cloud.aiplatform.v1.BigQueryDestination.Builder, + com.google.cloud.aiplatform.v1.BigQueryDestinationOrBuilder> + getBigqueryDestinationFieldBuilder() { + if (bigqueryDestinationBuilder_ == null) { + if (!(destinationCase_ == 10)) { + destination_ = com.google.cloud.aiplatform.v1.BigQueryDestination.getDefaultInstance(); + } + bigqueryDestinationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.BigQueryDestination, + com.google.cloud.aiplatform.v1.BigQueryDestination.Builder, + com.google.cloud.aiplatform.v1.BigQueryDestinationOrBuilder>( + (com.google.cloud.aiplatform.v1.BigQueryDestination) destination_, + getParentForChildren(), + isClean()); + destination_ = null; + } + destinationCase_ = 10; + onChanged(); + ; + return bigqueryDestinationBuilder_; + } + + private java.lang.Object datasetId_ = ""; + /** + * + * + *
+     * Required. The ID of the Dataset in the same Project and Location which data will be
+     * used to train the Model. The Dataset must use schema compatible with
+     * Model being trained, and what is compatible should be described in the
+     * used TrainingPipeline's [training_task_definition]
+     * [google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition].
+     * For tabular Datasets, all their data is exported to training, to pick
+     * and choose from.
+     * 
+ * + * string dataset_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The datasetId. + */ + public java.lang.String getDatasetId() { + java.lang.Object ref = datasetId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + datasetId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The ID of the Dataset in the same Project and Location which data will be
+     * used to train the Model. The Dataset must use schema compatible with
+     * Model being trained, and what is compatible should be described in the
+     * used TrainingPipeline's [training_task_definition]
+     * [google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition].
+     * For tabular Datasets, all their data is exported to training, to pick
+     * and choose from.
+     * 
+ * + * string dataset_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for datasetId. + */ + public com.google.protobuf.ByteString getDatasetIdBytes() { + java.lang.Object ref = datasetId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + datasetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The ID of the Dataset in the same Project and Location which data will be
+     * used to train the Model. The Dataset must use schema compatible with
+     * Model being trained, and what is compatible should be described in the
+     * used TrainingPipeline's [training_task_definition]
+     * [google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition].
+     * For tabular Datasets, all their data is exported to training, to pick
+     * and choose from.
+     * 
+ * + * string dataset_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The datasetId to set. + * @return This builder for chaining. + */ + public Builder setDatasetId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + datasetId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The ID of the Dataset in the same Project and Location which data will be
+     * used to train the Model. The Dataset must use schema compatible with
+     * Model being trained, and what is compatible should be described in the
+     * used TrainingPipeline's [training_task_definition]
+     * [google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition].
+     * For tabular Datasets, all their data is exported to training, to pick
+     * and choose from.
+     * 
+ * + * string dataset_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDatasetId() { + + datasetId_ = getDefaultInstance().getDatasetId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The ID of the Dataset in the same Project and Location which data will be
+     * used to train the Model. The Dataset must use schema compatible with
+     * Model being trained, and what is compatible should be described in the
+     * used TrainingPipeline's [training_task_definition]
+     * [google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition].
+     * For tabular Datasets, all their data is exported to training, to pick
+     * and choose from.
+     * 
+ * + * string dataset_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for datasetId to set. + * @return This builder for chaining. + */ + public Builder setDatasetIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + datasetId_ = value; + onChanged(); + return this; + } + + private java.lang.Object annotationsFilter_ = ""; + /** + * + * + *
+     * Applicable only to Datasets that have DataItems and Annotations.
+     * A filter on Annotations of the Dataset. Only Annotations that both
+     * match this filter and belong to DataItems not ignored by the split method
+     * are used in respectively training, validation or test role, depending on
+     * the role of the DataItem they are on (for the auto-assigned that role is
+     * decided by AI Platform). A filter with same syntax as the one used in
+     * [ListAnnotations][google.cloud.aiplatform.v1.DatasetService.ListAnnotations] may be used, but note
+     * here it filters across all Annotations of the Dataset, and not just within
+     * a single DataItem.
+     * 
+ * + * string annotations_filter = 6; + * + * @return The annotationsFilter. + */ + public java.lang.String getAnnotationsFilter() { + java.lang.Object ref = annotationsFilter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + annotationsFilter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Applicable only to Datasets that have DataItems and Annotations.
+     * A filter on Annotations of the Dataset. Only Annotations that both
+     * match this filter and belong to DataItems not ignored by the split method
+     * are used in respectively training, validation or test role, depending on
+     * the role of the DataItem they are on (for the auto-assigned that role is
+     * decided by AI Platform). A filter with same syntax as the one used in
+     * [ListAnnotations][google.cloud.aiplatform.v1.DatasetService.ListAnnotations] may be used, but note
+     * here it filters across all Annotations of the Dataset, and not just within
+     * a single DataItem.
+     * 
+ * + * string annotations_filter = 6; + * + * @return The bytes for annotationsFilter. + */ + public com.google.protobuf.ByteString getAnnotationsFilterBytes() { + java.lang.Object ref = annotationsFilter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + annotationsFilter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Applicable only to Datasets that have DataItems and Annotations.
+     * A filter on Annotations of the Dataset. Only Annotations that both
+     * match this filter and belong to DataItems not ignored by the split method
+     * are used in respectively training, validation or test role, depending on
+     * the role of the DataItem they are on (for the auto-assigned that role is
+     * decided by AI Platform). A filter with same syntax as the one used in
+     * [ListAnnotations][google.cloud.aiplatform.v1.DatasetService.ListAnnotations] may be used, but note
+     * here it filters across all Annotations of the Dataset, and not just within
+     * a single DataItem.
+     * 
+ * + * string annotations_filter = 6; + * + * @param value The annotationsFilter to set. + * @return This builder for chaining. + */ + public Builder setAnnotationsFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + annotationsFilter_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Applicable only to Datasets that have DataItems and Annotations.
+     * A filter on Annotations of the Dataset. Only Annotations that both
+     * match this filter and belong to DataItems not ignored by the split method
+     * are used in respectively training, validation or test role, depending on
+     * the role of the DataItem they are on (for the auto-assigned that role is
+     * decided by AI Platform). A filter with same syntax as the one used in
+     * [ListAnnotations][google.cloud.aiplatform.v1.DatasetService.ListAnnotations] may be used, but note
+     * here it filters across all Annotations of the Dataset, and not just within
+     * a single DataItem.
+     * 
+ * + * string annotations_filter = 6; + * + * @return This builder for chaining. + */ + public Builder clearAnnotationsFilter() { + + annotationsFilter_ = getDefaultInstance().getAnnotationsFilter(); + onChanged(); + return this; + } + /** + * + * + *
+     * Applicable only to Datasets that have DataItems and Annotations.
+     * A filter on Annotations of the Dataset. Only Annotations that both
+     * match this filter and belong to DataItems not ignored by the split method
+     * are used in respectively training, validation or test role, depending on
+     * the role of the DataItem they are on (for the auto-assigned that role is
+     * decided by AI Platform). A filter with same syntax as the one used in
+     * [ListAnnotations][google.cloud.aiplatform.v1.DatasetService.ListAnnotations] may be used, but note
+     * here it filters across all Annotations of the Dataset, and not just within
+     * a single DataItem.
+     * 
+ * + * string annotations_filter = 6; + * + * @param value The bytes for annotationsFilter to set. + * @return This builder for chaining. + */ + public Builder setAnnotationsFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + annotationsFilter_ = value; + onChanged(); + return this; + } + + private java.lang.Object annotationSchemaUri_ = ""; + /** + * + * + *
+     * Applicable only to custom training with Datasets that have DataItems and
+     * Annotations.
+     * Cloud Storage URI that points to a YAML file describing the annotation
+     * schema. The schema is defined as an OpenAPI 3.0.2
+     * [Schema Object](https://tinyurl.com/y538mdwt#schema-object).
+     * The schema files that can be used here are found in
+     * gs://google-cloud-aiplatform/schema/dataset/annotation/ , note that the
+     * chosen schema must be consistent with
+     * [metadata][google.cloud.aiplatform.v1.Dataset.metadata_schema_uri] of the Dataset specified by
+     * [dataset_id][google.cloud.aiplatform.v1.InputDataConfig.dataset_id].
+     * Only Annotations that both match this schema and belong to DataItems not
+     * ignored by the split method are used in respectively training, validation
+     * or test role, depending on the role of the DataItem they are on.
+     * When used in conjunction with [annotations_filter][google.cloud.aiplatform.v1.InputDataConfig.annotations_filter], the Annotations used
+     * for training are filtered by both [annotations_filter][google.cloud.aiplatform.v1.InputDataConfig.annotations_filter] and
+     * [annotation_schema_uri][google.cloud.aiplatform.v1.InputDataConfig.annotation_schema_uri].
+     * 
+ * + * string annotation_schema_uri = 9; + * + * @return The annotationSchemaUri. + */ + public java.lang.String getAnnotationSchemaUri() { + java.lang.Object ref = annotationSchemaUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + annotationSchemaUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Applicable only to custom training with Datasets that have DataItems and
+     * Annotations.
+     * Cloud Storage URI that points to a YAML file describing the annotation
+     * schema. The schema is defined as an OpenAPI 3.0.2
+     * [Schema Object](https://tinyurl.com/y538mdwt#schema-object).
+     * The schema files that can be used here are found in
+     * gs://google-cloud-aiplatform/schema/dataset/annotation/ , note that the
+     * chosen schema must be consistent with
+     * [metadata][google.cloud.aiplatform.v1.Dataset.metadata_schema_uri] of the Dataset specified by
+     * [dataset_id][google.cloud.aiplatform.v1.InputDataConfig.dataset_id].
+     * Only Annotations that both match this schema and belong to DataItems not
+     * ignored by the split method are used in respectively training, validation
+     * or test role, depending on the role of the DataItem they are on.
+     * When used in conjunction with [annotations_filter][google.cloud.aiplatform.v1.InputDataConfig.annotations_filter], the Annotations used
+     * for training are filtered by both [annotations_filter][google.cloud.aiplatform.v1.InputDataConfig.annotations_filter] and
+     * [annotation_schema_uri][google.cloud.aiplatform.v1.InputDataConfig.annotation_schema_uri].
+     * 
+ * + * string annotation_schema_uri = 9; + * + * @return The bytes for annotationSchemaUri. + */ + public com.google.protobuf.ByteString getAnnotationSchemaUriBytes() { + java.lang.Object ref = annotationSchemaUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + annotationSchemaUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Applicable only to custom training with Datasets that have DataItems and
+     * Annotations.
+     * Cloud Storage URI that points to a YAML file describing the annotation
+     * schema. The schema is defined as an OpenAPI 3.0.2
+     * [Schema Object](https://tinyurl.com/y538mdwt#schema-object).
+     * The schema files that can be used here are found in
+     * gs://google-cloud-aiplatform/schema/dataset/annotation/ , note that the
+     * chosen schema must be consistent with
+     * [metadata][google.cloud.aiplatform.v1.Dataset.metadata_schema_uri] of the Dataset specified by
+     * [dataset_id][google.cloud.aiplatform.v1.InputDataConfig.dataset_id].
+     * Only Annotations that both match this schema and belong to DataItems not
+     * ignored by the split method are used in respectively training, validation
+     * or test role, depending on the role of the DataItem they are on.
+     * When used in conjunction with [annotations_filter][google.cloud.aiplatform.v1.InputDataConfig.annotations_filter], the Annotations used
+     * for training are filtered by both [annotations_filter][google.cloud.aiplatform.v1.InputDataConfig.annotations_filter] and
+     * [annotation_schema_uri][google.cloud.aiplatform.v1.InputDataConfig.annotation_schema_uri].
+     * 
+ * + * string annotation_schema_uri = 9; + * + * @param value The annotationSchemaUri to set. + * @return This builder for chaining. + */ + public Builder setAnnotationSchemaUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + annotationSchemaUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Applicable only to custom training with Datasets that have DataItems and
+     * Annotations.
+     * Cloud Storage URI that points to a YAML file describing the annotation
+     * schema. The schema is defined as an OpenAPI 3.0.2
+     * [Schema Object](https://tinyurl.com/y538mdwt#schema-object).
+     * The schema files that can be used here are found in
+     * gs://google-cloud-aiplatform/schema/dataset/annotation/ , note that the
+     * chosen schema must be consistent with
+     * [metadata][google.cloud.aiplatform.v1.Dataset.metadata_schema_uri] of the Dataset specified by
+     * [dataset_id][google.cloud.aiplatform.v1.InputDataConfig.dataset_id].
+     * Only Annotations that both match this schema and belong to DataItems not
+     * ignored by the split method are used in respectively training, validation
+     * or test role, depending on the role of the DataItem they are on.
+     * When used in conjunction with [annotations_filter][google.cloud.aiplatform.v1.InputDataConfig.annotations_filter], the Annotations used
+     * for training are filtered by both [annotations_filter][google.cloud.aiplatform.v1.InputDataConfig.annotations_filter] and
+     * [annotation_schema_uri][google.cloud.aiplatform.v1.InputDataConfig.annotation_schema_uri].
+     * 
+ * + * string annotation_schema_uri = 9; + * + * @return This builder for chaining. + */ + public Builder clearAnnotationSchemaUri() { + + annotationSchemaUri_ = getDefaultInstance().getAnnotationSchemaUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * Applicable only to custom training with Datasets that have DataItems and
+     * Annotations.
+     * Cloud Storage URI that points to a YAML file describing the annotation
+     * schema. The schema is defined as an OpenAPI 3.0.2
+     * [Schema Object](https://tinyurl.com/y538mdwt#schema-object).
+     * The schema files that can be used here are found in
+     * gs://google-cloud-aiplatform/schema/dataset/annotation/ , note that the
+     * chosen schema must be consistent with
+     * [metadata][google.cloud.aiplatform.v1.Dataset.metadata_schema_uri] of the Dataset specified by
+     * [dataset_id][google.cloud.aiplatform.v1.InputDataConfig.dataset_id].
+     * Only Annotations that both match this schema and belong to DataItems not
+     * ignored by the split method are used in respectively training, validation
+     * or test role, depending on the role of the DataItem they are on.
+     * When used in conjunction with [annotations_filter][google.cloud.aiplatform.v1.InputDataConfig.annotations_filter], the Annotations used
+     * for training are filtered by both [annotations_filter][google.cloud.aiplatform.v1.InputDataConfig.annotations_filter] and
+     * [annotation_schema_uri][google.cloud.aiplatform.v1.InputDataConfig.annotation_schema_uri].
+     * 
+ * + * string annotation_schema_uri = 9; + * + * @param value The bytes for annotationSchemaUri to set. + * @return This builder for chaining. + */ + public Builder setAnnotationSchemaUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + annotationSchemaUri_ = 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.v1.InputDataConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.InputDataConfig) + private static final com.google.cloud.aiplatform.v1.InputDataConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.InputDataConfig(); + } + + public static com.google.cloud.aiplatform.v1.InputDataConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InputDataConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new InputDataConfig(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.v1.InputDataConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/InputDataConfigOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/InputDataConfigOrBuilder.java new file mode 100644 index 000000000..be255d805 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/InputDataConfigOrBuilder.java @@ -0,0 +1,465 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/training_pipeline.proto + +package com.google.cloud.aiplatform.v1; + +public interface InputDataConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.InputDataConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Split based on fractions defining the size of each set.
+   * 
+ * + * .google.cloud.aiplatform.v1.FractionSplit fraction_split = 2; + * + * @return Whether the fractionSplit field is set. + */ + boolean hasFractionSplit(); + /** + * + * + *
+   * Split based on fractions defining the size of each set.
+   * 
+ * + * .google.cloud.aiplatform.v1.FractionSplit fraction_split = 2; + * + * @return The fractionSplit. + */ + com.google.cloud.aiplatform.v1.FractionSplit getFractionSplit(); + /** + * + * + *
+   * Split based on fractions defining the size of each set.
+   * 
+ * + * .google.cloud.aiplatform.v1.FractionSplit fraction_split = 2; + */ + com.google.cloud.aiplatform.v1.FractionSplitOrBuilder getFractionSplitOrBuilder(); + + /** + * + * + *
+   * Split based on the provided filters for each set.
+   * 
+ * + * .google.cloud.aiplatform.v1.FilterSplit filter_split = 3; + * + * @return Whether the filterSplit field is set. + */ + boolean hasFilterSplit(); + /** + * + * + *
+   * Split based on the provided filters for each set.
+   * 
+ * + * .google.cloud.aiplatform.v1.FilterSplit filter_split = 3; + * + * @return The filterSplit. + */ + com.google.cloud.aiplatform.v1.FilterSplit getFilterSplit(); + /** + * + * + *
+   * Split based on the provided filters for each set.
+   * 
+ * + * .google.cloud.aiplatform.v1.FilterSplit filter_split = 3; + */ + com.google.cloud.aiplatform.v1.FilterSplitOrBuilder getFilterSplitOrBuilder(); + + /** + * + * + *
+   * Supported only for tabular Datasets.
+   * Split based on a predefined key.
+   * 
+ * + * .google.cloud.aiplatform.v1.PredefinedSplit predefined_split = 4; + * + * @return Whether the predefinedSplit field is set. + */ + boolean hasPredefinedSplit(); + /** + * + * + *
+   * Supported only for tabular Datasets.
+   * Split based on a predefined key.
+   * 
+ * + * .google.cloud.aiplatform.v1.PredefinedSplit predefined_split = 4; + * + * @return The predefinedSplit. + */ + com.google.cloud.aiplatform.v1.PredefinedSplit getPredefinedSplit(); + /** + * + * + *
+   * Supported only for tabular Datasets.
+   * Split based on a predefined key.
+   * 
+ * + * .google.cloud.aiplatform.v1.PredefinedSplit predefined_split = 4; + */ + com.google.cloud.aiplatform.v1.PredefinedSplitOrBuilder getPredefinedSplitOrBuilder(); + + /** + * + * + *
+   * Supported only for tabular Datasets.
+   * Split based on the timestamp of the input data pieces.
+   * 
+ * + * .google.cloud.aiplatform.v1.TimestampSplit timestamp_split = 5; + * + * @return Whether the timestampSplit field is set. + */ + boolean hasTimestampSplit(); + /** + * + * + *
+   * Supported only for tabular Datasets.
+   * Split based on the timestamp of the input data pieces.
+   * 
+ * + * .google.cloud.aiplatform.v1.TimestampSplit timestamp_split = 5; + * + * @return The timestampSplit. + */ + com.google.cloud.aiplatform.v1.TimestampSplit getTimestampSplit(); + /** + * + * + *
+   * Supported only for tabular Datasets.
+   * Split based on the timestamp of the input data pieces.
+   * 
+ * + * .google.cloud.aiplatform.v1.TimestampSplit timestamp_split = 5; + */ + com.google.cloud.aiplatform.v1.TimestampSplitOrBuilder getTimestampSplitOrBuilder(); + + /** + * + * + *
+   * The Cloud Storage location where the training data is to be
+   * written to. In the given directory a new directory is created with
+   * name:
+   * `dataset-<dataset-id>-<annotation-type>-<timestamp-of-training-call>`
+   * where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format.
+   * All training input data is written into that directory.
+   * The AI Platform environment variables representing Cloud Storage
+   * data URIs are represented in the Cloud Storage wildcard
+   * format to support sharded data. e.g.: "gs://.../training-*.jsonl"
+   * * AIP_DATA_FORMAT = "jsonl" for non-tabular data, "csv" for tabular data
+   * * AIP_TRAINING_DATA_URI =
+   * "gcs_destination/dataset-<dataset-id>-<annotation-type>-<time>/training-*.${AIP_DATA_FORMAT}"
+   * * AIP_VALIDATION_DATA_URI =
+   * "gcs_destination/dataset-<dataset-id>-<annotation-type>-<time>/validation-*.${AIP_DATA_FORMAT}"
+   * * AIP_TEST_DATA_URI =
+   * "gcs_destination/dataset-<dataset-id>-<annotation-type>-<time>/test-*.${AIP_DATA_FORMAT}"
+   * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination gcs_destination = 8; + * + * @return Whether the gcsDestination field is set. + */ + boolean hasGcsDestination(); + /** + * + * + *
+   * The Cloud Storage location where the training data is to be
+   * written to. In the given directory a new directory is created with
+   * name:
+   * `dataset-<dataset-id>-<annotation-type>-<timestamp-of-training-call>`
+   * where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format.
+   * All training input data is written into that directory.
+   * The AI Platform environment variables representing Cloud Storage
+   * data URIs are represented in the Cloud Storage wildcard
+   * format to support sharded data. e.g.: "gs://.../training-*.jsonl"
+   * * AIP_DATA_FORMAT = "jsonl" for non-tabular data, "csv" for tabular data
+   * * AIP_TRAINING_DATA_URI =
+   * "gcs_destination/dataset-<dataset-id>-<annotation-type>-<time>/training-*.${AIP_DATA_FORMAT}"
+   * * AIP_VALIDATION_DATA_URI =
+   * "gcs_destination/dataset-<dataset-id>-<annotation-type>-<time>/validation-*.${AIP_DATA_FORMAT}"
+   * * AIP_TEST_DATA_URI =
+   * "gcs_destination/dataset-<dataset-id>-<annotation-type>-<time>/test-*.${AIP_DATA_FORMAT}"
+   * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination gcs_destination = 8; + * + * @return The gcsDestination. + */ + com.google.cloud.aiplatform.v1.GcsDestination getGcsDestination(); + /** + * + * + *
+   * The Cloud Storage location where the training data is to be
+   * written to. In the given directory a new directory is created with
+   * name:
+   * `dataset-<dataset-id>-<annotation-type>-<timestamp-of-training-call>`
+   * where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format.
+   * All training input data is written into that directory.
+   * The AI Platform environment variables representing Cloud Storage
+   * data URIs are represented in the Cloud Storage wildcard
+   * format to support sharded data. e.g.: "gs://.../training-*.jsonl"
+   * * AIP_DATA_FORMAT = "jsonl" for non-tabular data, "csv" for tabular data
+   * * AIP_TRAINING_DATA_URI =
+   * "gcs_destination/dataset-<dataset-id>-<annotation-type>-<time>/training-*.${AIP_DATA_FORMAT}"
+   * * AIP_VALIDATION_DATA_URI =
+   * "gcs_destination/dataset-<dataset-id>-<annotation-type>-<time>/validation-*.${AIP_DATA_FORMAT}"
+   * * AIP_TEST_DATA_URI =
+   * "gcs_destination/dataset-<dataset-id>-<annotation-type>-<time>/test-*.${AIP_DATA_FORMAT}"
+   * 
+ * + * .google.cloud.aiplatform.v1.GcsDestination gcs_destination = 8; + */ + com.google.cloud.aiplatform.v1.GcsDestinationOrBuilder getGcsDestinationOrBuilder(); + + /** + * + * + *
+   * Only applicable to custom training with tabular Dataset with BigQuery
+   * source.
+   * The BigQuery project location where the training data is to be written
+   * to. In the given project a new dataset is created with name
+   * `dataset_<dataset-id>_<annotation-type>_<timestamp-of-training-call>`
+   * where timestamp is in YYYY_MM_DDThh_mm_ss_sssZ format. All training
+   * input data is written into that dataset. In the dataset three
+   * tables are created, `training`, `validation` and `test`.
+   * * AIP_DATA_FORMAT = "bigquery".
+   * * AIP_TRAINING_DATA_URI  =
+   * "bigquery_destination.dataset_<dataset-id>_<annotation-type>_<time>.training"
+   * * AIP_VALIDATION_DATA_URI =
+   * "bigquery_destination.dataset_<dataset-id>_<annotation-type>_<time>.validation"
+   * * AIP_TEST_DATA_URI =
+   * "bigquery_destination.dataset_<dataset-id>_<annotation-type>_<time>.test"
+   * 
+ * + * .google.cloud.aiplatform.v1.BigQueryDestination bigquery_destination = 10; + * + * @return Whether the bigqueryDestination field is set. + */ + boolean hasBigqueryDestination(); + /** + * + * + *
+   * Only applicable to custom training with tabular Dataset with BigQuery
+   * source.
+   * The BigQuery project location where the training data is to be written
+   * to. In the given project a new dataset is created with name
+   * `dataset_<dataset-id>_<annotation-type>_<timestamp-of-training-call>`
+   * where timestamp is in YYYY_MM_DDThh_mm_ss_sssZ format. All training
+   * input data is written into that dataset. In the dataset three
+   * tables are created, `training`, `validation` and `test`.
+   * * AIP_DATA_FORMAT = "bigquery".
+   * * AIP_TRAINING_DATA_URI  =
+   * "bigquery_destination.dataset_<dataset-id>_<annotation-type>_<time>.training"
+   * * AIP_VALIDATION_DATA_URI =
+   * "bigquery_destination.dataset_<dataset-id>_<annotation-type>_<time>.validation"
+   * * AIP_TEST_DATA_URI =
+   * "bigquery_destination.dataset_<dataset-id>_<annotation-type>_<time>.test"
+   * 
+ * + * .google.cloud.aiplatform.v1.BigQueryDestination bigquery_destination = 10; + * + * @return The bigqueryDestination. + */ + com.google.cloud.aiplatform.v1.BigQueryDestination getBigqueryDestination(); + /** + * + * + *
+   * Only applicable to custom training with tabular Dataset with BigQuery
+   * source.
+   * The BigQuery project location where the training data is to be written
+   * to. In the given project a new dataset is created with name
+   * `dataset_<dataset-id>_<annotation-type>_<timestamp-of-training-call>`
+   * where timestamp is in YYYY_MM_DDThh_mm_ss_sssZ format. All training
+   * input data is written into that dataset. In the dataset three
+   * tables are created, `training`, `validation` and `test`.
+   * * AIP_DATA_FORMAT = "bigquery".
+   * * AIP_TRAINING_DATA_URI  =
+   * "bigquery_destination.dataset_<dataset-id>_<annotation-type>_<time>.training"
+   * * AIP_VALIDATION_DATA_URI =
+   * "bigquery_destination.dataset_<dataset-id>_<annotation-type>_<time>.validation"
+   * * AIP_TEST_DATA_URI =
+   * "bigquery_destination.dataset_<dataset-id>_<annotation-type>_<time>.test"
+   * 
+ * + * .google.cloud.aiplatform.v1.BigQueryDestination bigquery_destination = 10; + */ + com.google.cloud.aiplatform.v1.BigQueryDestinationOrBuilder getBigqueryDestinationOrBuilder(); + + /** + * + * + *
+   * Required. The ID of the Dataset in the same Project and Location which data will be
+   * used to train the Model. The Dataset must use schema compatible with
+   * Model being trained, and what is compatible should be described in the
+   * used TrainingPipeline's [training_task_definition]
+   * [google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition].
+   * For tabular Datasets, all their data is exported to training, to pick
+   * and choose from.
+   * 
+ * + * string dataset_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The datasetId. + */ + java.lang.String getDatasetId(); + /** + * + * + *
+   * Required. The ID of the Dataset in the same Project and Location which data will be
+   * used to train the Model. The Dataset must use schema compatible with
+   * Model being trained, and what is compatible should be described in the
+   * used TrainingPipeline's [training_task_definition]
+   * [google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition].
+   * For tabular Datasets, all their data is exported to training, to pick
+   * and choose from.
+   * 
+ * + * string dataset_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for datasetId. + */ + com.google.protobuf.ByteString getDatasetIdBytes(); + + /** + * + * + *
+   * Applicable only to Datasets that have DataItems and Annotations.
+   * A filter on Annotations of the Dataset. Only Annotations that both
+   * match this filter and belong to DataItems not ignored by the split method
+   * are used in respectively training, validation or test role, depending on
+   * the role of the DataItem they are on (for the auto-assigned that role is
+   * decided by AI Platform). A filter with same syntax as the one used in
+   * [ListAnnotations][google.cloud.aiplatform.v1.DatasetService.ListAnnotations] may be used, but note
+   * here it filters across all Annotations of the Dataset, and not just within
+   * a single DataItem.
+   * 
+ * + * string annotations_filter = 6; + * + * @return The annotationsFilter. + */ + java.lang.String getAnnotationsFilter(); + /** + * + * + *
+   * Applicable only to Datasets that have DataItems and Annotations.
+   * A filter on Annotations of the Dataset. Only Annotations that both
+   * match this filter and belong to DataItems not ignored by the split method
+   * are used in respectively training, validation or test role, depending on
+   * the role of the DataItem they are on (for the auto-assigned that role is
+   * decided by AI Platform). A filter with same syntax as the one used in
+   * [ListAnnotations][google.cloud.aiplatform.v1.DatasetService.ListAnnotations] may be used, but note
+   * here it filters across all Annotations of the Dataset, and not just within
+   * a single DataItem.
+   * 
+ * + * string annotations_filter = 6; + * + * @return The bytes for annotationsFilter. + */ + com.google.protobuf.ByteString getAnnotationsFilterBytes(); + + /** + * + * + *
+   * Applicable only to custom training with Datasets that have DataItems and
+   * Annotations.
+   * Cloud Storage URI that points to a YAML file describing the annotation
+   * schema. The schema is defined as an OpenAPI 3.0.2
+   * [Schema Object](https://tinyurl.com/y538mdwt#schema-object).
+   * The schema files that can be used here are found in
+   * gs://google-cloud-aiplatform/schema/dataset/annotation/ , note that the
+   * chosen schema must be consistent with
+   * [metadata][google.cloud.aiplatform.v1.Dataset.metadata_schema_uri] of the Dataset specified by
+   * [dataset_id][google.cloud.aiplatform.v1.InputDataConfig.dataset_id].
+   * Only Annotations that both match this schema and belong to DataItems not
+   * ignored by the split method are used in respectively training, validation
+   * or test role, depending on the role of the DataItem they are on.
+   * When used in conjunction with [annotations_filter][google.cloud.aiplatform.v1.InputDataConfig.annotations_filter], the Annotations used
+   * for training are filtered by both [annotations_filter][google.cloud.aiplatform.v1.InputDataConfig.annotations_filter] and
+   * [annotation_schema_uri][google.cloud.aiplatform.v1.InputDataConfig.annotation_schema_uri].
+   * 
+ * + * string annotation_schema_uri = 9; + * + * @return The annotationSchemaUri. + */ + java.lang.String getAnnotationSchemaUri(); + /** + * + * + *
+   * Applicable only to custom training with Datasets that have DataItems and
+   * Annotations.
+   * Cloud Storage URI that points to a YAML file describing the annotation
+   * schema. The schema is defined as an OpenAPI 3.0.2
+   * [Schema Object](https://tinyurl.com/y538mdwt#schema-object).
+   * The schema files that can be used here are found in
+   * gs://google-cloud-aiplatform/schema/dataset/annotation/ , note that the
+   * chosen schema must be consistent with
+   * [metadata][google.cloud.aiplatform.v1.Dataset.metadata_schema_uri] of the Dataset specified by
+   * [dataset_id][google.cloud.aiplatform.v1.InputDataConfig.dataset_id].
+   * Only Annotations that both match this schema and belong to DataItems not
+   * ignored by the split method are used in respectively training, validation
+   * or test role, depending on the role of the DataItem they are on.
+   * When used in conjunction with [annotations_filter][google.cloud.aiplatform.v1.InputDataConfig.annotations_filter], the Annotations used
+   * for training are filtered by both [annotations_filter][google.cloud.aiplatform.v1.InputDataConfig.annotations_filter] and
+   * [annotation_schema_uri][google.cloud.aiplatform.v1.InputDataConfig.annotation_schema_uri].
+   * 
+ * + * string annotation_schema_uri = 9; + * + * @return The bytes for annotationSchemaUri. + */ + com.google.protobuf.ByteString getAnnotationSchemaUriBytes(); + + public com.google.cloud.aiplatform.v1.InputDataConfig.SplitCase getSplitCase(); + + public com.google.cloud.aiplatform.v1.InputDataConfig.DestinationCase getDestinationCase(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/IoProto.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/IoProto.java new file mode 100644 index 000000000..919b3a877 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/IoProto.java @@ -0,0 +1,129 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/io.proto + +package com.google.cloud.aiplatform.v1; + +public final class IoProto { + private IoProto() {} + + 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_v1_GcsSource_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_GcsSource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_GcsDestination_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_GcsDestination_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_BigQuerySource_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_BigQuerySource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_BigQueryDestination_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_BigQueryDestination_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ContainerRegistryDestination_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ContainerRegistryDestination_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/v1/io.proto\022\032g" + + "oogle.cloud.aiplatform.v1\032\037google/api/fi" + + "eld_behavior.proto\032\034google/api/annotatio" + + "ns.proto\"\036\n\tGcsSource\022\021\n\004uris\030\001 \003(\tB\003\340A\002" + + "\"0\n\016GcsDestination\022\036\n\021output_uri_prefix\030" + + "\001 \001(\tB\003\340A\002\"(\n\016BigQuerySource\022\026\n\tinput_ur" + + "i\030\001 \001(\tB\003\340A\002\".\n\023BigQueryDestination\022\027\n\no" + + "utput_uri\030\001 \001(\tB\003\340A\002\"7\n\034ContainerRegistr" + + "yDestination\022\027\n\noutput_uri\030\001 \001(\tB\003\340A\002Bq\n" + + "\036com.google.cloud.aiplatform.v1B\007IoProto" + + "P\001ZDgoogle.golang.org/genproto/googleapi" + + "s/cloud/aiplatform/v1;aiplatformb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1_GcsSource_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_GcsSource_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_GcsSource_descriptor, + new java.lang.String[] { + "Uris", + }); + internal_static_google_cloud_aiplatform_v1_GcsDestination_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_aiplatform_v1_GcsDestination_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_GcsDestination_descriptor, + new java.lang.String[] { + "OutputUriPrefix", + }); + internal_static_google_cloud_aiplatform_v1_BigQuerySource_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_aiplatform_v1_BigQuerySource_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_BigQuerySource_descriptor, + new java.lang.String[] { + "InputUri", + }); + internal_static_google_cloud_aiplatform_v1_BigQueryDestination_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_aiplatform_v1_BigQueryDestination_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_BigQueryDestination_descriptor, + new java.lang.String[] { + "OutputUri", + }); + internal_static_google_cloud_aiplatform_v1_ContainerRegistryDestination_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_aiplatform_v1_ContainerRegistryDestination_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ContainerRegistryDestination_descriptor, + new java.lang.String[] { + "OutputUri", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/JobServiceProto.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/JobServiceProto.java new file mode 100644 index 000000000..83571e7ae --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/JobServiceProto.java @@ -0,0 +1,582 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/job_service.proto + +package com.google.cloud.aiplatform.v1; + +public final class JobServiceProto { + private JobServiceProto() {} + + 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_v1_CreateCustomJobRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_CreateCustomJobRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_GetCustomJobRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_GetCustomJobRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ListCustomJobsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ListCustomJobsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ListCustomJobsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ListCustomJobsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_DeleteCustomJobRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_DeleteCustomJobRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_CancelCustomJobRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_CancelCustomJobRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_CreateDataLabelingJobRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_CreateDataLabelingJobRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_GetDataLabelingJobRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_GetDataLabelingJobRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ListDataLabelingJobsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ListDataLabelingJobsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ListDataLabelingJobsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ListDataLabelingJobsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_DeleteDataLabelingJobRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_DeleteDataLabelingJobRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_CancelDataLabelingJobRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_CancelDataLabelingJobRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_CreateHyperparameterTuningJobRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_CreateHyperparameterTuningJobRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_GetHyperparameterTuningJobRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_GetHyperparameterTuningJobRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ListHyperparameterTuningJobsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ListHyperparameterTuningJobsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ListHyperparameterTuningJobsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ListHyperparameterTuningJobsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_DeleteHyperparameterTuningJobRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_DeleteHyperparameterTuningJobRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_CancelHyperparameterTuningJobRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_CancelHyperparameterTuningJobRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_CreateBatchPredictionJobRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_CreateBatchPredictionJobRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_GetBatchPredictionJobRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_GetBatchPredictionJobRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ListBatchPredictionJobsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ListBatchPredictionJobsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ListBatchPredictionJobsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ListBatchPredictionJobsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_DeleteBatchPredictionJobRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_DeleteBatchPredictionJobRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_CancelBatchPredictionJobRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_CancelBatchPredictionJobRequest_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/v1/job_service" + + ".proto\022\032google.cloud.aiplatform.v1\032\034goog" + + "le/api/annotations.proto\032\027google/api/cli" + + "ent.proto\032\037google/api/field_behavior.pro" + + "to\032\031google/api/resource.proto\0325google/cl" + + "oud/aiplatform/v1/batch_prediction_job.p" + + "roto\032+google/cloud/aiplatform/v1/custom_" + + "job.proto\0322google/cloud/aiplatform/v1/da" + + "ta_labeling_job.proto\032:google/cloud/aipl" + + "atform/v1/hyperparameter_tuning_job.prot" + + "o\032*google/cloud/aiplatform/v1/operation." + + "proto\032#google/longrunning/operations.pro" + + "to\032\033google/protobuf/empty.proto\032 google/" + + "protobuf/field_mask.proto\032\037google/protob" + + "uf/timestamp.proto\"\223\001\n\026CreateCustomJobRe" + + "quest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!locations" + + ".googleapis.com/Location\022>\n\ncustom_job\030\002" + + " \001(\0132%.google.cloud.aiplatform.v1.Custom" + + "JobB\003\340A\002\"P\n\023GetCustomJobRequest\0229\n\004name\030" + + "\001 \001(\tB+\340A\002\372A%\n#aiplatform.googleapis.com" + + "/CustomJob\"\270\001\n\025ListCustomJobsRequest\0229\n\006" + + "parent\030\001 \001(\tB)\340A\002\372A#\n!locations.googleap" + + "is.com/Location\022\016\n\006filter\030\002 \001(\t\022\021\n\tpage_" + + "size\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\022-\n\tread_m" + + "ask\030\005 \001(\0132\032.google.protobuf.FieldMask\"m\n" + + "\026ListCustomJobsResponse\022:\n\013custom_jobs\030\001" + + " \003(\0132%.google.cloud.aiplatform.v1.Custom" + + "Job\022\027\n\017next_page_token\030\002 \001(\t\"S\n\026DeleteCu" + + "stomJobRequest\0229\n\004name\030\001 \001(\tB+\340A\002\372A%\n#ai" + + "platform.googleapis.com/CustomJob\"S\n\026Can" + + "celCustomJobRequest\0229\n\004name\030\001 \001(\tB+\340A\002\372A" + + "%\n#aiplatform.googleapis.com/CustomJob\"\246" + + "\001\n\034CreateDataLabelingJobRequest\0229\n\006paren" + + "t\030\001 \001(\tB)\340A\002\372A#\n!locations.googleapis.co" + + "m/Location\022K\n\021data_labeling_job\030\002 \001(\0132+." + + "google.cloud.aiplatform.v1.DataLabelingJ" + + "obB\003\340A\002\"\\\n\031GetDataLabelingJobRequest\022?\n\004" + + "name\030\001 \001(\tB1\340A\002\372A+\n)aiplatform.googleapi" + + "s.com/DataLabelingJob\"\320\001\n\033ListDataLabeli" + + "ngJobsRequest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!l" + + "ocations.googleapis.com/Location\022\016\n\006filt" + + "er\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005\022\022\n\npage_toke" + + "n\030\004 \001(\t\022-\n\tread_mask\030\005 \001(\0132\032.google.prot" + + "obuf.FieldMask\022\020\n\010order_by\030\006 \001(\t\"\200\001\n\034Lis" + + "tDataLabelingJobsResponse\022G\n\022data_labeli" + + "ng_jobs\030\001 \003(\0132+.google.cloud.aiplatform." + + "v1.DataLabelingJob\022\027\n\017next_page_token\030\002 " + + "\001(\t\"_\n\034DeleteDataLabelingJobRequest\022?\n\004n" + + "ame\030\001 \001(\tB1\340A\002\372A+\n)aiplatform.googleapis" + + ".com/DataLabelingJob\"_\n\034CancelDataLabeli" + + "ngJobRequest\022?\n\004name\030\001 \001(\tB1\340A\002\372A+\n)aipl" + + "atform.googleapis.com/DataLabelingJob\"\276\001" + + "\n$CreateHyperparameterTuningJobRequest\0229" + + "\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!locations.google" + + "apis.com/Location\022[\n\031hyperparameter_tuni" + + "ng_job\030\002 \001(\01323.google.cloud.aiplatform.v" + + "1.HyperparameterTuningJobB\003\340A\002\"l\n!GetHyp" + + "erparameterTuningJobRequest\022G\n\004name\030\001 \001(" + + "\tB9\340A\002\372A3\n1aiplatform.googleapis.com/Hyp" + + "erparameterTuningJob\"\306\001\n#ListHyperparame" + + "terTuningJobsRequest\0229\n\006parent\030\001 \001(\tB)\340A" + + "\002\372A#\n!locations.googleapis.com/Location\022" + + "\016\n\006filter\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005\022\022\n\npa" + + "ge_token\030\004 \001(\t\022-\n\tread_mask\030\005 \001(\0132\032.goog" + + "le.protobuf.FieldMask\"\230\001\n$ListHyperparam" + + "eterTuningJobsResponse\022W\n\032hyperparameter" + + "_tuning_jobs\030\001 \003(\01323.google.cloud.aiplat" + + "form.v1.HyperparameterTuningJob\022\027\n\017next_" + + "page_token\030\002 \001(\t\"o\n$DeleteHyperparameter" + + "TuningJobRequest\022G\n\004name\030\001 \001(\tB9\340A\002\372A3\n1" + + "aiplatform.googleapis.com/Hyperparameter" + + "TuningJob\"o\n$CancelHyperparameterTuningJ" + + "obRequest\022G\n\004name\030\001 \001(\tB9\340A\002\372A3\n1aiplatf" + + "orm.googleapis.com/HyperparameterTuningJ" + + "ob\"\257\001\n\037CreateBatchPredictionJobRequest\0229" + + "\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!locations.google" + + "apis.com/Location\022Q\n\024batch_prediction_jo" + + "b\030\002 \001(\0132..google.cloud.aiplatform.v1.Bat" + + "chPredictionJobB\003\340A\002\"b\n\034GetBatchPredicti" + + "onJobRequest\022B\n\004name\030\001 \001(\tB4\340A\002\372A.\n,aipl" + + "atform.googleapis.com/BatchPredictionJob" + + "\"\301\001\n\036ListBatchPredictionJobsRequest\0229\n\006p" + + "arent\030\001 \001(\tB)\340A\002\372A#\n!locations.googleapi" + + "s.com/Location\022\016\n\006filter\030\002 \001(\t\022\021\n\tpage_s" + + "ize\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\022-\n\tread_ma" + + "sk\030\005 \001(\0132\032.google.protobuf.FieldMask\"\211\001\n" + + "\037ListBatchPredictionJobsResponse\022M\n\025batc" + + "h_prediction_jobs\030\001 \003(\0132..google.cloud.a" + + "iplatform.v1.BatchPredictionJob\022\027\n\017next_" + + "page_token\030\002 \001(\t\"e\n\037DeleteBatchPredictio" + + "nJobRequest\022B\n\004name\030\001 \001(\tB4\340A\002\372A.\n,aipla" + + "tform.googleapis.com/BatchPredictionJob\"" + + "e\n\037CancelBatchPredictionJobRequest\022B\n\004na" + + "me\030\001 \001(\tB4\340A\002\372A.\n,aiplatform.googleapis." + + "com/BatchPredictionJob2\326\"\n\nJobService\022\304\001" + + "\n\017CreateCustomJob\0222.google.cloud.aiplatf" + + "orm.v1.CreateCustomJobRequest\032%.google.c" + + "loud.aiplatform.v1.CustomJob\"V\202\323\344\223\002<\"./v" + + "1/{parent=projects/*/locations/*}/custom" + + "Jobs:\ncustom_job\332A\021parent,custom_job\022\245\001\n" + + "\014GetCustomJob\022/.google.cloud.aiplatform." + + "v1.GetCustomJobRequest\032%.google.cloud.ai" + + "platform.v1.CustomJob\"=\202\323\344\223\0020\022./v1/{name" + + "=projects/*/locations/*/customJobs/*}\332A\004" + + "name\022\270\001\n\016ListCustomJobs\0221.google.cloud.a" + + "iplatform.v1.ListCustomJobsRequest\0322.goo" + + "gle.cloud.aiplatform.v1.ListCustomJobsRe" + + "sponse\"?\202\323\344\223\0020\022./v1/{parent=projects/*/l" + + "ocations/*}/customJobs\332A\006parent\022\326\001\n\017Dele" + + "teCustomJob\0222.google.cloud.aiplatform.v1" + + ".DeleteCustomJobRequest\032\035.google.longrun" + + "ning.Operation\"p\202\323\344\223\0020*./v1/{name=projec" + + "ts/*/locations/*/customJobs/*}\332A\004name\312A0" + + "\n\025google.protobuf.Empty\022\027DeleteOperation" + + "Metadata\022\246\001\n\017CancelCustomJob\0222.google.cl" + + "oud.aiplatform.v1.CancelCustomJobRequest" + + "\032\026.google.protobuf.Empty\"G\202\323\344\223\002:\"5/v1/{n" + + "ame=projects/*/locations/*/customJobs/*}" + + ":cancel:\001*\332A\004name\022\352\001\n\025CreateDataLabeling" + + "Job\0228.google.cloud.aiplatform.v1.CreateD" + + "ataLabelingJobRequest\032+.google.cloud.aip" + + "latform.v1.DataLabelingJob\"j\202\323\344\223\002I\"4/v1/" + + "{parent=projects/*/locations/*}/dataLabe" + + "lingJobs:\021data_labeling_job\332A\030parent,dat" + + "a_labeling_job\022\275\001\n\022GetDataLabelingJob\0225." + + "google.cloud.aiplatform.v1.GetDataLabeli" + + "ngJobRequest\032+.google.cloud.aiplatform.v" + + "1.DataLabelingJob\"C\202\323\344\223\0026\0224/v1/{name=pro" + + "jects/*/locations/*/dataLabelingJobs/*}\332" + + "A\004name\022\320\001\n\024ListDataLabelingJobs\0227.google" + + ".cloud.aiplatform.v1.ListDataLabelingJob" + + "sRequest\0328.google.cloud.aiplatform.v1.Li" + + "stDataLabelingJobsResponse\"E\202\323\344\223\0026\0224/v1/" + + "{parent=projects/*/locations/*}/dataLabe" + + "lingJobs\332A\006parent\022\350\001\n\025DeleteDataLabeling" + + "Job\0228.google.cloud.aiplatform.v1.DeleteD" + + "ataLabelingJobRequest\032\035.google.longrunni" + + "ng.Operation\"v\202\323\344\223\0026*4/v1/{name=projects" + + "/*/locations/*/dataLabelingJobs/*}\332A\004nam" + + "e\312A0\n\025google.protobuf.Empty\022\027DeleteOpera" + + "tionMetadata\022\270\001\n\025CancelDataLabelingJob\0228" + + ".google.cloud.aiplatform.v1.CancelDataLa" + + "belingJobRequest\032\026.google.protobuf.Empty" + + "\"M\202\323\344\223\002@\";/v1/{name=projects/*/locations" + + "/*/dataLabelingJobs/*}:cancel:\001*\332A\004name\022" + + "\233\002\n\035CreateHyperparameterTuningJob\022@.goog" + + "le.cloud.aiplatform.v1.CreateHyperparame" + + "terTuningJobRequest\0323.google.cloud.aipla" + + "tform.v1.HyperparameterTuningJob\"\202\001\202\323\344\223\002" + + "Y\"" + + "\022\022*/v1/{nam" + + "e=projects/*/locations/*/batchPrediction" + + "Jobs/*}:cancel:\001*\332A\004name\032M\312A\031aiplatform." + + "googleapis.com\322A.https://www.googleapis." + + "com/auth/cloud-platformBy\n\036com.google.cl" + + "oud.aiplatform.v1B\017JobServiceProtoP\001ZDgo" + + "ogle.golang.org/genproto/googleapis/clou" + + "d/aiplatform/v1;aiplatformb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.aiplatform.v1.BatchPredictionJobProto.getDescriptor(), + com.google.cloud.aiplatform.v1.CustomJobProto.getDescriptor(), + com.google.cloud.aiplatform.v1.DataLabelingJobProto.getDescriptor(), + com.google.cloud.aiplatform.v1.HyperparameterTuningJobProto.getDescriptor(), + com.google.cloud.aiplatform.v1.OperationProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1_CreateCustomJobRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_CreateCustomJobRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_CreateCustomJobRequest_descriptor, + new java.lang.String[] { + "Parent", "CustomJob", + }); + internal_static_google_cloud_aiplatform_v1_GetCustomJobRequest_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_aiplatform_v1_GetCustomJobRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_GetCustomJobRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_aiplatform_v1_ListCustomJobsRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_aiplatform_v1_ListCustomJobsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ListCustomJobsRequest_descriptor, + new java.lang.String[] { + "Parent", "Filter", "PageSize", "PageToken", "ReadMask", + }); + internal_static_google_cloud_aiplatform_v1_ListCustomJobsResponse_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_aiplatform_v1_ListCustomJobsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ListCustomJobsResponse_descriptor, + new java.lang.String[] { + "CustomJobs", "NextPageToken", + }); + internal_static_google_cloud_aiplatform_v1_DeleteCustomJobRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_aiplatform_v1_DeleteCustomJobRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_DeleteCustomJobRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_aiplatform_v1_CancelCustomJobRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_aiplatform_v1_CancelCustomJobRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_CancelCustomJobRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_aiplatform_v1_CreateDataLabelingJobRequest_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_aiplatform_v1_CreateDataLabelingJobRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_CreateDataLabelingJobRequest_descriptor, + new java.lang.String[] { + "Parent", "DataLabelingJob", + }); + internal_static_google_cloud_aiplatform_v1_GetDataLabelingJobRequest_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_aiplatform_v1_GetDataLabelingJobRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_GetDataLabelingJobRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_aiplatform_v1_ListDataLabelingJobsRequest_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_aiplatform_v1_ListDataLabelingJobsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ListDataLabelingJobsRequest_descriptor, + new java.lang.String[] { + "Parent", "Filter", "PageSize", "PageToken", "ReadMask", "OrderBy", + }); + internal_static_google_cloud_aiplatform_v1_ListDataLabelingJobsResponse_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_aiplatform_v1_ListDataLabelingJobsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ListDataLabelingJobsResponse_descriptor, + new java.lang.String[] { + "DataLabelingJobs", "NextPageToken", + }); + internal_static_google_cloud_aiplatform_v1_DeleteDataLabelingJobRequest_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_aiplatform_v1_DeleteDataLabelingJobRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_DeleteDataLabelingJobRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_aiplatform_v1_CancelDataLabelingJobRequest_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_aiplatform_v1_CancelDataLabelingJobRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_CancelDataLabelingJobRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_aiplatform_v1_CreateHyperparameterTuningJobRequest_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_aiplatform_v1_CreateHyperparameterTuningJobRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_CreateHyperparameterTuningJobRequest_descriptor, + new java.lang.String[] { + "Parent", "HyperparameterTuningJob", + }); + internal_static_google_cloud_aiplatform_v1_GetHyperparameterTuningJobRequest_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_cloud_aiplatform_v1_GetHyperparameterTuningJobRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_GetHyperparameterTuningJobRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_aiplatform_v1_ListHyperparameterTuningJobsRequest_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_cloud_aiplatform_v1_ListHyperparameterTuningJobsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ListHyperparameterTuningJobsRequest_descriptor, + new java.lang.String[] { + "Parent", "Filter", "PageSize", "PageToken", "ReadMask", + }); + internal_static_google_cloud_aiplatform_v1_ListHyperparameterTuningJobsResponse_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_cloud_aiplatform_v1_ListHyperparameterTuningJobsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ListHyperparameterTuningJobsResponse_descriptor, + new java.lang.String[] { + "HyperparameterTuningJobs", "NextPageToken", + }); + internal_static_google_cloud_aiplatform_v1_DeleteHyperparameterTuningJobRequest_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_cloud_aiplatform_v1_DeleteHyperparameterTuningJobRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_DeleteHyperparameterTuningJobRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_aiplatform_v1_CancelHyperparameterTuningJobRequest_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_google_cloud_aiplatform_v1_CancelHyperparameterTuningJobRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_CancelHyperparameterTuningJobRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_aiplatform_v1_CreateBatchPredictionJobRequest_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_google_cloud_aiplatform_v1_CreateBatchPredictionJobRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_CreateBatchPredictionJobRequest_descriptor, + new java.lang.String[] { + "Parent", "BatchPredictionJob", + }); + internal_static_google_cloud_aiplatform_v1_GetBatchPredictionJobRequest_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_google_cloud_aiplatform_v1_GetBatchPredictionJobRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_GetBatchPredictionJobRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_aiplatform_v1_ListBatchPredictionJobsRequest_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_google_cloud_aiplatform_v1_ListBatchPredictionJobsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ListBatchPredictionJobsRequest_descriptor, + new java.lang.String[] { + "Parent", "Filter", "PageSize", "PageToken", "ReadMask", + }); + internal_static_google_cloud_aiplatform_v1_ListBatchPredictionJobsResponse_descriptor = + getDescriptor().getMessageTypes().get(21); + internal_static_google_cloud_aiplatform_v1_ListBatchPredictionJobsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ListBatchPredictionJobsResponse_descriptor, + new java.lang.String[] { + "BatchPredictionJobs", "NextPageToken", + }); + internal_static_google_cloud_aiplatform_v1_DeleteBatchPredictionJobRequest_descriptor = + getDescriptor().getMessageTypes().get(22); + internal_static_google_cloud_aiplatform_v1_DeleteBatchPredictionJobRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_DeleteBatchPredictionJobRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_aiplatform_v1_CancelBatchPredictionJobRequest_descriptor = + getDescriptor().getMessageTypes().get(23); + internal_static_google_cloud_aiplatform_v1_CancelBatchPredictionJobRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_CancelBatchPredictionJobRequest_descriptor, + new java.lang.String[] { + "Name", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resourceReference); + registry.add(com.google.longrunning.OperationsProto.operationInfo); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.aiplatform.v1.BatchPredictionJobProto.getDescriptor(); + com.google.cloud.aiplatform.v1.CustomJobProto.getDescriptor(); + com.google.cloud.aiplatform.v1.DataLabelingJobProto.getDescriptor(); + com.google.cloud.aiplatform.v1.HyperparameterTuningJobProto.getDescriptor(); + com.google.cloud.aiplatform.v1.OperationProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/JobState.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/JobState.java new file mode 100644 index 000000000..76591466f --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/JobState.java @@ -0,0 +1,310 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/job_state.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Describes the state of a job.
+ * 
+ * + * Protobuf enum {@code google.cloud.aiplatform.v1.JobState} + */ +public enum JobState implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * The job state is unspecified.
+   * 
+ * + * JOB_STATE_UNSPECIFIED = 0; + */ + JOB_STATE_UNSPECIFIED(0), + /** + * + * + *
+   * The job has been just created or resumed and processing has not yet begun.
+   * 
+ * + * JOB_STATE_QUEUED = 1; + */ + JOB_STATE_QUEUED(1), + /** + * + * + *
+   * The service is preparing to run the job.
+   * 
+ * + * JOB_STATE_PENDING = 2; + */ + JOB_STATE_PENDING(2), + /** + * + * + *
+   * The job is in progress.
+   * 
+ * + * JOB_STATE_RUNNING = 3; + */ + JOB_STATE_RUNNING(3), + /** + * + * + *
+   * The job completed successfully.
+   * 
+ * + * JOB_STATE_SUCCEEDED = 4; + */ + JOB_STATE_SUCCEEDED(4), + /** + * + * + *
+   * The job failed.
+   * 
+ * + * JOB_STATE_FAILED = 5; + */ + JOB_STATE_FAILED(5), + /** + * + * + *
+   * The job is being cancelled. From this state the job may only go to
+   * either `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED` or `JOB_STATE_CANCELLED`.
+   * 
+ * + * JOB_STATE_CANCELLING = 6; + */ + JOB_STATE_CANCELLING(6), + /** + * + * + *
+   * The job has been cancelled.
+   * 
+ * + * JOB_STATE_CANCELLED = 7; + */ + JOB_STATE_CANCELLED(7), + /** + * + * + *
+   * The job has been stopped, and can be resumed.
+   * 
+ * + * JOB_STATE_PAUSED = 8; + */ + JOB_STATE_PAUSED(8), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * The job state is unspecified.
+   * 
+ * + * JOB_STATE_UNSPECIFIED = 0; + */ + public static final int JOB_STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * The job has been just created or resumed and processing has not yet begun.
+   * 
+ * + * JOB_STATE_QUEUED = 1; + */ + public static final int JOB_STATE_QUEUED_VALUE = 1; + /** + * + * + *
+   * The service is preparing to run the job.
+   * 
+ * + * JOB_STATE_PENDING = 2; + */ + public static final int JOB_STATE_PENDING_VALUE = 2; + /** + * + * + *
+   * The job is in progress.
+   * 
+ * + * JOB_STATE_RUNNING = 3; + */ + public static final int JOB_STATE_RUNNING_VALUE = 3; + /** + * + * + *
+   * The job completed successfully.
+   * 
+ * + * JOB_STATE_SUCCEEDED = 4; + */ + public static final int JOB_STATE_SUCCEEDED_VALUE = 4; + /** + * + * + *
+   * The job failed.
+   * 
+ * + * JOB_STATE_FAILED = 5; + */ + public static final int JOB_STATE_FAILED_VALUE = 5; + /** + * + * + *
+   * The job is being cancelled. From this state the job may only go to
+   * either `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED` or `JOB_STATE_CANCELLED`.
+   * 
+ * + * JOB_STATE_CANCELLING = 6; + */ + public static final int JOB_STATE_CANCELLING_VALUE = 6; + /** + * + * + *
+   * The job has been cancelled.
+   * 
+ * + * JOB_STATE_CANCELLED = 7; + */ + public static final int JOB_STATE_CANCELLED_VALUE = 7; + /** + * + * + *
+   * The job has been stopped, and can be resumed.
+   * 
+ * + * JOB_STATE_PAUSED = 8; + */ + public static final int JOB_STATE_PAUSED_VALUE = 8; + + 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 JobState 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 JobState forNumber(int value) { + switch (value) { + case 0: + return JOB_STATE_UNSPECIFIED; + case 1: + return JOB_STATE_QUEUED; + case 2: + return JOB_STATE_PENDING; + case 3: + return JOB_STATE_RUNNING; + case 4: + return JOB_STATE_SUCCEEDED; + case 5: + return JOB_STATE_FAILED; + case 6: + return JOB_STATE_CANCELLING; + case 7: + return JOB_STATE_CANCELLED; + case 8: + return JOB_STATE_PAUSED; + 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 JobState findValueByNumber(int number) { + return JobState.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.v1.JobStateProto.getDescriptor().getEnumTypes().get(0); + } + + private static final JobState[] VALUES = values(); + + public static JobState 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 JobState(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.aiplatform.v1.JobState) +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/JobStateProto.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/JobStateProto.java new file mode 100644 index 000000000..e5414e634 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/JobStateProto.java @@ -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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/job_state.proto + +package com.google.cloud.aiplatform.v1; + +public final class JobStateProto { + private JobStateProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + 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/v1/job_state.p" + + "roto\022\032google.cloud.aiplatform.v1\032\034google" + + "/api/annotations.proto*\341\001\n\010JobState\022\031\n\025J" + + "OB_STATE_UNSPECIFIED\020\000\022\024\n\020JOB_STATE_QUEU" + + "ED\020\001\022\025\n\021JOB_STATE_PENDING\020\002\022\025\n\021JOB_STATE" + + "_RUNNING\020\003\022\027\n\023JOB_STATE_SUCCEEDED\020\004\022\024\n\020J" + + "OB_STATE_FAILED\020\005\022\030\n\024JOB_STATE_CANCELLIN" + + "G\020\006\022\027\n\023JOB_STATE_CANCELLED\020\007\022\024\n\020JOB_STAT" + + "E_PAUSED\020\010Bw\n\036com.google.cloud.aiplatfor" + + "m.v1B\rJobStateProtoP\001ZDgoogle.golang.org" + + "/genproto/googleapis/cloud/aiplatform/v1" + + ";aiplatformb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + }); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListAnnotationsRequest.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListAnnotationsRequest.java new file mode 100644 index 000000000..f6ec451da --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListAnnotationsRequest.java @@ -0,0 +1,1567 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/dataset_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for [DatasetService.ListAnnotations][google.cloud.aiplatform.v1.DatasetService.ListAnnotations].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListAnnotationsRequest} + */ +public final class ListAnnotationsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ListAnnotationsRequest) + ListAnnotationsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListAnnotationsRequest.newBuilder() to construct. + private ListAnnotationsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListAnnotationsRequest() { + parent_ = ""; + filter_ = ""; + pageToken_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListAnnotationsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListAnnotationsRequest( + 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(); + + parent_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + filter_ = s; + break; + } + case 24: + { + pageSize_ = input.readInt32(); + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 42: + { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (readMask_ != null) { + subBuilder = readMask_.toBuilder(); + } + readMask_ = + input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(readMask_); + readMask_ = subBuilder.buildPartial(); + } + + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + orderBy_ = 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.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_ListAnnotationsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_ListAnnotationsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListAnnotationsRequest.class, + com.google.cloud.aiplatform.v1.ListAnnotationsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The resource name of the DataItem to list Annotations from.
+   * Format:
+   * `projects/{project}/locations/{location}/datasets/{dataset}/dataItems/{data_item}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the DataItem to list Annotations from.
+   * Format:
+   * `projects/{project}/locations/{location}/datasets/{dataset}/dataItems/{data_item}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 2; + private volatile java.lang.Object filter_; + /** + * + * + *
+   * The standard list filter.
+   * 
+ * + * string filter = 2; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * The standard list filter.
+   * 
+ * + * string filter = 2; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 3; + private int pageSize_; + /** + * + * + *
+   * The standard list page size.
+   * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 4; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * The standard list page token.
+   * 
+ * + * string page_token = 4; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The standard list page token.
+   * 
+ * + * string page_token = 4; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int READ_MASK_FIELD_NUMBER = 5; + private com.google.protobuf.FieldMask readMask_; + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return Whether the readMask field is set. + */ + @java.lang.Override + public boolean hasReadMask() { + return readMask_ != null; + } + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return The readMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getReadMask() { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder() { + return getReadMask(); + } + + public static final int ORDER_BY_FIELD_NUMBER = 6; + private volatile java.lang.Object orderBy_; + /** + * + * + *
+   * A comma-separated list of fields to order by, sorted in ascending order.
+   * Use "desc" after a field name for descending.
+   * 
+ * + * string order_by = 6; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + 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(); + orderBy_ = s; + return s; + } + } + /** + * + * + *
+   * A comma-separated list of fields to order by, sorted in ascending order.
+   * Use "desc" after a field name for descending.
+   * 
+ * + * string order_by = 6; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!getFilterBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); + } + if (pageSize_ != 0) { + output.writeInt32(3, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); + } + if (readMask_ != null) { + output.writeMessage(5, getReadMask()); + } + if (!getOrderByBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, orderBy_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!getFilterBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_); + } + if (readMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getReadMask()); + } + if (!getOrderByBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, orderBy_); + } + 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.v1.ListAnnotationsRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ListAnnotationsRequest other = + (com.google.cloud.aiplatform.v1.ListAnnotationsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (hasReadMask() != other.hasReadMask()) return false; + if (hasReadMask()) { + if (!getReadMask().equals(other.getReadMask())) return false; + } + if (!getOrderBy().equals(other.getOrderBy())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + if (hasReadMask()) { + hash = (37 * hash) + READ_MASK_FIELD_NUMBER; + hash = (53 * hash) + getReadMask().hashCode(); + } + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.ListAnnotationsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListAnnotationsRequest 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.v1.ListAnnotationsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListAnnotationsRequest 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.v1.ListAnnotationsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListAnnotationsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListAnnotationsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListAnnotationsRequest 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.v1.ListAnnotationsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListAnnotationsRequest 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.v1.ListAnnotationsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListAnnotationsRequest 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.v1.ListAnnotationsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [DatasetService.ListAnnotations][google.cloud.aiplatform.v1.DatasetService.ListAnnotations].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListAnnotationsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ListAnnotationsRequest) + com.google.cloud.aiplatform.v1.ListAnnotationsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_ListAnnotationsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_ListAnnotationsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListAnnotationsRequest.class, + com.google.cloud.aiplatform.v1.ListAnnotationsRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ListAnnotationsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + filter_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + if (readMaskBuilder_ == null) { + readMask_ = null; + } else { + readMask_ = null; + readMaskBuilder_ = null; + } + orderBy_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_ListAnnotationsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListAnnotationsRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ListAnnotationsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListAnnotationsRequest build() { + com.google.cloud.aiplatform.v1.ListAnnotationsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListAnnotationsRequest buildPartial() { + com.google.cloud.aiplatform.v1.ListAnnotationsRequest result = + new com.google.cloud.aiplatform.v1.ListAnnotationsRequest(this); + result.parent_ = parent_; + result.filter_ = filter_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + if (readMaskBuilder_ == null) { + result.readMask_ = readMask_; + } else { + result.readMask_ = readMaskBuilder_.build(); + } + result.orderBy_ = orderBy_; + 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.v1.ListAnnotationsRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.ListAnnotationsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.ListAnnotationsRequest other) { + if (other == com.google.cloud.aiplatform.v1.ListAnnotationsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + if (other.hasReadMask()) { + mergeReadMask(other.getReadMask()); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + 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.v1.ListAnnotationsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.ListAnnotationsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the DataItem to list Annotations from.
+     * Format:
+     * `projects/{project}/locations/{location}/datasets/{dataset}/dataItems/{data_item}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the DataItem to list Annotations from.
+     * Format:
+     * `projects/{project}/locations/{location}/datasets/{dataset}/dataItems/{data_item}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the DataItem to list Annotations from.
+     * Format:
+     * `projects/{project}/locations/{location}/datasets/{dataset}/dataItems/{data_item}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the DataItem to list Annotations from.
+     * Format:
+     * `projects/{project}/locations/{location}/datasets/{dataset}/dataItems/{data_item}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the DataItem to list Annotations from.
+     * Format:
+     * `projects/{project}/locations/{location}/datasets/{dataset}/dataItems/{data_item}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * The standard list filter.
+     * 
+ * + * string filter = 2; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The standard list filter.
+     * 
+ * + * string filter = 2; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The standard list filter.
+     * 
+ * + * string filter = 2; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list filter.
+     * 
+ * + * string filter = 2; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list filter.
+     * 
+ * + * string filter = 2; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The standard list page size.
+     * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The standard list page size.
+     * 
+ * + * int32 page_size = 3; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list page size.
+     * 
+ * + * int32 page_size = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * The standard list page token.
+     * 
+ * + * string page_token = 4; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The standard list page token.
+     * 
+ * + * string page_token = 4; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The standard list page token.
+     * 
+ * + * string page_token = 4; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list page token.
+     * 
+ * + * string page_token = 4; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list page token.
+     * 
+ * + * string page_token = 4; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.FieldMask readMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + readMaskBuilder_; + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return Whether the readMask field is set. + */ + public boolean hasReadMask() { + return readMaskBuilder_ != null || readMask_ != null; + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return The readMask. + */ + public com.google.protobuf.FieldMask getReadMask() { + if (readMaskBuilder_ == null) { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } else { + return readMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + public Builder setReadMask(com.google.protobuf.FieldMask value) { + if (readMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + readMask_ = value; + onChanged(); + } else { + readMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + public Builder setReadMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (readMaskBuilder_ == null) { + readMask_ = builderForValue.build(); + onChanged(); + } else { + readMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + public Builder mergeReadMask(com.google.protobuf.FieldMask value) { + if (readMaskBuilder_ == null) { + if (readMask_ != null) { + readMask_ = + com.google.protobuf.FieldMask.newBuilder(readMask_).mergeFrom(value).buildPartial(); + } else { + readMask_ = value; + } + onChanged(); + } else { + readMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + public Builder clearReadMask() { + if (readMaskBuilder_ == null) { + readMask_ = null; + onChanged(); + } else { + readMask_ = null; + readMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + public com.google.protobuf.FieldMask.Builder getReadMaskBuilder() { + + onChanged(); + return getReadMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + public com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder() { + if (readMaskBuilder_ != null) { + return readMaskBuilder_.getMessageOrBuilder(); + } else { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getReadMaskFieldBuilder() { + if (readMaskBuilder_ == null) { + readMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getReadMask(), getParentForChildren(), isClean()); + readMask_ = null; + } + return readMaskBuilder_; + } + + private java.lang.Object orderBy_ = ""; + /** + * + * + *
+     * A comma-separated list of fields to order by, sorted in ascending order.
+     * Use "desc" after a field name for descending.
+     * 
+ * + * string order_by = 6; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A comma-separated list of fields to order by, sorted in ascending order.
+     * Use "desc" after a field name for descending.
+     * 
+ * + * string order_by = 6; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A comma-separated list of fields to order by, sorted in ascending order.
+     * Use "desc" after a field name for descending.
+     * 
+ * + * string order_by = 6; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + orderBy_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A comma-separated list of fields to order by, sorted in ascending order.
+     * Use "desc" after a field name for descending.
+     * 
+ * + * string order_by = 6; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + + orderBy_ = getDefaultInstance().getOrderBy(); + onChanged(); + return this; + } + /** + * + * + *
+     * A comma-separated list of fields to order by, sorted in ascending order.
+     * Use "desc" after a field name for descending.
+     * 
+ * + * string order_by = 6; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + orderBy_ = 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.v1.ListAnnotationsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ListAnnotationsRequest) + private static final com.google.cloud.aiplatform.v1.ListAnnotationsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ListAnnotationsRequest(); + } + + public static com.google.cloud.aiplatform.v1.ListAnnotationsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAnnotationsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListAnnotationsRequest(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.v1.ListAnnotationsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListAnnotationsRequestOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListAnnotationsRequestOrBuilder.java new file mode 100644 index 000000000..395e15e05 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListAnnotationsRequestOrBuilder.java @@ -0,0 +1,183 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/dataset_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface ListAnnotationsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ListAnnotationsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the DataItem to list Annotations from.
+   * Format:
+   * `projects/{project}/locations/{location}/datasets/{dataset}/dataItems/{data_item}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of the DataItem to list Annotations from.
+   * Format:
+   * `projects/{project}/locations/{location}/datasets/{dataset}/dataItems/{data_item}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The standard list filter.
+   * 
+ * + * string filter = 2; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * The standard list filter.
+   * 
+ * + * string filter = 2; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * The standard list page size.
+   * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * The standard list page token.
+   * 
+ * + * string page_token = 4; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * The standard list page token.
+   * 
+ * + * string page_token = 4; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return Whether the readMask field is set. + */ + boolean hasReadMask(); + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return The readMask. + */ + com.google.protobuf.FieldMask getReadMask(); + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder(); + + /** + * + * + *
+   * A comma-separated list of fields to order by, sorted in ascending order.
+   * Use "desc" after a field name for descending.
+   * 
+ * + * string order_by = 6; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * A comma-separated list of fields to order by, sorted in ascending order.
+   * Use "desc" after a field name for descending.
+   * 
+ * + * string order_by = 6; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListAnnotationsResponse.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListAnnotationsResponse.java new file mode 100644 index 000000000..5aa49611a --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListAnnotationsResponse.java @@ -0,0 +1,1131 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/dataset_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Response message for [DatasetService.ListAnnotations][google.cloud.aiplatform.v1.DatasetService.ListAnnotations].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListAnnotationsResponse} + */ +public final class ListAnnotationsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ListAnnotationsResponse) + ListAnnotationsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListAnnotationsResponse.newBuilder() to construct. + private ListAnnotationsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListAnnotationsResponse() { + annotations_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListAnnotationsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListAnnotationsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + annotations_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + annotations_.add( + input.readMessage( + com.google.cloud.aiplatform.v1.Annotation.parser(), extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + annotations_ = java.util.Collections.unmodifiableList(annotations_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_ListAnnotationsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_ListAnnotationsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListAnnotationsResponse.class, + com.google.cloud.aiplatform.v1.ListAnnotationsResponse.Builder.class); + } + + public static final int ANNOTATIONS_FIELD_NUMBER = 1; + private java.util.List annotations_; + /** + * + * + *
+   * A list of Annotations that matches the specified filter in the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.Annotation annotations = 1; + */ + @java.lang.Override + public java.util.List getAnnotationsList() { + return annotations_; + } + /** + * + * + *
+   * A list of Annotations that matches the specified filter in the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.Annotation annotations = 1; + */ + @java.lang.Override + public java.util.List + getAnnotationsOrBuilderList() { + return annotations_; + } + /** + * + * + *
+   * A list of Annotations that matches the specified filter in the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.Annotation annotations = 1; + */ + @java.lang.Override + public int getAnnotationsCount() { + return annotations_.size(); + } + /** + * + * + *
+   * A list of Annotations that matches the specified filter in the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.Annotation annotations = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.Annotation getAnnotations(int index) { + return annotations_.get(index); + } + /** + * + * + *
+   * A list of Annotations that matches the specified filter in the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.Annotation annotations = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.AnnotationOrBuilder getAnnotationsOrBuilder(int index) { + return annotations_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * The standard List next-page token.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The standard List next-page token.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < annotations_.size(); i++) { + output.writeMessage(1, annotations_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < annotations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, annotations_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.ListAnnotationsResponse)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ListAnnotationsResponse other = + (com.google.cloud.aiplatform.v1.ListAnnotationsResponse) obj; + + if (!getAnnotationsList().equals(other.getAnnotationsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getAnnotationsCount() > 0) { + hash = (37 * hash) + ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + getAnnotationsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.ListAnnotationsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListAnnotationsResponse 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.v1.ListAnnotationsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListAnnotationsResponse 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.v1.ListAnnotationsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListAnnotationsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListAnnotationsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListAnnotationsResponse 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.v1.ListAnnotationsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListAnnotationsResponse 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.v1.ListAnnotationsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListAnnotationsResponse 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.v1.ListAnnotationsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for [DatasetService.ListAnnotations][google.cloud.aiplatform.v1.DatasetService.ListAnnotations].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListAnnotationsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ListAnnotationsResponse) + com.google.cloud.aiplatform.v1.ListAnnotationsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_ListAnnotationsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_ListAnnotationsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListAnnotationsResponse.class, + com.google.cloud.aiplatform.v1.ListAnnotationsResponse.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ListAnnotationsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getAnnotationsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (annotationsBuilder_ == null) { + annotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + annotationsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_ListAnnotationsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListAnnotationsResponse getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ListAnnotationsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListAnnotationsResponse build() { + com.google.cloud.aiplatform.v1.ListAnnotationsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListAnnotationsResponse buildPartial() { + com.google.cloud.aiplatform.v1.ListAnnotationsResponse result = + new com.google.cloud.aiplatform.v1.ListAnnotationsResponse(this); + int from_bitField0_ = bitField0_; + if (annotationsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + annotations_ = java.util.Collections.unmodifiableList(annotations_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.annotations_ = annotations_; + } else { + result.annotations_ = annotationsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + 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.v1.ListAnnotationsResponse) { + return mergeFrom((com.google.cloud.aiplatform.v1.ListAnnotationsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.ListAnnotationsResponse other) { + if (other == com.google.cloud.aiplatform.v1.ListAnnotationsResponse.getDefaultInstance()) + return this; + if (annotationsBuilder_ == null) { + if (!other.annotations_.isEmpty()) { + if (annotations_.isEmpty()) { + annotations_ = other.annotations_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAnnotationsIsMutable(); + annotations_.addAll(other.annotations_); + } + onChanged(); + } + } else { + if (!other.annotations_.isEmpty()) { + if (annotationsBuilder_.isEmpty()) { + annotationsBuilder_.dispose(); + annotationsBuilder_ = null; + annotations_ = other.annotations_; + bitField0_ = (bitField0_ & ~0x00000001); + annotationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAnnotationsFieldBuilder() + : null; + } else { + annotationsBuilder_.addAllMessages(other.annotations_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.aiplatform.v1.ListAnnotationsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.ListAnnotationsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List annotations_ = + java.util.Collections.emptyList(); + + private void ensureAnnotationsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + annotations_ = + new java.util.ArrayList(annotations_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.Annotation, + com.google.cloud.aiplatform.v1.Annotation.Builder, + com.google.cloud.aiplatform.v1.AnnotationOrBuilder> + annotationsBuilder_; + + /** + * + * + *
+     * A list of Annotations that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.Annotation annotations = 1; + */ + public java.util.List getAnnotationsList() { + if (annotationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(annotations_); + } else { + return annotationsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of Annotations that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.Annotation annotations = 1; + */ + public int getAnnotationsCount() { + if (annotationsBuilder_ == null) { + return annotations_.size(); + } else { + return annotationsBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of Annotations that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.Annotation annotations = 1; + */ + public com.google.cloud.aiplatform.v1.Annotation getAnnotations(int index) { + if (annotationsBuilder_ == null) { + return annotations_.get(index); + } else { + return annotationsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of Annotations that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.Annotation annotations = 1; + */ + public Builder setAnnotations(int index, com.google.cloud.aiplatform.v1.Annotation value) { + if (annotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnnotationsIsMutable(); + annotations_.set(index, value); + onChanged(); + } else { + annotationsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of Annotations that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.Annotation annotations = 1; + */ + public Builder setAnnotations( + int index, com.google.cloud.aiplatform.v1.Annotation.Builder builderForValue) { + if (annotationsBuilder_ == null) { + ensureAnnotationsIsMutable(); + annotations_.set(index, builderForValue.build()); + onChanged(); + } else { + annotationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of Annotations that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.Annotation annotations = 1; + */ + public Builder addAnnotations(com.google.cloud.aiplatform.v1.Annotation value) { + if (annotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnnotationsIsMutable(); + annotations_.add(value); + onChanged(); + } else { + annotationsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of Annotations that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.Annotation annotations = 1; + */ + public Builder addAnnotations(int index, com.google.cloud.aiplatform.v1.Annotation value) { + if (annotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnnotationsIsMutable(); + annotations_.add(index, value); + onChanged(); + } else { + annotationsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of Annotations that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.Annotation annotations = 1; + */ + public Builder addAnnotations( + com.google.cloud.aiplatform.v1.Annotation.Builder builderForValue) { + if (annotationsBuilder_ == null) { + ensureAnnotationsIsMutable(); + annotations_.add(builderForValue.build()); + onChanged(); + } else { + annotationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of Annotations that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.Annotation annotations = 1; + */ + public Builder addAnnotations( + int index, com.google.cloud.aiplatform.v1.Annotation.Builder builderForValue) { + if (annotationsBuilder_ == null) { + ensureAnnotationsIsMutable(); + annotations_.add(index, builderForValue.build()); + onChanged(); + } else { + annotationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of Annotations that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.Annotation annotations = 1; + */ + public Builder addAllAnnotations( + java.lang.Iterable values) { + if (annotationsBuilder_ == null) { + ensureAnnotationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, annotations_); + onChanged(); + } else { + annotationsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of Annotations that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.Annotation annotations = 1; + */ + public Builder clearAnnotations() { + if (annotationsBuilder_ == null) { + annotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + annotationsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of Annotations that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.Annotation annotations = 1; + */ + public Builder removeAnnotations(int index) { + if (annotationsBuilder_ == null) { + ensureAnnotationsIsMutable(); + annotations_.remove(index); + onChanged(); + } else { + annotationsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of Annotations that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.Annotation annotations = 1; + */ + public com.google.cloud.aiplatform.v1.Annotation.Builder getAnnotationsBuilder(int index) { + return getAnnotationsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of Annotations that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.Annotation annotations = 1; + */ + public com.google.cloud.aiplatform.v1.AnnotationOrBuilder getAnnotationsOrBuilder(int index) { + if (annotationsBuilder_ == null) { + return annotations_.get(index); + } else { + return annotationsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of Annotations that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.Annotation annotations = 1; + */ + public java.util.List + getAnnotationsOrBuilderList() { + if (annotationsBuilder_ != null) { + return annotationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(annotations_); + } + } + /** + * + * + *
+     * A list of Annotations that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.Annotation annotations = 1; + */ + public com.google.cloud.aiplatform.v1.Annotation.Builder addAnnotationsBuilder() { + return getAnnotationsFieldBuilder() + .addBuilder(com.google.cloud.aiplatform.v1.Annotation.getDefaultInstance()); + } + /** + * + * + *
+     * A list of Annotations that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.Annotation annotations = 1; + */ + public com.google.cloud.aiplatform.v1.Annotation.Builder addAnnotationsBuilder(int index) { + return getAnnotationsFieldBuilder() + .addBuilder(index, com.google.cloud.aiplatform.v1.Annotation.getDefaultInstance()); + } + /** + * + * + *
+     * A list of Annotations that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.Annotation annotations = 1; + */ + public java.util.List + getAnnotationsBuilderList() { + return getAnnotationsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.Annotation, + com.google.cloud.aiplatform.v1.Annotation.Builder, + com.google.cloud.aiplatform.v1.AnnotationOrBuilder> + getAnnotationsFieldBuilder() { + if (annotationsBuilder_ == null) { + annotationsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.Annotation, + com.google.cloud.aiplatform.v1.Annotation.Builder, + com.google.cloud.aiplatform.v1.AnnotationOrBuilder>( + annotations_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + annotations_ = null; + } + return annotationsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * The standard List next-page token.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The standard List next-page token.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The standard List next-page token.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The standard List next-page token.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The standard List next-page token.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.ListAnnotationsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ListAnnotationsResponse) + private static final com.google.cloud.aiplatform.v1.ListAnnotationsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ListAnnotationsResponse(); + } + + public static com.google.cloud.aiplatform.v1.ListAnnotationsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAnnotationsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListAnnotationsResponse(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.v1.ListAnnotationsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListAnnotationsResponseOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListAnnotationsResponseOrBuilder.java new file mode 100644 index 000000000..19cef0ca6 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListAnnotationsResponseOrBuilder.java @@ -0,0 +1,102 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/dataset_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface ListAnnotationsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ListAnnotationsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A list of Annotations that matches the specified filter in the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.Annotation annotations = 1; + */ + java.util.List getAnnotationsList(); + /** + * + * + *
+   * A list of Annotations that matches the specified filter in the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.Annotation annotations = 1; + */ + com.google.cloud.aiplatform.v1.Annotation getAnnotations(int index); + /** + * + * + *
+   * A list of Annotations that matches the specified filter in the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.Annotation annotations = 1; + */ + int getAnnotationsCount(); + /** + * + * + *
+   * A list of Annotations that matches the specified filter in the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.Annotation annotations = 1; + */ + java.util.List + getAnnotationsOrBuilderList(); + /** + * + * + *
+   * A list of Annotations that matches the specified filter in the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.Annotation annotations = 1; + */ + com.google.cloud.aiplatform.v1.AnnotationOrBuilder getAnnotationsOrBuilder(int index); + + /** + * + * + *
+   * The standard List next-page token.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * The standard List next-page token.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListBatchPredictionJobsRequest.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListBatchPredictionJobsRequest.java new file mode 100644 index 000000000..f77d48d42 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListBatchPredictionJobsRequest.java @@ -0,0 +1,1456 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/job_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for [JobService.ListBatchPredictionJobs][google.cloud.aiplatform.v1.JobService.ListBatchPredictionJobs].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListBatchPredictionJobsRequest} + */ +public final class ListBatchPredictionJobsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ListBatchPredictionJobsRequest) + ListBatchPredictionJobsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListBatchPredictionJobsRequest.newBuilder() to construct. + private ListBatchPredictionJobsRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListBatchPredictionJobsRequest() { + parent_ = ""; + filter_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListBatchPredictionJobsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListBatchPredictionJobsRequest( + 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(); + + parent_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + filter_ = s; + break; + } + case 24: + { + pageSize_ = input.readInt32(); + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 42: + { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (readMask_ != null) { + subBuilder = readMask_.toBuilder(); + } + readMask_ = + input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(readMask_); + readMask_ = 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.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_ListBatchPredictionJobsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_ListBatchPredictionJobsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListBatchPredictionJobsRequest.class, + com.google.cloud.aiplatform.v1.ListBatchPredictionJobsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The resource name of the Location to list the BatchPredictionJobs
+   * from. Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the Location to list the BatchPredictionJobs
+   * from. Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 2; + private volatile java.lang.Object filter_; + /** + * + * + *
+   * The standard list filter.
+   * Supported fields:
+   *   * `display_name` supports = and !=.
+   *   * `state` supports = and !=.
+   * Some examples of using the filter are:
+   *  * `state="JOB_STATE_SUCCEEDED" AND display_name="my_job"`
+   *  * `state="JOB_STATE_RUNNING" OR display_name="my_job"`
+   *  * `NOT display_name="my_job"`
+   *  * `state="JOB_STATE_FAILED"`
+   * 
+ * + * string filter = 2; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * The standard list filter.
+   * Supported fields:
+   *   * `display_name` supports = and !=.
+   *   * `state` supports = and !=.
+   * Some examples of using the filter are:
+   *  * `state="JOB_STATE_SUCCEEDED" AND display_name="my_job"`
+   *  * `state="JOB_STATE_RUNNING" OR display_name="my_job"`
+   *  * `NOT display_name="my_job"`
+   *  * `state="JOB_STATE_FAILED"`
+   * 
+ * + * string filter = 2; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 3; + private int pageSize_; + /** + * + * + *
+   * The standard list page size.
+   * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 4; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * The standard list page token.
+   * Typically obtained via
+   * [ListBatchPredictionJobsResponse.next_page_token][google.cloud.aiplatform.v1.ListBatchPredictionJobsResponse.next_page_token] of the previous
+   * [JobService.ListBatchPredictionJobs][google.cloud.aiplatform.v1.JobService.ListBatchPredictionJobs] call.
+   * 
+ * + * string page_token = 4; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The standard list page token.
+   * Typically obtained via
+   * [ListBatchPredictionJobsResponse.next_page_token][google.cloud.aiplatform.v1.ListBatchPredictionJobsResponse.next_page_token] of the previous
+   * [JobService.ListBatchPredictionJobs][google.cloud.aiplatform.v1.JobService.ListBatchPredictionJobs] call.
+   * 
+ * + * string page_token = 4; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int READ_MASK_FIELD_NUMBER = 5; + private com.google.protobuf.FieldMask readMask_; + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return Whether the readMask field is set. + */ + @java.lang.Override + public boolean hasReadMask() { + return readMask_ != null; + } + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return The readMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getReadMask() { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder() { + return getReadMask(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!getFilterBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); + } + if (pageSize_ != 0) { + output.writeInt32(3, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); + } + if (readMask_ != null) { + output.writeMessage(5, getReadMask()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!getFilterBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_); + } + if (readMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getReadMask()); + } + 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.v1.ListBatchPredictionJobsRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ListBatchPredictionJobsRequest other = + (com.google.cloud.aiplatform.v1.ListBatchPredictionJobsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (hasReadMask() != other.hasReadMask()) return false; + if (hasReadMask()) { + if (!getReadMask().equals(other.getReadMask())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + if (hasReadMask()) { + hash = (37 * hash) + READ_MASK_FIELD_NUMBER; + hash = (53 * hash) + getReadMask().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.ListBatchPredictionJobsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListBatchPredictionJobsRequest 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.v1.ListBatchPredictionJobsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListBatchPredictionJobsRequest 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.v1.ListBatchPredictionJobsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListBatchPredictionJobsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListBatchPredictionJobsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListBatchPredictionJobsRequest 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.v1.ListBatchPredictionJobsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListBatchPredictionJobsRequest 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.v1.ListBatchPredictionJobsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListBatchPredictionJobsRequest 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.v1.ListBatchPredictionJobsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [JobService.ListBatchPredictionJobs][google.cloud.aiplatform.v1.JobService.ListBatchPredictionJobs].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListBatchPredictionJobsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ListBatchPredictionJobsRequest) + com.google.cloud.aiplatform.v1.ListBatchPredictionJobsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_ListBatchPredictionJobsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_ListBatchPredictionJobsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListBatchPredictionJobsRequest.class, + com.google.cloud.aiplatform.v1.ListBatchPredictionJobsRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ListBatchPredictionJobsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + filter_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + if (readMaskBuilder_ == null) { + readMask_ = null; + } else { + readMask_ = null; + readMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_ListBatchPredictionJobsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListBatchPredictionJobsRequest + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ListBatchPredictionJobsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListBatchPredictionJobsRequest build() { + com.google.cloud.aiplatform.v1.ListBatchPredictionJobsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListBatchPredictionJobsRequest buildPartial() { + com.google.cloud.aiplatform.v1.ListBatchPredictionJobsRequest result = + new com.google.cloud.aiplatform.v1.ListBatchPredictionJobsRequest(this); + result.parent_ = parent_; + result.filter_ = filter_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + if (readMaskBuilder_ == null) { + result.readMask_ = readMask_; + } else { + result.readMask_ = readMaskBuilder_.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.v1.ListBatchPredictionJobsRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.ListBatchPredictionJobsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.ListBatchPredictionJobsRequest other) { + if (other + == com.google.cloud.aiplatform.v1.ListBatchPredictionJobsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + if (other.hasReadMask()) { + mergeReadMask(other.getReadMask()); + } + 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.v1.ListBatchPredictionJobsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.ListBatchPredictionJobsRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the Location to list the BatchPredictionJobs
+     * from. Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Location to list the BatchPredictionJobs
+     * from. Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Location to list the BatchPredictionJobs
+     * from. Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Location to list the BatchPredictionJobs
+     * from. Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Location to list the BatchPredictionJobs
+     * from. Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * The standard list filter.
+     * Supported fields:
+     *   * `display_name` supports = and !=.
+     *   * `state` supports = and !=.
+     * Some examples of using the filter are:
+     *  * `state="JOB_STATE_SUCCEEDED" AND display_name="my_job"`
+     *  * `state="JOB_STATE_RUNNING" OR display_name="my_job"`
+     *  * `NOT display_name="my_job"`
+     *  * `state="JOB_STATE_FAILED"`
+     * 
+ * + * string filter = 2; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The standard list filter.
+     * Supported fields:
+     *   * `display_name` supports = and !=.
+     *   * `state` supports = and !=.
+     * Some examples of using the filter are:
+     *  * `state="JOB_STATE_SUCCEEDED" AND display_name="my_job"`
+     *  * `state="JOB_STATE_RUNNING" OR display_name="my_job"`
+     *  * `NOT display_name="my_job"`
+     *  * `state="JOB_STATE_FAILED"`
+     * 
+ * + * string filter = 2; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The standard list filter.
+     * Supported fields:
+     *   * `display_name` supports = and !=.
+     *   * `state` supports = and !=.
+     * Some examples of using the filter are:
+     *  * `state="JOB_STATE_SUCCEEDED" AND display_name="my_job"`
+     *  * `state="JOB_STATE_RUNNING" OR display_name="my_job"`
+     *  * `NOT display_name="my_job"`
+     *  * `state="JOB_STATE_FAILED"`
+     * 
+ * + * string filter = 2; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list filter.
+     * Supported fields:
+     *   * `display_name` supports = and !=.
+     *   * `state` supports = and !=.
+     * Some examples of using the filter are:
+     *  * `state="JOB_STATE_SUCCEEDED" AND display_name="my_job"`
+     *  * `state="JOB_STATE_RUNNING" OR display_name="my_job"`
+     *  * `NOT display_name="my_job"`
+     *  * `state="JOB_STATE_FAILED"`
+     * 
+ * + * string filter = 2; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list filter.
+     * Supported fields:
+     *   * `display_name` supports = and !=.
+     *   * `state` supports = and !=.
+     * Some examples of using the filter are:
+     *  * `state="JOB_STATE_SUCCEEDED" AND display_name="my_job"`
+     *  * `state="JOB_STATE_RUNNING" OR display_name="my_job"`
+     *  * `NOT display_name="my_job"`
+     *  * `state="JOB_STATE_FAILED"`
+     * 
+ * + * string filter = 2; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The standard list page size.
+     * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The standard list page size.
+     * 
+ * + * int32 page_size = 3; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list page size.
+     * 
+ * + * int32 page_size = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * The standard list page token.
+     * Typically obtained via
+     * [ListBatchPredictionJobsResponse.next_page_token][google.cloud.aiplatform.v1.ListBatchPredictionJobsResponse.next_page_token] of the previous
+     * [JobService.ListBatchPredictionJobs][google.cloud.aiplatform.v1.JobService.ListBatchPredictionJobs] call.
+     * 
+ * + * string page_token = 4; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The standard list page token.
+     * Typically obtained via
+     * [ListBatchPredictionJobsResponse.next_page_token][google.cloud.aiplatform.v1.ListBatchPredictionJobsResponse.next_page_token] of the previous
+     * [JobService.ListBatchPredictionJobs][google.cloud.aiplatform.v1.JobService.ListBatchPredictionJobs] call.
+     * 
+ * + * string page_token = 4; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The standard list page token.
+     * Typically obtained via
+     * [ListBatchPredictionJobsResponse.next_page_token][google.cloud.aiplatform.v1.ListBatchPredictionJobsResponse.next_page_token] of the previous
+     * [JobService.ListBatchPredictionJobs][google.cloud.aiplatform.v1.JobService.ListBatchPredictionJobs] call.
+     * 
+ * + * string page_token = 4; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list page token.
+     * Typically obtained via
+     * [ListBatchPredictionJobsResponse.next_page_token][google.cloud.aiplatform.v1.ListBatchPredictionJobsResponse.next_page_token] of the previous
+     * [JobService.ListBatchPredictionJobs][google.cloud.aiplatform.v1.JobService.ListBatchPredictionJobs] call.
+     * 
+ * + * string page_token = 4; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list page token.
+     * Typically obtained via
+     * [ListBatchPredictionJobsResponse.next_page_token][google.cloud.aiplatform.v1.ListBatchPredictionJobsResponse.next_page_token] of the previous
+     * [JobService.ListBatchPredictionJobs][google.cloud.aiplatform.v1.JobService.ListBatchPredictionJobs] call.
+     * 
+ * + * string page_token = 4; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.FieldMask readMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + readMaskBuilder_; + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return Whether the readMask field is set. + */ + public boolean hasReadMask() { + return readMaskBuilder_ != null || readMask_ != null; + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return The readMask. + */ + public com.google.protobuf.FieldMask getReadMask() { + if (readMaskBuilder_ == null) { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } else { + return readMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + public Builder setReadMask(com.google.protobuf.FieldMask value) { + if (readMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + readMask_ = value; + onChanged(); + } else { + readMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + public Builder setReadMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (readMaskBuilder_ == null) { + readMask_ = builderForValue.build(); + onChanged(); + } else { + readMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + public Builder mergeReadMask(com.google.protobuf.FieldMask value) { + if (readMaskBuilder_ == null) { + if (readMask_ != null) { + readMask_ = + com.google.protobuf.FieldMask.newBuilder(readMask_).mergeFrom(value).buildPartial(); + } else { + readMask_ = value; + } + onChanged(); + } else { + readMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + public Builder clearReadMask() { + if (readMaskBuilder_ == null) { + readMask_ = null; + onChanged(); + } else { + readMask_ = null; + readMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + public com.google.protobuf.FieldMask.Builder getReadMaskBuilder() { + + onChanged(); + return getReadMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + public com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder() { + if (readMaskBuilder_ != null) { + return readMaskBuilder_.getMessageOrBuilder(); + } else { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getReadMaskFieldBuilder() { + if (readMaskBuilder_ == null) { + readMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getReadMask(), getParentForChildren(), isClean()); + readMask_ = null; + } + return readMaskBuilder_; + } + + @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.v1.ListBatchPredictionJobsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ListBatchPredictionJobsRequest) + private static final com.google.cloud.aiplatform.v1.ListBatchPredictionJobsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ListBatchPredictionJobsRequest(); + } + + public static com.google.cloud.aiplatform.v1.ListBatchPredictionJobsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListBatchPredictionJobsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListBatchPredictionJobsRequest(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.v1.ListBatchPredictionJobsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListBatchPredictionJobsRequestOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListBatchPredictionJobsRequestOrBuilder.java new file mode 100644 index 000000000..ffb39c4ac --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListBatchPredictionJobsRequestOrBuilder.java @@ -0,0 +1,176 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/job_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface ListBatchPredictionJobsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ListBatchPredictionJobsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the Location to list the BatchPredictionJobs
+   * from. Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of the Location to list the BatchPredictionJobs
+   * from. Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The standard list filter.
+   * Supported fields:
+   *   * `display_name` supports = and !=.
+   *   * `state` supports = and !=.
+   * Some examples of using the filter are:
+   *  * `state="JOB_STATE_SUCCEEDED" AND display_name="my_job"`
+   *  * `state="JOB_STATE_RUNNING" OR display_name="my_job"`
+   *  * `NOT display_name="my_job"`
+   *  * `state="JOB_STATE_FAILED"`
+   * 
+ * + * string filter = 2; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * The standard list filter.
+   * Supported fields:
+   *   * `display_name` supports = and !=.
+   *   * `state` supports = and !=.
+   * Some examples of using the filter are:
+   *  * `state="JOB_STATE_SUCCEEDED" AND display_name="my_job"`
+   *  * `state="JOB_STATE_RUNNING" OR display_name="my_job"`
+   *  * `NOT display_name="my_job"`
+   *  * `state="JOB_STATE_FAILED"`
+   * 
+ * + * string filter = 2; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * The standard list page size.
+   * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * The standard list page token.
+   * Typically obtained via
+   * [ListBatchPredictionJobsResponse.next_page_token][google.cloud.aiplatform.v1.ListBatchPredictionJobsResponse.next_page_token] of the previous
+   * [JobService.ListBatchPredictionJobs][google.cloud.aiplatform.v1.JobService.ListBatchPredictionJobs] call.
+   * 
+ * + * string page_token = 4; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * The standard list page token.
+   * Typically obtained via
+   * [ListBatchPredictionJobsResponse.next_page_token][google.cloud.aiplatform.v1.ListBatchPredictionJobsResponse.next_page_token] of the previous
+   * [JobService.ListBatchPredictionJobs][google.cloud.aiplatform.v1.JobService.ListBatchPredictionJobs] call.
+   * 
+ * + * string page_token = 4; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return Whether the readMask field is set. + */ + boolean hasReadMask(); + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return The readMask. + */ + com.google.protobuf.FieldMask getReadMask(); + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListBatchPredictionJobsResponse.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListBatchPredictionJobsResponse.java new file mode 100644 index 000000000..20c7a0bf0 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListBatchPredictionJobsResponse.java @@ -0,0 +1,1187 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/job_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Response message for [JobService.ListBatchPredictionJobs][google.cloud.aiplatform.v1.JobService.ListBatchPredictionJobs]
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListBatchPredictionJobsResponse} + */ +public final class ListBatchPredictionJobsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ListBatchPredictionJobsResponse) + ListBatchPredictionJobsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListBatchPredictionJobsResponse.newBuilder() to construct. + private ListBatchPredictionJobsResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListBatchPredictionJobsResponse() { + batchPredictionJobs_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListBatchPredictionJobsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListBatchPredictionJobsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + batchPredictionJobs_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + batchPredictionJobs_.add( + input.readMessage( + com.google.cloud.aiplatform.v1.BatchPredictionJob.parser(), + extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + batchPredictionJobs_ = java.util.Collections.unmodifiableList(batchPredictionJobs_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_ListBatchPredictionJobsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_ListBatchPredictionJobsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListBatchPredictionJobsResponse.class, + com.google.cloud.aiplatform.v1.ListBatchPredictionJobsResponse.Builder.class); + } + + public static final int BATCH_PREDICTION_JOBS_FIELD_NUMBER = 1; + private java.util.List batchPredictionJobs_; + /** + * + * + *
+   * List of BatchPredictionJobs in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.BatchPredictionJob batch_prediction_jobs = 1; + */ + @java.lang.Override + public java.util.List + getBatchPredictionJobsList() { + return batchPredictionJobs_; + } + /** + * + * + *
+   * List of BatchPredictionJobs in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.BatchPredictionJob batch_prediction_jobs = 1; + */ + @java.lang.Override + public java.util.List + getBatchPredictionJobsOrBuilderList() { + return batchPredictionJobs_; + } + /** + * + * + *
+   * List of BatchPredictionJobs in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.BatchPredictionJob batch_prediction_jobs = 1; + */ + @java.lang.Override + public int getBatchPredictionJobsCount() { + return batchPredictionJobs_.size(); + } + /** + * + * + *
+   * List of BatchPredictionJobs in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.BatchPredictionJob batch_prediction_jobs = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.BatchPredictionJob getBatchPredictionJobs(int index) { + return batchPredictionJobs_.get(index); + } + /** + * + * + *
+   * List of BatchPredictionJobs in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.BatchPredictionJob batch_prediction_jobs = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.BatchPredictionJobOrBuilder getBatchPredictionJobsOrBuilder( + int index) { + return batchPredictionJobs_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * Pass to [ListBatchPredictionJobsRequest.page_token][google.cloud.aiplatform.v1.ListBatchPredictionJobsRequest.page_token] to obtain that
+   * page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * Pass to [ListBatchPredictionJobsRequest.page_token][google.cloud.aiplatform.v1.ListBatchPredictionJobsRequest.page_token] to obtain that
+   * page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < batchPredictionJobs_.size(); i++) { + output.writeMessage(1, batchPredictionJobs_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < batchPredictionJobs_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, batchPredictionJobs_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.ListBatchPredictionJobsResponse)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ListBatchPredictionJobsResponse other = + (com.google.cloud.aiplatform.v1.ListBatchPredictionJobsResponse) obj; + + if (!getBatchPredictionJobsList().equals(other.getBatchPredictionJobsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getBatchPredictionJobsCount() > 0) { + hash = (37 * hash) + BATCH_PREDICTION_JOBS_FIELD_NUMBER; + hash = (53 * hash) + getBatchPredictionJobsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.ListBatchPredictionJobsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListBatchPredictionJobsResponse 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.v1.ListBatchPredictionJobsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListBatchPredictionJobsResponse 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.v1.ListBatchPredictionJobsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListBatchPredictionJobsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListBatchPredictionJobsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListBatchPredictionJobsResponse 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.v1.ListBatchPredictionJobsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListBatchPredictionJobsResponse 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.v1.ListBatchPredictionJobsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListBatchPredictionJobsResponse 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.v1.ListBatchPredictionJobsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for [JobService.ListBatchPredictionJobs][google.cloud.aiplatform.v1.JobService.ListBatchPredictionJobs]
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListBatchPredictionJobsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ListBatchPredictionJobsResponse) + com.google.cloud.aiplatform.v1.ListBatchPredictionJobsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_ListBatchPredictionJobsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_ListBatchPredictionJobsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListBatchPredictionJobsResponse.class, + com.google.cloud.aiplatform.v1.ListBatchPredictionJobsResponse.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ListBatchPredictionJobsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getBatchPredictionJobsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (batchPredictionJobsBuilder_ == null) { + batchPredictionJobs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + batchPredictionJobsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_ListBatchPredictionJobsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListBatchPredictionJobsResponse + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ListBatchPredictionJobsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListBatchPredictionJobsResponse build() { + com.google.cloud.aiplatform.v1.ListBatchPredictionJobsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListBatchPredictionJobsResponse buildPartial() { + com.google.cloud.aiplatform.v1.ListBatchPredictionJobsResponse result = + new com.google.cloud.aiplatform.v1.ListBatchPredictionJobsResponse(this); + int from_bitField0_ = bitField0_; + if (batchPredictionJobsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + batchPredictionJobs_ = java.util.Collections.unmodifiableList(batchPredictionJobs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.batchPredictionJobs_ = batchPredictionJobs_; + } else { + result.batchPredictionJobs_ = batchPredictionJobsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + 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.v1.ListBatchPredictionJobsResponse) { + return mergeFrom((com.google.cloud.aiplatform.v1.ListBatchPredictionJobsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.ListBatchPredictionJobsResponse other) { + if (other + == com.google.cloud.aiplatform.v1.ListBatchPredictionJobsResponse.getDefaultInstance()) + return this; + if (batchPredictionJobsBuilder_ == null) { + if (!other.batchPredictionJobs_.isEmpty()) { + if (batchPredictionJobs_.isEmpty()) { + batchPredictionJobs_ = other.batchPredictionJobs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureBatchPredictionJobsIsMutable(); + batchPredictionJobs_.addAll(other.batchPredictionJobs_); + } + onChanged(); + } + } else { + if (!other.batchPredictionJobs_.isEmpty()) { + if (batchPredictionJobsBuilder_.isEmpty()) { + batchPredictionJobsBuilder_.dispose(); + batchPredictionJobsBuilder_ = null; + batchPredictionJobs_ = other.batchPredictionJobs_; + bitField0_ = (bitField0_ & ~0x00000001); + batchPredictionJobsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getBatchPredictionJobsFieldBuilder() + : null; + } else { + batchPredictionJobsBuilder_.addAllMessages(other.batchPredictionJobs_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.aiplatform.v1.ListBatchPredictionJobsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.ListBatchPredictionJobsResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List batchPredictionJobs_ = + java.util.Collections.emptyList(); + + private void ensureBatchPredictionJobsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + batchPredictionJobs_ = + new java.util.ArrayList( + batchPredictionJobs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.BatchPredictionJob, + com.google.cloud.aiplatform.v1.BatchPredictionJob.Builder, + com.google.cloud.aiplatform.v1.BatchPredictionJobOrBuilder> + batchPredictionJobsBuilder_; + + /** + * + * + *
+     * List of BatchPredictionJobs in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.BatchPredictionJob batch_prediction_jobs = 1; + * + */ + public java.util.List + getBatchPredictionJobsList() { + if (batchPredictionJobsBuilder_ == null) { + return java.util.Collections.unmodifiableList(batchPredictionJobs_); + } else { + return batchPredictionJobsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of BatchPredictionJobs in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.BatchPredictionJob batch_prediction_jobs = 1; + * + */ + public int getBatchPredictionJobsCount() { + if (batchPredictionJobsBuilder_ == null) { + return batchPredictionJobs_.size(); + } else { + return batchPredictionJobsBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of BatchPredictionJobs in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.BatchPredictionJob batch_prediction_jobs = 1; + * + */ + public com.google.cloud.aiplatform.v1.BatchPredictionJob getBatchPredictionJobs(int index) { + if (batchPredictionJobsBuilder_ == null) { + return batchPredictionJobs_.get(index); + } else { + return batchPredictionJobsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of BatchPredictionJobs in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.BatchPredictionJob batch_prediction_jobs = 1; + * + */ + public Builder setBatchPredictionJobs( + int index, com.google.cloud.aiplatform.v1.BatchPredictionJob value) { + if (batchPredictionJobsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBatchPredictionJobsIsMutable(); + batchPredictionJobs_.set(index, value); + onChanged(); + } else { + batchPredictionJobsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of BatchPredictionJobs in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.BatchPredictionJob batch_prediction_jobs = 1; + * + */ + public Builder setBatchPredictionJobs( + int index, com.google.cloud.aiplatform.v1.BatchPredictionJob.Builder builderForValue) { + if (batchPredictionJobsBuilder_ == null) { + ensureBatchPredictionJobsIsMutable(); + batchPredictionJobs_.set(index, builderForValue.build()); + onChanged(); + } else { + batchPredictionJobsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of BatchPredictionJobs in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.BatchPredictionJob batch_prediction_jobs = 1; + * + */ + public Builder addBatchPredictionJobs(com.google.cloud.aiplatform.v1.BatchPredictionJob value) { + if (batchPredictionJobsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBatchPredictionJobsIsMutable(); + batchPredictionJobs_.add(value); + onChanged(); + } else { + batchPredictionJobsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of BatchPredictionJobs in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.BatchPredictionJob batch_prediction_jobs = 1; + * + */ + public Builder addBatchPredictionJobs( + int index, com.google.cloud.aiplatform.v1.BatchPredictionJob value) { + if (batchPredictionJobsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBatchPredictionJobsIsMutable(); + batchPredictionJobs_.add(index, value); + onChanged(); + } else { + batchPredictionJobsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of BatchPredictionJobs in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.BatchPredictionJob batch_prediction_jobs = 1; + * + */ + public Builder addBatchPredictionJobs( + com.google.cloud.aiplatform.v1.BatchPredictionJob.Builder builderForValue) { + if (batchPredictionJobsBuilder_ == null) { + ensureBatchPredictionJobsIsMutable(); + batchPredictionJobs_.add(builderForValue.build()); + onChanged(); + } else { + batchPredictionJobsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of BatchPredictionJobs in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.BatchPredictionJob batch_prediction_jobs = 1; + * + */ + public Builder addBatchPredictionJobs( + int index, com.google.cloud.aiplatform.v1.BatchPredictionJob.Builder builderForValue) { + if (batchPredictionJobsBuilder_ == null) { + ensureBatchPredictionJobsIsMutable(); + batchPredictionJobs_.add(index, builderForValue.build()); + onChanged(); + } else { + batchPredictionJobsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of BatchPredictionJobs in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.BatchPredictionJob batch_prediction_jobs = 1; + * + */ + public Builder addAllBatchPredictionJobs( + java.lang.Iterable values) { + if (batchPredictionJobsBuilder_ == null) { + ensureBatchPredictionJobsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, batchPredictionJobs_); + onChanged(); + } else { + batchPredictionJobsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of BatchPredictionJobs in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.BatchPredictionJob batch_prediction_jobs = 1; + * + */ + public Builder clearBatchPredictionJobs() { + if (batchPredictionJobsBuilder_ == null) { + batchPredictionJobs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + batchPredictionJobsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of BatchPredictionJobs in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.BatchPredictionJob batch_prediction_jobs = 1; + * + */ + public Builder removeBatchPredictionJobs(int index) { + if (batchPredictionJobsBuilder_ == null) { + ensureBatchPredictionJobsIsMutable(); + batchPredictionJobs_.remove(index); + onChanged(); + } else { + batchPredictionJobsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of BatchPredictionJobs in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.BatchPredictionJob batch_prediction_jobs = 1; + * + */ + public com.google.cloud.aiplatform.v1.BatchPredictionJob.Builder getBatchPredictionJobsBuilder( + int index) { + return getBatchPredictionJobsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of BatchPredictionJobs in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.BatchPredictionJob batch_prediction_jobs = 1; + * + */ + public com.google.cloud.aiplatform.v1.BatchPredictionJobOrBuilder + getBatchPredictionJobsOrBuilder(int index) { + if (batchPredictionJobsBuilder_ == null) { + return batchPredictionJobs_.get(index); + } else { + return batchPredictionJobsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of BatchPredictionJobs in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.BatchPredictionJob batch_prediction_jobs = 1; + * + */ + public java.util.List + getBatchPredictionJobsOrBuilderList() { + if (batchPredictionJobsBuilder_ != null) { + return batchPredictionJobsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(batchPredictionJobs_); + } + } + /** + * + * + *
+     * List of BatchPredictionJobs in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.BatchPredictionJob batch_prediction_jobs = 1; + * + */ + public com.google.cloud.aiplatform.v1.BatchPredictionJob.Builder + addBatchPredictionJobsBuilder() { + return getBatchPredictionJobsFieldBuilder() + .addBuilder(com.google.cloud.aiplatform.v1.BatchPredictionJob.getDefaultInstance()); + } + /** + * + * + *
+     * List of BatchPredictionJobs in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.BatchPredictionJob batch_prediction_jobs = 1; + * + */ + public com.google.cloud.aiplatform.v1.BatchPredictionJob.Builder addBatchPredictionJobsBuilder( + int index) { + return getBatchPredictionJobsFieldBuilder() + .addBuilder( + index, com.google.cloud.aiplatform.v1.BatchPredictionJob.getDefaultInstance()); + } + /** + * + * + *
+     * List of BatchPredictionJobs in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.BatchPredictionJob batch_prediction_jobs = 1; + * + */ + public java.util.List + getBatchPredictionJobsBuilderList() { + return getBatchPredictionJobsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.BatchPredictionJob, + com.google.cloud.aiplatform.v1.BatchPredictionJob.Builder, + com.google.cloud.aiplatform.v1.BatchPredictionJobOrBuilder> + getBatchPredictionJobsFieldBuilder() { + if (batchPredictionJobsBuilder_ == null) { + batchPredictionJobsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.BatchPredictionJob, + com.google.cloud.aiplatform.v1.BatchPredictionJob.Builder, + com.google.cloud.aiplatform.v1.BatchPredictionJobOrBuilder>( + batchPredictionJobs_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + batchPredictionJobs_ = null; + } + return batchPredictionJobsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to [ListBatchPredictionJobsRequest.page_token][google.cloud.aiplatform.v1.ListBatchPredictionJobsRequest.page_token] to obtain that
+     * page.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to [ListBatchPredictionJobsRequest.page_token][google.cloud.aiplatform.v1.ListBatchPredictionJobsRequest.page_token] to obtain that
+     * page.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to [ListBatchPredictionJobsRequest.page_token][google.cloud.aiplatform.v1.ListBatchPredictionJobsRequest.page_token] to obtain that
+     * page.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to [ListBatchPredictionJobsRequest.page_token][google.cloud.aiplatform.v1.ListBatchPredictionJobsRequest.page_token] to obtain that
+     * page.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to [ListBatchPredictionJobsRequest.page_token][google.cloud.aiplatform.v1.ListBatchPredictionJobsRequest.page_token] to obtain that
+     * page.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.ListBatchPredictionJobsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ListBatchPredictionJobsResponse) + private static final com.google.cloud.aiplatform.v1.ListBatchPredictionJobsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ListBatchPredictionJobsResponse(); + } + + public static com.google.cloud.aiplatform.v1.ListBatchPredictionJobsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListBatchPredictionJobsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListBatchPredictionJobsResponse(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.v1.ListBatchPredictionJobsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListBatchPredictionJobsResponseOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListBatchPredictionJobsResponseOrBuilder.java new file mode 100644 index 000000000..b5df98a49 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListBatchPredictionJobsResponseOrBuilder.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/v1/job_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface ListBatchPredictionJobsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ListBatchPredictionJobsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * List of BatchPredictionJobs in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.BatchPredictionJob batch_prediction_jobs = 1; + */ + java.util.List getBatchPredictionJobsList(); + /** + * + * + *
+   * List of BatchPredictionJobs in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.BatchPredictionJob batch_prediction_jobs = 1; + */ + com.google.cloud.aiplatform.v1.BatchPredictionJob getBatchPredictionJobs(int index); + /** + * + * + *
+   * List of BatchPredictionJobs in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.BatchPredictionJob batch_prediction_jobs = 1; + */ + int getBatchPredictionJobsCount(); + /** + * + * + *
+   * List of BatchPredictionJobs in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.BatchPredictionJob batch_prediction_jobs = 1; + */ + java.util.List + getBatchPredictionJobsOrBuilderList(); + /** + * + * + *
+   * List of BatchPredictionJobs in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.BatchPredictionJob batch_prediction_jobs = 1; + */ + com.google.cloud.aiplatform.v1.BatchPredictionJobOrBuilder getBatchPredictionJobsOrBuilder( + int index); + + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * Pass to [ListBatchPredictionJobsRequest.page_token][google.cloud.aiplatform.v1.ListBatchPredictionJobsRequest.page_token] to obtain that
+   * page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * Pass to [ListBatchPredictionJobsRequest.page_token][google.cloud.aiplatform.v1.ListBatchPredictionJobsRequest.page_token] to obtain that
+   * page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListCustomJobsRequest.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListCustomJobsRequest.java new file mode 100644 index 000000000..0e8c96d99 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListCustomJobsRequest.java @@ -0,0 +1,1450 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/job_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for [JobService.ListCustomJobs][google.cloud.aiplatform.v1.JobService.ListCustomJobs].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListCustomJobsRequest} + */ +public final class ListCustomJobsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ListCustomJobsRequest) + ListCustomJobsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListCustomJobsRequest.newBuilder() to construct. + private ListCustomJobsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListCustomJobsRequest() { + parent_ = ""; + filter_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListCustomJobsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListCustomJobsRequest( + 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(); + + parent_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + filter_ = s; + break; + } + case 24: + { + pageSize_ = input.readInt32(); + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 42: + { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (readMask_ != null) { + subBuilder = readMask_.toBuilder(); + } + readMask_ = + input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(readMask_); + readMask_ = 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.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_ListCustomJobsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_ListCustomJobsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListCustomJobsRequest.class, + com.google.cloud.aiplatform.v1.ListCustomJobsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The resource name of the Location to list the CustomJobs from.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the Location to list the CustomJobs from.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 2; + private volatile java.lang.Object filter_; + /** + * + * + *
+   * The standard list filter.
+   * Supported fields:
+   *   * `display_name` supports = and !=.
+   *   * `state` supports = and !=.
+   * Some examples of using the filter are:
+   *  * `state="JOB_STATE_SUCCEEDED" AND display_name="my_job"`
+   *  * `state="JOB_STATE_RUNNING" OR display_name="my_job"`
+   *  * `NOT display_name="my_job"`
+   *  * `state="JOB_STATE_FAILED"`
+   * 
+ * + * string filter = 2; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * The standard list filter.
+   * Supported fields:
+   *   * `display_name` supports = and !=.
+   *   * `state` supports = and !=.
+   * Some examples of using the filter are:
+   *  * `state="JOB_STATE_SUCCEEDED" AND display_name="my_job"`
+   *  * `state="JOB_STATE_RUNNING" OR display_name="my_job"`
+   *  * `NOT display_name="my_job"`
+   *  * `state="JOB_STATE_FAILED"`
+   * 
+ * + * string filter = 2; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 3; + private int pageSize_; + /** + * + * + *
+   * The standard list page size.
+   * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 4; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * The standard list page token.
+   * Typically obtained via
+   * [ListCustomJobsResponse.next_page_token][google.cloud.aiplatform.v1.ListCustomJobsResponse.next_page_token] of the previous
+   * [JobService.ListCustomJobs][google.cloud.aiplatform.v1.JobService.ListCustomJobs] call.
+   * 
+ * + * string page_token = 4; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The standard list page token.
+   * Typically obtained via
+   * [ListCustomJobsResponse.next_page_token][google.cloud.aiplatform.v1.ListCustomJobsResponse.next_page_token] of the previous
+   * [JobService.ListCustomJobs][google.cloud.aiplatform.v1.JobService.ListCustomJobs] call.
+   * 
+ * + * string page_token = 4; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int READ_MASK_FIELD_NUMBER = 5; + private com.google.protobuf.FieldMask readMask_; + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return Whether the readMask field is set. + */ + @java.lang.Override + public boolean hasReadMask() { + return readMask_ != null; + } + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return The readMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getReadMask() { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder() { + return getReadMask(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!getFilterBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); + } + if (pageSize_ != 0) { + output.writeInt32(3, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); + } + if (readMask_ != null) { + output.writeMessage(5, getReadMask()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!getFilterBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_); + } + if (readMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getReadMask()); + } + 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.v1.ListCustomJobsRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ListCustomJobsRequest other = + (com.google.cloud.aiplatform.v1.ListCustomJobsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (hasReadMask() != other.hasReadMask()) return false; + if (hasReadMask()) { + if (!getReadMask().equals(other.getReadMask())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + if (hasReadMask()) { + hash = (37 * hash) + READ_MASK_FIELD_NUMBER; + hash = (53 * hash) + getReadMask().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.ListCustomJobsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListCustomJobsRequest 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.v1.ListCustomJobsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListCustomJobsRequest 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.v1.ListCustomJobsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListCustomJobsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListCustomJobsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListCustomJobsRequest 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.v1.ListCustomJobsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListCustomJobsRequest 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.v1.ListCustomJobsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListCustomJobsRequest 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.v1.ListCustomJobsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [JobService.ListCustomJobs][google.cloud.aiplatform.v1.JobService.ListCustomJobs].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListCustomJobsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ListCustomJobsRequest) + com.google.cloud.aiplatform.v1.ListCustomJobsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_ListCustomJobsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_ListCustomJobsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListCustomJobsRequest.class, + com.google.cloud.aiplatform.v1.ListCustomJobsRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ListCustomJobsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + filter_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + if (readMaskBuilder_ == null) { + readMask_ = null; + } else { + readMask_ = null; + readMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_ListCustomJobsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListCustomJobsRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ListCustomJobsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListCustomJobsRequest build() { + com.google.cloud.aiplatform.v1.ListCustomJobsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListCustomJobsRequest buildPartial() { + com.google.cloud.aiplatform.v1.ListCustomJobsRequest result = + new com.google.cloud.aiplatform.v1.ListCustomJobsRequest(this); + result.parent_ = parent_; + result.filter_ = filter_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + if (readMaskBuilder_ == null) { + result.readMask_ = readMask_; + } else { + result.readMask_ = readMaskBuilder_.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.v1.ListCustomJobsRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.ListCustomJobsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.ListCustomJobsRequest other) { + if (other == com.google.cloud.aiplatform.v1.ListCustomJobsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + if (other.hasReadMask()) { + mergeReadMask(other.getReadMask()); + } + 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.v1.ListCustomJobsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.ListCustomJobsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the Location to list the CustomJobs from.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Location to list the CustomJobs from.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Location to list the CustomJobs from.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Location to list the CustomJobs from.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Location to list the CustomJobs from.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * The standard list filter.
+     * Supported fields:
+     *   * `display_name` supports = and !=.
+     *   * `state` supports = and !=.
+     * Some examples of using the filter are:
+     *  * `state="JOB_STATE_SUCCEEDED" AND display_name="my_job"`
+     *  * `state="JOB_STATE_RUNNING" OR display_name="my_job"`
+     *  * `NOT display_name="my_job"`
+     *  * `state="JOB_STATE_FAILED"`
+     * 
+ * + * string filter = 2; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The standard list filter.
+     * Supported fields:
+     *   * `display_name` supports = and !=.
+     *   * `state` supports = and !=.
+     * Some examples of using the filter are:
+     *  * `state="JOB_STATE_SUCCEEDED" AND display_name="my_job"`
+     *  * `state="JOB_STATE_RUNNING" OR display_name="my_job"`
+     *  * `NOT display_name="my_job"`
+     *  * `state="JOB_STATE_FAILED"`
+     * 
+ * + * string filter = 2; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The standard list filter.
+     * Supported fields:
+     *   * `display_name` supports = and !=.
+     *   * `state` supports = and !=.
+     * Some examples of using the filter are:
+     *  * `state="JOB_STATE_SUCCEEDED" AND display_name="my_job"`
+     *  * `state="JOB_STATE_RUNNING" OR display_name="my_job"`
+     *  * `NOT display_name="my_job"`
+     *  * `state="JOB_STATE_FAILED"`
+     * 
+ * + * string filter = 2; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list filter.
+     * Supported fields:
+     *   * `display_name` supports = and !=.
+     *   * `state` supports = and !=.
+     * Some examples of using the filter are:
+     *  * `state="JOB_STATE_SUCCEEDED" AND display_name="my_job"`
+     *  * `state="JOB_STATE_RUNNING" OR display_name="my_job"`
+     *  * `NOT display_name="my_job"`
+     *  * `state="JOB_STATE_FAILED"`
+     * 
+ * + * string filter = 2; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list filter.
+     * Supported fields:
+     *   * `display_name` supports = and !=.
+     *   * `state` supports = and !=.
+     * Some examples of using the filter are:
+     *  * `state="JOB_STATE_SUCCEEDED" AND display_name="my_job"`
+     *  * `state="JOB_STATE_RUNNING" OR display_name="my_job"`
+     *  * `NOT display_name="my_job"`
+     *  * `state="JOB_STATE_FAILED"`
+     * 
+ * + * string filter = 2; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The standard list page size.
+     * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The standard list page size.
+     * 
+ * + * int32 page_size = 3; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list page size.
+     * 
+ * + * int32 page_size = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * The standard list page token.
+     * Typically obtained via
+     * [ListCustomJobsResponse.next_page_token][google.cloud.aiplatform.v1.ListCustomJobsResponse.next_page_token] of the previous
+     * [JobService.ListCustomJobs][google.cloud.aiplatform.v1.JobService.ListCustomJobs] call.
+     * 
+ * + * string page_token = 4; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The standard list page token.
+     * Typically obtained via
+     * [ListCustomJobsResponse.next_page_token][google.cloud.aiplatform.v1.ListCustomJobsResponse.next_page_token] of the previous
+     * [JobService.ListCustomJobs][google.cloud.aiplatform.v1.JobService.ListCustomJobs] call.
+     * 
+ * + * string page_token = 4; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The standard list page token.
+     * Typically obtained via
+     * [ListCustomJobsResponse.next_page_token][google.cloud.aiplatform.v1.ListCustomJobsResponse.next_page_token] of the previous
+     * [JobService.ListCustomJobs][google.cloud.aiplatform.v1.JobService.ListCustomJobs] call.
+     * 
+ * + * string page_token = 4; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list page token.
+     * Typically obtained via
+     * [ListCustomJobsResponse.next_page_token][google.cloud.aiplatform.v1.ListCustomJobsResponse.next_page_token] of the previous
+     * [JobService.ListCustomJobs][google.cloud.aiplatform.v1.JobService.ListCustomJobs] call.
+     * 
+ * + * string page_token = 4; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list page token.
+     * Typically obtained via
+     * [ListCustomJobsResponse.next_page_token][google.cloud.aiplatform.v1.ListCustomJobsResponse.next_page_token] of the previous
+     * [JobService.ListCustomJobs][google.cloud.aiplatform.v1.JobService.ListCustomJobs] call.
+     * 
+ * + * string page_token = 4; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.FieldMask readMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + readMaskBuilder_; + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return Whether the readMask field is set. + */ + public boolean hasReadMask() { + return readMaskBuilder_ != null || readMask_ != null; + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return The readMask. + */ + public com.google.protobuf.FieldMask getReadMask() { + if (readMaskBuilder_ == null) { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } else { + return readMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + public Builder setReadMask(com.google.protobuf.FieldMask value) { + if (readMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + readMask_ = value; + onChanged(); + } else { + readMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + public Builder setReadMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (readMaskBuilder_ == null) { + readMask_ = builderForValue.build(); + onChanged(); + } else { + readMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + public Builder mergeReadMask(com.google.protobuf.FieldMask value) { + if (readMaskBuilder_ == null) { + if (readMask_ != null) { + readMask_ = + com.google.protobuf.FieldMask.newBuilder(readMask_).mergeFrom(value).buildPartial(); + } else { + readMask_ = value; + } + onChanged(); + } else { + readMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + public Builder clearReadMask() { + if (readMaskBuilder_ == null) { + readMask_ = null; + onChanged(); + } else { + readMask_ = null; + readMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + public com.google.protobuf.FieldMask.Builder getReadMaskBuilder() { + + onChanged(); + return getReadMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + public com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder() { + if (readMaskBuilder_ != null) { + return readMaskBuilder_.getMessageOrBuilder(); + } else { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getReadMaskFieldBuilder() { + if (readMaskBuilder_ == null) { + readMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getReadMask(), getParentForChildren(), isClean()); + readMask_ = null; + } + return readMaskBuilder_; + } + + @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.v1.ListCustomJobsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ListCustomJobsRequest) + private static final com.google.cloud.aiplatform.v1.ListCustomJobsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ListCustomJobsRequest(); + } + + public static com.google.cloud.aiplatform.v1.ListCustomJobsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListCustomJobsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListCustomJobsRequest(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.v1.ListCustomJobsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListCustomJobsRequestOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListCustomJobsRequestOrBuilder.java new file mode 100644 index 000000000..3e8119c22 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListCustomJobsRequestOrBuilder.java @@ -0,0 +1,176 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/job_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface ListCustomJobsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ListCustomJobsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the Location to list the CustomJobs from.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of the Location to list the CustomJobs from.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The standard list filter.
+   * Supported fields:
+   *   * `display_name` supports = and !=.
+   *   * `state` supports = and !=.
+   * Some examples of using the filter are:
+   *  * `state="JOB_STATE_SUCCEEDED" AND display_name="my_job"`
+   *  * `state="JOB_STATE_RUNNING" OR display_name="my_job"`
+   *  * `NOT display_name="my_job"`
+   *  * `state="JOB_STATE_FAILED"`
+   * 
+ * + * string filter = 2; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * The standard list filter.
+   * Supported fields:
+   *   * `display_name` supports = and !=.
+   *   * `state` supports = and !=.
+   * Some examples of using the filter are:
+   *  * `state="JOB_STATE_SUCCEEDED" AND display_name="my_job"`
+   *  * `state="JOB_STATE_RUNNING" OR display_name="my_job"`
+   *  * `NOT display_name="my_job"`
+   *  * `state="JOB_STATE_FAILED"`
+   * 
+ * + * string filter = 2; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * The standard list page size.
+   * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * The standard list page token.
+   * Typically obtained via
+   * [ListCustomJobsResponse.next_page_token][google.cloud.aiplatform.v1.ListCustomJobsResponse.next_page_token] of the previous
+   * [JobService.ListCustomJobs][google.cloud.aiplatform.v1.JobService.ListCustomJobs] call.
+   * 
+ * + * string page_token = 4; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * The standard list page token.
+   * Typically obtained via
+   * [ListCustomJobsResponse.next_page_token][google.cloud.aiplatform.v1.ListCustomJobsResponse.next_page_token] of the previous
+   * [JobService.ListCustomJobs][google.cloud.aiplatform.v1.JobService.ListCustomJobs] call.
+   * 
+ * + * string page_token = 4; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return Whether the readMask field is set. + */ + boolean hasReadMask(); + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return The readMask. + */ + com.google.protobuf.FieldMask getReadMask(); + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListCustomJobsResponse.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListCustomJobsResponse.java new file mode 100644 index 000000000..e506ebf55 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListCustomJobsResponse.java @@ -0,0 +1,1137 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/job_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Response message for [JobService.ListCustomJobs][google.cloud.aiplatform.v1.JobService.ListCustomJobs]
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListCustomJobsResponse} + */ +public final class ListCustomJobsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ListCustomJobsResponse) + ListCustomJobsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListCustomJobsResponse.newBuilder() to construct. + private ListCustomJobsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListCustomJobsResponse() { + customJobs_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListCustomJobsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListCustomJobsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + customJobs_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + customJobs_.add( + input.readMessage( + com.google.cloud.aiplatform.v1.CustomJob.parser(), extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + customJobs_ = java.util.Collections.unmodifiableList(customJobs_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_ListCustomJobsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_ListCustomJobsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListCustomJobsResponse.class, + com.google.cloud.aiplatform.v1.ListCustomJobsResponse.Builder.class); + } + + public static final int CUSTOM_JOBS_FIELD_NUMBER = 1; + private java.util.List customJobs_; + /** + * + * + *
+   * List of CustomJobs in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.CustomJob custom_jobs = 1; + */ + @java.lang.Override + public java.util.List getCustomJobsList() { + return customJobs_; + } + /** + * + * + *
+   * List of CustomJobs in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.CustomJob custom_jobs = 1; + */ + @java.lang.Override + public java.util.List + getCustomJobsOrBuilderList() { + return customJobs_; + } + /** + * + * + *
+   * List of CustomJobs in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.CustomJob custom_jobs = 1; + */ + @java.lang.Override + public int getCustomJobsCount() { + return customJobs_.size(); + } + /** + * + * + *
+   * List of CustomJobs in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.CustomJob custom_jobs = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.CustomJob getCustomJobs(int index) { + return customJobs_.get(index); + } + /** + * + * + *
+   * List of CustomJobs in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.CustomJob custom_jobs = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.CustomJobOrBuilder getCustomJobsOrBuilder(int index) { + return customJobs_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * Pass to [ListCustomJobsRequest.page_token][google.cloud.aiplatform.v1.ListCustomJobsRequest.page_token] to obtain that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * Pass to [ListCustomJobsRequest.page_token][google.cloud.aiplatform.v1.ListCustomJobsRequest.page_token] to obtain that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < customJobs_.size(); i++) { + output.writeMessage(1, customJobs_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < customJobs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, customJobs_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.ListCustomJobsResponse)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ListCustomJobsResponse other = + (com.google.cloud.aiplatform.v1.ListCustomJobsResponse) obj; + + if (!getCustomJobsList().equals(other.getCustomJobsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getCustomJobsCount() > 0) { + hash = (37 * hash) + CUSTOM_JOBS_FIELD_NUMBER; + hash = (53 * hash) + getCustomJobsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.ListCustomJobsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListCustomJobsResponse 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.v1.ListCustomJobsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListCustomJobsResponse 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.v1.ListCustomJobsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListCustomJobsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListCustomJobsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListCustomJobsResponse 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.v1.ListCustomJobsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListCustomJobsResponse 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.v1.ListCustomJobsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListCustomJobsResponse 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.v1.ListCustomJobsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for [JobService.ListCustomJobs][google.cloud.aiplatform.v1.JobService.ListCustomJobs]
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListCustomJobsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ListCustomJobsResponse) + com.google.cloud.aiplatform.v1.ListCustomJobsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_ListCustomJobsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_ListCustomJobsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListCustomJobsResponse.class, + com.google.cloud.aiplatform.v1.ListCustomJobsResponse.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ListCustomJobsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCustomJobsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (customJobsBuilder_ == null) { + customJobs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + customJobsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_ListCustomJobsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListCustomJobsResponse getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ListCustomJobsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListCustomJobsResponse build() { + com.google.cloud.aiplatform.v1.ListCustomJobsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListCustomJobsResponse buildPartial() { + com.google.cloud.aiplatform.v1.ListCustomJobsResponse result = + new com.google.cloud.aiplatform.v1.ListCustomJobsResponse(this); + int from_bitField0_ = bitField0_; + if (customJobsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + customJobs_ = java.util.Collections.unmodifiableList(customJobs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.customJobs_ = customJobs_; + } else { + result.customJobs_ = customJobsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + 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.v1.ListCustomJobsResponse) { + return mergeFrom((com.google.cloud.aiplatform.v1.ListCustomJobsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.ListCustomJobsResponse other) { + if (other == com.google.cloud.aiplatform.v1.ListCustomJobsResponse.getDefaultInstance()) + return this; + if (customJobsBuilder_ == null) { + if (!other.customJobs_.isEmpty()) { + if (customJobs_.isEmpty()) { + customJobs_ = other.customJobs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureCustomJobsIsMutable(); + customJobs_.addAll(other.customJobs_); + } + onChanged(); + } + } else { + if (!other.customJobs_.isEmpty()) { + if (customJobsBuilder_.isEmpty()) { + customJobsBuilder_.dispose(); + customJobsBuilder_ = null; + customJobs_ = other.customJobs_; + bitField0_ = (bitField0_ & ~0x00000001); + customJobsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getCustomJobsFieldBuilder() + : null; + } else { + customJobsBuilder_.addAllMessages(other.customJobs_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.aiplatform.v1.ListCustomJobsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.ListCustomJobsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List customJobs_ = + java.util.Collections.emptyList(); + + private void ensureCustomJobsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + customJobs_ = + new java.util.ArrayList(customJobs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.CustomJob, + com.google.cloud.aiplatform.v1.CustomJob.Builder, + com.google.cloud.aiplatform.v1.CustomJobOrBuilder> + customJobsBuilder_; + + /** + * + * + *
+     * List of CustomJobs in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.CustomJob custom_jobs = 1; + */ + public java.util.List getCustomJobsList() { + if (customJobsBuilder_ == null) { + return java.util.Collections.unmodifiableList(customJobs_); + } else { + return customJobsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of CustomJobs in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.CustomJob custom_jobs = 1; + */ + public int getCustomJobsCount() { + if (customJobsBuilder_ == null) { + return customJobs_.size(); + } else { + return customJobsBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of CustomJobs in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.CustomJob custom_jobs = 1; + */ + public com.google.cloud.aiplatform.v1.CustomJob getCustomJobs(int index) { + if (customJobsBuilder_ == null) { + return customJobs_.get(index); + } else { + return customJobsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of CustomJobs in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.CustomJob custom_jobs = 1; + */ + public Builder setCustomJobs(int index, com.google.cloud.aiplatform.v1.CustomJob value) { + if (customJobsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCustomJobsIsMutable(); + customJobs_.set(index, value); + onChanged(); + } else { + customJobsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of CustomJobs in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.CustomJob custom_jobs = 1; + */ + public Builder setCustomJobs( + int index, com.google.cloud.aiplatform.v1.CustomJob.Builder builderForValue) { + if (customJobsBuilder_ == null) { + ensureCustomJobsIsMutable(); + customJobs_.set(index, builderForValue.build()); + onChanged(); + } else { + customJobsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of CustomJobs in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.CustomJob custom_jobs = 1; + */ + public Builder addCustomJobs(com.google.cloud.aiplatform.v1.CustomJob value) { + if (customJobsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCustomJobsIsMutable(); + customJobs_.add(value); + onChanged(); + } else { + customJobsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of CustomJobs in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.CustomJob custom_jobs = 1; + */ + public Builder addCustomJobs(int index, com.google.cloud.aiplatform.v1.CustomJob value) { + if (customJobsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCustomJobsIsMutable(); + customJobs_.add(index, value); + onChanged(); + } else { + customJobsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of CustomJobs in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.CustomJob custom_jobs = 1; + */ + public Builder addCustomJobs(com.google.cloud.aiplatform.v1.CustomJob.Builder builderForValue) { + if (customJobsBuilder_ == null) { + ensureCustomJobsIsMutable(); + customJobs_.add(builderForValue.build()); + onChanged(); + } else { + customJobsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of CustomJobs in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.CustomJob custom_jobs = 1; + */ + public Builder addCustomJobs( + int index, com.google.cloud.aiplatform.v1.CustomJob.Builder builderForValue) { + if (customJobsBuilder_ == null) { + ensureCustomJobsIsMutable(); + customJobs_.add(index, builderForValue.build()); + onChanged(); + } else { + customJobsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of CustomJobs in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.CustomJob custom_jobs = 1; + */ + public Builder addAllCustomJobs( + java.lang.Iterable values) { + if (customJobsBuilder_ == null) { + ensureCustomJobsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, customJobs_); + onChanged(); + } else { + customJobsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of CustomJobs in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.CustomJob custom_jobs = 1; + */ + public Builder clearCustomJobs() { + if (customJobsBuilder_ == null) { + customJobs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + customJobsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of CustomJobs in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.CustomJob custom_jobs = 1; + */ + public Builder removeCustomJobs(int index) { + if (customJobsBuilder_ == null) { + ensureCustomJobsIsMutable(); + customJobs_.remove(index); + onChanged(); + } else { + customJobsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of CustomJobs in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.CustomJob custom_jobs = 1; + */ + public com.google.cloud.aiplatform.v1.CustomJob.Builder getCustomJobsBuilder(int index) { + return getCustomJobsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of CustomJobs in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.CustomJob custom_jobs = 1; + */ + public com.google.cloud.aiplatform.v1.CustomJobOrBuilder getCustomJobsOrBuilder(int index) { + if (customJobsBuilder_ == null) { + return customJobs_.get(index); + } else { + return customJobsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of CustomJobs in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.CustomJob custom_jobs = 1; + */ + public java.util.List + getCustomJobsOrBuilderList() { + if (customJobsBuilder_ != null) { + return customJobsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(customJobs_); + } + } + /** + * + * + *
+     * List of CustomJobs in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.CustomJob custom_jobs = 1; + */ + public com.google.cloud.aiplatform.v1.CustomJob.Builder addCustomJobsBuilder() { + return getCustomJobsFieldBuilder() + .addBuilder(com.google.cloud.aiplatform.v1.CustomJob.getDefaultInstance()); + } + /** + * + * + *
+     * List of CustomJobs in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.CustomJob custom_jobs = 1; + */ + public com.google.cloud.aiplatform.v1.CustomJob.Builder addCustomJobsBuilder(int index) { + return getCustomJobsFieldBuilder() + .addBuilder(index, com.google.cloud.aiplatform.v1.CustomJob.getDefaultInstance()); + } + /** + * + * + *
+     * List of CustomJobs in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.CustomJob custom_jobs = 1; + */ + public java.util.List + getCustomJobsBuilderList() { + return getCustomJobsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.CustomJob, + com.google.cloud.aiplatform.v1.CustomJob.Builder, + com.google.cloud.aiplatform.v1.CustomJobOrBuilder> + getCustomJobsFieldBuilder() { + if (customJobsBuilder_ == null) { + customJobsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.CustomJob, + com.google.cloud.aiplatform.v1.CustomJob.Builder, + com.google.cloud.aiplatform.v1.CustomJobOrBuilder>( + customJobs_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + customJobs_ = null; + } + return customJobsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to [ListCustomJobsRequest.page_token][google.cloud.aiplatform.v1.ListCustomJobsRequest.page_token] to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to [ListCustomJobsRequest.page_token][google.cloud.aiplatform.v1.ListCustomJobsRequest.page_token] to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to [ListCustomJobsRequest.page_token][google.cloud.aiplatform.v1.ListCustomJobsRequest.page_token] to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to [ListCustomJobsRequest.page_token][google.cloud.aiplatform.v1.ListCustomJobsRequest.page_token] to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to [ListCustomJobsRequest.page_token][google.cloud.aiplatform.v1.ListCustomJobsRequest.page_token] to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.ListCustomJobsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ListCustomJobsResponse) + private static final com.google.cloud.aiplatform.v1.ListCustomJobsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ListCustomJobsResponse(); + } + + public static com.google.cloud.aiplatform.v1.ListCustomJobsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListCustomJobsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListCustomJobsResponse(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.v1.ListCustomJobsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListCustomJobsResponseOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListCustomJobsResponseOrBuilder.java new file mode 100644 index 000000000..a7a7e0762 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListCustomJobsResponseOrBuilder.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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/job_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface ListCustomJobsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ListCustomJobsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * List of CustomJobs in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.CustomJob custom_jobs = 1; + */ + java.util.List getCustomJobsList(); + /** + * + * + *
+   * List of CustomJobs in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.CustomJob custom_jobs = 1; + */ + com.google.cloud.aiplatform.v1.CustomJob getCustomJobs(int index); + /** + * + * + *
+   * List of CustomJobs in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.CustomJob custom_jobs = 1; + */ + int getCustomJobsCount(); + /** + * + * + *
+   * List of CustomJobs in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.CustomJob custom_jobs = 1; + */ + java.util.List + getCustomJobsOrBuilderList(); + /** + * + * + *
+   * List of CustomJobs in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.CustomJob custom_jobs = 1; + */ + com.google.cloud.aiplatform.v1.CustomJobOrBuilder getCustomJobsOrBuilder(int index); + + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * Pass to [ListCustomJobsRequest.page_token][google.cloud.aiplatform.v1.ListCustomJobsRequest.page_token] to obtain that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * Pass to [ListCustomJobsRequest.page_token][google.cloud.aiplatform.v1.ListCustomJobsRequest.page_token] to obtain that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListDataItemsRequest.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListDataItemsRequest.java new file mode 100644 index 000000000..e3845b2fb --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListDataItemsRequest.java @@ -0,0 +1,1566 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/dataset_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for [DatasetService.ListDataItems][google.cloud.aiplatform.v1.DatasetService.ListDataItems].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListDataItemsRequest} + */ +public final class ListDataItemsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ListDataItemsRequest) + ListDataItemsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListDataItemsRequest.newBuilder() to construct. + private ListDataItemsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListDataItemsRequest() { + parent_ = ""; + filter_ = ""; + pageToken_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListDataItemsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListDataItemsRequest( + 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(); + + parent_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + filter_ = s; + break; + } + case 24: + { + pageSize_ = input.readInt32(); + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 42: + { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (readMask_ != null) { + subBuilder = readMask_.toBuilder(); + } + readMask_ = + input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(readMask_); + readMask_ = subBuilder.buildPartial(); + } + + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + orderBy_ = 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.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_ListDataItemsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_ListDataItemsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListDataItemsRequest.class, + com.google.cloud.aiplatform.v1.ListDataItemsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The resource name of the Dataset to list DataItems from.
+   * Format:
+   * `projects/{project}/locations/{location}/datasets/{dataset}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the Dataset to list DataItems from.
+   * Format:
+   * `projects/{project}/locations/{location}/datasets/{dataset}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 2; + private volatile java.lang.Object filter_; + /** + * + * + *
+   * The standard list filter.
+   * 
+ * + * string filter = 2; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * The standard list filter.
+   * 
+ * + * string filter = 2; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 3; + private int pageSize_; + /** + * + * + *
+   * The standard list page size.
+   * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 4; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * The standard list page token.
+   * 
+ * + * string page_token = 4; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The standard list page token.
+   * 
+ * + * string page_token = 4; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int READ_MASK_FIELD_NUMBER = 5; + private com.google.protobuf.FieldMask readMask_; + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return Whether the readMask field is set. + */ + @java.lang.Override + public boolean hasReadMask() { + return readMask_ != null; + } + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return The readMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getReadMask() { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder() { + return getReadMask(); + } + + public static final int ORDER_BY_FIELD_NUMBER = 6; + private volatile java.lang.Object orderBy_; + /** + * + * + *
+   * A comma-separated list of fields to order by, sorted in ascending order.
+   * Use "desc" after a field name for descending.
+   * 
+ * + * string order_by = 6; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + 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(); + orderBy_ = s; + return s; + } + } + /** + * + * + *
+   * A comma-separated list of fields to order by, sorted in ascending order.
+   * Use "desc" after a field name for descending.
+   * 
+ * + * string order_by = 6; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!getFilterBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); + } + if (pageSize_ != 0) { + output.writeInt32(3, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); + } + if (readMask_ != null) { + output.writeMessage(5, getReadMask()); + } + if (!getOrderByBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, orderBy_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!getFilterBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_); + } + if (readMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getReadMask()); + } + if (!getOrderByBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, orderBy_); + } + 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.v1.ListDataItemsRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ListDataItemsRequest other = + (com.google.cloud.aiplatform.v1.ListDataItemsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (hasReadMask() != other.hasReadMask()) return false; + if (hasReadMask()) { + if (!getReadMask().equals(other.getReadMask())) return false; + } + if (!getOrderBy().equals(other.getOrderBy())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + if (hasReadMask()) { + hash = (37 * hash) + READ_MASK_FIELD_NUMBER; + hash = (53 * hash) + getReadMask().hashCode(); + } + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.ListDataItemsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListDataItemsRequest 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.v1.ListDataItemsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListDataItemsRequest 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.v1.ListDataItemsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListDataItemsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListDataItemsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListDataItemsRequest 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.v1.ListDataItemsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListDataItemsRequest 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.v1.ListDataItemsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListDataItemsRequest 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.v1.ListDataItemsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [DatasetService.ListDataItems][google.cloud.aiplatform.v1.DatasetService.ListDataItems].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListDataItemsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ListDataItemsRequest) + com.google.cloud.aiplatform.v1.ListDataItemsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_ListDataItemsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_ListDataItemsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListDataItemsRequest.class, + com.google.cloud.aiplatform.v1.ListDataItemsRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ListDataItemsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + filter_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + if (readMaskBuilder_ == null) { + readMask_ = null; + } else { + readMask_ = null; + readMaskBuilder_ = null; + } + orderBy_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_ListDataItemsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListDataItemsRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ListDataItemsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListDataItemsRequest build() { + com.google.cloud.aiplatform.v1.ListDataItemsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListDataItemsRequest buildPartial() { + com.google.cloud.aiplatform.v1.ListDataItemsRequest result = + new com.google.cloud.aiplatform.v1.ListDataItemsRequest(this); + result.parent_ = parent_; + result.filter_ = filter_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + if (readMaskBuilder_ == null) { + result.readMask_ = readMask_; + } else { + result.readMask_ = readMaskBuilder_.build(); + } + result.orderBy_ = orderBy_; + 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.v1.ListDataItemsRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.ListDataItemsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.ListDataItemsRequest other) { + if (other == com.google.cloud.aiplatform.v1.ListDataItemsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + if (other.hasReadMask()) { + mergeReadMask(other.getReadMask()); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + 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.v1.ListDataItemsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.ListDataItemsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the Dataset to list DataItems from.
+     * Format:
+     * `projects/{project}/locations/{location}/datasets/{dataset}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Dataset to list DataItems from.
+     * Format:
+     * `projects/{project}/locations/{location}/datasets/{dataset}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Dataset to list DataItems from.
+     * Format:
+     * `projects/{project}/locations/{location}/datasets/{dataset}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Dataset to list DataItems from.
+     * Format:
+     * `projects/{project}/locations/{location}/datasets/{dataset}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Dataset to list DataItems from.
+     * Format:
+     * `projects/{project}/locations/{location}/datasets/{dataset}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * The standard list filter.
+     * 
+ * + * string filter = 2; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The standard list filter.
+     * 
+ * + * string filter = 2; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The standard list filter.
+     * 
+ * + * string filter = 2; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list filter.
+     * 
+ * + * string filter = 2; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list filter.
+     * 
+ * + * string filter = 2; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The standard list page size.
+     * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The standard list page size.
+     * 
+ * + * int32 page_size = 3; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list page size.
+     * 
+ * + * int32 page_size = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * The standard list page token.
+     * 
+ * + * string page_token = 4; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The standard list page token.
+     * 
+ * + * string page_token = 4; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The standard list page token.
+     * 
+ * + * string page_token = 4; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list page token.
+     * 
+ * + * string page_token = 4; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list page token.
+     * 
+ * + * string page_token = 4; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.FieldMask readMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + readMaskBuilder_; + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return Whether the readMask field is set. + */ + public boolean hasReadMask() { + return readMaskBuilder_ != null || readMask_ != null; + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return The readMask. + */ + public com.google.protobuf.FieldMask getReadMask() { + if (readMaskBuilder_ == null) { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } else { + return readMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + public Builder setReadMask(com.google.protobuf.FieldMask value) { + if (readMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + readMask_ = value; + onChanged(); + } else { + readMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + public Builder setReadMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (readMaskBuilder_ == null) { + readMask_ = builderForValue.build(); + onChanged(); + } else { + readMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + public Builder mergeReadMask(com.google.protobuf.FieldMask value) { + if (readMaskBuilder_ == null) { + if (readMask_ != null) { + readMask_ = + com.google.protobuf.FieldMask.newBuilder(readMask_).mergeFrom(value).buildPartial(); + } else { + readMask_ = value; + } + onChanged(); + } else { + readMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + public Builder clearReadMask() { + if (readMaskBuilder_ == null) { + readMask_ = null; + onChanged(); + } else { + readMask_ = null; + readMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + public com.google.protobuf.FieldMask.Builder getReadMaskBuilder() { + + onChanged(); + return getReadMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + public com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder() { + if (readMaskBuilder_ != null) { + return readMaskBuilder_.getMessageOrBuilder(); + } else { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getReadMaskFieldBuilder() { + if (readMaskBuilder_ == null) { + readMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getReadMask(), getParentForChildren(), isClean()); + readMask_ = null; + } + return readMaskBuilder_; + } + + private java.lang.Object orderBy_ = ""; + /** + * + * + *
+     * A comma-separated list of fields to order by, sorted in ascending order.
+     * Use "desc" after a field name for descending.
+     * 
+ * + * string order_by = 6; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A comma-separated list of fields to order by, sorted in ascending order.
+     * Use "desc" after a field name for descending.
+     * 
+ * + * string order_by = 6; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A comma-separated list of fields to order by, sorted in ascending order.
+     * Use "desc" after a field name for descending.
+     * 
+ * + * string order_by = 6; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + orderBy_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A comma-separated list of fields to order by, sorted in ascending order.
+     * Use "desc" after a field name for descending.
+     * 
+ * + * string order_by = 6; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + + orderBy_ = getDefaultInstance().getOrderBy(); + onChanged(); + return this; + } + /** + * + * + *
+     * A comma-separated list of fields to order by, sorted in ascending order.
+     * Use "desc" after a field name for descending.
+     * 
+ * + * string order_by = 6; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + orderBy_ = 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.v1.ListDataItemsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ListDataItemsRequest) + private static final com.google.cloud.aiplatform.v1.ListDataItemsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ListDataItemsRequest(); + } + + public static com.google.cloud.aiplatform.v1.ListDataItemsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListDataItemsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListDataItemsRequest(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.v1.ListDataItemsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListDataItemsRequestOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListDataItemsRequestOrBuilder.java new file mode 100644 index 000000000..9e9789f50 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListDataItemsRequestOrBuilder.java @@ -0,0 +1,183 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/dataset_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface ListDataItemsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ListDataItemsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the Dataset to list DataItems from.
+   * Format:
+   * `projects/{project}/locations/{location}/datasets/{dataset}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of the Dataset to list DataItems from.
+   * Format:
+   * `projects/{project}/locations/{location}/datasets/{dataset}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The standard list filter.
+   * 
+ * + * string filter = 2; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * The standard list filter.
+   * 
+ * + * string filter = 2; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * The standard list page size.
+   * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * The standard list page token.
+   * 
+ * + * string page_token = 4; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * The standard list page token.
+   * 
+ * + * string page_token = 4; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return Whether the readMask field is set. + */ + boolean hasReadMask(); + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return The readMask. + */ + com.google.protobuf.FieldMask getReadMask(); + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder(); + + /** + * + * + *
+   * A comma-separated list of fields to order by, sorted in ascending order.
+   * Use "desc" after a field name for descending.
+   * 
+ * + * string order_by = 6; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * A comma-separated list of fields to order by, sorted in ascending order.
+   * Use "desc" after a field name for descending.
+   * 
+ * + * string order_by = 6; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListDataItemsResponse.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListDataItemsResponse.java new file mode 100644 index 000000000..5432194d1 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListDataItemsResponse.java @@ -0,0 +1,1128 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/dataset_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Response message for [DatasetService.ListDataItems][google.cloud.aiplatform.v1.DatasetService.ListDataItems].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListDataItemsResponse} + */ +public final class ListDataItemsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ListDataItemsResponse) + ListDataItemsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListDataItemsResponse.newBuilder() to construct. + private ListDataItemsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListDataItemsResponse() { + dataItems_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListDataItemsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListDataItemsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + dataItems_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + dataItems_.add( + input.readMessage( + com.google.cloud.aiplatform.v1.DataItem.parser(), extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + dataItems_ = java.util.Collections.unmodifiableList(dataItems_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_ListDataItemsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_ListDataItemsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListDataItemsResponse.class, + com.google.cloud.aiplatform.v1.ListDataItemsResponse.Builder.class); + } + + public static final int DATA_ITEMS_FIELD_NUMBER = 1; + private java.util.List dataItems_; + /** + * + * + *
+   * A list of DataItems that matches the specified filter in the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.DataItem data_items = 1; + */ + @java.lang.Override + public java.util.List getDataItemsList() { + return dataItems_; + } + /** + * + * + *
+   * A list of DataItems that matches the specified filter in the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.DataItem data_items = 1; + */ + @java.lang.Override + public java.util.List + getDataItemsOrBuilderList() { + return dataItems_; + } + /** + * + * + *
+   * A list of DataItems that matches the specified filter in the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.DataItem data_items = 1; + */ + @java.lang.Override + public int getDataItemsCount() { + return dataItems_.size(); + } + /** + * + * + *
+   * A list of DataItems that matches the specified filter in the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.DataItem data_items = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.DataItem getDataItems(int index) { + return dataItems_.get(index); + } + /** + * + * + *
+   * A list of DataItems that matches the specified filter in the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.DataItem data_items = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.DataItemOrBuilder getDataItemsOrBuilder(int index) { + return dataItems_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * The standard List next-page token.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The standard List next-page token.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < dataItems_.size(); i++) { + output.writeMessage(1, dataItems_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < dataItems_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, dataItems_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.ListDataItemsResponse)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ListDataItemsResponse other = + (com.google.cloud.aiplatform.v1.ListDataItemsResponse) obj; + + if (!getDataItemsList().equals(other.getDataItemsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getDataItemsCount() > 0) { + hash = (37 * hash) + DATA_ITEMS_FIELD_NUMBER; + hash = (53 * hash) + getDataItemsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.ListDataItemsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListDataItemsResponse 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.v1.ListDataItemsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListDataItemsResponse 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.v1.ListDataItemsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListDataItemsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListDataItemsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListDataItemsResponse 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.v1.ListDataItemsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListDataItemsResponse 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.v1.ListDataItemsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListDataItemsResponse 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.v1.ListDataItemsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for [DatasetService.ListDataItems][google.cloud.aiplatform.v1.DatasetService.ListDataItems].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListDataItemsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ListDataItemsResponse) + com.google.cloud.aiplatform.v1.ListDataItemsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_ListDataItemsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_ListDataItemsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListDataItemsResponse.class, + com.google.cloud.aiplatform.v1.ListDataItemsResponse.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ListDataItemsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getDataItemsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (dataItemsBuilder_ == null) { + dataItems_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + dataItemsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_ListDataItemsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListDataItemsResponse getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ListDataItemsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListDataItemsResponse build() { + com.google.cloud.aiplatform.v1.ListDataItemsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListDataItemsResponse buildPartial() { + com.google.cloud.aiplatform.v1.ListDataItemsResponse result = + new com.google.cloud.aiplatform.v1.ListDataItemsResponse(this); + int from_bitField0_ = bitField0_; + if (dataItemsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + dataItems_ = java.util.Collections.unmodifiableList(dataItems_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.dataItems_ = dataItems_; + } else { + result.dataItems_ = dataItemsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + 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.v1.ListDataItemsResponse) { + return mergeFrom((com.google.cloud.aiplatform.v1.ListDataItemsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.ListDataItemsResponse other) { + if (other == com.google.cloud.aiplatform.v1.ListDataItemsResponse.getDefaultInstance()) + return this; + if (dataItemsBuilder_ == null) { + if (!other.dataItems_.isEmpty()) { + if (dataItems_.isEmpty()) { + dataItems_ = other.dataItems_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDataItemsIsMutable(); + dataItems_.addAll(other.dataItems_); + } + onChanged(); + } + } else { + if (!other.dataItems_.isEmpty()) { + if (dataItemsBuilder_.isEmpty()) { + dataItemsBuilder_.dispose(); + dataItemsBuilder_ = null; + dataItems_ = other.dataItems_; + bitField0_ = (bitField0_ & ~0x00000001); + dataItemsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDataItemsFieldBuilder() + : null; + } else { + dataItemsBuilder_.addAllMessages(other.dataItems_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.aiplatform.v1.ListDataItemsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.ListDataItemsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List dataItems_ = + java.util.Collections.emptyList(); + + private void ensureDataItemsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + dataItems_ = new java.util.ArrayList(dataItems_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.DataItem, + com.google.cloud.aiplatform.v1.DataItem.Builder, + com.google.cloud.aiplatform.v1.DataItemOrBuilder> + dataItemsBuilder_; + + /** + * + * + *
+     * A list of DataItems that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.DataItem data_items = 1; + */ + public java.util.List getDataItemsList() { + if (dataItemsBuilder_ == null) { + return java.util.Collections.unmodifiableList(dataItems_); + } else { + return dataItemsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of DataItems that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.DataItem data_items = 1; + */ + public int getDataItemsCount() { + if (dataItemsBuilder_ == null) { + return dataItems_.size(); + } else { + return dataItemsBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of DataItems that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.DataItem data_items = 1; + */ + public com.google.cloud.aiplatform.v1.DataItem getDataItems(int index) { + if (dataItemsBuilder_ == null) { + return dataItems_.get(index); + } else { + return dataItemsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of DataItems that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.DataItem data_items = 1; + */ + public Builder setDataItems(int index, com.google.cloud.aiplatform.v1.DataItem value) { + if (dataItemsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataItemsIsMutable(); + dataItems_.set(index, value); + onChanged(); + } else { + dataItemsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of DataItems that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.DataItem data_items = 1; + */ + public Builder setDataItems( + int index, com.google.cloud.aiplatform.v1.DataItem.Builder builderForValue) { + if (dataItemsBuilder_ == null) { + ensureDataItemsIsMutable(); + dataItems_.set(index, builderForValue.build()); + onChanged(); + } else { + dataItemsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of DataItems that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.DataItem data_items = 1; + */ + public Builder addDataItems(com.google.cloud.aiplatform.v1.DataItem value) { + if (dataItemsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataItemsIsMutable(); + dataItems_.add(value); + onChanged(); + } else { + dataItemsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of DataItems that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.DataItem data_items = 1; + */ + public Builder addDataItems(int index, com.google.cloud.aiplatform.v1.DataItem value) { + if (dataItemsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataItemsIsMutable(); + dataItems_.add(index, value); + onChanged(); + } else { + dataItemsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of DataItems that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.DataItem data_items = 1; + */ + public Builder addDataItems(com.google.cloud.aiplatform.v1.DataItem.Builder builderForValue) { + if (dataItemsBuilder_ == null) { + ensureDataItemsIsMutable(); + dataItems_.add(builderForValue.build()); + onChanged(); + } else { + dataItemsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of DataItems that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.DataItem data_items = 1; + */ + public Builder addDataItems( + int index, com.google.cloud.aiplatform.v1.DataItem.Builder builderForValue) { + if (dataItemsBuilder_ == null) { + ensureDataItemsIsMutable(); + dataItems_.add(index, builderForValue.build()); + onChanged(); + } else { + dataItemsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of DataItems that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.DataItem data_items = 1; + */ + public Builder addAllDataItems( + java.lang.Iterable values) { + if (dataItemsBuilder_ == null) { + ensureDataItemsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, dataItems_); + onChanged(); + } else { + dataItemsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of DataItems that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.DataItem data_items = 1; + */ + public Builder clearDataItems() { + if (dataItemsBuilder_ == null) { + dataItems_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + dataItemsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of DataItems that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.DataItem data_items = 1; + */ + public Builder removeDataItems(int index) { + if (dataItemsBuilder_ == null) { + ensureDataItemsIsMutable(); + dataItems_.remove(index); + onChanged(); + } else { + dataItemsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of DataItems that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.DataItem data_items = 1; + */ + public com.google.cloud.aiplatform.v1.DataItem.Builder getDataItemsBuilder(int index) { + return getDataItemsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of DataItems that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.DataItem data_items = 1; + */ + public com.google.cloud.aiplatform.v1.DataItemOrBuilder getDataItemsOrBuilder(int index) { + if (dataItemsBuilder_ == null) { + return dataItems_.get(index); + } else { + return dataItemsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of DataItems that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.DataItem data_items = 1; + */ + public java.util.List + getDataItemsOrBuilderList() { + if (dataItemsBuilder_ != null) { + return dataItemsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(dataItems_); + } + } + /** + * + * + *
+     * A list of DataItems that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.DataItem data_items = 1; + */ + public com.google.cloud.aiplatform.v1.DataItem.Builder addDataItemsBuilder() { + return getDataItemsFieldBuilder() + .addBuilder(com.google.cloud.aiplatform.v1.DataItem.getDefaultInstance()); + } + /** + * + * + *
+     * A list of DataItems that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.DataItem data_items = 1; + */ + public com.google.cloud.aiplatform.v1.DataItem.Builder addDataItemsBuilder(int index) { + return getDataItemsFieldBuilder() + .addBuilder(index, com.google.cloud.aiplatform.v1.DataItem.getDefaultInstance()); + } + /** + * + * + *
+     * A list of DataItems that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.DataItem data_items = 1; + */ + public java.util.List + getDataItemsBuilderList() { + return getDataItemsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.DataItem, + com.google.cloud.aiplatform.v1.DataItem.Builder, + com.google.cloud.aiplatform.v1.DataItemOrBuilder> + getDataItemsFieldBuilder() { + if (dataItemsBuilder_ == null) { + dataItemsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.DataItem, + com.google.cloud.aiplatform.v1.DataItem.Builder, + com.google.cloud.aiplatform.v1.DataItemOrBuilder>( + dataItems_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + dataItems_ = null; + } + return dataItemsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * The standard List next-page token.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The standard List next-page token.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The standard List next-page token.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The standard List next-page token.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The standard List next-page token.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.ListDataItemsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ListDataItemsResponse) + private static final com.google.cloud.aiplatform.v1.ListDataItemsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ListDataItemsResponse(); + } + + public static com.google.cloud.aiplatform.v1.ListDataItemsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListDataItemsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListDataItemsResponse(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.v1.ListDataItemsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListDataItemsResponseOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListDataItemsResponseOrBuilder.java new file mode 100644 index 000000000..84f406caa --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListDataItemsResponseOrBuilder.java @@ -0,0 +1,102 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/dataset_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface ListDataItemsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ListDataItemsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A list of DataItems that matches the specified filter in the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.DataItem data_items = 1; + */ + java.util.List getDataItemsList(); + /** + * + * + *
+   * A list of DataItems that matches the specified filter in the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.DataItem data_items = 1; + */ + com.google.cloud.aiplatform.v1.DataItem getDataItems(int index); + /** + * + * + *
+   * A list of DataItems that matches the specified filter in the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.DataItem data_items = 1; + */ + int getDataItemsCount(); + /** + * + * + *
+   * A list of DataItems that matches the specified filter in the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.DataItem data_items = 1; + */ + java.util.List + getDataItemsOrBuilderList(); + /** + * + * + *
+   * A list of DataItems that matches the specified filter in the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.DataItem data_items = 1; + */ + com.google.cloud.aiplatform.v1.DataItemOrBuilder getDataItemsOrBuilder(int index); + + /** + * + * + *
+   * The standard List next-page token.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * The standard List next-page token.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListDataLabelingJobsRequest.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListDataLabelingJobsRequest.java new file mode 100644 index 000000000..ac6c1d5c7 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListDataLabelingJobsRequest.java @@ -0,0 +1,1659 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/job_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for [DataLabelingJobService.ListDataLabelingJobs][].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListDataLabelingJobsRequest} + */ +public final class ListDataLabelingJobsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ListDataLabelingJobsRequest) + ListDataLabelingJobsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListDataLabelingJobsRequest.newBuilder() to construct. + private ListDataLabelingJobsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListDataLabelingJobsRequest() { + parent_ = ""; + filter_ = ""; + pageToken_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListDataLabelingJobsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListDataLabelingJobsRequest( + 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(); + + parent_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + filter_ = s; + break; + } + case 24: + { + pageSize_ = input.readInt32(); + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 42: + { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (readMask_ != null) { + subBuilder = readMask_.toBuilder(); + } + readMask_ = + input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(readMask_); + readMask_ = subBuilder.buildPartial(); + } + + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + orderBy_ = 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.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_ListDataLabelingJobsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_ListDataLabelingJobsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListDataLabelingJobsRequest.class, + com.google.cloud.aiplatform.v1.ListDataLabelingJobsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The parent of the DataLabelingJob.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent of the DataLabelingJob.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 2; + private volatile java.lang.Object filter_; + /** + * + * + *
+   * The standard list filter.
+   * Supported fields:
+   *   * `display_name` supports = and !=.
+   *   * `state` supports = and !=.
+   * Some examples of using the filter are:
+   *  * `state="JOB_STATE_SUCCEEDED" AND display_name="my_job"`
+   *  * `state="JOB_STATE_RUNNING" OR display_name="my_job"`
+   *  * `NOT display_name="my_job"`
+   *  * `state="JOB_STATE_FAILED"`
+   * 
+ * + * string filter = 2; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * The standard list filter.
+   * Supported fields:
+   *   * `display_name` supports = and !=.
+   *   * `state` supports = and !=.
+   * Some examples of using the filter are:
+   *  * `state="JOB_STATE_SUCCEEDED" AND display_name="my_job"`
+   *  * `state="JOB_STATE_RUNNING" OR display_name="my_job"`
+   *  * `NOT display_name="my_job"`
+   *  * `state="JOB_STATE_FAILED"`
+   * 
+ * + * string filter = 2; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 3; + private int pageSize_; + /** + * + * + *
+   * The standard list page size.
+   * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 4; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * The standard list page token.
+   * 
+ * + * string page_token = 4; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The standard list page token.
+   * 
+ * + * string page_token = 4; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int READ_MASK_FIELD_NUMBER = 5; + private com.google.protobuf.FieldMask readMask_; + /** + * + * + *
+   * Mask specifying which fields to read. FieldMask represents a set of
+   * symbolic field paths. For example, the mask can be `paths: "name"`. The
+   * "name" here is a field in DataLabelingJob.
+   * If this field is not set, all fields of the DataLabelingJob are returned.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return Whether the readMask field is set. + */ + @java.lang.Override + public boolean hasReadMask() { + return readMask_ != null; + } + /** + * + * + *
+   * Mask specifying which fields to read. FieldMask represents a set of
+   * symbolic field paths. For example, the mask can be `paths: "name"`. The
+   * "name" here is a field in DataLabelingJob.
+   * If this field is not set, all fields of the DataLabelingJob are returned.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return The readMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getReadMask() { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } + /** + * + * + *
+   * Mask specifying which fields to read. FieldMask represents a set of
+   * symbolic field paths. For example, the mask can be `paths: "name"`. The
+   * "name" here is a field in DataLabelingJob.
+   * If this field is not set, all fields of the DataLabelingJob are returned.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder() { + return getReadMask(); + } + + public static final int ORDER_BY_FIELD_NUMBER = 6; + private volatile java.lang.Object orderBy_; + /** + * + * + *
+   * A comma-separated list of fields to order by, sorted in ascending order by
+   * default.
+   * Use `desc` after a field name for descending.
+   * 
+ * + * string order_by = 6; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + 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(); + orderBy_ = s; + return s; + } + } + /** + * + * + *
+   * A comma-separated list of fields to order by, sorted in ascending order by
+   * default.
+   * Use `desc` after a field name for descending.
+   * 
+ * + * string order_by = 6; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!getFilterBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); + } + if (pageSize_ != 0) { + output.writeInt32(3, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); + } + if (readMask_ != null) { + output.writeMessage(5, getReadMask()); + } + if (!getOrderByBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, orderBy_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!getFilterBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_); + } + if (readMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getReadMask()); + } + if (!getOrderByBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, orderBy_); + } + 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.v1.ListDataLabelingJobsRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ListDataLabelingJobsRequest other = + (com.google.cloud.aiplatform.v1.ListDataLabelingJobsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (hasReadMask() != other.hasReadMask()) return false; + if (hasReadMask()) { + if (!getReadMask().equals(other.getReadMask())) return false; + } + if (!getOrderBy().equals(other.getOrderBy())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + if (hasReadMask()) { + hash = (37 * hash) + READ_MASK_FIELD_NUMBER; + hash = (53 * hash) + getReadMask().hashCode(); + } + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.ListDataLabelingJobsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListDataLabelingJobsRequest 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.v1.ListDataLabelingJobsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListDataLabelingJobsRequest 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.v1.ListDataLabelingJobsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListDataLabelingJobsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListDataLabelingJobsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListDataLabelingJobsRequest 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.v1.ListDataLabelingJobsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListDataLabelingJobsRequest 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.v1.ListDataLabelingJobsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListDataLabelingJobsRequest 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.v1.ListDataLabelingJobsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [DataLabelingJobService.ListDataLabelingJobs][].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListDataLabelingJobsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ListDataLabelingJobsRequest) + com.google.cloud.aiplatform.v1.ListDataLabelingJobsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_ListDataLabelingJobsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_ListDataLabelingJobsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListDataLabelingJobsRequest.class, + com.google.cloud.aiplatform.v1.ListDataLabelingJobsRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ListDataLabelingJobsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + filter_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + if (readMaskBuilder_ == null) { + readMask_ = null; + } else { + readMask_ = null; + readMaskBuilder_ = null; + } + orderBy_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_ListDataLabelingJobsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListDataLabelingJobsRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ListDataLabelingJobsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListDataLabelingJobsRequest build() { + com.google.cloud.aiplatform.v1.ListDataLabelingJobsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListDataLabelingJobsRequest buildPartial() { + com.google.cloud.aiplatform.v1.ListDataLabelingJobsRequest result = + new com.google.cloud.aiplatform.v1.ListDataLabelingJobsRequest(this); + result.parent_ = parent_; + result.filter_ = filter_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + if (readMaskBuilder_ == null) { + result.readMask_ = readMask_; + } else { + result.readMask_ = readMaskBuilder_.build(); + } + result.orderBy_ = orderBy_; + 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.v1.ListDataLabelingJobsRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.ListDataLabelingJobsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.ListDataLabelingJobsRequest other) { + if (other == com.google.cloud.aiplatform.v1.ListDataLabelingJobsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + if (other.hasReadMask()) { + mergeReadMask(other.getReadMask()); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + 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.v1.ListDataLabelingJobsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.ListDataLabelingJobsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent of the DataLabelingJob.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent of the DataLabelingJob.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent of the DataLabelingJob.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent of the DataLabelingJob.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent of the DataLabelingJob.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * The standard list filter.
+     * Supported fields:
+     *   * `display_name` supports = and !=.
+     *   * `state` supports = and !=.
+     * Some examples of using the filter are:
+     *  * `state="JOB_STATE_SUCCEEDED" AND display_name="my_job"`
+     *  * `state="JOB_STATE_RUNNING" OR display_name="my_job"`
+     *  * `NOT display_name="my_job"`
+     *  * `state="JOB_STATE_FAILED"`
+     * 
+ * + * string filter = 2; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The standard list filter.
+     * Supported fields:
+     *   * `display_name` supports = and !=.
+     *   * `state` supports = and !=.
+     * Some examples of using the filter are:
+     *  * `state="JOB_STATE_SUCCEEDED" AND display_name="my_job"`
+     *  * `state="JOB_STATE_RUNNING" OR display_name="my_job"`
+     *  * `NOT display_name="my_job"`
+     *  * `state="JOB_STATE_FAILED"`
+     * 
+ * + * string filter = 2; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The standard list filter.
+     * Supported fields:
+     *   * `display_name` supports = and !=.
+     *   * `state` supports = and !=.
+     * Some examples of using the filter are:
+     *  * `state="JOB_STATE_SUCCEEDED" AND display_name="my_job"`
+     *  * `state="JOB_STATE_RUNNING" OR display_name="my_job"`
+     *  * `NOT display_name="my_job"`
+     *  * `state="JOB_STATE_FAILED"`
+     * 
+ * + * string filter = 2; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list filter.
+     * Supported fields:
+     *   * `display_name` supports = and !=.
+     *   * `state` supports = and !=.
+     * Some examples of using the filter are:
+     *  * `state="JOB_STATE_SUCCEEDED" AND display_name="my_job"`
+     *  * `state="JOB_STATE_RUNNING" OR display_name="my_job"`
+     *  * `NOT display_name="my_job"`
+     *  * `state="JOB_STATE_FAILED"`
+     * 
+ * + * string filter = 2; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list filter.
+     * Supported fields:
+     *   * `display_name` supports = and !=.
+     *   * `state` supports = and !=.
+     * Some examples of using the filter are:
+     *  * `state="JOB_STATE_SUCCEEDED" AND display_name="my_job"`
+     *  * `state="JOB_STATE_RUNNING" OR display_name="my_job"`
+     *  * `NOT display_name="my_job"`
+     *  * `state="JOB_STATE_FAILED"`
+     * 
+ * + * string filter = 2; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The standard list page size.
+     * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The standard list page size.
+     * 
+ * + * int32 page_size = 3; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list page size.
+     * 
+ * + * int32 page_size = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * The standard list page token.
+     * 
+ * + * string page_token = 4; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The standard list page token.
+     * 
+ * + * string page_token = 4; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The standard list page token.
+     * 
+ * + * string page_token = 4; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list page token.
+     * 
+ * + * string page_token = 4; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list page token.
+     * 
+ * + * string page_token = 4; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.FieldMask readMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + readMaskBuilder_; + /** + * + * + *
+     * Mask specifying which fields to read. FieldMask represents a set of
+     * symbolic field paths. For example, the mask can be `paths: "name"`. The
+     * "name" here is a field in DataLabelingJob.
+     * If this field is not set, all fields of the DataLabelingJob are returned.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return Whether the readMask field is set. + */ + public boolean hasReadMask() { + return readMaskBuilder_ != null || readMask_ != null; + } + /** + * + * + *
+     * Mask specifying which fields to read. FieldMask represents a set of
+     * symbolic field paths. For example, the mask can be `paths: "name"`. The
+     * "name" here is a field in DataLabelingJob.
+     * If this field is not set, all fields of the DataLabelingJob are returned.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return The readMask. + */ + public com.google.protobuf.FieldMask getReadMask() { + if (readMaskBuilder_ == null) { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } else { + return readMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Mask specifying which fields to read. FieldMask represents a set of
+     * symbolic field paths. For example, the mask can be `paths: "name"`. The
+     * "name" here is a field in DataLabelingJob.
+     * If this field is not set, all fields of the DataLabelingJob are returned.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + public Builder setReadMask(com.google.protobuf.FieldMask value) { + if (readMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + readMask_ = value; + onChanged(); + } else { + readMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Mask specifying which fields to read. FieldMask represents a set of
+     * symbolic field paths. For example, the mask can be `paths: "name"`. The
+     * "name" here is a field in DataLabelingJob.
+     * If this field is not set, all fields of the DataLabelingJob are returned.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + public Builder setReadMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (readMaskBuilder_ == null) { + readMask_ = builderForValue.build(); + onChanged(); + } else { + readMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Mask specifying which fields to read. FieldMask represents a set of
+     * symbolic field paths. For example, the mask can be `paths: "name"`. The
+     * "name" here is a field in DataLabelingJob.
+     * If this field is not set, all fields of the DataLabelingJob are returned.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + public Builder mergeReadMask(com.google.protobuf.FieldMask value) { + if (readMaskBuilder_ == null) { + if (readMask_ != null) { + readMask_ = + com.google.protobuf.FieldMask.newBuilder(readMask_).mergeFrom(value).buildPartial(); + } else { + readMask_ = value; + } + onChanged(); + } else { + readMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Mask specifying which fields to read. FieldMask represents a set of
+     * symbolic field paths. For example, the mask can be `paths: "name"`. The
+     * "name" here is a field in DataLabelingJob.
+     * If this field is not set, all fields of the DataLabelingJob are returned.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + public Builder clearReadMask() { + if (readMaskBuilder_ == null) { + readMask_ = null; + onChanged(); + } else { + readMask_ = null; + readMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Mask specifying which fields to read. FieldMask represents a set of
+     * symbolic field paths. For example, the mask can be `paths: "name"`. The
+     * "name" here is a field in DataLabelingJob.
+     * If this field is not set, all fields of the DataLabelingJob are returned.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + public com.google.protobuf.FieldMask.Builder getReadMaskBuilder() { + + onChanged(); + return getReadMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Mask specifying which fields to read. FieldMask represents a set of
+     * symbolic field paths. For example, the mask can be `paths: "name"`. The
+     * "name" here is a field in DataLabelingJob.
+     * If this field is not set, all fields of the DataLabelingJob are returned.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + public com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder() { + if (readMaskBuilder_ != null) { + return readMaskBuilder_.getMessageOrBuilder(); + } else { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } + } + /** + * + * + *
+     * Mask specifying which fields to read. FieldMask represents a set of
+     * symbolic field paths. For example, the mask can be `paths: "name"`. The
+     * "name" here is a field in DataLabelingJob.
+     * If this field is not set, all fields of the DataLabelingJob are returned.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getReadMaskFieldBuilder() { + if (readMaskBuilder_ == null) { + readMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getReadMask(), getParentForChildren(), isClean()); + readMask_ = null; + } + return readMaskBuilder_; + } + + private java.lang.Object orderBy_ = ""; + /** + * + * + *
+     * A comma-separated list of fields to order by, sorted in ascending order by
+     * default.
+     * Use `desc` after a field name for descending.
+     * 
+ * + * string order_by = 6; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A comma-separated list of fields to order by, sorted in ascending order by
+     * default.
+     * Use `desc` after a field name for descending.
+     * 
+ * + * string order_by = 6; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A comma-separated list of fields to order by, sorted in ascending order by
+     * default.
+     * Use `desc` after a field name for descending.
+     * 
+ * + * string order_by = 6; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + orderBy_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A comma-separated list of fields to order by, sorted in ascending order by
+     * default.
+     * Use `desc` after a field name for descending.
+     * 
+ * + * string order_by = 6; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + + orderBy_ = getDefaultInstance().getOrderBy(); + onChanged(); + return this; + } + /** + * + * + *
+     * A comma-separated list of fields to order by, sorted in ascending order by
+     * default.
+     * Use `desc` after a field name for descending.
+     * 
+ * + * string order_by = 6; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + orderBy_ = 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.v1.ListDataLabelingJobsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ListDataLabelingJobsRequest) + private static final com.google.cloud.aiplatform.v1.ListDataLabelingJobsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ListDataLabelingJobsRequest(); + } + + public static com.google.cloud.aiplatform.v1.ListDataLabelingJobsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListDataLabelingJobsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListDataLabelingJobsRequest(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.v1.ListDataLabelingJobsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListDataLabelingJobsRequestOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListDataLabelingJobsRequestOrBuilder.java new file mode 100644 index 000000000..e62afebd9 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListDataLabelingJobsRequestOrBuilder.java @@ -0,0 +1,208 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/job_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface ListDataLabelingJobsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ListDataLabelingJobsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent of the DataLabelingJob.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent of the DataLabelingJob.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The standard list filter.
+   * Supported fields:
+   *   * `display_name` supports = and !=.
+   *   * `state` supports = and !=.
+   * Some examples of using the filter are:
+   *  * `state="JOB_STATE_SUCCEEDED" AND display_name="my_job"`
+   *  * `state="JOB_STATE_RUNNING" OR display_name="my_job"`
+   *  * `NOT display_name="my_job"`
+   *  * `state="JOB_STATE_FAILED"`
+   * 
+ * + * string filter = 2; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * The standard list filter.
+   * Supported fields:
+   *   * `display_name` supports = and !=.
+   *   * `state` supports = and !=.
+   * Some examples of using the filter are:
+   *  * `state="JOB_STATE_SUCCEEDED" AND display_name="my_job"`
+   *  * `state="JOB_STATE_RUNNING" OR display_name="my_job"`
+   *  * `NOT display_name="my_job"`
+   *  * `state="JOB_STATE_FAILED"`
+   * 
+ * + * string filter = 2; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * The standard list page size.
+   * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * The standard list page token.
+   * 
+ * + * string page_token = 4; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * The standard list page token.
+   * 
+ * + * string page_token = 4; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Mask specifying which fields to read. FieldMask represents a set of
+   * symbolic field paths. For example, the mask can be `paths: "name"`. The
+   * "name" here is a field in DataLabelingJob.
+   * If this field is not set, all fields of the DataLabelingJob are returned.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return Whether the readMask field is set. + */ + boolean hasReadMask(); + /** + * + * + *
+   * Mask specifying which fields to read. FieldMask represents a set of
+   * symbolic field paths. For example, the mask can be `paths: "name"`. The
+   * "name" here is a field in DataLabelingJob.
+   * If this field is not set, all fields of the DataLabelingJob are returned.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return The readMask. + */ + com.google.protobuf.FieldMask getReadMask(); + /** + * + * + *
+   * Mask specifying which fields to read. FieldMask represents a set of
+   * symbolic field paths. For example, the mask can be `paths: "name"`. The
+   * "name" here is a field in DataLabelingJob.
+   * If this field is not set, all fields of the DataLabelingJob are returned.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder(); + + /** + * + * + *
+   * A comma-separated list of fields to order by, sorted in ascending order by
+   * default.
+   * Use `desc` after a field name for descending.
+   * 
+ * + * string order_by = 6; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * A comma-separated list of fields to order by, sorted in ascending order by
+   * default.
+   * Use `desc` after a field name for descending.
+   * 
+ * + * string order_by = 6; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListDataLabelingJobsResponse.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListDataLabelingJobsResponse.java new file mode 100644 index 000000000..146a3bdf8 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListDataLabelingJobsResponse.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/v1/job_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Response message for [JobService.ListDataLabelingJobs][google.cloud.aiplatform.v1.JobService.ListDataLabelingJobs].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListDataLabelingJobsResponse} + */ +public final class ListDataLabelingJobsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ListDataLabelingJobsResponse) + ListDataLabelingJobsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListDataLabelingJobsResponse.newBuilder() to construct. + private ListDataLabelingJobsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListDataLabelingJobsResponse() { + dataLabelingJobs_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListDataLabelingJobsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListDataLabelingJobsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + dataLabelingJobs_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + dataLabelingJobs_.add( + input.readMessage( + com.google.cloud.aiplatform.v1.DataLabelingJob.parser(), extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + dataLabelingJobs_ = java.util.Collections.unmodifiableList(dataLabelingJobs_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_ListDataLabelingJobsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_ListDataLabelingJobsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListDataLabelingJobsResponse.class, + com.google.cloud.aiplatform.v1.ListDataLabelingJobsResponse.Builder.class); + } + + public static final int DATA_LABELING_JOBS_FIELD_NUMBER = 1; + private java.util.List dataLabelingJobs_; + /** + * + * + *
+   * A list of DataLabelingJobs that matches the specified filter in the
+   * request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.DataLabelingJob data_labeling_jobs = 1; + */ + @java.lang.Override + public java.util.List getDataLabelingJobsList() { + return dataLabelingJobs_; + } + /** + * + * + *
+   * A list of DataLabelingJobs that matches the specified filter in the
+   * request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.DataLabelingJob data_labeling_jobs = 1; + */ + @java.lang.Override + public java.util.List + getDataLabelingJobsOrBuilderList() { + return dataLabelingJobs_; + } + /** + * + * + *
+   * A list of DataLabelingJobs that matches the specified filter in the
+   * request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.DataLabelingJob data_labeling_jobs = 1; + */ + @java.lang.Override + public int getDataLabelingJobsCount() { + return dataLabelingJobs_.size(); + } + /** + * + * + *
+   * A list of DataLabelingJobs that matches the specified filter in the
+   * request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.DataLabelingJob data_labeling_jobs = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.DataLabelingJob getDataLabelingJobs(int index) { + return dataLabelingJobs_.get(index); + } + /** + * + * + *
+   * A list of DataLabelingJobs that matches the specified filter in the
+   * request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.DataLabelingJob data_labeling_jobs = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.DataLabelingJobOrBuilder getDataLabelingJobsOrBuilder( + int index) { + return dataLabelingJobs_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * The standard List next-page token.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The standard List next-page token.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < dataLabelingJobs_.size(); i++) { + output.writeMessage(1, dataLabelingJobs_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < dataLabelingJobs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, dataLabelingJobs_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.ListDataLabelingJobsResponse)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ListDataLabelingJobsResponse other = + (com.google.cloud.aiplatform.v1.ListDataLabelingJobsResponse) obj; + + if (!getDataLabelingJobsList().equals(other.getDataLabelingJobsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getDataLabelingJobsCount() > 0) { + hash = (37 * hash) + DATA_LABELING_JOBS_FIELD_NUMBER; + hash = (53 * hash) + getDataLabelingJobsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.ListDataLabelingJobsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListDataLabelingJobsResponse 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.v1.ListDataLabelingJobsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListDataLabelingJobsResponse 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.v1.ListDataLabelingJobsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListDataLabelingJobsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListDataLabelingJobsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListDataLabelingJobsResponse 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.v1.ListDataLabelingJobsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListDataLabelingJobsResponse 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.v1.ListDataLabelingJobsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListDataLabelingJobsResponse 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.v1.ListDataLabelingJobsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for [JobService.ListDataLabelingJobs][google.cloud.aiplatform.v1.JobService.ListDataLabelingJobs].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListDataLabelingJobsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ListDataLabelingJobsResponse) + com.google.cloud.aiplatform.v1.ListDataLabelingJobsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_ListDataLabelingJobsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_ListDataLabelingJobsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListDataLabelingJobsResponse.class, + com.google.cloud.aiplatform.v1.ListDataLabelingJobsResponse.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ListDataLabelingJobsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getDataLabelingJobsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (dataLabelingJobsBuilder_ == null) { + dataLabelingJobs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + dataLabelingJobsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_ListDataLabelingJobsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListDataLabelingJobsResponse getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ListDataLabelingJobsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListDataLabelingJobsResponse build() { + com.google.cloud.aiplatform.v1.ListDataLabelingJobsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListDataLabelingJobsResponse buildPartial() { + com.google.cloud.aiplatform.v1.ListDataLabelingJobsResponse result = + new com.google.cloud.aiplatform.v1.ListDataLabelingJobsResponse(this); + int from_bitField0_ = bitField0_; + if (dataLabelingJobsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + dataLabelingJobs_ = java.util.Collections.unmodifiableList(dataLabelingJobs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.dataLabelingJobs_ = dataLabelingJobs_; + } else { + result.dataLabelingJobs_ = dataLabelingJobsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + 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.v1.ListDataLabelingJobsResponse) { + return mergeFrom((com.google.cloud.aiplatform.v1.ListDataLabelingJobsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.ListDataLabelingJobsResponse other) { + if (other == com.google.cloud.aiplatform.v1.ListDataLabelingJobsResponse.getDefaultInstance()) + return this; + if (dataLabelingJobsBuilder_ == null) { + if (!other.dataLabelingJobs_.isEmpty()) { + if (dataLabelingJobs_.isEmpty()) { + dataLabelingJobs_ = other.dataLabelingJobs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDataLabelingJobsIsMutable(); + dataLabelingJobs_.addAll(other.dataLabelingJobs_); + } + onChanged(); + } + } else { + if (!other.dataLabelingJobs_.isEmpty()) { + if (dataLabelingJobsBuilder_.isEmpty()) { + dataLabelingJobsBuilder_.dispose(); + dataLabelingJobsBuilder_ = null; + dataLabelingJobs_ = other.dataLabelingJobs_; + bitField0_ = (bitField0_ & ~0x00000001); + dataLabelingJobsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDataLabelingJobsFieldBuilder() + : null; + } else { + dataLabelingJobsBuilder_.addAllMessages(other.dataLabelingJobs_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.aiplatform.v1.ListDataLabelingJobsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.ListDataLabelingJobsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List dataLabelingJobs_ = + java.util.Collections.emptyList(); + + private void ensureDataLabelingJobsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + dataLabelingJobs_ = + new java.util.ArrayList( + dataLabelingJobs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.DataLabelingJob, + com.google.cloud.aiplatform.v1.DataLabelingJob.Builder, + com.google.cloud.aiplatform.v1.DataLabelingJobOrBuilder> + dataLabelingJobsBuilder_; + + /** + * + * + *
+     * A list of DataLabelingJobs that matches the specified filter in the
+     * request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.DataLabelingJob data_labeling_jobs = 1; + */ + public java.util.List + getDataLabelingJobsList() { + if (dataLabelingJobsBuilder_ == null) { + return java.util.Collections.unmodifiableList(dataLabelingJobs_); + } else { + return dataLabelingJobsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of DataLabelingJobs that matches the specified filter in the
+     * request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.DataLabelingJob data_labeling_jobs = 1; + */ + public int getDataLabelingJobsCount() { + if (dataLabelingJobsBuilder_ == null) { + return dataLabelingJobs_.size(); + } else { + return dataLabelingJobsBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of DataLabelingJobs that matches the specified filter in the
+     * request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.DataLabelingJob data_labeling_jobs = 1; + */ + public com.google.cloud.aiplatform.v1.DataLabelingJob getDataLabelingJobs(int index) { + if (dataLabelingJobsBuilder_ == null) { + return dataLabelingJobs_.get(index); + } else { + return dataLabelingJobsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of DataLabelingJobs that matches the specified filter in the
+     * request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.DataLabelingJob data_labeling_jobs = 1; + */ + public Builder setDataLabelingJobs( + int index, com.google.cloud.aiplatform.v1.DataLabelingJob value) { + if (dataLabelingJobsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataLabelingJobsIsMutable(); + dataLabelingJobs_.set(index, value); + onChanged(); + } else { + dataLabelingJobsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of DataLabelingJobs that matches the specified filter in the
+     * request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.DataLabelingJob data_labeling_jobs = 1; + */ + public Builder setDataLabelingJobs( + int index, com.google.cloud.aiplatform.v1.DataLabelingJob.Builder builderForValue) { + if (dataLabelingJobsBuilder_ == null) { + ensureDataLabelingJobsIsMutable(); + dataLabelingJobs_.set(index, builderForValue.build()); + onChanged(); + } else { + dataLabelingJobsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of DataLabelingJobs that matches the specified filter in the
+     * request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.DataLabelingJob data_labeling_jobs = 1; + */ + public Builder addDataLabelingJobs(com.google.cloud.aiplatform.v1.DataLabelingJob value) { + if (dataLabelingJobsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataLabelingJobsIsMutable(); + dataLabelingJobs_.add(value); + onChanged(); + } else { + dataLabelingJobsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of DataLabelingJobs that matches the specified filter in the
+     * request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.DataLabelingJob data_labeling_jobs = 1; + */ + public Builder addDataLabelingJobs( + int index, com.google.cloud.aiplatform.v1.DataLabelingJob value) { + if (dataLabelingJobsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataLabelingJobsIsMutable(); + dataLabelingJobs_.add(index, value); + onChanged(); + } else { + dataLabelingJobsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of DataLabelingJobs that matches the specified filter in the
+     * request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.DataLabelingJob data_labeling_jobs = 1; + */ + public Builder addDataLabelingJobs( + com.google.cloud.aiplatform.v1.DataLabelingJob.Builder builderForValue) { + if (dataLabelingJobsBuilder_ == null) { + ensureDataLabelingJobsIsMutable(); + dataLabelingJobs_.add(builderForValue.build()); + onChanged(); + } else { + dataLabelingJobsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of DataLabelingJobs that matches the specified filter in the
+     * request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.DataLabelingJob data_labeling_jobs = 1; + */ + public Builder addDataLabelingJobs( + int index, com.google.cloud.aiplatform.v1.DataLabelingJob.Builder builderForValue) { + if (dataLabelingJobsBuilder_ == null) { + ensureDataLabelingJobsIsMutable(); + dataLabelingJobs_.add(index, builderForValue.build()); + onChanged(); + } else { + dataLabelingJobsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of DataLabelingJobs that matches the specified filter in the
+     * request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.DataLabelingJob data_labeling_jobs = 1; + */ + public Builder addAllDataLabelingJobs( + java.lang.Iterable values) { + if (dataLabelingJobsBuilder_ == null) { + ensureDataLabelingJobsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, dataLabelingJobs_); + onChanged(); + } else { + dataLabelingJobsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of DataLabelingJobs that matches the specified filter in the
+     * request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.DataLabelingJob data_labeling_jobs = 1; + */ + public Builder clearDataLabelingJobs() { + if (dataLabelingJobsBuilder_ == null) { + dataLabelingJobs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + dataLabelingJobsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of DataLabelingJobs that matches the specified filter in the
+     * request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.DataLabelingJob data_labeling_jobs = 1; + */ + public Builder removeDataLabelingJobs(int index) { + if (dataLabelingJobsBuilder_ == null) { + ensureDataLabelingJobsIsMutable(); + dataLabelingJobs_.remove(index); + onChanged(); + } else { + dataLabelingJobsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of DataLabelingJobs that matches the specified filter in the
+     * request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.DataLabelingJob data_labeling_jobs = 1; + */ + public com.google.cloud.aiplatform.v1.DataLabelingJob.Builder getDataLabelingJobsBuilder( + int index) { + return getDataLabelingJobsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of DataLabelingJobs that matches the specified filter in the
+     * request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.DataLabelingJob data_labeling_jobs = 1; + */ + public com.google.cloud.aiplatform.v1.DataLabelingJobOrBuilder getDataLabelingJobsOrBuilder( + int index) { + if (dataLabelingJobsBuilder_ == null) { + return dataLabelingJobs_.get(index); + } else { + return dataLabelingJobsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of DataLabelingJobs that matches the specified filter in the
+     * request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.DataLabelingJob data_labeling_jobs = 1; + */ + public java.util.List + getDataLabelingJobsOrBuilderList() { + if (dataLabelingJobsBuilder_ != null) { + return dataLabelingJobsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(dataLabelingJobs_); + } + } + /** + * + * + *
+     * A list of DataLabelingJobs that matches the specified filter in the
+     * request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.DataLabelingJob data_labeling_jobs = 1; + */ + public com.google.cloud.aiplatform.v1.DataLabelingJob.Builder addDataLabelingJobsBuilder() { + return getDataLabelingJobsFieldBuilder() + .addBuilder(com.google.cloud.aiplatform.v1.DataLabelingJob.getDefaultInstance()); + } + /** + * + * + *
+     * A list of DataLabelingJobs that matches the specified filter in the
+     * request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.DataLabelingJob data_labeling_jobs = 1; + */ + public com.google.cloud.aiplatform.v1.DataLabelingJob.Builder addDataLabelingJobsBuilder( + int index) { + return getDataLabelingJobsFieldBuilder() + .addBuilder(index, com.google.cloud.aiplatform.v1.DataLabelingJob.getDefaultInstance()); + } + /** + * + * + *
+     * A list of DataLabelingJobs that matches the specified filter in the
+     * request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.DataLabelingJob data_labeling_jobs = 1; + */ + public java.util.List + getDataLabelingJobsBuilderList() { + return getDataLabelingJobsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.DataLabelingJob, + com.google.cloud.aiplatform.v1.DataLabelingJob.Builder, + com.google.cloud.aiplatform.v1.DataLabelingJobOrBuilder> + getDataLabelingJobsFieldBuilder() { + if (dataLabelingJobsBuilder_ == null) { + dataLabelingJobsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.DataLabelingJob, + com.google.cloud.aiplatform.v1.DataLabelingJob.Builder, + com.google.cloud.aiplatform.v1.DataLabelingJobOrBuilder>( + dataLabelingJobs_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + dataLabelingJobs_ = null; + } + return dataLabelingJobsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * The standard List next-page token.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The standard List next-page token.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The standard List next-page token.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The standard List next-page token.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The standard List next-page token.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.ListDataLabelingJobsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ListDataLabelingJobsResponse) + private static final com.google.cloud.aiplatform.v1.ListDataLabelingJobsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ListDataLabelingJobsResponse(); + } + + public static com.google.cloud.aiplatform.v1.ListDataLabelingJobsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListDataLabelingJobsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListDataLabelingJobsResponse(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.v1.ListDataLabelingJobsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListDataLabelingJobsResponseOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListDataLabelingJobsResponseOrBuilder.java new file mode 100644 index 000000000..8bd478b5c --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListDataLabelingJobsResponseOrBuilder.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/v1/job_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface ListDataLabelingJobsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ListDataLabelingJobsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A list of DataLabelingJobs that matches the specified filter in the
+   * request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.DataLabelingJob data_labeling_jobs = 1; + */ + java.util.List getDataLabelingJobsList(); + /** + * + * + *
+   * A list of DataLabelingJobs that matches the specified filter in the
+   * request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.DataLabelingJob data_labeling_jobs = 1; + */ + com.google.cloud.aiplatform.v1.DataLabelingJob getDataLabelingJobs(int index); + /** + * + * + *
+   * A list of DataLabelingJobs that matches the specified filter in the
+   * request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.DataLabelingJob data_labeling_jobs = 1; + */ + int getDataLabelingJobsCount(); + /** + * + * + *
+   * A list of DataLabelingJobs that matches the specified filter in the
+   * request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.DataLabelingJob data_labeling_jobs = 1; + */ + java.util.List + getDataLabelingJobsOrBuilderList(); + /** + * + * + *
+   * A list of DataLabelingJobs that matches the specified filter in the
+   * request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.DataLabelingJob data_labeling_jobs = 1; + */ + com.google.cloud.aiplatform.v1.DataLabelingJobOrBuilder getDataLabelingJobsOrBuilder(int index); + + /** + * + * + *
+   * The standard List next-page token.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * The standard List next-page token.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListDatasetsRequest.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListDatasetsRequest.java new file mode 100644 index 000000000..0f5be70a7 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListDatasetsRequest.java @@ -0,0 +1,1657 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/dataset_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for [DatasetService.ListDatasets][google.cloud.aiplatform.v1.DatasetService.ListDatasets].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListDatasetsRequest} + */ +public final class ListDatasetsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ListDatasetsRequest) + ListDatasetsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListDatasetsRequest.newBuilder() to construct. + private ListDatasetsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListDatasetsRequest() { + parent_ = ""; + filter_ = ""; + pageToken_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListDatasetsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListDatasetsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + filter_ = s; + break; + } + case 24: + { + pageSize_ = input.readInt32(); + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 42: + { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (readMask_ != null) { + subBuilder = readMask_.toBuilder(); + } + readMask_ = + input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(readMask_); + readMask_ = subBuilder.buildPartial(); + } + + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + orderBy_ = 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.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_ListDatasetsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_ListDatasetsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListDatasetsRequest.class, + com.google.cloud.aiplatform.v1.ListDatasetsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The name of the Dataset's parent resource.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the Dataset's parent resource.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 2; + private volatile java.lang.Object filter_; + /** + * + * + *
+   * An expression for filtering the results of the request. For field names
+   * both snake_case and camelCase are supported.
+   *   * `display_name`: supports = and !=
+   *   * `metadata_schema_uri`: supports = and !=
+   *   * `labels` supports general map functions that is:
+   *     * `labels.key=value` - key:value equality
+   *     * `labels.key:* or labels:key - key existence
+   *     * A key including a space must be quoted. `labels."a key"`.
+   * Some examples:
+   *   * `displayName="myDisplayName"`
+   *   * `labels.myKey="myValue"`
+   * 
+ * + * string filter = 2; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * An expression for filtering the results of the request. For field names
+   * both snake_case and camelCase are supported.
+   *   * `display_name`: supports = and !=
+   *   * `metadata_schema_uri`: supports = and !=
+   *   * `labels` supports general map functions that is:
+   *     * `labels.key=value` - key:value equality
+   *     * `labels.key:* or labels:key - key existence
+   *     * A key including a space must be quoted. `labels."a key"`.
+   * Some examples:
+   *   * `displayName="myDisplayName"`
+   *   * `labels.myKey="myValue"`
+   * 
+ * + * string filter = 2; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 3; + private int pageSize_; + /** + * + * + *
+   * The standard list page size.
+   * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 4; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * The standard list page token.
+   * 
+ * + * string page_token = 4; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The standard list page token.
+   * 
+ * + * string page_token = 4; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int READ_MASK_FIELD_NUMBER = 5; + private com.google.protobuf.FieldMask readMask_; + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return Whether the readMask field is set. + */ + @java.lang.Override + public boolean hasReadMask() { + return readMask_ != null; + } + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return The readMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getReadMask() { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder() { + return getReadMask(); + } + + public static final int ORDER_BY_FIELD_NUMBER = 6; + private volatile java.lang.Object orderBy_; + /** + * + * + *
+   * A comma-separated list of fields to order by, sorted in ascending order.
+   * Use "desc" after a field name for descending.
+   * Supported fields:
+   *   * `display_name`
+   *   * `create_time`
+   *   * `update_time`
+   * 
+ * + * string order_by = 6; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + 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(); + orderBy_ = s; + return s; + } + } + /** + * + * + *
+   * A comma-separated list of fields to order by, sorted in ascending order.
+   * Use "desc" after a field name for descending.
+   * Supported fields:
+   *   * `display_name`
+   *   * `create_time`
+   *   * `update_time`
+   * 
+ * + * string order_by = 6; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!getFilterBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); + } + if (pageSize_ != 0) { + output.writeInt32(3, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); + } + if (readMask_ != null) { + output.writeMessage(5, getReadMask()); + } + if (!getOrderByBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, orderBy_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!getFilterBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_); + } + if (readMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getReadMask()); + } + if (!getOrderByBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, orderBy_); + } + 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.v1.ListDatasetsRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ListDatasetsRequest other = + (com.google.cloud.aiplatform.v1.ListDatasetsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (hasReadMask() != other.hasReadMask()) return false; + if (hasReadMask()) { + if (!getReadMask().equals(other.getReadMask())) return false; + } + if (!getOrderBy().equals(other.getOrderBy())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + if (hasReadMask()) { + hash = (37 * hash) + READ_MASK_FIELD_NUMBER; + hash = (53 * hash) + getReadMask().hashCode(); + } + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.ListDatasetsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListDatasetsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListDatasetsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListDatasetsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListDatasetsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListDatasetsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListDatasetsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListDatasetsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListDatasetsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListDatasetsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListDatasetsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListDatasetsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1.ListDatasetsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [DatasetService.ListDatasets][google.cloud.aiplatform.v1.DatasetService.ListDatasets].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListDatasetsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ListDatasetsRequest) + com.google.cloud.aiplatform.v1.ListDatasetsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_ListDatasetsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_ListDatasetsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListDatasetsRequest.class, + com.google.cloud.aiplatform.v1.ListDatasetsRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ListDatasetsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + filter_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + if (readMaskBuilder_ == null) { + readMask_ = null; + } else { + readMask_ = null; + readMaskBuilder_ = null; + } + orderBy_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_ListDatasetsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListDatasetsRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ListDatasetsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListDatasetsRequest build() { + com.google.cloud.aiplatform.v1.ListDatasetsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListDatasetsRequest buildPartial() { + com.google.cloud.aiplatform.v1.ListDatasetsRequest result = + new com.google.cloud.aiplatform.v1.ListDatasetsRequest(this); + result.parent_ = parent_; + result.filter_ = filter_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + if (readMaskBuilder_ == null) { + result.readMask_ = readMask_; + } else { + result.readMask_ = readMaskBuilder_.build(); + } + result.orderBy_ = orderBy_; + 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.v1.ListDatasetsRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.ListDatasetsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.ListDatasetsRequest other) { + if (other == com.google.cloud.aiplatform.v1.ListDatasetsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + if (other.hasReadMask()) { + mergeReadMask(other.getReadMask()); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + 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.v1.ListDatasetsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.ListDatasetsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The name of the Dataset's parent resource.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the Dataset's parent resource.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the Dataset's parent resource.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the Dataset's parent resource.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the Dataset's parent resource.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * An expression for filtering the results of the request. For field names
+     * both snake_case and camelCase are supported.
+     *   * `display_name`: supports = and !=
+     *   * `metadata_schema_uri`: supports = and !=
+     *   * `labels` supports general map functions that is:
+     *     * `labels.key=value` - key:value equality
+     *     * `labels.key:* or labels:key - key existence
+     *     * A key including a space must be quoted. `labels."a key"`.
+     * Some examples:
+     *   * `displayName="myDisplayName"`
+     *   * `labels.myKey="myValue"`
+     * 
+ * + * string filter = 2; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * An expression for filtering the results of the request. For field names
+     * both snake_case and camelCase are supported.
+     *   * `display_name`: supports = and !=
+     *   * `metadata_schema_uri`: supports = and !=
+     *   * `labels` supports general map functions that is:
+     *     * `labels.key=value` - key:value equality
+     *     * `labels.key:* or labels:key - key existence
+     *     * A key including a space must be quoted. `labels."a key"`.
+     * Some examples:
+     *   * `displayName="myDisplayName"`
+     *   * `labels.myKey="myValue"`
+     * 
+ * + * string filter = 2; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * An expression for filtering the results of the request. For field names
+     * both snake_case and camelCase are supported.
+     *   * `display_name`: supports = and !=
+     *   * `metadata_schema_uri`: supports = and !=
+     *   * `labels` supports general map functions that is:
+     *     * `labels.key=value` - key:value equality
+     *     * `labels.key:* or labels:key - key existence
+     *     * A key including a space must be quoted. `labels."a key"`.
+     * Some examples:
+     *   * `displayName="myDisplayName"`
+     *   * `labels.myKey="myValue"`
+     * 
+ * + * string filter = 2; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * An expression for filtering the results of the request. For field names
+     * both snake_case and camelCase are supported.
+     *   * `display_name`: supports = and !=
+     *   * `metadata_schema_uri`: supports = and !=
+     *   * `labels` supports general map functions that is:
+     *     * `labels.key=value` - key:value equality
+     *     * `labels.key:* or labels:key - key existence
+     *     * A key including a space must be quoted. `labels."a key"`.
+     * Some examples:
+     *   * `displayName="myDisplayName"`
+     *   * `labels.myKey="myValue"`
+     * 
+ * + * string filter = 2; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + * + * + *
+     * An expression for filtering the results of the request. For field names
+     * both snake_case and camelCase are supported.
+     *   * `display_name`: supports = and !=
+     *   * `metadata_schema_uri`: supports = and !=
+     *   * `labels` supports general map functions that is:
+     *     * `labels.key=value` - key:value equality
+     *     * `labels.key:* or labels:key - key existence
+     *     * A key including a space must be quoted. `labels."a key"`.
+     * Some examples:
+     *   * `displayName="myDisplayName"`
+     *   * `labels.myKey="myValue"`
+     * 
+ * + * string filter = 2; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The standard list page size.
+     * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The standard list page size.
+     * 
+ * + * int32 page_size = 3; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list page size.
+     * 
+ * + * int32 page_size = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * The standard list page token.
+     * 
+ * + * string page_token = 4; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The standard list page token.
+     * 
+ * + * string page_token = 4; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The standard list page token.
+     * 
+ * + * string page_token = 4; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list page token.
+     * 
+ * + * string page_token = 4; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list page token.
+     * 
+ * + * string page_token = 4; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.FieldMask readMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + readMaskBuilder_; + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return Whether the readMask field is set. + */ + public boolean hasReadMask() { + return readMaskBuilder_ != null || readMask_ != null; + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return The readMask. + */ + public com.google.protobuf.FieldMask getReadMask() { + if (readMaskBuilder_ == null) { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } else { + return readMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + public Builder setReadMask(com.google.protobuf.FieldMask value) { + if (readMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + readMask_ = value; + onChanged(); + } else { + readMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + public Builder setReadMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (readMaskBuilder_ == null) { + readMask_ = builderForValue.build(); + onChanged(); + } else { + readMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + public Builder mergeReadMask(com.google.protobuf.FieldMask value) { + if (readMaskBuilder_ == null) { + if (readMask_ != null) { + readMask_ = + com.google.protobuf.FieldMask.newBuilder(readMask_).mergeFrom(value).buildPartial(); + } else { + readMask_ = value; + } + onChanged(); + } else { + readMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + public Builder clearReadMask() { + if (readMaskBuilder_ == null) { + readMask_ = null; + onChanged(); + } else { + readMask_ = null; + readMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + public com.google.protobuf.FieldMask.Builder getReadMaskBuilder() { + + onChanged(); + return getReadMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + public com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder() { + if (readMaskBuilder_ != null) { + return readMaskBuilder_.getMessageOrBuilder(); + } else { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getReadMaskFieldBuilder() { + if (readMaskBuilder_ == null) { + readMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getReadMask(), getParentForChildren(), isClean()); + readMask_ = null; + } + return readMaskBuilder_; + } + + private java.lang.Object orderBy_ = ""; + /** + * + * + *
+     * A comma-separated list of fields to order by, sorted in ascending order.
+     * Use "desc" after a field name for descending.
+     * Supported fields:
+     *   * `display_name`
+     *   * `create_time`
+     *   * `update_time`
+     * 
+ * + * string order_by = 6; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A comma-separated list of fields to order by, sorted in ascending order.
+     * Use "desc" after a field name for descending.
+     * Supported fields:
+     *   * `display_name`
+     *   * `create_time`
+     *   * `update_time`
+     * 
+ * + * string order_by = 6; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A comma-separated list of fields to order by, sorted in ascending order.
+     * Use "desc" after a field name for descending.
+     * Supported fields:
+     *   * `display_name`
+     *   * `create_time`
+     *   * `update_time`
+     * 
+ * + * string order_by = 6; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + orderBy_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A comma-separated list of fields to order by, sorted in ascending order.
+     * Use "desc" after a field name for descending.
+     * Supported fields:
+     *   * `display_name`
+     *   * `create_time`
+     *   * `update_time`
+     * 
+ * + * string order_by = 6; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + + orderBy_ = getDefaultInstance().getOrderBy(); + onChanged(); + return this; + } + /** + * + * + *
+     * A comma-separated list of fields to order by, sorted in ascending order.
+     * Use "desc" after a field name for descending.
+     * Supported fields:
+     *   * `display_name`
+     *   * `create_time`
+     *   * `update_time`
+     * 
+ * + * string order_by = 6; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + orderBy_ = 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.v1.ListDatasetsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ListDatasetsRequest) + private static final com.google.cloud.aiplatform.v1.ListDatasetsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ListDatasetsRequest(); + } + + public static com.google.cloud.aiplatform.v1.ListDatasetsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListDatasetsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListDatasetsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListDatasetsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListDatasetsRequestOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListDatasetsRequestOrBuilder.java new file mode 100644 index 000000000..819f949aa --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListDatasetsRequestOrBuilder.java @@ -0,0 +1,209 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/dataset_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface ListDatasetsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ListDatasetsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the Dataset's parent resource.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The name of the Dataset's parent resource.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * An expression for filtering the results of the request. For field names
+   * both snake_case and camelCase are supported.
+   *   * `display_name`: supports = and !=
+   *   * `metadata_schema_uri`: supports = and !=
+   *   * `labels` supports general map functions that is:
+   *     * `labels.key=value` - key:value equality
+   *     * `labels.key:* or labels:key - key existence
+   *     * A key including a space must be quoted. `labels."a key"`.
+   * Some examples:
+   *   * `displayName="myDisplayName"`
+   *   * `labels.myKey="myValue"`
+   * 
+ * + * string filter = 2; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * An expression for filtering the results of the request. For field names
+   * both snake_case and camelCase are supported.
+   *   * `display_name`: supports = and !=
+   *   * `metadata_schema_uri`: supports = and !=
+   *   * `labels` supports general map functions that is:
+   *     * `labels.key=value` - key:value equality
+   *     * `labels.key:* or labels:key - key existence
+   *     * A key including a space must be quoted. `labels."a key"`.
+   * Some examples:
+   *   * `displayName="myDisplayName"`
+   *   * `labels.myKey="myValue"`
+   * 
+ * + * string filter = 2; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * The standard list page size.
+   * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * The standard list page token.
+   * 
+ * + * string page_token = 4; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * The standard list page token.
+   * 
+ * + * string page_token = 4; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return Whether the readMask field is set. + */ + boolean hasReadMask(); + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return The readMask. + */ + com.google.protobuf.FieldMask getReadMask(); + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder(); + + /** + * + * + *
+   * A comma-separated list of fields to order by, sorted in ascending order.
+   * Use "desc" after a field name for descending.
+   * Supported fields:
+   *   * `display_name`
+   *   * `create_time`
+   *   * `update_time`
+   * 
+ * + * string order_by = 6; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * A comma-separated list of fields to order by, sorted in ascending order.
+   * Use "desc" after a field name for descending.
+   * Supported fields:
+   *   * `display_name`
+   *   * `create_time`
+   *   * `update_time`
+   * 
+ * + * string order_by = 6; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListDatasetsResponse.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListDatasetsResponse.java new file mode 100644 index 000000000..9d921b954 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListDatasetsResponse.java @@ -0,0 +1,1127 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/dataset_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Response message for [DatasetService.ListDatasets][google.cloud.aiplatform.v1.DatasetService.ListDatasets].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListDatasetsResponse} + */ +public final class ListDatasetsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ListDatasetsResponse) + ListDatasetsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListDatasetsResponse.newBuilder() to construct. + private ListDatasetsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListDatasetsResponse() { + datasets_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListDatasetsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListDatasetsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + datasets_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + datasets_.add( + input.readMessage( + com.google.cloud.aiplatform.v1.Dataset.parser(), extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + datasets_ = java.util.Collections.unmodifiableList(datasets_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_ListDatasetsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_ListDatasetsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListDatasetsResponse.class, + com.google.cloud.aiplatform.v1.ListDatasetsResponse.Builder.class); + } + + public static final int DATASETS_FIELD_NUMBER = 1; + private java.util.List datasets_; + /** + * + * + *
+   * A list of Datasets that matches the specified filter in the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.Dataset datasets = 1; + */ + @java.lang.Override + public java.util.List getDatasetsList() { + return datasets_; + } + /** + * + * + *
+   * A list of Datasets that matches the specified filter in the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.Dataset datasets = 1; + */ + @java.lang.Override + public java.util.List + getDatasetsOrBuilderList() { + return datasets_; + } + /** + * + * + *
+   * A list of Datasets that matches the specified filter in the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.Dataset datasets = 1; + */ + @java.lang.Override + public int getDatasetsCount() { + return datasets_.size(); + } + /** + * + * + *
+   * A list of Datasets that matches the specified filter in the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.Dataset datasets = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.Dataset getDatasets(int index) { + return datasets_.get(index); + } + /** + * + * + *
+   * A list of Datasets that matches the specified filter in the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.Dataset datasets = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.DatasetOrBuilder getDatasetsOrBuilder(int index) { + return datasets_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * The standard List next-page token.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The standard List next-page token.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < datasets_.size(); i++) { + output.writeMessage(1, datasets_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < datasets_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, datasets_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.ListDatasetsResponse)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ListDatasetsResponse other = + (com.google.cloud.aiplatform.v1.ListDatasetsResponse) obj; + + if (!getDatasetsList().equals(other.getDatasetsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getDatasetsCount() > 0) { + hash = (37 * hash) + DATASETS_FIELD_NUMBER; + hash = (53 * hash) + getDatasetsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.ListDatasetsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListDatasetsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListDatasetsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListDatasetsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListDatasetsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListDatasetsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListDatasetsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListDatasetsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListDatasetsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListDatasetsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListDatasetsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListDatasetsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1.ListDatasetsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for [DatasetService.ListDatasets][google.cloud.aiplatform.v1.DatasetService.ListDatasets].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListDatasetsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ListDatasetsResponse) + com.google.cloud.aiplatform.v1.ListDatasetsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_ListDatasetsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_ListDatasetsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListDatasetsResponse.class, + com.google.cloud.aiplatform.v1.ListDatasetsResponse.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ListDatasetsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getDatasetsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (datasetsBuilder_ == null) { + datasets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + datasetsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_ListDatasetsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListDatasetsResponse getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ListDatasetsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListDatasetsResponse build() { + com.google.cloud.aiplatform.v1.ListDatasetsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListDatasetsResponse buildPartial() { + com.google.cloud.aiplatform.v1.ListDatasetsResponse result = + new com.google.cloud.aiplatform.v1.ListDatasetsResponse(this); + int from_bitField0_ = bitField0_; + if (datasetsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + datasets_ = java.util.Collections.unmodifiableList(datasets_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.datasets_ = datasets_; + } else { + result.datasets_ = datasetsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + 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.v1.ListDatasetsResponse) { + return mergeFrom((com.google.cloud.aiplatform.v1.ListDatasetsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.ListDatasetsResponse other) { + if (other == com.google.cloud.aiplatform.v1.ListDatasetsResponse.getDefaultInstance()) + return this; + if (datasetsBuilder_ == null) { + if (!other.datasets_.isEmpty()) { + if (datasets_.isEmpty()) { + datasets_ = other.datasets_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDatasetsIsMutable(); + datasets_.addAll(other.datasets_); + } + onChanged(); + } + } else { + if (!other.datasets_.isEmpty()) { + if (datasetsBuilder_.isEmpty()) { + datasetsBuilder_.dispose(); + datasetsBuilder_ = null; + datasets_ = other.datasets_; + bitField0_ = (bitField0_ & ~0x00000001); + datasetsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDatasetsFieldBuilder() + : null; + } else { + datasetsBuilder_.addAllMessages(other.datasets_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.aiplatform.v1.ListDatasetsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.ListDatasetsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List datasets_ = + java.util.Collections.emptyList(); + + private void ensureDatasetsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + datasets_ = new java.util.ArrayList(datasets_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.Dataset, + com.google.cloud.aiplatform.v1.Dataset.Builder, + com.google.cloud.aiplatform.v1.DatasetOrBuilder> + datasetsBuilder_; + + /** + * + * + *
+     * A list of Datasets that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.Dataset datasets = 1; + */ + public java.util.List getDatasetsList() { + if (datasetsBuilder_ == null) { + return java.util.Collections.unmodifiableList(datasets_); + } else { + return datasetsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of Datasets that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.Dataset datasets = 1; + */ + public int getDatasetsCount() { + if (datasetsBuilder_ == null) { + return datasets_.size(); + } else { + return datasetsBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of Datasets that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.Dataset datasets = 1; + */ + public com.google.cloud.aiplatform.v1.Dataset getDatasets(int index) { + if (datasetsBuilder_ == null) { + return datasets_.get(index); + } else { + return datasetsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of Datasets that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.Dataset datasets = 1; + */ + public Builder setDatasets(int index, com.google.cloud.aiplatform.v1.Dataset value) { + if (datasetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDatasetsIsMutable(); + datasets_.set(index, value); + onChanged(); + } else { + datasetsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of Datasets that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.Dataset datasets = 1; + */ + public Builder setDatasets( + int index, com.google.cloud.aiplatform.v1.Dataset.Builder builderForValue) { + if (datasetsBuilder_ == null) { + ensureDatasetsIsMutable(); + datasets_.set(index, builderForValue.build()); + onChanged(); + } else { + datasetsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of Datasets that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.Dataset datasets = 1; + */ + public Builder addDatasets(com.google.cloud.aiplatform.v1.Dataset value) { + if (datasetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDatasetsIsMutable(); + datasets_.add(value); + onChanged(); + } else { + datasetsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of Datasets that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.Dataset datasets = 1; + */ + public Builder addDatasets(int index, com.google.cloud.aiplatform.v1.Dataset value) { + if (datasetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDatasetsIsMutable(); + datasets_.add(index, value); + onChanged(); + } else { + datasetsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of Datasets that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.Dataset datasets = 1; + */ + public Builder addDatasets(com.google.cloud.aiplatform.v1.Dataset.Builder builderForValue) { + if (datasetsBuilder_ == null) { + ensureDatasetsIsMutable(); + datasets_.add(builderForValue.build()); + onChanged(); + } else { + datasetsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of Datasets that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.Dataset datasets = 1; + */ + public Builder addDatasets( + int index, com.google.cloud.aiplatform.v1.Dataset.Builder builderForValue) { + if (datasetsBuilder_ == null) { + ensureDatasetsIsMutable(); + datasets_.add(index, builderForValue.build()); + onChanged(); + } else { + datasetsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of Datasets that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.Dataset datasets = 1; + */ + public Builder addAllDatasets( + java.lang.Iterable values) { + if (datasetsBuilder_ == null) { + ensureDatasetsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, datasets_); + onChanged(); + } else { + datasetsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of Datasets that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.Dataset datasets = 1; + */ + public Builder clearDatasets() { + if (datasetsBuilder_ == null) { + datasets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + datasetsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of Datasets that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.Dataset datasets = 1; + */ + public Builder removeDatasets(int index) { + if (datasetsBuilder_ == null) { + ensureDatasetsIsMutable(); + datasets_.remove(index); + onChanged(); + } else { + datasetsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of Datasets that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.Dataset datasets = 1; + */ + public com.google.cloud.aiplatform.v1.Dataset.Builder getDatasetsBuilder(int index) { + return getDatasetsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of Datasets that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.Dataset datasets = 1; + */ + public com.google.cloud.aiplatform.v1.DatasetOrBuilder getDatasetsOrBuilder(int index) { + if (datasetsBuilder_ == null) { + return datasets_.get(index); + } else { + return datasetsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of Datasets that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.Dataset datasets = 1; + */ + public java.util.List + getDatasetsOrBuilderList() { + if (datasetsBuilder_ != null) { + return datasetsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(datasets_); + } + } + /** + * + * + *
+     * A list of Datasets that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.Dataset datasets = 1; + */ + public com.google.cloud.aiplatform.v1.Dataset.Builder addDatasetsBuilder() { + return getDatasetsFieldBuilder() + .addBuilder(com.google.cloud.aiplatform.v1.Dataset.getDefaultInstance()); + } + /** + * + * + *
+     * A list of Datasets that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.Dataset datasets = 1; + */ + public com.google.cloud.aiplatform.v1.Dataset.Builder addDatasetsBuilder(int index) { + return getDatasetsFieldBuilder() + .addBuilder(index, com.google.cloud.aiplatform.v1.Dataset.getDefaultInstance()); + } + /** + * + * + *
+     * A list of Datasets that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.Dataset datasets = 1; + */ + public java.util.List getDatasetsBuilderList() { + return getDatasetsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.Dataset, + com.google.cloud.aiplatform.v1.Dataset.Builder, + com.google.cloud.aiplatform.v1.DatasetOrBuilder> + getDatasetsFieldBuilder() { + if (datasetsBuilder_ == null) { + datasetsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.Dataset, + com.google.cloud.aiplatform.v1.Dataset.Builder, + com.google.cloud.aiplatform.v1.DatasetOrBuilder>( + datasets_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + datasets_ = null; + } + return datasetsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * The standard List next-page token.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The standard List next-page token.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The standard List next-page token.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The standard List next-page token.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The standard List next-page token.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.ListDatasetsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ListDatasetsResponse) + private static final com.google.cloud.aiplatform.v1.ListDatasetsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ListDatasetsResponse(); + } + + public static com.google.cloud.aiplatform.v1.ListDatasetsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListDatasetsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListDatasetsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListDatasetsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListDatasetsResponseOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListDatasetsResponseOrBuilder.java new file mode 100644 index 000000000..87d5f48f0 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListDatasetsResponseOrBuilder.java @@ -0,0 +1,102 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/dataset_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface ListDatasetsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ListDatasetsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A list of Datasets that matches the specified filter in the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.Dataset datasets = 1; + */ + java.util.List getDatasetsList(); + /** + * + * + *
+   * A list of Datasets that matches the specified filter in the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.Dataset datasets = 1; + */ + com.google.cloud.aiplatform.v1.Dataset getDatasets(int index); + /** + * + * + *
+   * A list of Datasets that matches the specified filter in the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.Dataset datasets = 1; + */ + int getDatasetsCount(); + /** + * + * + *
+   * A list of Datasets that matches the specified filter in the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.Dataset datasets = 1; + */ + java.util.List + getDatasetsOrBuilderList(); + /** + * + * + *
+   * A list of Datasets that matches the specified filter in the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.Dataset datasets = 1; + */ + com.google.cloud.aiplatform.v1.DatasetOrBuilder getDatasetsOrBuilder(int index); + + /** + * + * + *
+   * The standard List next-page token.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * The standard List next-page token.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListEndpointsRequest.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListEndpointsRequest.java new file mode 100644 index 000000000..c8e25e8c7 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListEndpointsRequest.java @@ -0,0 +1,1711 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/endpoint_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for [EndpointService.ListEndpoints][google.cloud.aiplatform.v1.EndpointService.ListEndpoints].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListEndpointsRequest} + */ +public final class ListEndpointsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ListEndpointsRequest) + ListEndpointsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListEndpointsRequest.newBuilder() to construct. + private ListEndpointsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListEndpointsRequest() { + parent_ = ""; + filter_ = ""; + pageToken_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListEndpointsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListEndpointsRequest( + 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(); + + parent_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + filter_ = s; + break; + } + case 24: + { + pageSize_ = input.readInt32(); + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 42: + { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (readMask_ != null) { + subBuilder = readMask_.toBuilder(); + } + readMask_ = + input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(readMask_); + readMask_ = subBuilder.buildPartial(); + } + + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + orderBy_ = 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.v1.EndpointServiceProto + .internal_static_google_cloud_aiplatform_v1_ListEndpointsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.EndpointServiceProto + .internal_static_google_cloud_aiplatform_v1_ListEndpointsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListEndpointsRequest.class, + com.google.cloud.aiplatform.v1.ListEndpointsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The resource name of the Location from which to list the Endpoints.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the Location from which to list the Endpoints.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 2; + private volatile java.lang.Object filter_; + /** + * + * + *
+   * Optional. An expression for filtering the results of the request. For field names
+   * both snake_case and camelCase are supported.
+   *   * `endpoint` supports = and !=. `endpoint` represents the Endpoint ID,
+   *     i.e. the last segment of the Endpoint's [resource name][google.cloud.aiplatform.v1.Endpoint.name].
+   *   * `display_name` supports = and, !=
+   *   * `labels` supports general map functions that is:
+   *     * `labels.key=value` - key:value equality
+   *     * `labels.key:* or labels:key - key existence
+   *     * A key including a space must be quoted. `labels."a key"`.
+   * Some examples:
+   *   * `endpoint=1`
+   *   * `displayName="myDisplayName"`
+   *   * `labels.myKey="myValue"`
+   * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An expression for filtering the results of the request. For field names
+   * both snake_case and camelCase are supported.
+   *   * `endpoint` supports = and !=. `endpoint` represents the Endpoint ID,
+   *     i.e. the last segment of the Endpoint's [resource name][google.cloud.aiplatform.v1.Endpoint.name].
+   *   * `display_name` supports = and, !=
+   *   * `labels` supports general map functions that is:
+   *     * `labels.key=value` - key:value equality
+   *     * `labels.key:* or labels:key - key existence
+   *     * A key including a space must be quoted. `labels."a key"`.
+   * Some examples:
+   *   * `endpoint=1`
+   *   * `displayName="myDisplayName"`
+   *   * `labels.myKey="myValue"`
+   * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 3; + private int pageSize_; + /** + * + * + *
+   * Optional. The standard list page size.
+   * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 4; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * Optional. The standard list page token.
+   * Typically obtained via
+   * [ListEndpointsResponse.next_page_token][google.cloud.aiplatform.v1.ListEndpointsResponse.next_page_token] of the previous
+   * [EndpointService.ListEndpoints][google.cloud.aiplatform.v1.EndpointService.ListEndpoints] call.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The standard list page token.
+   * Typically obtained via
+   * [ListEndpointsResponse.next_page_token][google.cloud.aiplatform.v1.ListEndpointsResponse.next_page_token] of the previous
+   * [EndpointService.ListEndpoints][google.cloud.aiplatform.v1.EndpointService.ListEndpoints] call.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int READ_MASK_FIELD_NUMBER = 5; + private com.google.protobuf.FieldMask readMask_; + /** + * + * + *
+   * Optional. Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the readMask field is set. + */ + @java.lang.Override + public boolean hasReadMask() { + return readMask_ != null; + } + /** + * + * + *
+   * Optional. Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The readMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getReadMask() { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } + /** + * + * + *
+   * Optional. Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder() { + return getReadMask(); + } + + public static final int ORDER_BY_FIELD_NUMBER = 6; + private volatile java.lang.Object orderBy_; + /** + * + * + *
+   * A comma-separated list of fields to order by, sorted in ascending order.
+   * Use "desc" after a field name for descending.
+   * Supported fields:
+   *   * `display_name`
+   *   * `create_time`
+   *   * `update_time`
+   * Example: `display_name, create_time desc`.
+   * 
+ * + * string order_by = 6; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + 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(); + orderBy_ = s; + return s; + } + } + /** + * + * + *
+   * A comma-separated list of fields to order by, sorted in ascending order.
+   * Use "desc" after a field name for descending.
+   * Supported fields:
+   *   * `display_name`
+   *   * `create_time`
+   *   * `update_time`
+   * Example: `display_name, create_time desc`.
+   * 
+ * + * string order_by = 6; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!getFilterBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); + } + if (pageSize_ != 0) { + output.writeInt32(3, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); + } + if (readMask_ != null) { + output.writeMessage(5, getReadMask()); + } + if (!getOrderByBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, orderBy_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!getFilterBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_); + } + if (readMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getReadMask()); + } + if (!getOrderByBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, orderBy_); + } + 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.v1.ListEndpointsRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ListEndpointsRequest other = + (com.google.cloud.aiplatform.v1.ListEndpointsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (hasReadMask() != other.hasReadMask()) return false; + if (hasReadMask()) { + if (!getReadMask().equals(other.getReadMask())) return false; + } + if (!getOrderBy().equals(other.getOrderBy())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + if (hasReadMask()) { + hash = (37 * hash) + READ_MASK_FIELD_NUMBER; + hash = (53 * hash) + getReadMask().hashCode(); + } + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.ListEndpointsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListEndpointsRequest 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.v1.ListEndpointsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListEndpointsRequest 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.v1.ListEndpointsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListEndpointsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListEndpointsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListEndpointsRequest 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.v1.ListEndpointsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListEndpointsRequest 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.v1.ListEndpointsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListEndpointsRequest 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.v1.ListEndpointsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [EndpointService.ListEndpoints][google.cloud.aiplatform.v1.EndpointService.ListEndpoints].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListEndpointsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ListEndpointsRequest) + com.google.cloud.aiplatform.v1.ListEndpointsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.EndpointServiceProto + .internal_static_google_cloud_aiplatform_v1_ListEndpointsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.EndpointServiceProto + .internal_static_google_cloud_aiplatform_v1_ListEndpointsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListEndpointsRequest.class, + com.google.cloud.aiplatform.v1.ListEndpointsRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ListEndpointsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + filter_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + if (readMaskBuilder_ == null) { + readMask_ = null; + } else { + readMask_ = null; + readMaskBuilder_ = null; + } + orderBy_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.EndpointServiceProto + .internal_static_google_cloud_aiplatform_v1_ListEndpointsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListEndpointsRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ListEndpointsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListEndpointsRequest build() { + com.google.cloud.aiplatform.v1.ListEndpointsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListEndpointsRequest buildPartial() { + com.google.cloud.aiplatform.v1.ListEndpointsRequest result = + new com.google.cloud.aiplatform.v1.ListEndpointsRequest(this); + result.parent_ = parent_; + result.filter_ = filter_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + if (readMaskBuilder_ == null) { + result.readMask_ = readMask_; + } else { + result.readMask_ = readMaskBuilder_.build(); + } + result.orderBy_ = orderBy_; + 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.v1.ListEndpointsRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.ListEndpointsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.ListEndpointsRequest other) { + if (other == com.google.cloud.aiplatform.v1.ListEndpointsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + if (other.hasReadMask()) { + mergeReadMask(other.getReadMask()); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + 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.v1.ListEndpointsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.ListEndpointsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the Location from which to list the Endpoints.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Location from which to list the Endpoints.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Location from which to list the Endpoints.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Location from which to list the Endpoints.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Location from which to list the Endpoints.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Optional. An expression for filtering the results of the request. For field names
+     * both snake_case and camelCase are supported.
+     *   * `endpoint` supports = and !=. `endpoint` represents the Endpoint ID,
+     *     i.e. the last segment of the Endpoint's [resource name][google.cloud.aiplatform.v1.Endpoint.name].
+     *   * `display_name` supports = and, !=
+     *   * `labels` supports general map functions that is:
+     *     * `labels.key=value` - key:value equality
+     *     * `labels.key:* or labels:key - key existence
+     *     * A key including a space must be quoted. `labels."a key"`.
+     * Some examples:
+     *   * `endpoint=1`
+     *   * `displayName="myDisplayName"`
+     *   * `labels.myKey="myValue"`
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An expression for filtering the results of the request. For field names
+     * both snake_case and camelCase are supported.
+     *   * `endpoint` supports = and !=. `endpoint` represents the Endpoint ID,
+     *     i.e. the last segment of the Endpoint's [resource name][google.cloud.aiplatform.v1.Endpoint.name].
+     *   * `display_name` supports = and, !=
+     *   * `labels` supports general map functions that is:
+     *     * `labels.key=value` - key:value equality
+     *     * `labels.key:* or labels:key - key existence
+     *     * A key including a space must be quoted. `labels."a key"`.
+     * Some examples:
+     *   * `endpoint=1`
+     *   * `displayName="myDisplayName"`
+     *   * `labels.myKey="myValue"`
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An expression for filtering the results of the request. For field names
+     * both snake_case and camelCase are supported.
+     *   * `endpoint` supports = and !=. `endpoint` represents the Endpoint ID,
+     *     i.e. the last segment of the Endpoint's [resource name][google.cloud.aiplatform.v1.Endpoint.name].
+     *   * `display_name` supports = and, !=
+     *   * `labels` supports general map functions that is:
+     *     * `labels.key=value` - key:value equality
+     *     * `labels.key:* or labels:key - key existence
+     *     * A key including a space must be quoted. `labels."a key"`.
+     * Some examples:
+     *   * `endpoint=1`
+     *   * `displayName="myDisplayName"`
+     *   * `labels.myKey="myValue"`
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An expression for filtering the results of the request. For field names
+     * both snake_case and camelCase are supported.
+     *   * `endpoint` supports = and !=. `endpoint` represents the Endpoint ID,
+     *     i.e. the last segment of the Endpoint's [resource name][google.cloud.aiplatform.v1.Endpoint.name].
+     *   * `display_name` supports = and, !=
+     *   * `labels` supports general map functions that is:
+     *     * `labels.key=value` - key:value equality
+     *     * `labels.key:* or labels:key - key existence
+     *     * A key including a space must be quoted. `labels."a key"`.
+     * Some examples:
+     *   * `endpoint=1`
+     *   * `displayName="myDisplayName"`
+     *   * `labels.myKey="myValue"`
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An expression for filtering the results of the request. For field names
+     * both snake_case and camelCase are supported.
+     *   * `endpoint` supports = and !=. `endpoint` represents the Endpoint ID,
+     *     i.e. the last segment of the Endpoint's [resource name][google.cloud.aiplatform.v1.Endpoint.name].
+     *   * `display_name` supports = and, !=
+     *   * `labels` supports general map functions that is:
+     *     * `labels.key=value` - key:value equality
+     *     * `labels.key:* or labels:key - key existence
+     *     * A key including a space must be quoted. `labels."a key"`.
+     * Some examples:
+     *   * `endpoint=1`
+     *   * `displayName="myDisplayName"`
+     *   * `labels.myKey="myValue"`
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Optional. The standard list page size.
+     * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Optional. The standard list page size.
+     * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard list page size.
+     * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * Optional. The standard list page token.
+     * Typically obtained via
+     * [ListEndpointsResponse.next_page_token][google.cloud.aiplatform.v1.ListEndpointsResponse.next_page_token] of the previous
+     * [EndpointService.ListEndpoints][google.cloud.aiplatform.v1.EndpointService.ListEndpoints] call.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The standard list page token.
+     * Typically obtained via
+     * [ListEndpointsResponse.next_page_token][google.cloud.aiplatform.v1.ListEndpointsResponse.next_page_token] of the previous
+     * [EndpointService.ListEndpoints][google.cloud.aiplatform.v1.EndpointService.ListEndpoints] call.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The standard list page token.
+     * Typically obtained via
+     * [ListEndpointsResponse.next_page_token][google.cloud.aiplatform.v1.ListEndpointsResponse.next_page_token] of the previous
+     * [EndpointService.ListEndpoints][google.cloud.aiplatform.v1.EndpointService.ListEndpoints] call.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard list page token.
+     * Typically obtained via
+     * [ListEndpointsResponse.next_page_token][google.cloud.aiplatform.v1.ListEndpointsResponse.next_page_token] of the previous
+     * [EndpointService.ListEndpoints][google.cloud.aiplatform.v1.EndpointService.ListEndpoints] call.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard list page token.
+     * Typically obtained via
+     * [ListEndpointsResponse.next_page_token][google.cloud.aiplatform.v1.ListEndpointsResponse.next_page_token] of the previous
+     * [EndpointService.ListEndpoints][google.cloud.aiplatform.v1.EndpointService.ListEndpoints] call.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.FieldMask readMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + readMaskBuilder_; + /** + * + * + *
+     * Optional. Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the readMask field is set. + */ + public boolean hasReadMask() { + return readMaskBuilder_ != null || readMask_ != null; + } + /** + * + * + *
+     * Optional. Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The readMask. + */ + public com.google.protobuf.FieldMask getReadMask() { + if (readMaskBuilder_ == null) { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } else { + return readMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setReadMask(com.google.protobuf.FieldMask value) { + if (readMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + readMask_ = value; + onChanged(); + } else { + readMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setReadMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (readMaskBuilder_ == null) { + readMask_ = builderForValue.build(); + onChanged(); + } else { + readMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeReadMask(com.google.protobuf.FieldMask value) { + if (readMaskBuilder_ == null) { + if (readMask_ != null) { + readMask_ = + com.google.protobuf.FieldMask.newBuilder(readMask_).mergeFrom(value).buildPartial(); + } else { + readMask_ = value; + } + onChanged(); + } else { + readMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearReadMask() { + if (readMaskBuilder_ == null) { + readMask_ = null; + onChanged(); + } else { + readMask_ = null; + readMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMask.Builder getReadMaskBuilder() { + + onChanged(); + return getReadMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder() { + if (readMaskBuilder_ != null) { + return readMaskBuilder_.getMessageOrBuilder(); + } else { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } + } + /** + * + * + *
+     * Optional. Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getReadMaskFieldBuilder() { + if (readMaskBuilder_ == null) { + readMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getReadMask(), getParentForChildren(), isClean()); + readMask_ = null; + } + return readMaskBuilder_; + } + + private java.lang.Object orderBy_ = ""; + /** + * + * + *
+     * A comma-separated list of fields to order by, sorted in ascending order.
+     * Use "desc" after a field name for descending.
+     * Supported fields:
+     *   * `display_name`
+     *   * `create_time`
+     *   * `update_time`
+     * Example: `display_name, create_time desc`.
+     * 
+ * + * string order_by = 6; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A comma-separated list of fields to order by, sorted in ascending order.
+     * Use "desc" after a field name for descending.
+     * Supported fields:
+     *   * `display_name`
+     *   * `create_time`
+     *   * `update_time`
+     * Example: `display_name, create_time desc`.
+     * 
+ * + * string order_by = 6; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A comma-separated list of fields to order by, sorted in ascending order.
+     * Use "desc" after a field name for descending.
+     * Supported fields:
+     *   * `display_name`
+     *   * `create_time`
+     *   * `update_time`
+     * Example: `display_name, create_time desc`.
+     * 
+ * + * string order_by = 6; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + orderBy_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A comma-separated list of fields to order by, sorted in ascending order.
+     * Use "desc" after a field name for descending.
+     * Supported fields:
+     *   * `display_name`
+     *   * `create_time`
+     *   * `update_time`
+     * Example: `display_name, create_time desc`.
+     * 
+ * + * string order_by = 6; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + + orderBy_ = getDefaultInstance().getOrderBy(); + onChanged(); + return this; + } + /** + * + * + *
+     * A comma-separated list of fields to order by, sorted in ascending order.
+     * Use "desc" after a field name for descending.
+     * Supported fields:
+     *   * `display_name`
+     *   * `create_time`
+     *   * `update_time`
+     * Example: `display_name, create_time desc`.
+     * 
+ * + * string order_by = 6; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + orderBy_ = 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.v1.ListEndpointsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ListEndpointsRequest) + private static final com.google.cloud.aiplatform.v1.ListEndpointsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ListEndpointsRequest(); + } + + public static com.google.cloud.aiplatform.v1.ListEndpointsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListEndpointsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListEndpointsRequest(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.v1.ListEndpointsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListEndpointsRequestOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListEndpointsRequestOrBuilder.java new file mode 100644 index 000000000..a610ad271 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListEndpointsRequestOrBuilder.java @@ -0,0 +1,224 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/endpoint_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface ListEndpointsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ListEndpointsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the Location from which to list the Endpoints.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of the Location from which to list the Endpoints.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. An expression for filtering the results of the request. For field names
+   * both snake_case and camelCase are supported.
+   *   * `endpoint` supports = and !=. `endpoint` represents the Endpoint ID,
+   *     i.e. the last segment of the Endpoint's [resource name][google.cloud.aiplatform.v1.Endpoint.name].
+   *   * `display_name` supports = and, !=
+   *   * `labels` supports general map functions that is:
+   *     * `labels.key=value` - key:value equality
+   *     * `labels.key:* or labels:key - key existence
+   *     * A key including a space must be quoted. `labels."a key"`.
+   * Some examples:
+   *   * `endpoint=1`
+   *   * `displayName="myDisplayName"`
+   *   * `labels.myKey="myValue"`
+   * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Optional. An expression for filtering the results of the request. For field names
+   * both snake_case and camelCase are supported.
+   *   * `endpoint` supports = and !=. `endpoint` represents the Endpoint ID,
+   *     i.e. the last segment of the Endpoint's [resource name][google.cloud.aiplatform.v1.Endpoint.name].
+   *   * `display_name` supports = and, !=
+   *   * `labels` supports general map functions that is:
+   *     * `labels.key=value` - key:value equality
+   *     * `labels.key:* or labels:key - key existence
+   *     * A key including a space must be quoted. `labels."a key"`.
+   * Some examples:
+   *   * `endpoint=1`
+   *   * `displayName="myDisplayName"`
+   *   * `labels.myKey="myValue"`
+   * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Optional. The standard list page size.
+   * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. The standard list page token.
+   * Typically obtained via
+   * [ListEndpointsResponse.next_page_token][google.cloud.aiplatform.v1.ListEndpointsResponse.next_page_token] of the previous
+   * [EndpointService.ListEndpoints][google.cloud.aiplatform.v1.EndpointService.ListEndpoints] call.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * Optional. The standard list page token.
+   * Typically obtained via
+   * [ListEndpointsResponse.next_page_token][google.cloud.aiplatform.v1.ListEndpointsResponse.next_page_token] of the previous
+   * [EndpointService.ListEndpoints][google.cloud.aiplatform.v1.EndpointService.ListEndpoints] call.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the readMask field is set. + */ + boolean hasReadMask(); + /** + * + * + *
+   * Optional. Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The readMask. + */ + com.google.protobuf.FieldMask getReadMask(); + /** + * + * + *
+   * Optional. Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder(); + + /** + * + * + *
+   * A comma-separated list of fields to order by, sorted in ascending order.
+   * Use "desc" after a field name for descending.
+   * Supported fields:
+   *   * `display_name`
+   *   * `create_time`
+   *   * `update_time`
+   * Example: `display_name, create_time desc`.
+   * 
+ * + * string order_by = 6; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * A comma-separated list of fields to order by, sorted in ascending order.
+   * Use "desc" after a field name for descending.
+   * Supported fields:
+   *   * `display_name`
+   *   * `create_time`
+   *   * `update_time`
+   * Example: `display_name, create_time desc`.
+   * 
+ * + * string order_by = 6; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListEndpointsResponse.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListEndpointsResponse.java new file mode 100644 index 000000000..0bd30be77 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListEndpointsResponse.java @@ -0,0 +1,1135 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/endpoint_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Response message for [EndpointService.ListEndpoints][google.cloud.aiplatform.v1.EndpointService.ListEndpoints].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListEndpointsResponse} + */ +public final class ListEndpointsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ListEndpointsResponse) + ListEndpointsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListEndpointsResponse.newBuilder() to construct. + private ListEndpointsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListEndpointsResponse() { + endpoints_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListEndpointsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListEndpointsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + endpoints_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + endpoints_.add( + input.readMessage( + com.google.cloud.aiplatform.v1.Endpoint.parser(), extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + endpoints_ = java.util.Collections.unmodifiableList(endpoints_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.EndpointServiceProto + .internal_static_google_cloud_aiplatform_v1_ListEndpointsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.EndpointServiceProto + .internal_static_google_cloud_aiplatform_v1_ListEndpointsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListEndpointsResponse.class, + com.google.cloud.aiplatform.v1.ListEndpointsResponse.Builder.class); + } + + public static final int ENDPOINTS_FIELD_NUMBER = 1; + private java.util.List endpoints_; + /** + * + * + *
+   * List of Endpoints in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.Endpoint endpoints = 1; + */ + @java.lang.Override + public java.util.List getEndpointsList() { + return endpoints_; + } + /** + * + * + *
+   * List of Endpoints in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.Endpoint endpoints = 1; + */ + @java.lang.Override + public java.util.List + getEndpointsOrBuilderList() { + return endpoints_; + } + /** + * + * + *
+   * List of Endpoints in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.Endpoint endpoints = 1; + */ + @java.lang.Override + public int getEndpointsCount() { + return endpoints_.size(); + } + /** + * + * + *
+   * List of Endpoints in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.Endpoint endpoints = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.Endpoint getEndpoints(int index) { + return endpoints_.get(index); + } + /** + * + * + *
+   * List of Endpoints in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.Endpoint endpoints = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.EndpointOrBuilder getEndpointsOrBuilder(int index) { + return endpoints_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * Pass to [ListEndpointsRequest.page_token][google.cloud.aiplatform.v1.ListEndpointsRequest.page_token] to obtain that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * Pass to [ListEndpointsRequest.page_token][google.cloud.aiplatform.v1.ListEndpointsRequest.page_token] to obtain that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < endpoints_.size(); i++) { + output.writeMessage(1, endpoints_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < endpoints_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, endpoints_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.ListEndpointsResponse)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ListEndpointsResponse other = + (com.google.cloud.aiplatform.v1.ListEndpointsResponse) obj; + + if (!getEndpointsList().equals(other.getEndpointsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getEndpointsCount() > 0) { + hash = (37 * hash) + ENDPOINTS_FIELD_NUMBER; + hash = (53 * hash) + getEndpointsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.ListEndpointsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListEndpointsResponse 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.v1.ListEndpointsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListEndpointsResponse 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.v1.ListEndpointsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListEndpointsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListEndpointsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListEndpointsResponse 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.v1.ListEndpointsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListEndpointsResponse 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.v1.ListEndpointsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListEndpointsResponse 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.v1.ListEndpointsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for [EndpointService.ListEndpoints][google.cloud.aiplatform.v1.EndpointService.ListEndpoints].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListEndpointsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ListEndpointsResponse) + com.google.cloud.aiplatform.v1.ListEndpointsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.EndpointServiceProto + .internal_static_google_cloud_aiplatform_v1_ListEndpointsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.EndpointServiceProto + .internal_static_google_cloud_aiplatform_v1_ListEndpointsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListEndpointsResponse.class, + com.google.cloud.aiplatform.v1.ListEndpointsResponse.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ListEndpointsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getEndpointsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (endpointsBuilder_ == null) { + endpoints_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + endpointsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.EndpointServiceProto + .internal_static_google_cloud_aiplatform_v1_ListEndpointsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListEndpointsResponse getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ListEndpointsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListEndpointsResponse build() { + com.google.cloud.aiplatform.v1.ListEndpointsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListEndpointsResponse buildPartial() { + com.google.cloud.aiplatform.v1.ListEndpointsResponse result = + new com.google.cloud.aiplatform.v1.ListEndpointsResponse(this); + int from_bitField0_ = bitField0_; + if (endpointsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + endpoints_ = java.util.Collections.unmodifiableList(endpoints_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.endpoints_ = endpoints_; + } else { + result.endpoints_ = endpointsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + 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.v1.ListEndpointsResponse) { + return mergeFrom((com.google.cloud.aiplatform.v1.ListEndpointsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.ListEndpointsResponse other) { + if (other == com.google.cloud.aiplatform.v1.ListEndpointsResponse.getDefaultInstance()) + return this; + if (endpointsBuilder_ == null) { + if (!other.endpoints_.isEmpty()) { + if (endpoints_.isEmpty()) { + endpoints_ = other.endpoints_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureEndpointsIsMutable(); + endpoints_.addAll(other.endpoints_); + } + onChanged(); + } + } else { + if (!other.endpoints_.isEmpty()) { + if (endpointsBuilder_.isEmpty()) { + endpointsBuilder_.dispose(); + endpointsBuilder_ = null; + endpoints_ = other.endpoints_; + bitField0_ = (bitField0_ & ~0x00000001); + endpointsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getEndpointsFieldBuilder() + : null; + } else { + endpointsBuilder_.addAllMessages(other.endpoints_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.aiplatform.v1.ListEndpointsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.ListEndpointsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List endpoints_ = + java.util.Collections.emptyList(); + + private void ensureEndpointsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + endpoints_ = new java.util.ArrayList(endpoints_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.Endpoint, + com.google.cloud.aiplatform.v1.Endpoint.Builder, + com.google.cloud.aiplatform.v1.EndpointOrBuilder> + endpointsBuilder_; + + /** + * + * + *
+     * List of Endpoints in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.Endpoint endpoints = 1; + */ + public java.util.List getEndpointsList() { + if (endpointsBuilder_ == null) { + return java.util.Collections.unmodifiableList(endpoints_); + } else { + return endpointsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of Endpoints in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.Endpoint endpoints = 1; + */ + public int getEndpointsCount() { + if (endpointsBuilder_ == null) { + return endpoints_.size(); + } else { + return endpointsBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of Endpoints in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.Endpoint endpoints = 1; + */ + public com.google.cloud.aiplatform.v1.Endpoint getEndpoints(int index) { + if (endpointsBuilder_ == null) { + return endpoints_.get(index); + } else { + return endpointsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of Endpoints in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.Endpoint endpoints = 1; + */ + public Builder setEndpoints(int index, com.google.cloud.aiplatform.v1.Endpoint value) { + if (endpointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEndpointsIsMutable(); + endpoints_.set(index, value); + onChanged(); + } else { + endpointsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of Endpoints in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.Endpoint endpoints = 1; + */ + public Builder setEndpoints( + int index, com.google.cloud.aiplatform.v1.Endpoint.Builder builderForValue) { + if (endpointsBuilder_ == null) { + ensureEndpointsIsMutable(); + endpoints_.set(index, builderForValue.build()); + onChanged(); + } else { + endpointsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of Endpoints in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.Endpoint endpoints = 1; + */ + public Builder addEndpoints(com.google.cloud.aiplatform.v1.Endpoint value) { + if (endpointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEndpointsIsMutable(); + endpoints_.add(value); + onChanged(); + } else { + endpointsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of Endpoints in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.Endpoint endpoints = 1; + */ + public Builder addEndpoints(int index, com.google.cloud.aiplatform.v1.Endpoint value) { + if (endpointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEndpointsIsMutable(); + endpoints_.add(index, value); + onChanged(); + } else { + endpointsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of Endpoints in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.Endpoint endpoints = 1; + */ + public Builder addEndpoints(com.google.cloud.aiplatform.v1.Endpoint.Builder builderForValue) { + if (endpointsBuilder_ == null) { + ensureEndpointsIsMutable(); + endpoints_.add(builderForValue.build()); + onChanged(); + } else { + endpointsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of Endpoints in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.Endpoint endpoints = 1; + */ + public Builder addEndpoints( + int index, com.google.cloud.aiplatform.v1.Endpoint.Builder builderForValue) { + if (endpointsBuilder_ == null) { + ensureEndpointsIsMutable(); + endpoints_.add(index, builderForValue.build()); + onChanged(); + } else { + endpointsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of Endpoints in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.Endpoint endpoints = 1; + */ + public Builder addAllEndpoints( + java.lang.Iterable values) { + if (endpointsBuilder_ == null) { + ensureEndpointsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, endpoints_); + onChanged(); + } else { + endpointsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of Endpoints in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.Endpoint endpoints = 1; + */ + public Builder clearEndpoints() { + if (endpointsBuilder_ == null) { + endpoints_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + endpointsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of Endpoints in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.Endpoint endpoints = 1; + */ + public Builder removeEndpoints(int index) { + if (endpointsBuilder_ == null) { + ensureEndpointsIsMutable(); + endpoints_.remove(index); + onChanged(); + } else { + endpointsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of Endpoints in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.Endpoint endpoints = 1; + */ + public com.google.cloud.aiplatform.v1.Endpoint.Builder getEndpointsBuilder(int index) { + return getEndpointsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of Endpoints in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.Endpoint endpoints = 1; + */ + public com.google.cloud.aiplatform.v1.EndpointOrBuilder getEndpointsOrBuilder(int index) { + if (endpointsBuilder_ == null) { + return endpoints_.get(index); + } else { + return endpointsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of Endpoints in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.Endpoint endpoints = 1; + */ + public java.util.List + getEndpointsOrBuilderList() { + if (endpointsBuilder_ != null) { + return endpointsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(endpoints_); + } + } + /** + * + * + *
+     * List of Endpoints in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.Endpoint endpoints = 1; + */ + public com.google.cloud.aiplatform.v1.Endpoint.Builder addEndpointsBuilder() { + return getEndpointsFieldBuilder() + .addBuilder(com.google.cloud.aiplatform.v1.Endpoint.getDefaultInstance()); + } + /** + * + * + *
+     * List of Endpoints in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.Endpoint endpoints = 1; + */ + public com.google.cloud.aiplatform.v1.Endpoint.Builder addEndpointsBuilder(int index) { + return getEndpointsFieldBuilder() + .addBuilder(index, com.google.cloud.aiplatform.v1.Endpoint.getDefaultInstance()); + } + /** + * + * + *
+     * List of Endpoints in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.Endpoint endpoints = 1; + */ + public java.util.List + getEndpointsBuilderList() { + return getEndpointsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.Endpoint, + com.google.cloud.aiplatform.v1.Endpoint.Builder, + com.google.cloud.aiplatform.v1.EndpointOrBuilder> + getEndpointsFieldBuilder() { + if (endpointsBuilder_ == null) { + endpointsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.Endpoint, + com.google.cloud.aiplatform.v1.Endpoint.Builder, + com.google.cloud.aiplatform.v1.EndpointOrBuilder>( + endpoints_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + endpoints_ = null; + } + return endpointsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to [ListEndpointsRequest.page_token][google.cloud.aiplatform.v1.ListEndpointsRequest.page_token] to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to [ListEndpointsRequest.page_token][google.cloud.aiplatform.v1.ListEndpointsRequest.page_token] to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to [ListEndpointsRequest.page_token][google.cloud.aiplatform.v1.ListEndpointsRequest.page_token] to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to [ListEndpointsRequest.page_token][google.cloud.aiplatform.v1.ListEndpointsRequest.page_token] to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to [ListEndpointsRequest.page_token][google.cloud.aiplatform.v1.ListEndpointsRequest.page_token] to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.ListEndpointsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ListEndpointsResponse) + private static final com.google.cloud.aiplatform.v1.ListEndpointsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ListEndpointsResponse(); + } + + public static com.google.cloud.aiplatform.v1.ListEndpointsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListEndpointsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListEndpointsResponse(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.v1.ListEndpointsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListEndpointsResponseOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListEndpointsResponseOrBuilder.java new file mode 100644 index 000000000..8d8ed8910 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListEndpointsResponseOrBuilder.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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/endpoint_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface ListEndpointsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ListEndpointsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * List of Endpoints in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.Endpoint endpoints = 1; + */ + java.util.List getEndpointsList(); + /** + * + * + *
+   * List of Endpoints in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.Endpoint endpoints = 1; + */ + com.google.cloud.aiplatform.v1.Endpoint getEndpoints(int index); + /** + * + * + *
+   * List of Endpoints in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.Endpoint endpoints = 1; + */ + int getEndpointsCount(); + /** + * + * + *
+   * List of Endpoints in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.Endpoint endpoints = 1; + */ + java.util.List + getEndpointsOrBuilderList(); + /** + * + * + *
+   * List of Endpoints in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.Endpoint endpoints = 1; + */ + com.google.cloud.aiplatform.v1.EndpointOrBuilder getEndpointsOrBuilder(int index); + + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * Pass to [ListEndpointsRequest.page_token][google.cloud.aiplatform.v1.ListEndpointsRequest.page_token] to obtain that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * Pass to [ListEndpointsRequest.page_token][google.cloud.aiplatform.v1.ListEndpointsRequest.page_token] to obtain that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListHyperparameterTuningJobsRequest.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListHyperparameterTuningJobsRequest.java new file mode 100644 index 000000000..c865aa9d8 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListHyperparameterTuningJobsRequest.java @@ -0,0 +1,1464 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/job_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for [JobService.ListHyperparameterTuningJobs][google.cloud.aiplatform.v1.JobService.ListHyperparameterTuningJobs].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListHyperparameterTuningJobsRequest} + */ +public final class ListHyperparameterTuningJobsRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ListHyperparameterTuningJobsRequest) + ListHyperparameterTuningJobsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListHyperparameterTuningJobsRequest.newBuilder() to construct. + private ListHyperparameterTuningJobsRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListHyperparameterTuningJobsRequest() { + parent_ = ""; + filter_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListHyperparameterTuningJobsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListHyperparameterTuningJobsRequest( + 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(); + + parent_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + filter_ = s; + break; + } + case 24: + { + pageSize_ = input.readInt32(); + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 42: + { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (readMask_ != null) { + subBuilder = readMask_.toBuilder(); + } + readMask_ = + input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(readMask_); + readMask_ = 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.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_ListHyperparameterTuningJobsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_ListHyperparameterTuningJobsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsRequest.class, + com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The resource name of the Location to list the HyperparameterTuningJobs
+   * from. Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the Location to list the HyperparameterTuningJobs
+   * from. Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 2; + private volatile java.lang.Object filter_; + /** + * + * + *
+   * The standard list filter.
+   * Supported fields:
+   *   * `display_name` supports = and !=.
+   *   * `state` supports = and !=.
+   * Some examples of using the filter are:
+   *  * `state="JOB_STATE_SUCCEEDED" AND display_name="my_job"`
+   *  * `state="JOB_STATE_RUNNING" OR display_name="my_job"`
+   *  * `NOT display_name="my_job"`
+   *  * `state="JOB_STATE_FAILED"`
+   * 
+ * + * string filter = 2; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * The standard list filter.
+   * Supported fields:
+   *   * `display_name` supports = and !=.
+   *   * `state` supports = and !=.
+   * Some examples of using the filter are:
+   *  * `state="JOB_STATE_SUCCEEDED" AND display_name="my_job"`
+   *  * `state="JOB_STATE_RUNNING" OR display_name="my_job"`
+   *  * `NOT display_name="my_job"`
+   *  * `state="JOB_STATE_FAILED"`
+   * 
+ * + * string filter = 2; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 3; + private int pageSize_; + /** + * + * + *
+   * The standard list page size.
+   * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 4; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * The standard list page token.
+   * Typically obtained via
+   * [ListHyperparameterTuningJobsResponse.next_page_token][google.cloud.aiplatform.v1.ListHyperparameterTuningJobsResponse.next_page_token] of the previous
+   * [JobService.ListHyperparameterTuningJobs][google.cloud.aiplatform.v1.JobService.ListHyperparameterTuningJobs] call.
+   * 
+ * + * string page_token = 4; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The standard list page token.
+   * Typically obtained via
+   * [ListHyperparameterTuningJobsResponse.next_page_token][google.cloud.aiplatform.v1.ListHyperparameterTuningJobsResponse.next_page_token] of the previous
+   * [JobService.ListHyperparameterTuningJobs][google.cloud.aiplatform.v1.JobService.ListHyperparameterTuningJobs] call.
+   * 
+ * + * string page_token = 4; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int READ_MASK_FIELD_NUMBER = 5; + private com.google.protobuf.FieldMask readMask_; + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return Whether the readMask field is set. + */ + @java.lang.Override + public boolean hasReadMask() { + return readMask_ != null; + } + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return The readMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getReadMask() { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder() { + return getReadMask(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!getFilterBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); + } + if (pageSize_ != 0) { + output.writeInt32(3, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); + } + if (readMask_ != null) { + output.writeMessage(5, getReadMask()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!getFilterBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_); + } + if (readMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getReadMask()); + } + 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.v1.ListHyperparameterTuningJobsRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsRequest other = + (com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (hasReadMask() != other.hasReadMask()) return false; + if (hasReadMask()) { + if (!getReadMask().equals(other.getReadMask())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + if (hasReadMask()) { + hash = (37 * hash) + READ_MASK_FIELD_NUMBER; + hash = (53 * hash) + getReadMask().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsRequest 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.v1.ListHyperparameterTuningJobsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsRequest 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.v1.ListHyperparameterTuningJobsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsRequest 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.v1.ListHyperparameterTuningJobsRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsRequest + 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.v1.ListHyperparameterTuningJobsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsRequest 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.v1.ListHyperparameterTuningJobsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [JobService.ListHyperparameterTuningJobs][google.cloud.aiplatform.v1.JobService.ListHyperparameterTuningJobs].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListHyperparameterTuningJobsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ListHyperparameterTuningJobsRequest) + com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_ListHyperparameterTuningJobsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_ListHyperparameterTuningJobsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsRequest.class, + com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsRequest.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + filter_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + if (readMaskBuilder_ == null) { + readMask_ = null; + } else { + readMask_ = null; + readMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_ListHyperparameterTuningJobsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsRequest + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsRequest build() { + com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsRequest buildPartial() { + com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsRequest result = + new com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsRequest(this); + result.parent_ = parent_; + result.filter_ = filter_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + if (readMaskBuilder_ == null) { + result.readMask_ = readMask_; + } else { + result.readMask_ = readMaskBuilder_.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.v1.ListHyperparameterTuningJobsRequest) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsRequest other) { + if (other + == com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + if (other.hasReadMask()) { + mergeReadMask(other.getReadMask()); + } + 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.v1.ListHyperparameterTuningJobsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the Location to list the HyperparameterTuningJobs
+     * from. Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Location to list the HyperparameterTuningJobs
+     * from. Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Location to list the HyperparameterTuningJobs
+     * from. Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Location to list the HyperparameterTuningJobs
+     * from. Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Location to list the HyperparameterTuningJobs
+     * from. Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * The standard list filter.
+     * Supported fields:
+     *   * `display_name` supports = and !=.
+     *   * `state` supports = and !=.
+     * Some examples of using the filter are:
+     *  * `state="JOB_STATE_SUCCEEDED" AND display_name="my_job"`
+     *  * `state="JOB_STATE_RUNNING" OR display_name="my_job"`
+     *  * `NOT display_name="my_job"`
+     *  * `state="JOB_STATE_FAILED"`
+     * 
+ * + * string filter = 2; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The standard list filter.
+     * Supported fields:
+     *   * `display_name` supports = and !=.
+     *   * `state` supports = and !=.
+     * Some examples of using the filter are:
+     *  * `state="JOB_STATE_SUCCEEDED" AND display_name="my_job"`
+     *  * `state="JOB_STATE_RUNNING" OR display_name="my_job"`
+     *  * `NOT display_name="my_job"`
+     *  * `state="JOB_STATE_FAILED"`
+     * 
+ * + * string filter = 2; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The standard list filter.
+     * Supported fields:
+     *   * `display_name` supports = and !=.
+     *   * `state` supports = and !=.
+     * Some examples of using the filter are:
+     *  * `state="JOB_STATE_SUCCEEDED" AND display_name="my_job"`
+     *  * `state="JOB_STATE_RUNNING" OR display_name="my_job"`
+     *  * `NOT display_name="my_job"`
+     *  * `state="JOB_STATE_FAILED"`
+     * 
+ * + * string filter = 2; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list filter.
+     * Supported fields:
+     *   * `display_name` supports = and !=.
+     *   * `state` supports = and !=.
+     * Some examples of using the filter are:
+     *  * `state="JOB_STATE_SUCCEEDED" AND display_name="my_job"`
+     *  * `state="JOB_STATE_RUNNING" OR display_name="my_job"`
+     *  * `NOT display_name="my_job"`
+     *  * `state="JOB_STATE_FAILED"`
+     * 
+ * + * string filter = 2; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list filter.
+     * Supported fields:
+     *   * `display_name` supports = and !=.
+     *   * `state` supports = and !=.
+     * Some examples of using the filter are:
+     *  * `state="JOB_STATE_SUCCEEDED" AND display_name="my_job"`
+     *  * `state="JOB_STATE_RUNNING" OR display_name="my_job"`
+     *  * `NOT display_name="my_job"`
+     *  * `state="JOB_STATE_FAILED"`
+     * 
+ * + * string filter = 2; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The standard list page size.
+     * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The standard list page size.
+     * 
+ * + * int32 page_size = 3; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list page size.
+     * 
+ * + * int32 page_size = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * The standard list page token.
+     * Typically obtained via
+     * [ListHyperparameterTuningJobsResponse.next_page_token][google.cloud.aiplatform.v1.ListHyperparameterTuningJobsResponse.next_page_token] of the previous
+     * [JobService.ListHyperparameterTuningJobs][google.cloud.aiplatform.v1.JobService.ListHyperparameterTuningJobs] call.
+     * 
+ * + * string page_token = 4; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The standard list page token.
+     * Typically obtained via
+     * [ListHyperparameterTuningJobsResponse.next_page_token][google.cloud.aiplatform.v1.ListHyperparameterTuningJobsResponse.next_page_token] of the previous
+     * [JobService.ListHyperparameterTuningJobs][google.cloud.aiplatform.v1.JobService.ListHyperparameterTuningJobs] call.
+     * 
+ * + * string page_token = 4; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The standard list page token.
+     * Typically obtained via
+     * [ListHyperparameterTuningJobsResponse.next_page_token][google.cloud.aiplatform.v1.ListHyperparameterTuningJobsResponse.next_page_token] of the previous
+     * [JobService.ListHyperparameterTuningJobs][google.cloud.aiplatform.v1.JobService.ListHyperparameterTuningJobs] call.
+     * 
+ * + * string page_token = 4; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list page token.
+     * Typically obtained via
+     * [ListHyperparameterTuningJobsResponse.next_page_token][google.cloud.aiplatform.v1.ListHyperparameterTuningJobsResponse.next_page_token] of the previous
+     * [JobService.ListHyperparameterTuningJobs][google.cloud.aiplatform.v1.JobService.ListHyperparameterTuningJobs] call.
+     * 
+ * + * string page_token = 4; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list page token.
+     * Typically obtained via
+     * [ListHyperparameterTuningJobsResponse.next_page_token][google.cloud.aiplatform.v1.ListHyperparameterTuningJobsResponse.next_page_token] of the previous
+     * [JobService.ListHyperparameterTuningJobs][google.cloud.aiplatform.v1.JobService.ListHyperparameterTuningJobs] call.
+     * 
+ * + * string page_token = 4; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.FieldMask readMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + readMaskBuilder_; + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return Whether the readMask field is set. + */ + public boolean hasReadMask() { + return readMaskBuilder_ != null || readMask_ != null; + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return The readMask. + */ + public com.google.protobuf.FieldMask getReadMask() { + if (readMaskBuilder_ == null) { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } else { + return readMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + public Builder setReadMask(com.google.protobuf.FieldMask value) { + if (readMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + readMask_ = value; + onChanged(); + } else { + readMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + public Builder setReadMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (readMaskBuilder_ == null) { + readMask_ = builderForValue.build(); + onChanged(); + } else { + readMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + public Builder mergeReadMask(com.google.protobuf.FieldMask value) { + if (readMaskBuilder_ == null) { + if (readMask_ != null) { + readMask_ = + com.google.protobuf.FieldMask.newBuilder(readMask_).mergeFrom(value).buildPartial(); + } else { + readMask_ = value; + } + onChanged(); + } else { + readMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + public Builder clearReadMask() { + if (readMaskBuilder_ == null) { + readMask_ = null; + onChanged(); + } else { + readMask_ = null; + readMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + public com.google.protobuf.FieldMask.Builder getReadMaskBuilder() { + + onChanged(); + return getReadMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + public com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder() { + if (readMaskBuilder_ != null) { + return readMaskBuilder_.getMessageOrBuilder(); + } else { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getReadMaskFieldBuilder() { + if (readMaskBuilder_ == null) { + readMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getReadMask(), getParentForChildren(), isClean()); + readMask_ = null; + } + return readMaskBuilder_; + } + + @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.v1.ListHyperparameterTuningJobsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ListHyperparameterTuningJobsRequest) + private static final com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsRequest(); + } + + public static com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListHyperparameterTuningJobsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListHyperparameterTuningJobsRequest(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.v1.ListHyperparameterTuningJobsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListHyperparameterTuningJobsRequestOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListHyperparameterTuningJobsRequestOrBuilder.java new file mode 100644 index 000000000..3eaefc01a --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListHyperparameterTuningJobsRequestOrBuilder.java @@ -0,0 +1,176 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/job_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface ListHyperparameterTuningJobsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ListHyperparameterTuningJobsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the Location to list the HyperparameterTuningJobs
+   * from. Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of the Location to list the HyperparameterTuningJobs
+   * from. Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The standard list filter.
+   * Supported fields:
+   *   * `display_name` supports = and !=.
+   *   * `state` supports = and !=.
+   * Some examples of using the filter are:
+   *  * `state="JOB_STATE_SUCCEEDED" AND display_name="my_job"`
+   *  * `state="JOB_STATE_RUNNING" OR display_name="my_job"`
+   *  * `NOT display_name="my_job"`
+   *  * `state="JOB_STATE_FAILED"`
+   * 
+ * + * string filter = 2; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * The standard list filter.
+   * Supported fields:
+   *   * `display_name` supports = and !=.
+   *   * `state` supports = and !=.
+   * Some examples of using the filter are:
+   *  * `state="JOB_STATE_SUCCEEDED" AND display_name="my_job"`
+   *  * `state="JOB_STATE_RUNNING" OR display_name="my_job"`
+   *  * `NOT display_name="my_job"`
+   *  * `state="JOB_STATE_FAILED"`
+   * 
+ * + * string filter = 2; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * The standard list page size.
+   * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * The standard list page token.
+   * Typically obtained via
+   * [ListHyperparameterTuningJobsResponse.next_page_token][google.cloud.aiplatform.v1.ListHyperparameterTuningJobsResponse.next_page_token] of the previous
+   * [JobService.ListHyperparameterTuningJobs][google.cloud.aiplatform.v1.JobService.ListHyperparameterTuningJobs] call.
+   * 
+ * + * string page_token = 4; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * The standard list page token.
+   * Typically obtained via
+   * [ListHyperparameterTuningJobsResponse.next_page_token][google.cloud.aiplatform.v1.ListHyperparameterTuningJobsResponse.next_page_token] of the previous
+   * [JobService.ListHyperparameterTuningJobs][google.cloud.aiplatform.v1.JobService.ListHyperparameterTuningJobs] call.
+   * 
+ * + * string page_token = 4; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return Whether the readMask field is set. + */ + boolean hasReadMask(); + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return The readMask. + */ + com.google.protobuf.FieldMask getReadMask(); + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListHyperparameterTuningJobsResponse.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListHyperparameterTuningJobsResponse.java new file mode 100644 index 000000000..606acfbba --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListHyperparameterTuningJobsResponse.java @@ -0,0 +1,1254 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/job_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Response message for [JobService.ListHyperparameterTuningJobs][google.cloud.aiplatform.v1.JobService.ListHyperparameterTuningJobs]
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListHyperparameterTuningJobsResponse} + */ +public final class ListHyperparameterTuningJobsResponse + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ListHyperparameterTuningJobsResponse) + ListHyperparameterTuningJobsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListHyperparameterTuningJobsResponse.newBuilder() to construct. + private ListHyperparameterTuningJobsResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListHyperparameterTuningJobsResponse() { + hyperparameterTuningJobs_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListHyperparameterTuningJobsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListHyperparameterTuningJobsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + hyperparameterTuningJobs_ = + new java.util.ArrayList< + com.google.cloud.aiplatform.v1.HyperparameterTuningJob>(); + mutable_bitField0_ |= 0x00000001; + } + hyperparameterTuningJobs_.add( + input.readMessage( + com.google.cloud.aiplatform.v1.HyperparameterTuningJob.parser(), + extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + hyperparameterTuningJobs_ = + java.util.Collections.unmodifiableList(hyperparameterTuningJobs_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_ListHyperparameterTuningJobsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_ListHyperparameterTuningJobsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsResponse.class, + com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsResponse.Builder.class); + } + + public static final int HYPERPARAMETER_TUNING_JOBS_FIELD_NUMBER = 1; + private java.util.List + hyperparameterTuningJobs_; + /** + * + * + *
+   * List of HyperparameterTuningJobs in the requested page.
+   * [HyperparameterTuningJob.trials][google.cloud.aiplatform.v1.HyperparameterTuningJob.trials] of the jobs will be not be returned.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.HyperparameterTuningJob hyperparameter_tuning_jobs = 1; + * + */ + @java.lang.Override + public java.util.List + getHyperparameterTuningJobsList() { + return hyperparameterTuningJobs_; + } + /** + * + * + *
+   * List of HyperparameterTuningJobs in the requested page.
+   * [HyperparameterTuningJob.trials][google.cloud.aiplatform.v1.HyperparameterTuningJob.trials] of the jobs will be not be returned.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.HyperparameterTuningJob hyperparameter_tuning_jobs = 1; + * + */ + @java.lang.Override + public java.util.List + getHyperparameterTuningJobsOrBuilderList() { + return hyperparameterTuningJobs_; + } + /** + * + * + *
+   * List of HyperparameterTuningJobs in the requested page.
+   * [HyperparameterTuningJob.trials][google.cloud.aiplatform.v1.HyperparameterTuningJob.trials] of the jobs will be not be returned.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.HyperparameterTuningJob hyperparameter_tuning_jobs = 1; + * + */ + @java.lang.Override + public int getHyperparameterTuningJobsCount() { + return hyperparameterTuningJobs_.size(); + } + /** + * + * + *
+   * List of HyperparameterTuningJobs in the requested page.
+   * [HyperparameterTuningJob.trials][google.cloud.aiplatform.v1.HyperparameterTuningJob.trials] of the jobs will be not be returned.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.HyperparameterTuningJob hyperparameter_tuning_jobs = 1; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.HyperparameterTuningJob getHyperparameterTuningJobs( + int index) { + return hyperparameterTuningJobs_.get(index); + } + /** + * + * + *
+   * List of HyperparameterTuningJobs in the requested page.
+   * [HyperparameterTuningJob.trials][google.cloud.aiplatform.v1.HyperparameterTuningJob.trials] of the jobs will be not be returned.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.HyperparameterTuningJob hyperparameter_tuning_jobs = 1; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.HyperparameterTuningJobOrBuilder + getHyperparameterTuningJobsOrBuilder(int index) { + return hyperparameterTuningJobs_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * Pass to [ListHyperparameterTuningJobsRequest.page_token][google.cloud.aiplatform.v1.ListHyperparameterTuningJobsRequest.page_token] to obtain that
+   * page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * Pass to [ListHyperparameterTuningJobsRequest.page_token][google.cloud.aiplatform.v1.ListHyperparameterTuningJobsRequest.page_token] to obtain that
+   * page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < hyperparameterTuningJobs_.size(); i++) { + output.writeMessage(1, hyperparameterTuningJobs_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < hyperparameterTuningJobs_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, hyperparameterTuningJobs_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsResponse)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsResponse other = + (com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsResponse) obj; + + if (!getHyperparameterTuningJobsList().equals(other.getHyperparameterTuningJobsList())) + return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getHyperparameterTuningJobsCount() > 0) { + hash = (37 * hash) + HYPERPARAMETER_TUNING_JOBS_FIELD_NUMBER; + hash = (53 * hash) + getHyperparameterTuningJobsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsResponse 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.v1.ListHyperparameterTuningJobsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsResponse 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.v1.ListHyperparameterTuningJobsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsResponse 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.v1.ListHyperparameterTuningJobsResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsResponse + 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.v1.ListHyperparameterTuningJobsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsResponse 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.v1.ListHyperparameterTuningJobsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for [JobService.ListHyperparameterTuningJobs][google.cloud.aiplatform.v1.JobService.ListHyperparameterTuningJobs]
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListHyperparameterTuningJobsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ListHyperparameterTuningJobsResponse) + com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_ListHyperparameterTuningJobsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_ListHyperparameterTuningJobsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsResponse.class, + com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsResponse.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getHyperparameterTuningJobsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (hyperparameterTuningJobsBuilder_ == null) { + hyperparameterTuningJobs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + hyperparameterTuningJobsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_ListHyperparameterTuningJobsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsResponse + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsResponse build() { + com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsResponse buildPartial() { + com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsResponse result = + new com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsResponse(this); + int from_bitField0_ = bitField0_; + if (hyperparameterTuningJobsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + hyperparameterTuningJobs_ = + java.util.Collections.unmodifiableList(hyperparameterTuningJobs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.hyperparameterTuningJobs_ = hyperparameterTuningJobs_; + } else { + result.hyperparameterTuningJobs_ = hyperparameterTuningJobsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + 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.v1.ListHyperparameterTuningJobsResponse) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsResponse other) { + if (other + == com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsResponse + .getDefaultInstance()) return this; + if (hyperparameterTuningJobsBuilder_ == null) { + if (!other.hyperparameterTuningJobs_.isEmpty()) { + if (hyperparameterTuningJobs_.isEmpty()) { + hyperparameterTuningJobs_ = other.hyperparameterTuningJobs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureHyperparameterTuningJobsIsMutable(); + hyperparameterTuningJobs_.addAll(other.hyperparameterTuningJobs_); + } + onChanged(); + } + } else { + if (!other.hyperparameterTuningJobs_.isEmpty()) { + if (hyperparameterTuningJobsBuilder_.isEmpty()) { + hyperparameterTuningJobsBuilder_.dispose(); + hyperparameterTuningJobsBuilder_ = null; + hyperparameterTuningJobs_ = other.hyperparameterTuningJobs_; + bitField0_ = (bitField0_ & ~0x00000001); + hyperparameterTuningJobsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getHyperparameterTuningJobsFieldBuilder() + : null; + } else { + hyperparameterTuningJobsBuilder_.addAllMessages(other.hyperparameterTuningJobs_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List + hyperparameterTuningJobs_ = java.util.Collections.emptyList(); + + private void ensureHyperparameterTuningJobsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + hyperparameterTuningJobs_ = + new java.util.ArrayList( + hyperparameterTuningJobs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.HyperparameterTuningJob, + com.google.cloud.aiplatform.v1.HyperparameterTuningJob.Builder, + com.google.cloud.aiplatform.v1.HyperparameterTuningJobOrBuilder> + hyperparameterTuningJobsBuilder_; + + /** + * + * + *
+     * List of HyperparameterTuningJobs in the requested page.
+     * [HyperparameterTuningJob.trials][google.cloud.aiplatform.v1.HyperparameterTuningJob.trials] of the jobs will be not be returned.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.HyperparameterTuningJob hyperparameter_tuning_jobs = 1; + * + */ + public java.util.List + getHyperparameterTuningJobsList() { + if (hyperparameterTuningJobsBuilder_ == null) { + return java.util.Collections.unmodifiableList(hyperparameterTuningJobs_); + } else { + return hyperparameterTuningJobsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of HyperparameterTuningJobs in the requested page.
+     * [HyperparameterTuningJob.trials][google.cloud.aiplatform.v1.HyperparameterTuningJob.trials] of the jobs will be not be returned.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.HyperparameterTuningJob hyperparameter_tuning_jobs = 1; + * + */ + public int getHyperparameterTuningJobsCount() { + if (hyperparameterTuningJobsBuilder_ == null) { + return hyperparameterTuningJobs_.size(); + } else { + return hyperparameterTuningJobsBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of HyperparameterTuningJobs in the requested page.
+     * [HyperparameterTuningJob.trials][google.cloud.aiplatform.v1.HyperparameterTuningJob.trials] of the jobs will be not be returned.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.HyperparameterTuningJob hyperparameter_tuning_jobs = 1; + * + */ + public com.google.cloud.aiplatform.v1.HyperparameterTuningJob getHyperparameterTuningJobs( + int index) { + if (hyperparameterTuningJobsBuilder_ == null) { + return hyperparameterTuningJobs_.get(index); + } else { + return hyperparameterTuningJobsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of HyperparameterTuningJobs in the requested page.
+     * [HyperparameterTuningJob.trials][google.cloud.aiplatform.v1.HyperparameterTuningJob.trials] of the jobs will be not be returned.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.HyperparameterTuningJob hyperparameter_tuning_jobs = 1; + * + */ + public Builder setHyperparameterTuningJobs( + int index, com.google.cloud.aiplatform.v1.HyperparameterTuningJob value) { + if (hyperparameterTuningJobsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHyperparameterTuningJobsIsMutable(); + hyperparameterTuningJobs_.set(index, value); + onChanged(); + } else { + hyperparameterTuningJobsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of HyperparameterTuningJobs in the requested page.
+     * [HyperparameterTuningJob.trials][google.cloud.aiplatform.v1.HyperparameterTuningJob.trials] of the jobs will be not be returned.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.HyperparameterTuningJob hyperparameter_tuning_jobs = 1; + * + */ + public Builder setHyperparameterTuningJobs( + int index, com.google.cloud.aiplatform.v1.HyperparameterTuningJob.Builder builderForValue) { + if (hyperparameterTuningJobsBuilder_ == null) { + ensureHyperparameterTuningJobsIsMutable(); + hyperparameterTuningJobs_.set(index, builderForValue.build()); + onChanged(); + } else { + hyperparameterTuningJobsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of HyperparameterTuningJobs in the requested page.
+     * [HyperparameterTuningJob.trials][google.cloud.aiplatform.v1.HyperparameterTuningJob.trials] of the jobs will be not be returned.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.HyperparameterTuningJob hyperparameter_tuning_jobs = 1; + * + */ + public Builder addHyperparameterTuningJobs( + com.google.cloud.aiplatform.v1.HyperparameterTuningJob value) { + if (hyperparameterTuningJobsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHyperparameterTuningJobsIsMutable(); + hyperparameterTuningJobs_.add(value); + onChanged(); + } else { + hyperparameterTuningJobsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of HyperparameterTuningJobs in the requested page.
+     * [HyperparameterTuningJob.trials][google.cloud.aiplatform.v1.HyperparameterTuningJob.trials] of the jobs will be not be returned.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.HyperparameterTuningJob hyperparameter_tuning_jobs = 1; + * + */ + public Builder addHyperparameterTuningJobs( + int index, com.google.cloud.aiplatform.v1.HyperparameterTuningJob value) { + if (hyperparameterTuningJobsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHyperparameterTuningJobsIsMutable(); + hyperparameterTuningJobs_.add(index, value); + onChanged(); + } else { + hyperparameterTuningJobsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of HyperparameterTuningJobs in the requested page.
+     * [HyperparameterTuningJob.trials][google.cloud.aiplatform.v1.HyperparameterTuningJob.trials] of the jobs will be not be returned.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.HyperparameterTuningJob hyperparameter_tuning_jobs = 1; + * + */ + public Builder addHyperparameterTuningJobs( + com.google.cloud.aiplatform.v1.HyperparameterTuningJob.Builder builderForValue) { + if (hyperparameterTuningJobsBuilder_ == null) { + ensureHyperparameterTuningJobsIsMutable(); + hyperparameterTuningJobs_.add(builderForValue.build()); + onChanged(); + } else { + hyperparameterTuningJobsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of HyperparameterTuningJobs in the requested page.
+     * [HyperparameterTuningJob.trials][google.cloud.aiplatform.v1.HyperparameterTuningJob.trials] of the jobs will be not be returned.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.HyperparameterTuningJob hyperparameter_tuning_jobs = 1; + * + */ + public Builder addHyperparameterTuningJobs( + int index, com.google.cloud.aiplatform.v1.HyperparameterTuningJob.Builder builderForValue) { + if (hyperparameterTuningJobsBuilder_ == null) { + ensureHyperparameterTuningJobsIsMutable(); + hyperparameterTuningJobs_.add(index, builderForValue.build()); + onChanged(); + } else { + hyperparameterTuningJobsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of HyperparameterTuningJobs in the requested page.
+     * [HyperparameterTuningJob.trials][google.cloud.aiplatform.v1.HyperparameterTuningJob.trials] of the jobs will be not be returned.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.HyperparameterTuningJob hyperparameter_tuning_jobs = 1; + * + */ + public Builder addAllHyperparameterTuningJobs( + java.lang.Iterable + values) { + if (hyperparameterTuningJobsBuilder_ == null) { + ensureHyperparameterTuningJobsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, hyperparameterTuningJobs_); + onChanged(); + } else { + hyperparameterTuningJobsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of HyperparameterTuningJobs in the requested page.
+     * [HyperparameterTuningJob.trials][google.cloud.aiplatform.v1.HyperparameterTuningJob.trials] of the jobs will be not be returned.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.HyperparameterTuningJob hyperparameter_tuning_jobs = 1; + * + */ + public Builder clearHyperparameterTuningJobs() { + if (hyperparameterTuningJobsBuilder_ == null) { + hyperparameterTuningJobs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + hyperparameterTuningJobsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of HyperparameterTuningJobs in the requested page.
+     * [HyperparameterTuningJob.trials][google.cloud.aiplatform.v1.HyperparameterTuningJob.trials] of the jobs will be not be returned.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.HyperparameterTuningJob hyperparameter_tuning_jobs = 1; + * + */ + public Builder removeHyperparameterTuningJobs(int index) { + if (hyperparameterTuningJobsBuilder_ == null) { + ensureHyperparameterTuningJobsIsMutable(); + hyperparameterTuningJobs_.remove(index); + onChanged(); + } else { + hyperparameterTuningJobsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of HyperparameterTuningJobs in the requested page.
+     * [HyperparameterTuningJob.trials][google.cloud.aiplatform.v1.HyperparameterTuningJob.trials] of the jobs will be not be returned.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.HyperparameterTuningJob hyperparameter_tuning_jobs = 1; + * + */ + public com.google.cloud.aiplatform.v1.HyperparameterTuningJob.Builder + getHyperparameterTuningJobsBuilder(int index) { + return getHyperparameterTuningJobsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of HyperparameterTuningJobs in the requested page.
+     * [HyperparameterTuningJob.trials][google.cloud.aiplatform.v1.HyperparameterTuningJob.trials] of the jobs will be not be returned.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.HyperparameterTuningJob hyperparameter_tuning_jobs = 1; + * + */ + public com.google.cloud.aiplatform.v1.HyperparameterTuningJobOrBuilder + getHyperparameterTuningJobsOrBuilder(int index) { + if (hyperparameterTuningJobsBuilder_ == null) { + return hyperparameterTuningJobs_.get(index); + } else { + return hyperparameterTuningJobsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of HyperparameterTuningJobs in the requested page.
+     * [HyperparameterTuningJob.trials][google.cloud.aiplatform.v1.HyperparameterTuningJob.trials] of the jobs will be not be returned.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.HyperparameterTuningJob hyperparameter_tuning_jobs = 1; + * + */ + public java.util.List + getHyperparameterTuningJobsOrBuilderList() { + if (hyperparameterTuningJobsBuilder_ != null) { + return hyperparameterTuningJobsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(hyperparameterTuningJobs_); + } + } + /** + * + * + *
+     * List of HyperparameterTuningJobs in the requested page.
+     * [HyperparameterTuningJob.trials][google.cloud.aiplatform.v1.HyperparameterTuningJob.trials] of the jobs will be not be returned.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.HyperparameterTuningJob hyperparameter_tuning_jobs = 1; + * + */ + public com.google.cloud.aiplatform.v1.HyperparameterTuningJob.Builder + addHyperparameterTuningJobsBuilder() { + return getHyperparameterTuningJobsFieldBuilder() + .addBuilder(com.google.cloud.aiplatform.v1.HyperparameterTuningJob.getDefaultInstance()); + } + /** + * + * + *
+     * List of HyperparameterTuningJobs in the requested page.
+     * [HyperparameterTuningJob.trials][google.cloud.aiplatform.v1.HyperparameterTuningJob.trials] of the jobs will be not be returned.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.HyperparameterTuningJob hyperparameter_tuning_jobs = 1; + * + */ + public com.google.cloud.aiplatform.v1.HyperparameterTuningJob.Builder + addHyperparameterTuningJobsBuilder(int index) { + return getHyperparameterTuningJobsFieldBuilder() + .addBuilder( + index, com.google.cloud.aiplatform.v1.HyperparameterTuningJob.getDefaultInstance()); + } + /** + * + * + *
+     * List of HyperparameterTuningJobs in the requested page.
+     * [HyperparameterTuningJob.trials][google.cloud.aiplatform.v1.HyperparameterTuningJob.trials] of the jobs will be not be returned.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.HyperparameterTuningJob hyperparameter_tuning_jobs = 1; + * + */ + public java.util.List + getHyperparameterTuningJobsBuilderList() { + return getHyperparameterTuningJobsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.HyperparameterTuningJob, + com.google.cloud.aiplatform.v1.HyperparameterTuningJob.Builder, + com.google.cloud.aiplatform.v1.HyperparameterTuningJobOrBuilder> + getHyperparameterTuningJobsFieldBuilder() { + if (hyperparameterTuningJobsBuilder_ == null) { + hyperparameterTuningJobsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.HyperparameterTuningJob, + com.google.cloud.aiplatform.v1.HyperparameterTuningJob.Builder, + com.google.cloud.aiplatform.v1.HyperparameterTuningJobOrBuilder>( + hyperparameterTuningJobs_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + hyperparameterTuningJobs_ = null; + } + return hyperparameterTuningJobsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to [ListHyperparameterTuningJobsRequest.page_token][google.cloud.aiplatform.v1.ListHyperparameterTuningJobsRequest.page_token] to obtain that
+     * page.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to [ListHyperparameterTuningJobsRequest.page_token][google.cloud.aiplatform.v1.ListHyperparameterTuningJobsRequest.page_token] to obtain that
+     * page.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to [ListHyperparameterTuningJobsRequest.page_token][google.cloud.aiplatform.v1.ListHyperparameterTuningJobsRequest.page_token] to obtain that
+     * page.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to [ListHyperparameterTuningJobsRequest.page_token][google.cloud.aiplatform.v1.ListHyperparameterTuningJobsRequest.page_token] to obtain that
+     * page.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to [ListHyperparameterTuningJobsRequest.page_token][google.cloud.aiplatform.v1.ListHyperparameterTuningJobsRequest.page_token] to obtain that
+     * page.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.ListHyperparameterTuningJobsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ListHyperparameterTuningJobsResponse) + private static final com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsResponse(); + } + + public static com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListHyperparameterTuningJobsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListHyperparameterTuningJobsResponse(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.v1.ListHyperparameterTuningJobsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListHyperparameterTuningJobsResponseOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListHyperparameterTuningJobsResponseOrBuilder.java new file mode 100644 index 000000000..57c97da65 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListHyperparameterTuningJobsResponseOrBuilder.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/v1/job_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface ListHyperparameterTuningJobsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ListHyperparameterTuningJobsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * List of HyperparameterTuningJobs in the requested page.
+   * [HyperparameterTuningJob.trials][google.cloud.aiplatform.v1.HyperparameterTuningJob.trials] of the jobs will be not be returned.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.HyperparameterTuningJob hyperparameter_tuning_jobs = 1; + * + */ + java.util.List + getHyperparameterTuningJobsList(); + /** + * + * + *
+   * List of HyperparameterTuningJobs in the requested page.
+   * [HyperparameterTuningJob.trials][google.cloud.aiplatform.v1.HyperparameterTuningJob.trials] of the jobs will be not be returned.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.HyperparameterTuningJob hyperparameter_tuning_jobs = 1; + * + */ + com.google.cloud.aiplatform.v1.HyperparameterTuningJob getHyperparameterTuningJobs(int index); + /** + * + * + *
+   * List of HyperparameterTuningJobs in the requested page.
+   * [HyperparameterTuningJob.trials][google.cloud.aiplatform.v1.HyperparameterTuningJob.trials] of the jobs will be not be returned.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.HyperparameterTuningJob hyperparameter_tuning_jobs = 1; + * + */ + int getHyperparameterTuningJobsCount(); + /** + * + * + *
+   * List of HyperparameterTuningJobs in the requested page.
+   * [HyperparameterTuningJob.trials][google.cloud.aiplatform.v1.HyperparameterTuningJob.trials] of the jobs will be not be returned.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.HyperparameterTuningJob hyperparameter_tuning_jobs = 1; + * + */ + java.util.List + getHyperparameterTuningJobsOrBuilderList(); + /** + * + * + *
+   * List of HyperparameterTuningJobs in the requested page.
+   * [HyperparameterTuningJob.trials][google.cloud.aiplatform.v1.HyperparameterTuningJob.trials] of the jobs will be not be returned.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.HyperparameterTuningJob hyperparameter_tuning_jobs = 1; + * + */ + com.google.cloud.aiplatform.v1.HyperparameterTuningJobOrBuilder + getHyperparameterTuningJobsOrBuilder(int index); + + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * Pass to [ListHyperparameterTuningJobsRequest.page_token][google.cloud.aiplatform.v1.ListHyperparameterTuningJobsRequest.page_token] to obtain that
+   * page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * Pass to [ListHyperparameterTuningJobsRequest.page_token][google.cloud.aiplatform.v1.ListHyperparameterTuningJobsRequest.page_token] to obtain that
+   * page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListModelEvaluationSlicesRequest.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListModelEvaluationSlicesRequest.java new file mode 100644 index 000000000..136235733 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListModelEvaluationSlicesRequest.java @@ -0,0 +1,1417 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/model_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for [ModelService.ListModelEvaluationSlices][google.cloud.aiplatform.v1.ModelService.ListModelEvaluationSlices].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListModelEvaluationSlicesRequest} + */ +public final class ListModelEvaluationSlicesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ListModelEvaluationSlicesRequest) + ListModelEvaluationSlicesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListModelEvaluationSlicesRequest.newBuilder() to construct. + private ListModelEvaluationSlicesRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListModelEvaluationSlicesRequest() { + parent_ = ""; + filter_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListModelEvaluationSlicesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListModelEvaluationSlicesRequest( + 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(); + + parent_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + filter_ = s; + break; + } + case 24: + { + pageSize_ = input.readInt32(); + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 42: + { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (readMask_ != null) { + subBuilder = readMask_.toBuilder(); + } + readMask_ = + input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(readMask_); + readMask_ = 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.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_ListModelEvaluationSlicesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_ListModelEvaluationSlicesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesRequest.class, + com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The resource name of the ModelEvaluation to list the ModelEvaluationSlices
+   * from. Format:
+   * `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the ModelEvaluation to list the ModelEvaluationSlices
+   * from. Format:
+   * `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 2; + private volatile java.lang.Object filter_; + /** + * + * + *
+   * The standard list filter.
+   *   * `slice.dimension` - for =.
+   * 
+ * + * string filter = 2; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * The standard list filter.
+   *   * `slice.dimension` - for =.
+   * 
+ * + * string filter = 2; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 3; + private int pageSize_; + /** + * + * + *
+   * The standard list page size.
+   * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 4; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * The standard list page token.
+   * Typically obtained via
+   * [ListModelEvaluationSlicesResponse.next_page_token][google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponse.next_page_token] of the previous
+   * [ModelService.ListModelEvaluationSlices][google.cloud.aiplatform.v1.ModelService.ListModelEvaluationSlices] call.
+   * 
+ * + * string page_token = 4; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The standard list page token.
+   * Typically obtained via
+   * [ListModelEvaluationSlicesResponse.next_page_token][google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponse.next_page_token] of the previous
+   * [ModelService.ListModelEvaluationSlices][google.cloud.aiplatform.v1.ModelService.ListModelEvaluationSlices] call.
+   * 
+ * + * string page_token = 4; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int READ_MASK_FIELD_NUMBER = 5; + private com.google.protobuf.FieldMask readMask_; + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return Whether the readMask field is set. + */ + @java.lang.Override + public boolean hasReadMask() { + return readMask_ != null; + } + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return The readMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getReadMask() { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder() { + return getReadMask(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!getFilterBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); + } + if (pageSize_ != 0) { + output.writeInt32(3, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); + } + if (readMask_ != null) { + output.writeMessage(5, getReadMask()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!getFilterBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_); + } + if (readMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getReadMask()); + } + 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.v1.ListModelEvaluationSlicesRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesRequest other = + (com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (hasReadMask() != other.hasReadMask()) return false; + if (hasReadMask()) { + if (!getReadMask().equals(other.getReadMask())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + if (hasReadMask()) { + hash = (37 * hash) + READ_MASK_FIELD_NUMBER; + hash = (53 * hash) + getReadMask().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesRequest 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.v1.ListModelEvaluationSlicesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesRequest 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.v1.ListModelEvaluationSlicesRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesRequest 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.v1.ListModelEvaluationSlicesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesRequest 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.v1.ListModelEvaluationSlicesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesRequest 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.v1.ListModelEvaluationSlicesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [ModelService.ListModelEvaluationSlices][google.cloud.aiplatform.v1.ModelService.ListModelEvaluationSlices].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListModelEvaluationSlicesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ListModelEvaluationSlicesRequest) + com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_ListModelEvaluationSlicesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_ListModelEvaluationSlicesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesRequest.class, + com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + filter_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + if (readMaskBuilder_ == null) { + readMask_ = null; + } else { + readMask_ = null; + readMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_ListModelEvaluationSlicesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesRequest + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesRequest build() { + com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesRequest buildPartial() { + com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesRequest result = + new com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesRequest(this); + result.parent_ = parent_; + result.filter_ = filter_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + if (readMaskBuilder_ == null) { + result.readMask_ = readMask_; + } else { + result.readMask_ = readMaskBuilder_.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.v1.ListModelEvaluationSlicesRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesRequest other) { + if (other + == com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + if (other.hasReadMask()) { + mergeReadMask(other.getReadMask()); + } + 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.v1.ListModelEvaluationSlicesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the ModelEvaluation to list the ModelEvaluationSlices
+     * from. Format:
+     * `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the ModelEvaluation to list the ModelEvaluationSlices
+     * from. Format:
+     * `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the ModelEvaluation to list the ModelEvaluationSlices
+     * from. Format:
+     * `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the ModelEvaluation to list the ModelEvaluationSlices
+     * from. Format:
+     * `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the ModelEvaluation to list the ModelEvaluationSlices
+     * from. Format:
+     * `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * The standard list filter.
+     *   * `slice.dimension` - for =.
+     * 
+ * + * string filter = 2; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The standard list filter.
+     *   * `slice.dimension` - for =.
+     * 
+ * + * string filter = 2; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The standard list filter.
+     *   * `slice.dimension` - for =.
+     * 
+ * + * string filter = 2; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list filter.
+     *   * `slice.dimension` - for =.
+     * 
+ * + * string filter = 2; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list filter.
+     *   * `slice.dimension` - for =.
+     * 
+ * + * string filter = 2; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The standard list page size.
+     * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The standard list page size.
+     * 
+ * + * int32 page_size = 3; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list page size.
+     * 
+ * + * int32 page_size = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * The standard list page token.
+     * Typically obtained via
+     * [ListModelEvaluationSlicesResponse.next_page_token][google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponse.next_page_token] of the previous
+     * [ModelService.ListModelEvaluationSlices][google.cloud.aiplatform.v1.ModelService.ListModelEvaluationSlices] call.
+     * 
+ * + * string page_token = 4; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The standard list page token.
+     * Typically obtained via
+     * [ListModelEvaluationSlicesResponse.next_page_token][google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponse.next_page_token] of the previous
+     * [ModelService.ListModelEvaluationSlices][google.cloud.aiplatform.v1.ModelService.ListModelEvaluationSlices] call.
+     * 
+ * + * string page_token = 4; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The standard list page token.
+     * Typically obtained via
+     * [ListModelEvaluationSlicesResponse.next_page_token][google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponse.next_page_token] of the previous
+     * [ModelService.ListModelEvaluationSlices][google.cloud.aiplatform.v1.ModelService.ListModelEvaluationSlices] call.
+     * 
+ * + * string page_token = 4; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list page token.
+     * Typically obtained via
+     * [ListModelEvaluationSlicesResponse.next_page_token][google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponse.next_page_token] of the previous
+     * [ModelService.ListModelEvaluationSlices][google.cloud.aiplatform.v1.ModelService.ListModelEvaluationSlices] call.
+     * 
+ * + * string page_token = 4; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list page token.
+     * Typically obtained via
+     * [ListModelEvaluationSlicesResponse.next_page_token][google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponse.next_page_token] of the previous
+     * [ModelService.ListModelEvaluationSlices][google.cloud.aiplatform.v1.ModelService.ListModelEvaluationSlices] call.
+     * 
+ * + * string page_token = 4; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.FieldMask readMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + readMaskBuilder_; + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return Whether the readMask field is set. + */ + public boolean hasReadMask() { + return readMaskBuilder_ != null || readMask_ != null; + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return The readMask. + */ + public com.google.protobuf.FieldMask getReadMask() { + if (readMaskBuilder_ == null) { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } else { + return readMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + public Builder setReadMask(com.google.protobuf.FieldMask value) { + if (readMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + readMask_ = value; + onChanged(); + } else { + readMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + public Builder setReadMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (readMaskBuilder_ == null) { + readMask_ = builderForValue.build(); + onChanged(); + } else { + readMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + public Builder mergeReadMask(com.google.protobuf.FieldMask value) { + if (readMaskBuilder_ == null) { + if (readMask_ != null) { + readMask_ = + com.google.protobuf.FieldMask.newBuilder(readMask_).mergeFrom(value).buildPartial(); + } else { + readMask_ = value; + } + onChanged(); + } else { + readMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + public Builder clearReadMask() { + if (readMaskBuilder_ == null) { + readMask_ = null; + onChanged(); + } else { + readMask_ = null; + readMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + public com.google.protobuf.FieldMask.Builder getReadMaskBuilder() { + + onChanged(); + return getReadMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + public com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder() { + if (readMaskBuilder_ != null) { + return readMaskBuilder_.getMessageOrBuilder(); + } else { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getReadMaskFieldBuilder() { + if (readMaskBuilder_ == null) { + readMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getReadMask(), getParentForChildren(), isClean()); + readMask_ = null; + } + return readMaskBuilder_; + } + + @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.v1.ListModelEvaluationSlicesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ListModelEvaluationSlicesRequest) + private static final com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesRequest(); + } + + public static com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListModelEvaluationSlicesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListModelEvaluationSlicesRequest(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.v1.ListModelEvaluationSlicesRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListModelEvaluationSlicesRequestOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListModelEvaluationSlicesRequestOrBuilder.java new file mode 100644 index 000000000..828293c61 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListModelEvaluationSlicesRequestOrBuilder.java @@ -0,0 +1,164 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/model_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface ListModelEvaluationSlicesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ListModelEvaluationSlicesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the ModelEvaluation to list the ModelEvaluationSlices
+   * from. Format:
+   * `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of the ModelEvaluation to list the ModelEvaluationSlices
+   * from. Format:
+   * `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The standard list filter.
+   *   * `slice.dimension` - for =.
+   * 
+ * + * string filter = 2; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * The standard list filter.
+   *   * `slice.dimension` - for =.
+   * 
+ * + * string filter = 2; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * The standard list page size.
+   * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * The standard list page token.
+   * Typically obtained via
+   * [ListModelEvaluationSlicesResponse.next_page_token][google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponse.next_page_token] of the previous
+   * [ModelService.ListModelEvaluationSlices][google.cloud.aiplatform.v1.ModelService.ListModelEvaluationSlices] call.
+   * 
+ * + * string page_token = 4; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * The standard list page token.
+   * Typically obtained via
+   * [ListModelEvaluationSlicesResponse.next_page_token][google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponse.next_page_token] of the previous
+   * [ModelService.ListModelEvaluationSlices][google.cloud.aiplatform.v1.ModelService.ListModelEvaluationSlices] call.
+   * 
+ * + * string page_token = 4; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return Whether the readMask field is set. + */ + boolean hasReadMask(); + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return The readMask. + */ + com.google.protobuf.FieldMask getReadMask(); + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListModelEvaluationSlicesResponse.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListModelEvaluationSlicesResponse.java new file mode 100644 index 000000000..0d46964f6 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListModelEvaluationSlicesResponse.java @@ -0,0 +1,1196 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/model_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Response message for [ModelService.ListModelEvaluationSlices][google.cloud.aiplatform.v1.ModelService.ListModelEvaluationSlices].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponse} + */ +public final class ListModelEvaluationSlicesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponse) + ListModelEvaluationSlicesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListModelEvaluationSlicesResponse.newBuilder() to construct. + private ListModelEvaluationSlicesResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListModelEvaluationSlicesResponse() { + modelEvaluationSlices_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListModelEvaluationSlicesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListModelEvaluationSlicesResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + modelEvaluationSlices_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + modelEvaluationSlices_.add( + input.readMessage( + com.google.cloud.aiplatform.v1.ModelEvaluationSlice.parser(), + extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + modelEvaluationSlices_ = java.util.Collections.unmodifiableList(modelEvaluationSlices_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_ListModelEvaluationSlicesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_ListModelEvaluationSlicesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponse.class, + com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponse.Builder.class); + } + + public static final int MODEL_EVALUATION_SLICES_FIELD_NUMBER = 1; + private java.util.List + modelEvaluationSlices_; + /** + * + * + *
+   * List of ModelEvaluations in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.ModelEvaluationSlice model_evaluation_slices = 1; + * + */ + @java.lang.Override + public java.util.List + getModelEvaluationSlicesList() { + return modelEvaluationSlices_; + } + /** + * + * + *
+   * List of ModelEvaluations in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.ModelEvaluationSlice model_evaluation_slices = 1; + * + */ + @java.lang.Override + public java.util.List + getModelEvaluationSlicesOrBuilderList() { + return modelEvaluationSlices_; + } + /** + * + * + *
+   * List of ModelEvaluations in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.ModelEvaluationSlice model_evaluation_slices = 1; + * + */ + @java.lang.Override + public int getModelEvaluationSlicesCount() { + return modelEvaluationSlices_.size(); + } + /** + * + * + *
+   * List of ModelEvaluations in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.ModelEvaluationSlice model_evaluation_slices = 1; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ModelEvaluationSlice getModelEvaluationSlices(int index) { + return modelEvaluationSlices_.get(index); + } + /** + * + * + *
+   * List of ModelEvaluations in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.ModelEvaluationSlice model_evaluation_slices = 1; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ModelEvaluationSliceOrBuilder + getModelEvaluationSlicesOrBuilder(int index) { + return modelEvaluationSlices_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * A token to retrieve next page of results.
+   * Pass to [ListModelEvaluationSlicesRequest.page_token][google.cloud.aiplatform.v1.ListModelEvaluationSlicesRequest.page_token] to obtain that
+   * page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token to retrieve next page of results.
+   * Pass to [ListModelEvaluationSlicesRequest.page_token][google.cloud.aiplatform.v1.ListModelEvaluationSlicesRequest.page_token] to obtain that
+   * page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < modelEvaluationSlices_.size(); i++) { + output.writeMessage(1, modelEvaluationSlices_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < modelEvaluationSlices_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, modelEvaluationSlices_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponse)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponse other = + (com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponse) obj; + + if (!getModelEvaluationSlicesList().equals(other.getModelEvaluationSlicesList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getModelEvaluationSlicesCount() > 0) { + hash = (37 * hash) + MODEL_EVALUATION_SLICES_FIELD_NUMBER; + hash = (53 * hash) + getModelEvaluationSlicesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponse 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.v1.ListModelEvaluationSlicesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponse 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.v1.ListModelEvaluationSlicesResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponse 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.v1.ListModelEvaluationSlicesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponse 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.v1.ListModelEvaluationSlicesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponse 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.v1.ListModelEvaluationSlicesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for [ModelService.ListModelEvaluationSlices][google.cloud.aiplatform.v1.ModelService.ListModelEvaluationSlices].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponse) + com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_ListModelEvaluationSlicesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_ListModelEvaluationSlicesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponse.class, + com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponse.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getModelEvaluationSlicesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (modelEvaluationSlicesBuilder_ == null) { + modelEvaluationSlices_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + modelEvaluationSlicesBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_ListModelEvaluationSlicesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponse + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponse build() { + com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponse buildPartial() { + com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponse result = + new com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponse(this); + int from_bitField0_ = bitField0_; + if (modelEvaluationSlicesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + modelEvaluationSlices_ = java.util.Collections.unmodifiableList(modelEvaluationSlices_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.modelEvaluationSlices_ = modelEvaluationSlices_; + } else { + result.modelEvaluationSlices_ = modelEvaluationSlicesBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + 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.v1.ListModelEvaluationSlicesResponse) { + return mergeFrom((com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponse other) { + if (other + == com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponse.getDefaultInstance()) + return this; + if (modelEvaluationSlicesBuilder_ == null) { + if (!other.modelEvaluationSlices_.isEmpty()) { + if (modelEvaluationSlices_.isEmpty()) { + modelEvaluationSlices_ = other.modelEvaluationSlices_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureModelEvaluationSlicesIsMutable(); + modelEvaluationSlices_.addAll(other.modelEvaluationSlices_); + } + onChanged(); + } + } else { + if (!other.modelEvaluationSlices_.isEmpty()) { + if (modelEvaluationSlicesBuilder_.isEmpty()) { + modelEvaluationSlicesBuilder_.dispose(); + modelEvaluationSlicesBuilder_ = null; + modelEvaluationSlices_ = other.modelEvaluationSlices_; + bitField0_ = (bitField0_ & ~0x00000001); + modelEvaluationSlicesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getModelEvaluationSlicesFieldBuilder() + : null; + } else { + modelEvaluationSlicesBuilder_.addAllMessages(other.modelEvaluationSlices_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List + modelEvaluationSlices_ = java.util.Collections.emptyList(); + + private void ensureModelEvaluationSlicesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + modelEvaluationSlices_ = + new java.util.ArrayList( + modelEvaluationSlices_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.ModelEvaluationSlice, + com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Builder, + com.google.cloud.aiplatform.v1.ModelEvaluationSliceOrBuilder> + modelEvaluationSlicesBuilder_; + + /** + * + * + *
+     * List of ModelEvaluations in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.ModelEvaluationSlice model_evaluation_slices = 1; + * + */ + public java.util.List + getModelEvaluationSlicesList() { + if (modelEvaluationSlicesBuilder_ == null) { + return java.util.Collections.unmodifiableList(modelEvaluationSlices_); + } else { + return modelEvaluationSlicesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of ModelEvaluations in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.ModelEvaluationSlice model_evaluation_slices = 1; + * + */ + public int getModelEvaluationSlicesCount() { + if (modelEvaluationSlicesBuilder_ == null) { + return modelEvaluationSlices_.size(); + } else { + return modelEvaluationSlicesBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of ModelEvaluations in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.ModelEvaluationSlice model_evaluation_slices = 1; + * + */ + public com.google.cloud.aiplatform.v1.ModelEvaluationSlice getModelEvaluationSlices(int index) { + if (modelEvaluationSlicesBuilder_ == null) { + return modelEvaluationSlices_.get(index); + } else { + return modelEvaluationSlicesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of ModelEvaluations in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.ModelEvaluationSlice model_evaluation_slices = 1; + * + */ + public Builder setModelEvaluationSlices( + int index, com.google.cloud.aiplatform.v1.ModelEvaluationSlice value) { + if (modelEvaluationSlicesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureModelEvaluationSlicesIsMutable(); + modelEvaluationSlices_.set(index, value); + onChanged(); + } else { + modelEvaluationSlicesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of ModelEvaluations in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.ModelEvaluationSlice model_evaluation_slices = 1; + * + */ + public Builder setModelEvaluationSlices( + int index, com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Builder builderForValue) { + if (modelEvaluationSlicesBuilder_ == null) { + ensureModelEvaluationSlicesIsMutable(); + modelEvaluationSlices_.set(index, builderForValue.build()); + onChanged(); + } else { + modelEvaluationSlicesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of ModelEvaluations in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.ModelEvaluationSlice model_evaluation_slices = 1; + * + */ + public Builder addModelEvaluationSlices( + com.google.cloud.aiplatform.v1.ModelEvaluationSlice value) { + if (modelEvaluationSlicesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureModelEvaluationSlicesIsMutable(); + modelEvaluationSlices_.add(value); + onChanged(); + } else { + modelEvaluationSlicesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of ModelEvaluations in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.ModelEvaluationSlice model_evaluation_slices = 1; + * + */ + public Builder addModelEvaluationSlices( + int index, com.google.cloud.aiplatform.v1.ModelEvaluationSlice value) { + if (modelEvaluationSlicesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureModelEvaluationSlicesIsMutable(); + modelEvaluationSlices_.add(index, value); + onChanged(); + } else { + modelEvaluationSlicesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of ModelEvaluations in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.ModelEvaluationSlice model_evaluation_slices = 1; + * + */ + public Builder addModelEvaluationSlices( + com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Builder builderForValue) { + if (modelEvaluationSlicesBuilder_ == null) { + ensureModelEvaluationSlicesIsMutable(); + modelEvaluationSlices_.add(builderForValue.build()); + onChanged(); + } else { + modelEvaluationSlicesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of ModelEvaluations in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.ModelEvaluationSlice model_evaluation_slices = 1; + * + */ + public Builder addModelEvaluationSlices( + int index, com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Builder builderForValue) { + if (modelEvaluationSlicesBuilder_ == null) { + ensureModelEvaluationSlicesIsMutable(); + modelEvaluationSlices_.add(index, builderForValue.build()); + onChanged(); + } else { + modelEvaluationSlicesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of ModelEvaluations in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.ModelEvaluationSlice model_evaluation_slices = 1; + * + */ + public Builder addAllModelEvaluationSlices( + java.lang.Iterable values) { + if (modelEvaluationSlicesBuilder_ == null) { + ensureModelEvaluationSlicesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, modelEvaluationSlices_); + onChanged(); + } else { + modelEvaluationSlicesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of ModelEvaluations in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.ModelEvaluationSlice model_evaluation_slices = 1; + * + */ + public Builder clearModelEvaluationSlices() { + if (modelEvaluationSlicesBuilder_ == null) { + modelEvaluationSlices_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + modelEvaluationSlicesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of ModelEvaluations in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.ModelEvaluationSlice model_evaluation_slices = 1; + * + */ + public Builder removeModelEvaluationSlices(int index) { + if (modelEvaluationSlicesBuilder_ == null) { + ensureModelEvaluationSlicesIsMutable(); + modelEvaluationSlices_.remove(index); + onChanged(); + } else { + modelEvaluationSlicesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of ModelEvaluations in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.ModelEvaluationSlice model_evaluation_slices = 1; + * + */ + public com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Builder + getModelEvaluationSlicesBuilder(int index) { + return getModelEvaluationSlicesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of ModelEvaluations in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.ModelEvaluationSlice model_evaluation_slices = 1; + * + */ + public com.google.cloud.aiplatform.v1.ModelEvaluationSliceOrBuilder + getModelEvaluationSlicesOrBuilder(int index) { + if (modelEvaluationSlicesBuilder_ == null) { + return modelEvaluationSlices_.get(index); + } else { + return modelEvaluationSlicesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of ModelEvaluations in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.ModelEvaluationSlice model_evaluation_slices = 1; + * + */ + public java.util.List + getModelEvaluationSlicesOrBuilderList() { + if (modelEvaluationSlicesBuilder_ != null) { + return modelEvaluationSlicesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(modelEvaluationSlices_); + } + } + /** + * + * + *
+     * List of ModelEvaluations in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.ModelEvaluationSlice model_evaluation_slices = 1; + * + */ + public com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Builder + addModelEvaluationSlicesBuilder() { + return getModelEvaluationSlicesFieldBuilder() + .addBuilder(com.google.cloud.aiplatform.v1.ModelEvaluationSlice.getDefaultInstance()); + } + /** + * + * + *
+     * List of ModelEvaluations in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.ModelEvaluationSlice model_evaluation_slices = 1; + * + */ + public com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Builder + addModelEvaluationSlicesBuilder(int index) { + return getModelEvaluationSlicesFieldBuilder() + .addBuilder( + index, com.google.cloud.aiplatform.v1.ModelEvaluationSlice.getDefaultInstance()); + } + /** + * + * + *
+     * List of ModelEvaluations in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.ModelEvaluationSlice model_evaluation_slices = 1; + * + */ + public java.util.List + getModelEvaluationSlicesBuilderList() { + return getModelEvaluationSlicesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.ModelEvaluationSlice, + com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Builder, + com.google.cloud.aiplatform.v1.ModelEvaluationSliceOrBuilder> + getModelEvaluationSlicesFieldBuilder() { + if (modelEvaluationSlicesBuilder_ == null) { + modelEvaluationSlicesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.ModelEvaluationSlice, + com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Builder, + com.google.cloud.aiplatform.v1.ModelEvaluationSliceOrBuilder>( + modelEvaluationSlices_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + modelEvaluationSlices_ = null; + } + return modelEvaluationSlicesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token to retrieve next page of results.
+     * Pass to [ListModelEvaluationSlicesRequest.page_token][google.cloud.aiplatform.v1.ListModelEvaluationSlicesRequest.page_token] to obtain that
+     * page.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token to retrieve next page of results.
+     * Pass to [ListModelEvaluationSlicesRequest.page_token][google.cloud.aiplatform.v1.ListModelEvaluationSlicesRequest.page_token] to obtain that
+     * page.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token to retrieve next page of results.
+     * Pass to [ListModelEvaluationSlicesRequest.page_token][google.cloud.aiplatform.v1.ListModelEvaluationSlicesRequest.page_token] to obtain that
+     * page.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve next page of results.
+     * Pass to [ListModelEvaluationSlicesRequest.page_token][google.cloud.aiplatform.v1.ListModelEvaluationSlicesRequest.page_token] to obtain that
+     * page.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve next page of results.
+     * Pass to [ListModelEvaluationSlicesRequest.page_token][google.cloud.aiplatform.v1.ListModelEvaluationSlicesRequest.page_token] to obtain that
+     * page.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponse) + private static final com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponse(); + } + + public static com.google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListModelEvaluationSlicesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListModelEvaluationSlicesResponse(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.v1.ListModelEvaluationSlicesResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListModelEvaluationSlicesResponseOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListModelEvaluationSlicesResponseOrBuilder.java new file mode 100644 index 000000000..fc6b60d56 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListModelEvaluationSlicesResponseOrBuilder.java @@ -0,0 +1,113 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/model_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface ListModelEvaluationSlicesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * List of ModelEvaluations in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.ModelEvaluationSlice model_evaluation_slices = 1; + * + */ + java.util.List + getModelEvaluationSlicesList(); + /** + * + * + *
+   * List of ModelEvaluations in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.ModelEvaluationSlice model_evaluation_slices = 1; + * + */ + com.google.cloud.aiplatform.v1.ModelEvaluationSlice getModelEvaluationSlices(int index); + /** + * + * + *
+   * List of ModelEvaluations in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.ModelEvaluationSlice model_evaluation_slices = 1; + * + */ + int getModelEvaluationSlicesCount(); + /** + * + * + *
+   * List of ModelEvaluations in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.ModelEvaluationSlice model_evaluation_slices = 1; + * + */ + java.util.List + getModelEvaluationSlicesOrBuilderList(); + /** + * + * + *
+   * List of ModelEvaluations in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.ModelEvaluationSlice model_evaluation_slices = 1; + * + */ + com.google.cloud.aiplatform.v1.ModelEvaluationSliceOrBuilder getModelEvaluationSlicesOrBuilder( + int index); + + /** + * + * + *
+   * A token to retrieve next page of results.
+   * Pass to [ListModelEvaluationSlicesRequest.page_token][google.cloud.aiplatform.v1.ListModelEvaluationSlicesRequest.page_token] to obtain that
+   * page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token to retrieve next page of results.
+   * Pass to [ListModelEvaluationSlicesRequest.page_token][google.cloud.aiplatform.v1.ListModelEvaluationSlicesRequest.page_token] to obtain that
+   * page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListModelEvaluationsRequest.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListModelEvaluationsRequest.java new file mode 100644 index 000000000..ece3fa5f8 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListModelEvaluationsRequest.java @@ -0,0 +1,1395 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/model_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for [ModelService.ListModelEvaluations][google.cloud.aiplatform.v1.ModelService.ListModelEvaluations].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListModelEvaluationsRequest} + */ +public final class ListModelEvaluationsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ListModelEvaluationsRequest) + ListModelEvaluationsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListModelEvaluationsRequest.newBuilder() to construct. + private ListModelEvaluationsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListModelEvaluationsRequest() { + parent_ = ""; + filter_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListModelEvaluationsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListModelEvaluationsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + filter_ = s; + break; + } + case 24: + { + pageSize_ = input.readInt32(); + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 42: + { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (readMask_ != null) { + subBuilder = readMask_.toBuilder(); + } + readMask_ = + input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(readMask_); + readMask_ = 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.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_ListModelEvaluationsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_ListModelEvaluationsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListModelEvaluationsRequest.class, + com.google.cloud.aiplatform.v1.ListModelEvaluationsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The resource name of the Model to list the ModelEvaluations from.
+   * Format: `projects/{project}/locations/{location}/models/{model}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the Model to list the ModelEvaluations from.
+   * Format: `projects/{project}/locations/{location}/models/{model}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 2; + private volatile java.lang.Object filter_; + /** + * + * + *
+   * The standard list filter.
+   * 
+ * + * string filter = 2; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * The standard list filter.
+   * 
+ * + * string filter = 2; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 3; + private int pageSize_; + /** + * + * + *
+   * The standard list page size.
+   * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 4; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * The standard list page token.
+   * Typically obtained via
+   * [ListModelEvaluationsResponse.next_page_token][google.cloud.aiplatform.v1.ListModelEvaluationsResponse.next_page_token] of the previous
+   * [ModelService.ListModelEvaluations][google.cloud.aiplatform.v1.ModelService.ListModelEvaluations] call.
+   * 
+ * + * string page_token = 4; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The standard list page token.
+   * Typically obtained via
+   * [ListModelEvaluationsResponse.next_page_token][google.cloud.aiplatform.v1.ListModelEvaluationsResponse.next_page_token] of the previous
+   * [ModelService.ListModelEvaluations][google.cloud.aiplatform.v1.ModelService.ListModelEvaluations] call.
+   * 
+ * + * string page_token = 4; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int READ_MASK_FIELD_NUMBER = 5; + private com.google.protobuf.FieldMask readMask_; + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return Whether the readMask field is set. + */ + @java.lang.Override + public boolean hasReadMask() { + return readMask_ != null; + } + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return The readMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getReadMask() { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder() { + return getReadMask(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!getFilterBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); + } + if (pageSize_ != 0) { + output.writeInt32(3, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); + } + if (readMask_ != null) { + output.writeMessage(5, getReadMask()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!getFilterBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_); + } + if (readMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getReadMask()); + } + 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.v1.ListModelEvaluationsRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ListModelEvaluationsRequest other = + (com.google.cloud.aiplatform.v1.ListModelEvaluationsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (hasReadMask() != other.hasReadMask()) return false; + if (hasReadMask()) { + if (!getReadMask().equals(other.getReadMask())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + if (hasReadMask()) { + hash = (37 * hash) + READ_MASK_FIELD_NUMBER; + hash = (53 * hash) + getReadMask().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.ListModelEvaluationsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListModelEvaluationsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListModelEvaluationsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListModelEvaluationsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListModelEvaluationsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListModelEvaluationsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListModelEvaluationsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListModelEvaluationsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListModelEvaluationsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListModelEvaluationsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListModelEvaluationsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListModelEvaluationsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.ListModelEvaluationsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [ModelService.ListModelEvaluations][google.cloud.aiplatform.v1.ModelService.ListModelEvaluations].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListModelEvaluationsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ListModelEvaluationsRequest) + com.google.cloud.aiplatform.v1.ListModelEvaluationsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_ListModelEvaluationsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_ListModelEvaluationsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListModelEvaluationsRequest.class, + com.google.cloud.aiplatform.v1.ListModelEvaluationsRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ListModelEvaluationsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + filter_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + if (readMaskBuilder_ == null) { + readMask_ = null; + } else { + readMask_ = null; + readMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_ListModelEvaluationsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListModelEvaluationsRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ListModelEvaluationsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListModelEvaluationsRequest build() { + com.google.cloud.aiplatform.v1.ListModelEvaluationsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListModelEvaluationsRequest buildPartial() { + com.google.cloud.aiplatform.v1.ListModelEvaluationsRequest result = + new com.google.cloud.aiplatform.v1.ListModelEvaluationsRequest(this); + result.parent_ = parent_; + result.filter_ = filter_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + if (readMaskBuilder_ == null) { + result.readMask_ = readMask_; + } else { + result.readMask_ = readMaskBuilder_.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.v1.ListModelEvaluationsRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.ListModelEvaluationsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.ListModelEvaluationsRequest other) { + if (other == com.google.cloud.aiplatform.v1.ListModelEvaluationsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + if (other.hasReadMask()) { + mergeReadMask(other.getReadMask()); + } + 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.v1.ListModelEvaluationsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.ListModelEvaluationsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the Model to list the ModelEvaluations from.
+     * Format: `projects/{project}/locations/{location}/models/{model}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Model to list the ModelEvaluations from.
+     * Format: `projects/{project}/locations/{location}/models/{model}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Model to list the ModelEvaluations from.
+     * Format: `projects/{project}/locations/{location}/models/{model}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Model to list the ModelEvaluations from.
+     * Format: `projects/{project}/locations/{location}/models/{model}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Model to list the ModelEvaluations from.
+     * Format: `projects/{project}/locations/{location}/models/{model}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * The standard list filter.
+     * 
+ * + * string filter = 2; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The standard list filter.
+     * 
+ * + * string filter = 2; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The standard list filter.
+     * 
+ * + * string filter = 2; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list filter.
+     * 
+ * + * string filter = 2; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list filter.
+     * 
+ * + * string filter = 2; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The standard list page size.
+     * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The standard list page size.
+     * 
+ * + * int32 page_size = 3; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list page size.
+     * 
+ * + * int32 page_size = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * The standard list page token.
+     * Typically obtained via
+     * [ListModelEvaluationsResponse.next_page_token][google.cloud.aiplatform.v1.ListModelEvaluationsResponse.next_page_token] of the previous
+     * [ModelService.ListModelEvaluations][google.cloud.aiplatform.v1.ModelService.ListModelEvaluations] call.
+     * 
+ * + * string page_token = 4; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The standard list page token.
+     * Typically obtained via
+     * [ListModelEvaluationsResponse.next_page_token][google.cloud.aiplatform.v1.ListModelEvaluationsResponse.next_page_token] of the previous
+     * [ModelService.ListModelEvaluations][google.cloud.aiplatform.v1.ModelService.ListModelEvaluations] call.
+     * 
+ * + * string page_token = 4; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The standard list page token.
+     * Typically obtained via
+     * [ListModelEvaluationsResponse.next_page_token][google.cloud.aiplatform.v1.ListModelEvaluationsResponse.next_page_token] of the previous
+     * [ModelService.ListModelEvaluations][google.cloud.aiplatform.v1.ModelService.ListModelEvaluations] call.
+     * 
+ * + * string page_token = 4; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list page token.
+     * Typically obtained via
+     * [ListModelEvaluationsResponse.next_page_token][google.cloud.aiplatform.v1.ListModelEvaluationsResponse.next_page_token] of the previous
+     * [ModelService.ListModelEvaluations][google.cloud.aiplatform.v1.ModelService.ListModelEvaluations] call.
+     * 
+ * + * string page_token = 4; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list page token.
+     * Typically obtained via
+     * [ListModelEvaluationsResponse.next_page_token][google.cloud.aiplatform.v1.ListModelEvaluationsResponse.next_page_token] of the previous
+     * [ModelService.ListModelEvaluations][google.cloud.aiplatform.v1.ModelService.ListModelEvaluations] call.
+     * 
+ * + * string page_token = 4; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.FieldMask readMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + readMaskBuilder_; + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return Whether the readMask field is set. + */ + public boolean hasReadMask() { + return readMaskBuilder_ != null || readMask_ != null; + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return The readMask. + */ + public com.google.protobuf.FieldMask getReadMask() { + if (readMaskBuilder_ == null) { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } else { + return readMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + public Builder setReadMask(com.google.protobuf.FieldMask value) { + if (readMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + readMask_ = value; + onChanged(); + } else { + readMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + public Builder setReadMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (readMaskBuilder_ == null) { + readMask_ = builderForValue.build(); + onChanged(); + } else { + readMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + public Builder mergeReadMask(com.google.protobuf.FieldMask value) { + if (readMaskBuilder_ == null) { + if (readMask_ != null) { + readMask_ = + com.google.protobuf.FieldMask.newBuilder(readMask_).mergeFrom(value).buildPartial(); + } else { + readMask_ = value; + } + onChanged(); + } else { + readMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + public Builder clearReadMask() { + if (readMaskBuilder_ == null) { + readMask_ = null; + onChanged(); + } else { + readMask_ = null; + readMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + public com.google.protobuf.FieldMask.Builder getReadMaskBuilder() { + + onChanged(); + return getReadMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + public com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder() { + if (readMaskBuilder_ != null) { + return readMaskBuilder_.getMessageOrBuilder(); + } else { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getReadMaskFieldBuilder() { + if (readMaskBuilder_ == null) { + readMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getReadMask(), getParentForChildren(), isClean()); + readMask_ = null; + } + return readMaskBuilder_; + } + + @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.v1.ListModelEvaluationsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ListModelEvaluationsRequest) + private static final com.google.cloud.aiplatform.v1.ListModelEvaluationsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ListModelEvaluationsRequest(); + } + + public static com.google.cloud.aiplatform.v1.ListModelEvaluationsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListModelEvaluationsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListModelEvaluationsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListModelEvaluationsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListModelEvaluationsRequestOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListModelEvaluationsRequestOrBuilder.java new file mode 100644 index 000000000..6500efd36 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListModelEvaluationsRequestOrBuilder.java @@ -0,0 +1,160 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/model_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface ListModelEvaluationsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ListModelEvaluationsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the Model to list the ModelEvaluations from.
+   * Format: `projects/{project}/locations/{location}/models/{model}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of the Model to list the ModelEvaluations from.
+   * Format: `projects/{project}/locations/{location}/models/{model}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The standard list filter.
+   * 
+ * + * string filter = 2; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * The standard list filter.
+   * 
+ * + * string filter = 2; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * The standard list page size.
+   * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * The standard list page token.
+   * Typically obtained via
+   * [ListModelEvaluationsResponse.next_page_token][google.cloud.aiplatform.v1.ListModelEvaluationsResponse.next_page_token] of the previous
+   * [ModelService.ListModelEvaluations][google.cloud.aiplatform.v1.ModelService.ListModelEvaluations] call.
+   * 
+ * + * string page_token = 4; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * The standard list page token.
+   * Typically obtained via
+   * [ListModelEvaluationsResponse.next_page_token][google.cloud.aiplatform.v1.ListModelEvaluationsResponse.next_page_token] of the previous
+   * [ModelService.ListModelEvaluations][google.cloud.aiplatform.v1.ModelService.ListModelEvaluations] call.
+   * 
+ * + * string page_token = 4; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return Whether the readMask field is set. + */ + boolean hasReadMask(); + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return The readMask. + */ + com.google.protobuf.FieldMask getReadMask(); + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListModelEvaluationsResponse.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListModelEvaluationsResponse.java new file mode 100644 index 000000000..5de34eb6d --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListModelEvaluationsResponse.java @@ -0,0 +1,1150 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/model_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Response message for [ModelService.ListModelEvaluations][google.cloud.aiplatform.v1.ModelService.ListModelEvaluations].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListModelEvaluationsResponse} + */ +public final class ListModelEvaluationsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ListModelEvaluationsResponse) + ListModelEvaluationsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListModelEvaluationsResponse.newBuilder() to construct. + private ListModelEvaluationsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListModelEvaluationsResponse() { + modelEvaluations_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListModelEvaluationsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListModelEvaluationsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + modelEvaluations_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + modelEvaluations_.add( + input.readMessage( + com.google.cloud.aiplatform.v1.ModelEvaluation.parser(), extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + modelEvaluations_ = java.util.Collections.unmodifiableList(modelEvaluations_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_ListModelEvaluationsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_ListModelEvaluationsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListModelEvaluationsResponse.class, + com.google.cloud.aiplatform.v1.ListModelEvaluationsResponse.Builder.class); + } + + public static final int MODEL_EVALUATIONS_FIELD_NUMBER = 1; + private java.util.List modelEvaluations_; + /** + * + * + *
+   * List of ModelEvaluations in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.ModelEvaluation model_evaluations = 1; + */ + @java.lang.Override + public java.util.List getModelEvaluationsList() { + return modelEvaluations_; + } + /** + * + * + *
+   * List of ModelEvaluations in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.ModelEvaluation model_evaluations = 1; + */ + @java.lang.Override + public java.util.List + getModelEvaluationsOrBuilderList() { + return modelEvaluations_; + } + /** + * + * + *
+   * List of ModelEvaluations in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.ModelEvaluation model_evaluations = 1; + */ + @java.lang.Override + public int getModelEvaluationsCount() { + return modelEvaluations_.size(); + } + /** + * + * + *
+   * List of ModelEvaluations in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.ModelEvaluation model_evaluations = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ModelEvaluation getModelEvaluations(int index) { + return modelEvaluations_.get(index); + } + /** + * + * + *
+   * List of ModelEvaluations in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.ModelEvaluation model_evaluations = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ModelEvaluationOrBuilder getModelEvaluationsOrBuilder( + int index) { + return modelEvaluations_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * A token to retrieve next page of results.
+   * Pass to [ListModelEvaluationsRequest.page_token][google.cloud.aiplatform.v1.ListModelEvaluationsRequest.page_token] to obtain that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token to retrieve next page of results.
+   * Pass to [ListModelEvaluationsRequest.page_token][google.cloud.aiplatform.v1.ListModelEvaluationsRequest.page_token] to obtain that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < modelEvaluations_.size(); i++) { + output.writeMessage(1, modelEvaluations_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < modelEvaluations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, modelEvaluations_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.ListModelEvaluationsResponse)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ListModelEvaluationsResponse other = + (com.google.cloud.aiplatform.v1.ListModelEvaluationsResponse) obj; + + if (!getModelEvaluationsList().equals(other.getModelEvaluationsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getModelEvaluationsCount() > 0) { + hash = (37 * hash) + MODEL_EVALUATIONS_FIELD_NUMBER; + hash = (53 * hash) + getModelEvaluationsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.ListModelEvaluationsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListModelEvaluationsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListModelEvaluationsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListModelEvaluationsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListModelEvaluationsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListModelEvaluationsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListModelEvaluationsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListModelEvaluationsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListModelEvaluationsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListModelEvaluationsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListModelEvaluationsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListModelEvaluationsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1.ListModelEvaluationsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for [ModelService.ListModelEvaluations][google.cloud.aiplatform.v1.ModelService.ListModelEvaluations].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListModelEvaluationsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ListModelEvaluationsResponse) + com.google.cloud.aiplatform.v1.ListModelEvaluationsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_ListModelEvaluationsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_ListModelEvaluationsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListModelEvaluationsResponse.class, + com.google.cloud.aiplatform.v1.ListModelEvaluationsResponse.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ListModelEvaluationsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getModelEvaluationsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (modelEvaluationsBuilder_ == null) { + modelEvaluations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + modelEvaluationsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_ListModelEvaluationsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListModelEvaluationsResponse getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ListModelEvaluationsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListModelEvaluationsResponse build() { + com.google.cloud.aiplatform.v1.ListModelEvaluationsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListModelEvaluationsResponse buildPartial() { + com.google.cloud.aiplatform.v1.ListModelEvaluationsResponse result = + new com.google.cloud.aiplatform.v1.ListModelEvaluationsResponse(this); + int from_bitField0_ = bitField0_; + if (modelEvaluationsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + modelEvaluations_ = java.util.Collections.unmodifiableList(modelEvaluations_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.modelEvaluations_ = modelEvaluations_; + } else { + result.modelEvaluations_ = modelEvaluationsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + 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.v1.ListModelEvaluationsResponse) { + return mergeFrom((com.google.cloud.aiplatform.v1.ListModelEvaluationsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.ListModelEvaluationsResponse other) { + if (other == com.google.cloud.aiplatform.v1.ListModelEvaluationsResponse.getDefaultInstance()) + return this; + if (modelEvaluationsBuilder_ == null) { + if (!other.modelEvaluations_.isEmpty()) { + if (modelEvaluations_.isEmpty()) { + modelEvaluations_ = other.modelEvaluations_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureModelEvaluationsIsMutable(); + modelEvaluations_.addAll(other.modelEvaluations_); + } + onChanged(); + } + } else { + if (!other.modelEvaluations_.isEmpty()) { + if (modelEvaluationsBuilder_.isEmpty()) { + modelEvaluationsBuilder_.dispose(); + modelEvaluationsBuilder_ = null; + modelEvaluations_ = other.modelEvaluations_; + bitField0_ = (bitField0_ & ~0x00000001); + modelEvaluationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getModelEvaluationsFieldBuilder() + : null; + } else { + modelEvaluationsBuilder_.addAllMessages(other.modelEvaluations_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.aiplatform.v1.ListModelEvaluationsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.ListModelEvaluationsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List modelEvaluations_ = + java.util.Collections.emptyList(); + + private void ensureModelEvaluationsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + modelEvaluations_ = + new java.util.ArrayList( + modelEvaluations_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.ModelEvaluation, + com.google.cloud.aiplatform.v1.ModelEvaluation.Builder, + com.google.cloud.aiplatform.v1.ModelEvaluationOrBuilder> + modelEvaluationsBuilder_; + + /** + * + * + *
+     * List of ModelEvaluations in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.ModelEvaluation model_evaluations = 1; + */ + public java.util.List + getModelEvaluationsList() { + if (modelEvaluationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(modelEvaluations_); + } else { + return modelEvaluationsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of ModelEvaluations in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.ModelEvaluation model_evaluations = 1; + */ + public int getModelEvaluationsCount() { + if (modelEvaluationsBuilder_ == null) { + return modelEvaluations_.size(); + } else { + return modelEvaluationsBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of ModelEvaluations in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.ModelEvaluation model_evaluations = 1; + */ + public com.google.cloud.aiplatform.v1.ModelEvaluation getModelEvaluations(int index) { + if (modelEvaluationsBuilder_ == null) { + return modelEvaluations_.get(index); + } else { + return modelEvaluationsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of ModelEvaluations in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.ModelEvaluation model_evaluations = 1; + */ + public Builder setModelEvaluations( + int index, com.google.cloud.aiplatform.v1.ModelEvaluation value) { + if (modelEvaluationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureModelEvaluationsIsMutable(); + modelEvaluations_.set(index, value); + onChanged(); + } else { + modelEvaluationsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of ModelEvaluations in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.ModelEvaluation model_evaluations = 1; + */ + public Builder setModelEvaluations( + int index, com.google.cloud.aiplatform.v1.ModelEvaluation.Builder builderForValue) { + if (modelEvaluationsBuilder_ == null) { + ensureModelEvaluationsIsMutable(); + modelEvaluations_.set(index, builderForValue.build()); + onChanged(); + } else { + modelEvaluationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of ModelEvaluations in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.ModelEvaluation model_evaluations = 1; + */ + public Builder addModelEvaluations(com.google.cloud.aiplatform.v1.ModelEvaluation value) { + if (modelEvaluationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureModelEvaluationsIsMutable(); + modelEvaluations_.add(value); + onChanged(); + } else { + modelEvaluationsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of ModelEvaluations in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.ModelEvaluation model_evaluations = 1; + */ + public Builder addModelEvaluations( + int index, com.google.cloud.aiplatform.v1.ModelEvaluation value) { + if (modelEvaluationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureModelEvaluationsIsMutable(); + modelEvaluations_.add(index, value); + onChanged(); + } else { + modelEvaluationsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of ModelEvaluations in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.ModelEvaluation model_evaluations = 1; + */ + public Builder addModelEvaluations( + com.google.cloud.aiplatform.v1.ModelEvaluation.Builder builderForValue) { + if (modelEvaluationsBuilder_ == null) { + ensureModelEvaluationsIsMutable(); + modelEvaluations_.add(builderForValue.build()); + onChanged(); + } else { + modelEvaluationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of ModelEvaluations in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.ModelEvaluation model_evaluations = 1; + */ + public Builder addModelEvaluations( + int index, com.google.cloud.aiplatform.v1.ModelEvaluation.Builder builderForValue) { + if (modelEvaluationsBuilder_ == null) { + ensureModelEvaluationsIsMutable(); + modelEvaluations_.add(index, builderForValue.build()); + onChanged(); + } else { + modelEvaluationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of ModelEvaluations in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.ModelEvaluation model_evaluations = 1; + */ + public Builder addAllModelEvaluations( + java.lang.Iterable values) { + if (modelEvaluationsBuilder_ == null) { + ensureModelEvaluationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, modelEvaluations_); + onChanged(); + } else { + modelEvaluationsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of ModelEvaluations in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.ModelEvaluation model_evaluations = 1; + */ + public Builder clearModelEvaluations() { + if (modelEvaluationsBuilder_ == null) { + modelEvaluations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + modelEvaluationsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of ModelEvaluations in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.ModelEvaluation model_evaluations = 1; + */ + public Builder removeModelEvaluations(int index) { + if (modelEvaluationsBuilder_ == null) { + ensureModelEvaluationsIsMutable(); + modelEvaluations_.remove(index); + onChanged(); + } else { + modelEvaluationsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of ModelEvaluations in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.ModelEvaluation model_evaluations = 1; + */ + public com.google.cloud.aiplatform.v1.ModelEvaluation.Builder getModelEvaluationsBuilder( + int index) { + return getModelEvaluationsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of ModelEvaluations in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.ModelEvaluation model_evaluations = 1; + */ + public com.google.cloud.aiplatform.v1.ModelEvaluationOrBuilder getModelEvaluationsOrBuilder( + int index) { + if (modelEvaluationsBuilder_ == null) { + return modelEvaluations_.get(index); + } else { + return modelEvaluationsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of ModelEvaluations in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.ModelEvaluation model_evaluations = 1; + */ + public java.util.List + getModelEvaluationsOrBuilderList() { + if (modelEvaluationsBuilder_ != null) { + return modelEvaluationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(modelEvaluations_); + } + } + /** + * + * + *
+     * List of ModelEvaluations in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.ModelEvaluation model_evaluations = 1; + */ + public com.google.cloud.aiplatform.v1.ModelEvaluation.Builder addModelEvaluationsBuilder() { + return getModelEvaluationsFieldBuilder() + .addBuilder(com.google.cloud.aiplatform.v1.ModelEvaluation.getDefaultInstance()); + } + /** + * + * + *
+     * List of ModelEvaluations in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.ModelEvaluation model_evaluations = 1; + */ + public com.google.cloud.aiplatform.v1.ModelEvaluation.Builder addModelEvaluationsBuilder( + int index) { + return getModelEvaluationsFieldBuilder() + .addBuilder(index, com.google.cloud.aiplatform.v1.ModelEvaluation.getDefaultInstance()); + } + /** + * + * + *
+     * List of ModelEvaluations in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.ModelEvaluation model_evaluations = 1; + */ + public java.util.List + getModelEvaluationsBuilderList() { + return getModelEvaluationsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.ModelEvaluation, + com.google.cloud.aiplatform.v1.ModelEvaluation.Builder, + com.google.cloud.aiplatform.v1.ModelEvaluationOrBuilder> + getModelEvaluationsFieldBuilder() { + if (modelEvaluationsBuilder_ == null) { + modelEvaluationsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.ModelEvaluation, + com.google.cloud.aiplatform.v1.ModelEvaluation.Builder, + com.google.cloud.aiplatform.v1.ModelEvaluationOrBuilder>( + modelEvaluations_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + modelEvaluations_ = null; + } + return modelEvaluationsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token to retrieve next page of results.
+     * Pass to [ListModelEvaluationsRequest.page_token][google.cloud.aiplatform.v1.ListModelEvaluationsRequest.page_token] to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token to retrieve next page of results.
+     * Pass to [ListModelEvaluationsRequest.page_token][google.cloud.aiplatform.v1.ListModelEvaluationsRequest.page_token] to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token to retrieve next page of results.
+     * Pass to [ListModelEvaluationsRequest.page_token][google.cloud.aiplatform.v1.ListModelEvaluationsRequest.page_token] to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve next page of results.
+     * Pass to [ListModelEvaluationsRequest.page_token][google.cloud.aiplatform.v1.ListModelEvaluationsRequest.page_token] to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve next page of results.
+     * Pass to [ListModelEvaluationsRequest.page_token][google.cloud.aiplatform.v1.ListModelEvaluationsRequest.page_token] to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.ListModelEvaluationsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ListModelEvaluationsResponse) + private static final com.google.cloud.aiplatform.v1.ListModelEvaluationsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ListModelEvaluationsResponse(); + } + + public static com.google.cloud.aiplatform.v1.ListModelEvaluationsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListModelEvaluationsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListModelEvaluationsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListModelEvaluationsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListModelEvaluationsResponseOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListModelEvaluationsResponseOrBuilder.java new file mode 100644 index 000000000..6f653c964 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListModelEvaluationsResponseOrBuilder.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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/model_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface ListModelEvaluationsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ListModelEvaluationsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * List of ModelEvaluations in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.ModelEvaluation model_evaluations = 1; + */ + java.util.List getModelEvaluationsList(); + /** + * + * + *
+   * List of ModelEvaluations in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.ModelEvaluation model_evaluations = 1; + */ + com.google.cloud.aiplatform.v1.ModelEvaluation getModelEvaluations(int index); + /** + * + * + *
+   * List of ModelEvaluations in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.ModelEvaluation model_evaluations = 1; + */ + int getModelEvaluationsCount(); + /** + * + * + *
+   * List of ModelEvaluations in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.ModelEvaluation model_evaluations = 1; + */ + java.util.List + getModelEvaluationsOrBuilderList(); + /** + * + * + *
+   * List of ModelEvaluations in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.ModelEvaluation model_evaluations = 1; + */ + com.google.cloud.aiplatform.v1.ModelEvaluationOrBuilder getModelEvaluationsOrBuilder(int index); + + /** + * + * + *
+   * A token to retrieve next page of results.
+   * Pass to [ListModelEvaluationsRequest.page_token][google.cloud.aiplatform.v1.ListModelEvaluationsRequest.page_token] to obtain that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token to retrieve next page of results.
+   * Pass to [ListModelEvaluationsRequest.page_token][google.cloud.aiplatform.v1.ListModelEvaluationsRequest.page_token] to obtain that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListModelsRequest.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListModelsRequest.java new file mode 100644 index 000000000..b2023b8d3 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListModelsRequest.java @@ -0,0 +1,1698 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/model_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for [ModelService.ListModels][google.cloud.aiplatform.v1.ModelService.ListModels].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListModelsRequest} + */ +public final class ListModelsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ListModelsRequest) + ListModelsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListModelsRequest.newBuilder() to construct. + private ListModelsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListModelsRequest() { + parent_ = ""; + filter_ = ""; + pageToken_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListModelsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListModelsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + filter_ = s; + break; + } + case 24: + { + pageSize_ = input.readInt32(); + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 42: + { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (readMask_ != null) { + subBuilder = readMask_.toBuilder(); + } + readMask_ = + input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(readMask_); + readMask_ = subBuilder.buildPartial(); + } + + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + orderBy_ = 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.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_ListModelsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_ListModelsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListModelsRequest.class, + com.google.cloud.aiplatform.v1.ListModelsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The resource name of the Location to list the Models from.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the Location to list the Models from.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 2; + private volatile java.lang.Object filter_; + /** + * + * + *
+   * An expression for filtering the results of the request. For field names
+   * both snake_case and camelCase are supported.
+   *   * `model` supports = and !=. `model` represents the Model ID,
+   *     i.e. the last segment of the Model's [resource name][google.cloud.aiplatform.v1.Model.name].
+   *   * `display_name` supports = and !=
+   *   * `labels` supports general map functions that is:
+   *     * `labels.key=value` - key:value equality
+   *     * `labels.key:* or labels:key - key existence
+   *     * A key including a space must be quoted. `labels."a key"`.
+   * Some examples:
+   *   * `model=1234`
+   *   * `displayName="myDisplayName"`
+   *   * `labels.myKey="myValue"`
+   * 
+ * + * string filter = 2; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * An expression for filtering the results of the request. For field names
+   * both snake_case and camelCase are supported.
+   *   * `model` supports = and !=. `model` represents the Model ID,
+   *     i.e. the last segment of the Model's [resource name][google.cloud.aiplatform.v1.Model.name].
+   *   * `display_name` supports = and !=
+   *   * `labels` supports general map functions that is:
+   *     * `labels.key=value` - key:value equality
+   *     * `labels.key:* or labels:key - key existence
+   *     * A key including a space must be quoted. `labels."a key"`.
+   * Some examples:
+   *   * `model=1234`
+   *   * `displayName="myDisplayName"`
+   *   * `labels.myKey="myValue"`
+   * 
+ * + * string filter = 2; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 3; + private int pageSize_; + /** + * + * + *
+   * The standard list page size.
+   * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 4; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * The standard list page token.
+   * Typically obtained via
+   * [ListModelsResponse.next_page_token][google.cloud.aiplatform.v1.ListModelsResponse.next_page_token] of the previous
+   * [ModelService.ListModels][google.cloud.aiplatform.v1.ModelService.ListModels] call.
+   * 
+ * + * string page_token = 4; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The standard list page token.
+   * Typically obtained via
+   * [ListModelsResponse.next_page_token][google.cloud.aiplatform.v1.ListModelsResponse.next_page_token] of the previous
+   * [ModelService.ListModels][google.cloud.aiplatform.v1.ModelService.ListModels] call.
+   * 
+ * + * string page_token = 4; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int READ_MASK_FIELD_NUMBER = 5; + private com.google.protobuf.FieldMask readMask_; + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return Whether the readMask field is set. + */ + @java.lang.Override + public boolean hasReadMask() { + return readMask_ != null; + } + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return The readMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getReadMask() { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder() { + return getReadMask(); + } + + public static final int ORDER_BY_FIELD_NUMBER = 6; + private volatile java.lang.Object orderBy_; + /** + * + * + *
+   * A comma-separated list of fields to order by, sorted in ascending order.
+   * Use "desc" after a field name for descending.
+   * Supported fields:
+   *   * `display_name`
+   *   * `create_time`
+   *   * `update_time`
+   * Example: `display_name, create_time desc`.
+   * 
+ * + * string order_by = 6; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + 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(); + orderBy_ = s; + return s; + } + } + /** + * + * + *
+   * A comma-separated list of fields to order by, sorted in ascending order.
+   * Use "desc" after a field name for descending.
+   * Supported fields:
+   *   * `display_name`
+   *   * `create_time`
+   *   * `update_time`
+   * Example: `display_name, create_time desc`.
+   * 
+ * + * string order_by = 6; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!getFilterBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); + } + if (pageSize_ != 0) { + output.writeInt32(3, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); + } + if (readMask_ != null) { + output.writeMessage(5, getReadMask()); + } + if (!getOrderByBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, orderBy_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!getFilterBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_); + } + if (readMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getReadMask()); + } + if (!getOrderByBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, orderBy_); + } + 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.v1.ListModelsRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ListModelsRequest other = + (com.google.cloud.aiplatform.v1.ListModelsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (hasReadMask() != other.hasReadMask()) return false; + if (hasReadMask()) { + if (!getReadMask().equals(other.getReadMask())) return false; + } + if (!getOrderBy().equals(other.getOrderBy())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + if (hasReadMask()) { + hash = (37 * hash) + READ_MASK_FIELD_NUMBER; + hash = (53 * hash) + getReadMask().hashCode(); + } + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.ListModelsRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListModelsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListModelsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListModelsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListModelsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListModelsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListModelsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListModelsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListModelsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListModelsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListModelsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListModelsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1.ListModelsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [ModelService.ListModels][google.cloud.aiplatform.v1.ModelService.ListModels].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListModelsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ListModelsRequest) + com.google.cloud.aiplatform.v1.ListModelsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_ListModelsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_ListModelsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListModelsRequest.class, + com.google.cloud.aiplatform.v1.ListModelsRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ListModelsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + filter_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + if (readMaskBuilder_ == null) { + readMask_ = null; + } else { + readMask_ = null; + readMaskBuilder_ = null; + } + orderBy_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_ListModelsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListModelsRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ListModelsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListModelsRequest build() { + com.google.cloud.aiplatform.v1.ListModelsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListModelsRequest buildPartial() { + com.google.cloud.aiplatform.v1.ListModelsRequest result = + new com.google.cloud.aiplatform.v1.ListModelsRequest(this); + result.parent_ = parent_; + result.filter_ = filter_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + if (readMaskBuilder_ == null) { + result.readMask_ = readMask_; + } else { + result.readMask_ = readMaskBuilder_.build(); + } + result.orderBy_ = orderBy_; + 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.v1.ListModelsRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.ListModelsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.ListModelsRequest other) { + if (other == com.google.cloud.aiplatform.v1.ListModelsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + if (other.hasReadMask()) { + mergeReadMask(other.getReadMask()); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + 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.v1.ListModelsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.aiplatform.v1.ListModelsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the Location to list the Models from.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Location to list the Models from.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Location to list the Models from.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Location to list the Models from.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Location to list the Models from.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * An expression for filtering the results of the request. For field names
+     * both snake_case and camelCase are supported.
+     *   * `model` supports = and !=. `model` represents the Model ID,
+     *     i.e. the last segment of the Model's [resource name][google.cloud.aiplatform.v1.Model.name].
+     *   * `display_name` supports = and !=
+     *   * `labels` supports general map functions that is:
+     *     * `labels.key=value` - key:value equality
+     *     * `labels.key:* or labels:key - key existence
+     *     * A key including a space must be quoted. `labels."a key"`.
+     * Some examples:
+     *   * `model=1234`
+     *   * `displayName="myDisplayName"`
+     *   * `labels.myKey="myValue"`
+     * 
+ * + * string filter = 2; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * An expression for filtering the results of the request. For field names
+     * both snake_case and camelCase are supported.
+     *   * `model` supports = and !=. `model` represents the Model ID,
+     *     i.e. the last segment of the Model's [resource name][google.cloud.aiplatform.v1.Model.name].
+     *   * `display_name` supports = and !=
+     *   * `labels` supports general map functions that is:
+     *     * `labels.key=value` - key:value equality
+     *     * `labels.key:* or labels:key - key existence
+     *     * A key including a space must be quoted. `labels."a key"`.
+     * Some examples:
+     *   * `model=1234`
+     *   * `displayName="myDisplayName"`
+     *   * `labels.myKey="myValue"`
+     * 
+ * + * string filter = 2; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * An expression for filtering the results of the request. For field names
+     * both snake_case and camelCase are supported.
+     *   * `model` supports = and !=. `model` represents the Model ID,
+     *     i.e. the last segment of the Model's [resource name][google.cloud.aiplatform.v1.Model.name].
+     *   * `display_name` supports = and !=
+     *   * `labels` supports general map functions that is:
+     *     * `labels.key=value` - key:value equality
+     *     * `labels.key:* or labels:key - key existence
+     *     * A key including a space must be quoted. `labels."a key"`.
+     * Some examples:
+     *   * `model=1234`
+     *   * `displayName="myDisplayName"`
+     *   * `labels.myKey="myValue"`
+     * 
+ * + * string filter = 2; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * An expression for filtering the results of the request. For field names
+     * both snake_case and camelCase are supported.
+     *   * `model` supports = and !=. `model` represents the Model ID,
+     *     i.e. the last segment of the Model's [resource name][google.cloud.aiplatform.v1.Model.name].
+     *   * `display_name` supports = and !=
+     *   * `labels` supports general map functions that is:
+     *     * `labels.key=value` - key:value equality
+     *     * `labels.key:* or labels:key - key existence
+     *     * A key including a space must be quoted. `labels."a key"`.
+     * Some examples:
+     *   * `model=1234`
+     *   * `displayName="myDisplayName"`
+     *   * `labels.myKey="myValue"`
+     * 
+ * + * string filter = 2; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + * + * + *
+     * An expression for filtering the results of the request. For field names
+     * both snake_case and camelCase are supported.
+     *   * `model` supports = and !=. `model` represents the Model ID,
+     *     i.e. the last segment of the Model's [resource name][google.cloud.aiplatform.v1.Model.name].
+     *   * `display_name` supports = and !=
+     *   * `labels` supports general map functions that is:
+     *     * `labels.key=value` - key:value equality
+     *     * `labels.key:* or labels:key - key existence
+     *     * A key including a space must be quoted. `labels."a key"`.
+     * Some examples:
+     *   * `model=1234`
+     *   * `displayName="myDisplayName"`
+     *   * `labels.myKey="myValue"`
+     * 
+ * + * string filter = 2; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The standard list page size.
+     * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The standard list page size.
+     * 
+ * + * int32 page_size = 3; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list page size.
+     * 
+ * + * int32 page_size = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * The standard list page token.
+     * Typically obtained via
+     * [ListModelsResponse.next_page_token][google.cloud.aiplatform.v1.ListModelsResponse.next_page_token] of the previous
+     * [ModelService.ListModels][google.cloud.aiplatform.v1.ModelService.ListModels] call.
+     * 
+ * + * string page_token = 4; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The standard list page token.
+     * Typically obtained via
+     * [ListModelsResponse.next_page_token][google.cloud.aiplatform.v1.ListModelsResponse.next_page_token] of the previous
+     * [ModelService.ListModels][google.cloud.aiplatform.v1.ModelService.ListModels] call.
+     * 
+ * + * string page_token = 4; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The standard list page token.
+     * Typically obtained via
+     * [ListModelsResponse.next_page_token][google.cloud.aiplatform.v1.ListModelsResponse.next_page_token] of the previous
+     * [ModelService.ListModels][google.cloud.aiplatform.v1.ModelService.ListModels] call.
+     * 
+ * + * string page_token = 4; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list page token.
+     * Typically obtained via
+     * [ListModelsResponse.next_page_token][google.cloud.aiplatform.v1.ListModelsResponse.next_page_token] of the previous
+     * [ModelService.ListModels][google.cloud.aiplatform.v1.ModelService.ListModels] call.
+     * 
+ * + * string page_token = 4; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list page token.
+     * Typically obtained via
+     * [ListModelsResponse.next_page_token][google.cloud.aiplatform.v1.ListModelsResponse.next_page_token] of the previous
+     * [ModelService.ListModels][google.cloud.aiplatform.v1.ModelService.ListModels] call.
+     * 
+ * + * string page_token = 4; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.FieldMask readMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + readMaskBuilder_; + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return Whether the readMask field is set. + */ + public boolean hasReadMask() { + return readMaskBuilder_ != null || readMask_ != null; + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return The readMask. + */ + public com.google.protobuf.FieldMask getReadMask() { + if (readMaskBuilder_ == null) { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } else { + return readMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + public Builder setReadMask(com.google.protobuf.FieldMask value) { + if (readMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + readMask_ = value; + onChanged(); + } else { + readMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + public Builder setReadMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (readMaskBuilder_ == null) { + readMask_ = builderForValue.build(); + onChanged(); + } else { + readMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + public Builder mergeReadMask(com.google.protobuf.FieldMask value) { + if (readMaskBuilder_ == null) { + if (readMask_ != null) { + readMask_ = + com.google.protobuf.FieldMask.newBuilder(readMask_).mergeFrom(value).buildPartial(); + } else { + readMask_ = value; + } + onChanged(); + } else { + readMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + public Builder clearReadMask() { + if (readMaskBuilder_ == null) { + readMask_ = null; + onChanged(); + } else { + readMask_ = null; + readMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + public com.google.protobuf.FieldMask.Builder getReadMaskBuilder() { + + onChanged(); + return getReadMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + public com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder() { + if (readMaskBuilder_ != null) { + return readMaskBuilder_.getMessageOrBuilder(); + } else { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getReadMaskFieldBuilder() { + if (readMaskBuilder_ == null) { + readMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getReadMask(), getParentForChildren(), isClean()); + readMask_ = null; + } + return readMaskBuilder_; + } + + private java.lang.Object orderBy_ = ""; + /** + * + * + *
+     * A comma-separated list of fields to order by, sorted in ascending order.
+     * Use "desc" after a field name for descending.
+     * Supported fields:
+     *   * `display_name`
+     *   * `create_time`
+     *   * `update_time`
+     * Example: `display_name, create_time desc`.
+     * 
+ * + * string order_by = 6; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A comma-separated list of fields to order by, sorted in ascending order.
+     * Use "desc" after a field name for descending.
+     * Supported fields:
+     *   * `display_name`
+     *   * `create_time`
+     *   * `update_time`
+     * Example: `display_name, create_time desc`.
+     * 
+ * + * string order_by = 6; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A comma-separated list of fields to order by, sorted in ascending order.
+     * Use "desc" after a field name for descending.
+     * Supported fields:
+     *   * `display_name`
+     *   * `create_time`
+     *   * `update_time`
+     * Example: `display_name, create_time desc`.
+     * 
+ * + * string order_by = 6; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + orderBy_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A comma-separated list of fields to order by, sorted in ascending order.
+     * Use "desc" after a field name for descending.
+     * Supported fields:
+     *   * `display_name`
+     *   * `create_time`
+     *   * `update_time`
+     * Example: `display_name, create_time desc`.
+     * 
+ * + * string order_by = 6; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + + orderBy_ = getDefaultInstance().getOrderBy(); + onChanged(); + return this; + } + /** + * + * + *
+     * A comma-separated list of fields to order by, sorted in ascending order.
+     * Use "desc" after a field name for descending.
+     * Supported fields:
+     *   * `display_name`
+     *   * `create_time`
+     *   * `update_time`
+     * Example: `display_name, create_time desc`.
+     * 
+ * + * string order_by = 6; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + orderBy_ = 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.v1.ListModelsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ListModelsRequest) + private static final com.google.cloud.aiplatform.v1.ListModelsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ListModelsRequest(); + } + + public static com.google.cloud.aiplatform.v1.ListModelsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListModelsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListModelsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListModelsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListModelsRequestOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListModelsRequestOrBuilder.java new file mode 100644 index 000000000..203c89a88 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListModelsRequestOrBuilder.java @@ -0,0 +1,221 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/model_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface ListModelsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ListModelsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the Location to list the Models from.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of the Location to list the Models from.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * An expression for filtering the results of the request. For field names
+   * both snake_case and camelCase are supported.
+   *   * `model` supports = and !=. `model` represents the Model ID,
+   *     i.e. the last segment of the Model's [resource name][google.cloud.aiplatform.v1.Model.name].
+   *   * `display_name` supports = and !=
+   *   * `labels` supports general map functions that is:
+   *     * `labels.key=value` - key:value equality
+   *     * `labels.key:* or labels:key - key existence
+   *     * A key including a space must be quoted. `labels."a key"`.
+   * Some examples:
+   *   * `model=1234`
+   *   * `displayName="myDisplayName"`
+   *   * `labels.myKey="myValue"`
+   * 
+ * + * string filter = 2; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * An expression for filtering the results of the request. For field names
+   * both snake_case and camelCase are supported.
+   *   * `model` supports = and !=. `model` represents the Model ID,
+   *     i.e. the last segment of the Model's [resource name][google.cloud.aiplatform.v1.Model.name].
+   *   * `display_name` supports = and !=
+   *   * `labels` supports general map functions that is:
+   *     * `labels.key=value` - key:value equality
+   *     * `labels.key:* or labels:key - key existence
+   *     * A key including a space must be quoted. `labels."a key"`.
+   * Some examples:
+   *   * `model=1234`
+   *   * `displayName="myDisplayName"`
+   *   * `labels.myKey="myValue"`
+   * 
+ * + * string filter = 2; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * The standard list page size.
+   * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * The standard list page token.
+   * Typically obtained via
+   * [ListModelsResponse.next_page_token][google.cloud.aiplatform.v1.ListModelsResponse.next_page_token] of the previous
+   * [ModelService.ListModels][google.cloud.aiplatform.v1.ModelService.ListModels] call.
+   * 
+ * + * string page_token = 4; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * The standard list page token.
+   * Typically obtained via
+   * [ListModelsResponse.next_page_token][google.cloud.aiplatform.v1.ListModelsResponse.next_page_token] of the previous
+   * [ModelService.ListModels][google.cloud.aiplatform.v1.ModelService.ListModels] call.
+   * 
+ * + * string page_token = 4; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return Whether the readMask field is set. + */ + boolean hasReadMask(); + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return The readMask. + */ + com.google.protobuf.FieldMask getReadMask(); + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder(); + + /** + * + * + *
+   * A comma-separated list of fields to order by, sorted in ascending order.
+   * Use "desc" after a field name for descending.
+   * Supported fields:
+   *   * `display_name`
+   *   * `create_time`
+   *   * `update_time`
+   * Example: `display_name, create_time desc`.
+   * 
+ * + * string order_by = 6; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * A comma-separated list of fields to order by, sorted in ascending order.
+   * Use "desc" after a field name for descending.
+   * Supported fields:
+   *   * `display_name`
+   *   * `create_time`
+   *   * `update_time`
+   * Example: `display_name, create_time desc`.
+   * 
+ * + * string order_by = 6; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListModelsResponse.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListModelsResponse.java new file mode 100644 index 000000000..fe1b6b355 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListModelsResponse.java @@ -0,0 +1,1134 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/model_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Response message for [ModelService.ListModels][google.cloud.aiplatform.v1.ModelService.ListModels]
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListModelsResponse} + */ +public final class ListModelsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ListModelsResponse) + ListModelsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListModelsResponse.newBuilder() to construct. + private ListModelsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListModelsResponse() { + models_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListModelsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListModelsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + models_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + models_.add( + input.readMessage( + com.google.cloud.aiplatform.v1.Model.parser(), extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + models_ = java.util.Collections.unmodifiableList(models_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_ListModelsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_ListModelsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListModelsResponse.class, + com.google.cloud.aiplatform.v1.ListModelsResponse.Builder.class); + } + + public static final int MODELS_FIELD_NUMBER = 1; + private java.util.List models_; + /** + * + * + *
+   * List of Models in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.Model models = 1; + */ + @java.lang.Override + public java.util.List getModelsList() { + return models_; + } + /** + * + * + *
+   * List of Models in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.Model models = 1; + */ + @java.lang.Override + public java.util.List + getModelsOrBuilderList() { + return models_; + } + /** + * + * + *
+   * List of Models in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.Model models = 1; + */ + @java.lang.Override + public int getModelsCount() { + return models_.size(); + } + /** + * + * + *
+   * List of Models in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.Model models = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.Model getModels(int index) { + return models_.get(index); + } + /** + * + * + *
+   * List of Models in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.Model models = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ModelOrBuilder getModelsOrBuilder(int index) { + return models_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * A token to retrieve next page of results.
+   * Pass to [ListModelsRequest.page_token][google.cloud.aiplatform.v1.ListModelsRequest.page_token] to obtain that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token to retrieve next page of results.
+   * Pass to [ListModelsRequest.page_token][google.cloud.aiplatform.v1.ListModelsRequest.page_token] to obtain that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < models_.size(); i++) { + output.writeMessage(1, models_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < models_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, models_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.ListModelsResponse)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ListModelsResponse other = + (com.google.cloud.aiplatform.v1.ListModelsResponse) obj; + + if (!getModelsList().equals(other.getModelsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getModelsCount() > 0) { + hash = (37 * hash) + MODELS_FIELD_NUMBER; + hash = (53 * hash) + getModelsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.ListModelsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListModelsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListModelsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListModelsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListModelsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListModelsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListModelsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListModelsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListModelsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListModelsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListModelsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListModelsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1.ListModelsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for [ModelService.ListModels][google.cloud.aiplatform.v1.ModelService.ListModels]
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListModelsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ListModelsResponse) + com.google.cloud.aiplatform.v1.ListModelsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_ListModelsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_ListModelsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListModelsResponse.class, + com.google.cloud.aiplatform.v1.ListModelsResponse.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ListModelsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getModelsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (modelsBuilder_ == null) { + models_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + modelsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_ListModelsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListModelsResponse getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ListModelsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListModelsResponse build() { + com.google.cloud.aiplatform.v1.ListModelsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListModelsResponse buildPartial() { + com.google.cloud.aiplatform.v1.ListModelsResponse result = + new com.google.cloud.aiplatform.v1.ListModelsResponse(this); + int from_bitField0_ = bitField0_; + if (modelsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + models_ = java.util.Collections.unmodifiableList(models_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.models_ = models_; + } else { + result.models_ = modelsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + 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.v1.ListModelsResponse) { + return mergeFrom((com.google.cloud.aiplatform.v1.ListModelsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.ListModelsResponse other) { + if (other == com.google.cloud.aiplatform.v1.ListModelsResponse.getDefaultInstance()) + return this; + if (modelsBuilder_ == null) { + if (!other.models_.isEmpty()) { + if (models_.isEmpty()) { + models_ = other.models_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureModelsIsMutable(); + models_.addAll(other.models_); + } + onChanged(); + } + } else { + if (!other.models_.isEmpty()) { + if (modelsBuilder_.isEmpty()) { + modelsBuilder_.dispose(); + modelsBuilder_ = null; + models_ = other.models_; + bitField0_ = (bitField0_ & ~0x00000001); + modelsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getModelsFieldBuilder() + : null; + } else { + modelsBuilder_.addAllMessages(other.models_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.aiplatform.v1.ListModelsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.ListModelsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List models_ = + java.util.Collections.emptyList(); + + private void ensureModelsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + models_ = new java.util.ArrayList(models_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.Model, + com.google.cloud.aiplatform.v1.Model.Builder, + com.google.cloud.aiplatform.v1.ModelOrBuilder> + modelsBuilder_; + + /** + * + * + *
+     * List of Models in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.Model models = 1; + */ + public java.util.List getModelsList() { + if (modelsBuilder_ == null) { + return java.util.Collections.unmodifiableList(models_); + } else { + return modelsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of Models in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.Model models = 1; + */ + public int getModelsCount() { + if (modelsBuilder_ == null) { + return models_.size(); + } else { + return modelsBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of Models in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.Model models = 1; + */ + public com.google.cloud.aiplatform.v1.Model getModels(int index) { + if (modelsBuilder_ == null) { + return models_.get(index); + } else { + return modelsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of Models in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.Model models = 1; + */ + public Builder setModels(int index, com.google.cloud.aiplatform.v1.Model value) { + if (modelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureModelsIsMutable(); + models_.set(index, value); + onChanged(); + } else { + modelsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of Models in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.Model models = 1; + */ + public Builder setModels( + int index, com.google.cloud.aiplatform.v1.Model.Builder builderForValue) { + if (modelsBuilder_ == null) { + ensureModelsIsMutable(); + models_.set(index, builderForValue.build()); + onChanged(); + } else { + modelsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of Models in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.Model models = 1; + */ + public Builder addModels(com.google.cloud.aiplatform.v1.Model value) { + if (modelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureModelsIsMutable(); + models_.add(value); + onChanged(); + } else { + modelsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of Models in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.Model models = 1; + */ + public Builder addModels(int index, com.google.cloud.aiplatform.v1.Model value) { + if (modelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureModelsIsMutable(); + models_.add(index, value); + onChanged(); + } else { + modelsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of Models in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.Model models = 1; + */ + public Builder addModels(com.google.cloud.aiplatform.v1.Model.Builder builderForValue) { + if (modelsBuilder_ == null) { + ensureModelsIsMutable(); + models_.add(builderForValue.build()); + onChanged(); + } else { + modelsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of Models in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.Model models = 1; + */ + public Builder addModels( + int index, com.google.cloud.aiplatform.v1.Model.Builder builderForValue) { + if (modelsBuilder_ == null) { + ensureModelsIsMutable(); + models_.add(index, builderForValue.build()); + onChanged(); + } else { + modelsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of Models in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.Model models = 1; + */ + public Builder addAllModels( + java.lang.Iterable values) { + if (modelsBuilder_ == null) { + ensureModelsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, models_); + onChanged(); + } else { + modelsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of Models in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.Model models = 1; + */ + public Builder clearModels() { + if (modelsBuilder_ == null) { + models_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + modelsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of Models in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.Model models = 1; + */ + public Builder removeModels(int index) { + if (modelsBuilder_ == null) { + ensureModelsIsMutable(); + models_.remove(index); + onChanged(); + } else { + modelsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of Models in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.Model models = 1; + */ + public com.google.cloud.aiplatform.v1.Model.Builder getModelsBuilder(int index) { + return getModelsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of Models in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.Model models = 1; + */ + public com.google.cloud.aiplatform.v1.ModelOrBuilder getModelsOrBuilder(int index) { + if (modelsBuilder_ == null) { + return models_.get(index); + } else { + return modelsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of Models in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.Model models = 1; + */ + public java.util.List + getModelsOrBuilderList() { + if (modelsBuilder_ != null) { + return modelsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(models_); + } + } + /** + * + * + *
+     * List of Models in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.Model models = 1; + */ + public com.google.cloud.aiplatform.v1.Model.Builder addModelsBuilder() { + return getModelsFieldBuilder() + .addBuilder(com.google.cloud.aiplatform.v1.Model.getDefaultInstance()); + } + /** + * + * + *
+     * List of Models in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.Model models = 1; + */ + public com.google.cloud.aiplatform.v1.Model.Builder addModelsBuilder(int index) { + return getModelsFieldBuilder() + .addBuilder(index, com.google.cloud.aiplatform.v1.Model.getDefaultInstance()); + } + /** + * + * + *
+     * List of Models in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.Model models = 1; + */ + public java.util.List getModelsBuilderList() { + return getModelsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.Model, + com.google.cloud.aiplatform.v1.Model.Builder, + com.google.cloud.aiplatform.v1.ModelOrBuilder> + getModelsFieldBuilder() { + if (modelsBuilder_ == null) { + modelsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.Model, + com.google.cloud.aiplatform.v1.Model.Builder, + com.google.cloud.aiplatform.v1.ModelOrBuilder>( + models_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + models_ = null; + } + return modelsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token to retrieve next page of results.
+     * Pass to [ListModelsRequest.page_token][google.cloud.aiplatform.v1.ListModelsRequest.page_token] to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token to retrieve next page of results.
+     * Pass to [ListModelsRequest.page_token][google.cloud.aiplatform.v1.ListModelsRequest.page_token] to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token to retrieve next page of results.
+     * Pass to [ListModelsRequest.page_token][google.cloud.aiplatform.v1.ListModelsRequest.page_token] to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve next page of results.
+     * Pass to [ListModelsRequest.page_token][google.cloud.aiplatform.v1.ListModelsRequest.page_token] to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve next page of results.
+     * Pass to [ListModelsRequest.page_token][google.cloud.aiplatform.v1.ListModelsRequest.page_token] to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.ListModelsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ListModelsResponse) + private static final com.google.cloud.aiplatform.v1.ListModelsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ListModelsResponse(); + } + + public static com.google.cloud.aiplatform.v1.ListModelsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListModelsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListModelsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListModelsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListModelsResponseOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListModelsResponseOrBuilder.java new file mode 100644 index 000000000..7b890059a --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListModelsResponseOrBuilder.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/v1/model_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface ListModelsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ListModelsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * List of Models in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.Model models = 1; + */ + java.util.List getModelsList(); + /** + * + * + *
+   * List of Models in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.Model models = 1; + */ + com.google.cloud.aiplatform.v1.Model getModels(int index); + /** + * + * + *
+   * List of Models in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.Model models = 1; + */ + int getModelsCount(); + /** + * + * + *
+   * List of Models in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.Model models = 1; + */ + java.util.List getModelsOrBuilderList(); + /** + * + * + *
+   * List of Models in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.Model models = 1; + */ + com.google.cloud.aiplatform.v1.ModelOrBuilder getModelsOrBuilder(int index); + + /** + * + * + *
+   * A token to retrieve next page of results.
+   * Pass to [ListModelsRequest.page_token][google.cloud.aiplatform.v1.ListModelsRequest.page_token] to obtain that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token to retrieve next page of results.
+   * Pass to [ListModelsRequest.page_token][google.cloud.aiplatform.v1.ListModelsRequest.page_token] to obtain that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListSpecialistPoolsRequest.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListSpecialistPoolsRequest.java new file mode 100644 index 000000000..bb5809bcf --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListSpecialistPoolsRequest.java @@ -0,0 +1,1216 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/specialist_pool_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for [SpecialistPoolService.ListSpecialistPools][google.cloud.aiplatform.v1.SpecialistPoolService.ListSpecialistPools].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListSpecialistPoolsRequest} + */ +public final class ListSpecialistPoolsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ListSpecialistPoolsRequest) + ListSpecialistPoolsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListSpecialistPoolsRequest.newBuilder() to construct. + private ListSpecialistPoolsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListSpecialistPoolsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListSpecialistPoolsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListSpecialistPoolsRequest( + 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(); + + parent_ = s; + break; + } + case 16: + { + pageSize_ = input.readInt32(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 34: + { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (readMask_ != null) { + subBuilder = readMask_.toBuilder(); + } + readMask_ = + input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(readMask_); + readMask_ = 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.v1.SpecialistPoolServiceProto + .internal_static_google_cloud_aiplatform_v1_ListSpecialistPoolsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.SpecialistPoolServiceProto + .internal_static_google_cloud_aiplatform_v1_ListSpecialistPoolsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListSpecialistPoolsRequest.class, + com.google.cloud.aiplatform.v1.ListSpecialistPoolsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The name of the SpecialistPool's parent resource.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the SpecialistPool's parent resource.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * + * + *
+   * The standard list page size.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * The standard list page token.
+   * Typically obtained by [ListSpecialistPoolsResponse.next_page_token][google.cloud.aiplatform.v1.ListSpecialistPoolsResponse.next_page_token] of
+   * the previous [SpecialistPoolService.ListSpecialistPools][google.cloud.aiplatform.v1.SpecialistPoolService.ListSpecialistPools] call. Return
+   * first page if empty.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The standard list page token.
+   * Typically obtained by [ListSpecialistPoolsResponse.next_page_token][google.cloud.aiplatform.v1.ListSpecialistPoolsResponse.next_page_token] of
+   * the previous [SpecialistPoolService.ListSpecialistPools][google.cloud.aiplatform.v1.SpecialistPoolService.ListSpecialistPools] call. Return
+   * first page if empty.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int READ_MASK_FIELD_NUMBER = 4; + private com.google.protobuf.FieldMask readMask_; + /** + * + * + *
+   * Mask specifying which fields to read. FieldMask represents a set of
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 4; + * + * @return Whether the readMask field is set. + */ + @java.lang.Override + public boolean hasReadMask() { + return readMask_ != null; + } + /** + * + * + *
+   * Mask specifying which fields to read. FieldMask represents a set of
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 4; + * + * @return The readMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getReadMask() { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } + /** + * + * + *
+   * Mask specifying which fields to read. FieldMask represents a set of
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 4; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder() { + return getReadMask(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (readMask_ != null) { + output.writeMessage(4, getReadMask()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (readMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getReadMask()); + } + 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.v1.ListSpecialistPoolsRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ListSpecialistPoolsRequest other = + (com.google.cloud.aiplatform.v1.ListSpecialistPoolsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (hasReadMask() != other.hasReadMask()) return false; + if (hasReadMask()) { + if (!getReadMask().equals(other.getReadMask())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + if (hasReadMask()) { + hash = (37 * hash) + READ_MASK_FIELD_NUMBER; + hash = (53 * hash) + getReadMask().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.ListSpecialistPoolsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListSpecialistPoolsRequest 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.v1.ListSpecialistPoolsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListSpecialistPoolsRequest 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.v1.ListSpecialistPoolsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListSpecialistPoolsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListSpecialistPoolsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListSpecialistPoolsRequest 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.v1.ListSpecialistPoolsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListSpecialistPoolsRequest 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.v1.ListSpecialistPoolsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListSpecialistPoolsRequest 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.v1.ListSpecialistPoolsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [SpecialistPoolService.ListSpecialistPools][google.cloud.aiplatform.v1.SpecialistPoolService.ListSpecialistPools].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListSpecialistPoolsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ListSpecialistPoolsRequest) + com.google.cloud.aiplatform.v1.ListSpecialistPoolsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.SpecialistPoolServiceProto + .internal_static_google_cloud_aiplatform_v1_ListSpecialistPoolsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.SpecialistPoolServiceProto + .internal_static_google_cloud_aiplatform_v1_ListSpecialistPoolsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListSpecialistPoolsRequest.class, + com.google.cloud.aiplatform.v1.ListSpecialistPoolsRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ListSpecialistPoolsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + if (readMaskBuilder_ == null) { + readMask_ = null; + } else { + readMask_ = null; + readMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.SpecialistPoolServiceProto + .internal_static_google_cloud_aiplatform_v1_ListSpecialistPoolsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListSpecialistPoolsRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ListSpecialistPoolsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListSpecialistPoolsRequest build() { + com.google.cloud.aiplatform.v1.ListSpecialistPoolsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListSpecialistPoolsRequest buildPartial() { + com.google.cloud.aiplatform.v1.ListSpecialistPoolsRequest result = + new com.google.cloud.aiplatform.v1.ListSpecialistPoolsRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + if (readMaskBuilder_ == null) { + result.readMask_ = readMask_; + } else { + result.readMask_ = readMaskBuilder_.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.v1.ListSpecialistPoolsRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.ListSpecialistPoolsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.ListSpecialistPoolsRequest other) { + if (other == com.google.cloud.aiplatform.v1.ListSpecialistPoolsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + if (other.hasReadMask()) { + mergeReadMask(other.getReadMask()); + } + 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.v1.ListSpecialistPoolsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.ListSpecialistPoolsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The name of the SpecialistPool's parent resource.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the SpecialistPool's parent resource.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the SpecialistPool's parent resource.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the SpecialistPool's parent resource.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the SpecialistPool's parent resource.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The standard list page size.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The standard list page size.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list page size.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * The standard list page token.
+     * Typically obtained by [ListSpecialistPoolsResponse.next_page_token][google.cloud.aiplatform.v1.ListSpecialistPoolsResponse.next_page_token] of
+     * the previous [SpecialistPoolService.ListSpecialistPools][google.cloud.aiplatform.v1.SpecialistPoolService.ListSpecialistPools] call. Return
+     * first page if empty.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The standard list page token.
+     * Typically obtained by [ListSpecialistPoolsResponse.next_page_token][google.cloud.aiplatform.v1.ListSpecialistPoolsResponse.next_page_token] of
+     * the previous [SpecialistPoolService.ListSpecialistPools][google.cloud.aiplatform.v1.SpecialistPoolService.ListSpecialistPools] call. Return
+     * first page if empty.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The standard list page token.
+     * Typically obtained by [ListSpecialistPoolsResponse.next_page_token][google.cloud.aiplatform.v1.ListSpecialistPoolsResponse.next_page_token] of
+     * the previous [SpecialistPoolService.ListSpecialistPools][google.cloud.aiplatform.v1.SpecialistPoolService.ListSpecialistPools] call. Return
+     * first page if empty.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list page token.
+     * Typically obtained by [ListSpecialistPoolsResponse.next_page_token][google.cloud.aiplatform.v1.ListSpecialistPoolsResponse.next_page_token] of
+     * the previous [SpecialistPoolService.ListSpecialistPools][google.cloud.aiplatform.v1.SpecialistPoolService.ListSpecialistPools] call. Return
+     * first page if empty.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list page token.
+     * Typically obtained by [ListSpecialistPoolsResponse.next_page_token][google.cloud.aiplatform.v1.ListSpecialistPoolsResponse.next_page_token] of
+     * the previous [SpecialistPoolService.ListSpecialistPools][google.cloud.aiplatform.v1.SpecialistPoolService.ListSpecialistPools] call. Return
+     * first page if empty.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.FieldMask readMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + readMaskBuilder_; + /** + * + * + *
+     * Mask specifying which fields to read. FieldMask represents a set of
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 4; + * + * @return Whether the readMask field is set. + */ + public boolean hasReadMask() { + return readMaskBuilder_ != null || readMask_ != null; + } + /** + * + * + *
+     * Mask specifying which fields to read. FieldMask represents a set of
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 4; + * + * @return The readMask. + */ + public com.google.protobuf.FieldMask getReadMask() { + if (readMaskBuilder_ == null) { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } else { + return readMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Mask specifying which fields to read. FieldMask represents a set of
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 4; + */ + public Builder setReadMask(com.google.protobuf.FieldMask value) { + if (readMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + readMask_ = value; + onChanged(); + } else { + readMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Mask specifying which fields to read. FieldMask represents a set of
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 4; + */ + public Builder setReadMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (readMaskBuilder_ == null) { + readMask_ = builderForValue.build(); + onChanged(); + } else { + readMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Mask specifying which fields to read. FieldMask represents a set of
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 4; + */ + public Builder mergeReadMask(com.google.protobuf.FieldMask value) { + if (readMaskBuilder_ == null) { + if (readMask_ != null) { + readMask_ = + com.google.protobuf.FieldMask.newBuilder(readMask_).mergeFrom(value).buildPartial(); + } else { + readMask_ = value; + } + onChanged(); + } else { + readMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Mask specifying which fields to read. FieldMask represents a set of
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 4; + */ + public Builder clearReadMask() { + if (readMaskBuilder_ == null) { + readMask_ = null; + onChanged(); + } else { + readMask_ = null; + readMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Mask specifying which fields to read. FieldMask represents a set of
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 4; + */ + public com.google.protobuf.FieldMask.Builder getReadMaskBuilder() { + + onChanged(); + return getReadMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Mask specifying which fields to read. FieldMask represents a set of
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 4; + */ + public com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder() { + if (readMaskBuilder_ != null) { + return readMaskBuilder_.getMessageOrBuilder(); + } else { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } + } + /** + * + * + *
+     * Mask specifying which fields to read. FieldMask represents a set of
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getReadMaskFieldBuilder() { + if (readMaskBuilder_ == null) { + readMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getReadMask(), getParentForChildren(), isClean()); + readMask_ = null; + } + return readMaskBuilder_; + } + + @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.v1.ListSpecialistPoolsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ListSpecialistPoolsRequest) + private static final com.google.cloud.aiplatform.v1.ListSpecialistPoolsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ListSpecialistPoolsRequest(); + } + + public static com.google.cloud.aiplatform.v1.ListSpecialistPoolsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListSpecialistPoolsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListSpecialistPoolsRequest(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.v1.ListSpecialistPoolsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListSpecialistPoolsRequestOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListSpecialistPoolsRequestOrBuilder.java new file mode 100644 index 000000000..057408552 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListSpecialistPoolsRequestOrBuilder.java @@ -0,0 +1,135 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/specialist_pool_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface ListSpecialistPoolsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ListSpecialistPoolsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the SpecialistPool's parent resource.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The name of the SpecialistPool's parent resource.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The standard list page size.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * The standard list page token.
+   * Typically obtained by [ListSpecialistPoolsResponse.next_page_token][google.cloud.aiplatform.v1.ListSpecialistPoolsResponse.next_page_token] of
+   * the previous [SpecialistPoolService.ListSpecialistPools][google.cloud.aiplatform.v1.SpecialistPoolService.ListSpecialistPools] call. Return
+   * first page if empty.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * The standard list page token.
+   * Typically obtained by [ListSpecialistPoolsResponse.next_page_token][google.cloud.aiplatform.v1.ListSpecialistPoolsResponse.next_page_token] of
+   * the previous [SpecialistPoolService.ListSpecialistPools][google.cloud.aiplatform.v1.SpecialistPoolService.ListSpecialistPools] call. Return
+   * first page if empty.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Mask specifying which fields to read. FieldMask represents a set of
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 4; + * + * @return Whether the readMask field is set. + */ + boolean hasReadMask(); + /** + * + * + *
+   * Mask specifying which fields to read. FieldMask represents a set of
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 4; + * + * @return The readMask. + */ + com.google.protobuf.FieldMask getReadMask(); + /** + * + * + *
+   * Mask specifying which fields to read. FieldMask represents a set of
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 4; + */ + com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListSpecialistPoolsResponse.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListSpecialistPoolsResponse.java new file mode 100644 index 000000000..7ee61d739 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListSpecialistPoolsResponse.java @@ -0,0 +1,1142 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/specialist_pool_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Response message for [SpecialistPoolService.ListSpecialistPools][google.cloud.aiplatform.v1.SpecialistPoolService.ListSpecialistPools].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListSpecialistPoolsResponse} + */ +public final class ListSpecialistPoolsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ListSpecialistPoolsResponse) + ListSpecialistPoolsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListSpecialistPoolsResponse.newBuilder() to construct. + private ListSpecialistPoolsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListSpecialistPoolsResponse() { + specialistPools_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListSpecialistPoolsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListSpecialistPoolsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + specialistPools_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + specialistPools_.add( + input.readMessage( + com.google.cloud.aiplatform.v1.SpecialistPool.parser(), extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + specialistPools_ = java.util.Collections.unmodifiableList(specialistPools_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.SpecialistPoolServiceProto + .internal_static_google_cloud_aiplatform_v1_ListSpecialistPoolsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.SpecialistPoolServiceProto + .internal_static_google_cloud_aiplatform_v1_ListSpecialistPoolsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListSpecialistPoolsResponse.class, + com.google.cloud.aiplatform.v1.ListSpecialistPoolsResponse.Builder.class); + } + + public static final int SPECIALIST_POOLS_FIELD_NUMBER = 1; + private java.util.List specialistPools_; + /** + * + * + *
+   * A list of SpecialistPools that matches the specified filter in the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.SpecialistPool specialist_pools = 1; + */ + @java.lang.Override + public java.util.List getSpecialistPoolsList() { + return specialistPools_; + } + /** + * + * + *
+   * A list of SpecialistPools that matches the specified filter in the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.SpecialistPool specialist_pools = 1; + */ + @java.lang.Override + public java.util.List + getSpecialistPoolsOrBuilderList() { + return specialistPools_; + } + /** + * + * + *
+   * A list of SpecialistPools that matches the specified filter in the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.SpecialistPool specialist_pools = 1; + */ + @java.lang.Override + public int getSpecialistPoolsCount() { + return specialistPools_.size(); + } + /** + * + * + *
+   * A list of SpecialistPools that matches the specified filter in the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.SpecialistPool specialist_pools = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.SpecialistPool getSpecialistPools(int index) { + return specialistPools_.get(index); + } + /** + * + * + *
+   * A list of SpecialistPools that matches the specified filter in the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.SpecialistPool specialist_pools = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.SpecialistPoolOrBuilder getSpecialistPoolsOrBuilder( + int index) { + return specialistPools_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * The standard List next-page token.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The standard List next-page token.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < specialistPools_.size(); i++) { + output.writeMessage(1, specialistPools_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < specialistPools_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, specialistPools_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.ListSpecialistPoolsResponse)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ListSpecialistPoolsResponse other = + (com.google.cloud.aiplatform.v1.ListSpecialistPoolsResponse) obj; + + if (!getSpecialistPoolsList().equals(other.getSpecialistPoolsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getSpecialistPoolsCount() > 0) { + hash = (37 * hash) + SPECIALIST_POOLS_FIELD_NUMBER; + hash = (53 * hash) + getSpecialistPoolsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.ListSpecialistPoolsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListSpecialistPoolsResponse 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.v1.ListSpecialistPoolsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListSpecialistPoolsResponse 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.v1.ListSpecialistPoolsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListSpecialistPoolsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListSpecialistPoolsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListSpecialistPoolsResponse 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.v1.ListSpecialistPoolsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListSpecialistPoolsResponse 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.v1.ListSpecialistPoolsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListSpecialistPoolsResponse 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.v1.ListSpecialistPoolsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for [SpecialistPoolService.ListSpecialistPools][google.cloud.aiplatform.v1.SpecialistPoolService.ListSpecialistPools].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListSpecialistPoolsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ListSpecialistPoolsResponse) + com.google.cloud.aiplatform.v1.ListSpecialistPoolsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.SpecialistPoolServiceProto + .internal_static_google_cloud_aiplatform_v1_ListSpecialistPoolsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.SpecialistPoolServiceProto + .internal_static_google_cloud_aiplatform_v1_ListSpecialistPoolsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListSpecialistPoolsResponse.class, + com.google.cloud.aiplatform.v1.ListSpecialistPoolsResponse.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ListSpecialistPoolsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getSpecialistPoolsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (specialistPoolsBuilder_ == null) { + specialistPools_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + specialistPoolsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.SpecialistPoolServiceProto + .internal_static_google_cloud_aiplatform_v1_ListSpecialistPoolsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListSpecialistPoolsResponse getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ListSpecialistPoolsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListSpecialistPoolsResponse build() { + com.google.cloud.aiplatform.v1.ListSpecialistPoolsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListSpecialistPoolsResponse buildPartial() { + com.google.cloud.aiplatform.v1.ListSpecialistPoolsResponse result = + new com.google.cloud.aiplatform.v1.ListSpecialistPoolsResponse(this); + int from_bitField0_ = bitField0_; + if (specialistPoolsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + specialistPools_ = java.util.Collections.unmodifiableList(specialistPools_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.specialistPools_ = specialistPools_; + } else { + result.specialistPools_ = specialistPoolsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + 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.v1.ListSpecialistPoolsResponse) { + return mergeFrom((com.google.cloud.aiplatform.v1.ListSpecialistPoolsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.ListSpecialistPoolsResponse other) { + if (other == com.google.cloud.aiplatform.v1.ListSpecialistPoolsResponse.getDefaultInstance()) + return this; + if (specialistPoolsBuilder_ == null) { + if (!other.specialistPools_.isEmpty()) { + if (specialistPools_.isEmpty()) { + specialistPools_ = other.specialistPools_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSpecialistPoolsIsMutable(); + specialistPools_.addAll(other.specialistPools_); + } + onChanged(); + } + } else { + if (!other.specialistPools_.isEmpty()) { + if (specialistPoolsBuilder_.isEmpty()) { + specialistPoolsBuilder_.dispose(); + specialistPoolsBuilder_ = null; + specialistPools_ = other.specialistPools_; + bitField0_ = (bitField0_ & ~0x00000001); + specialistPoolsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getSpecialistPoolsFieldBuilder() + : null; + } else { + specialistPoolsBuilder_.addAllMessages(other.specialistPools_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.aiplatform.v1.ListSpecialistPoolsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.ListSpecialistPoolsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List specialistPools_ = + java.util.Collections.emptyList(); + + private void ensureSpecialistPoolsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + specialistPools_ = + new java.util.ArrayList( + specialistPools_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.SpecialistPool, + com.google.cloud.aiplatform.v1.SpecialistPool.Builder, + com.google.cloud.aiplatform.v1.SpecialistPoolOrBuilder> + specialistPoolsBuilder_; + + /** + * + * + *
+     * A list of SpecialistPools that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.SpecialistPool specialist_pools = 1; + */ + public java.util.List getSpecialistPoolsList() { + if (specialistPoolsBuilder_ == null) { + return java.util.Collections.unmodifiableList(specialistPools_); + } else { + return specialistPoolsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of SpecialistPools that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.SpecialistPool specialist_pools = 1; + */ + public int getSpecialistPoolsCount() { + if (specialistPoolsBuilder_ == null) { + return specialistPools_.size(); + } else { + return specialistPoolsBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of SpecialistPools that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.SpecialistPool specialist_pools = 1; + */ + public com.google.cloud.aiplatform.v1.SpecialistPool getSpecialistPools(int index) { + if (specialistPoolsBuilder_ == null) { + return specialistPools_.get(index); + } else { + return specialistPoolsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of SpecialistPools that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.SpecialistPool specialist_pools = 1; + */ + public Builder setSpecialistPools( + int index, com.google.cloud.aiplatform.v1.SpecialistPool value) { + if (specialistPoolsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSpecialistPoolsIsMutable(); + specialistPools_.set(index, value); + onChanged(); + } else { + specialistPoolsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of SpecialistPools that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.SpecialistPool specialist_pools = 1; + */ + public Builder setSpecialistPools( + int index, com.google.cloud.aiplatform.v1.SpecialistPool.Builder builderForValue) { + if (specialistPoolsBuilder_ == null) { + ensureSpecialistPoolsIsMutable(); + specialistPools_.set(index, builderForValue.build()); + onChanged(); + } else { + specialistPoolsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of SpecialistPools that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.SpecialistPool specialist_pools = 1; + */ + public Builder addSpecialistPools(com.google.cloud.aiplatform.v1.SpecialistPool value) { + if (specialistPoolsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSpecialistPoolsIsMutable(); + specialistPools_.add(value); + onChanged(); + } else { + specialistPoolsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of SpecialistPools that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.SpecialistPool specialist_pools = 1; + */ + public Builder addSpecialistPools( + int index, com.google.cloud.aiplatform.v1.SpecialistPool value) { + if (specialistPoolsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSpecialistPoolsIsMutable(); + specialistPools_.add(index, value); + onChanged(); + } else { + specialistPoolsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of SpecialistPools that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.SpecialistPool specialist_pools = 1; + */ + public Builder addSpecialistPools( + com.google.cloud.aiplatform.v1.SpecialistPool.Builder builderForValue) { + if (specialistPoolsBuilder_ == null) { + ensureSpecialistPoolsIsMutable(); + specialistPools_.add(builderForValue.build()); + onChanged(); + } else { + specialistPoolsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of SpecialistPools that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.SpecialistPool specialist_pools = 1; + */ + public Builder addSpecialistPools( + int index, com.google.cloud.aiplatform.v1.SpecialistPool.Builder builderForValue) { + if (specialistPoolsBuilder_ == null) { + ensureSpecialistPoolsIsMutable(); + specialistPools_.add(index, builderForValue.build()); + onChanged(); + } else { + specialistPoolsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of SpecialistPools that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.SpecialistPool specialist_pools = 1; + */ + public Builder addAllSpecialistPools( + java.lang.Iterable values) { + if (specialistPoolsBuilder_ == null) { + ensureSpecialistPoolsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, specialistPools_); + onChanged(); + } else { + specialistPoolsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of SpecialistPools that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.SpecialistPool specialist_pools = 1; + */ + public Builder clearSpecialistPools() { + if (specialistPoolsBuilder_ == null) { + specialistPools_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + specialistPoolsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of SpecialistPools that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.SpecialistPool specialist_pools = 1; + */ + public Builder removeSpecialistPools(int index) { + if (specialistPoolsBuilder_ == null) { + ensureSpecialistPoolsIsMutable(); + specialistPools_.remove(index); + onChanged(); + } else { + specialistPoolsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of SpecialistPools that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.SpecialistPool specialist_pools = 1; + */ + public com.google.cloud.aiplatform.v1.SpecialistPool.Builder getSpecialistPoolsBuilder( + int index) { + return getSpecialistPoolsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of SpecialistPools that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.SpecialistPool specialist_pools = 1; + */ + public com.google.cloud.aiplatform.v1.SpecialistPoolOrBuilder getSpecialistPoolsOrBuilder( + int index) { + if (specialistPoolsBuilder_ == null) { + return specialistPools_.get(index); + } else { + return specialistPoolsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of SpecialistPools that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.SpecialistPool specialist_pools = 1; + */ + public java.util.List + getSpecialistPoolsOrBuilderList() { + if (specialistPoolsBuilder_ != null) { + return specialistPoolsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(specialistPools_); + } + } + /** + * + * + *
+     * A list of SpecialistPools that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.SpecialistPool specialist_pools = 1; + */ + public com.google.cloud.aiplatform.v1.SpecialistPool.Builder addSpecialistPoolsBuilder() { + return getSpecialistPoolsFieldBuilder() + .addBuilder(com.google.cloud.aiplatform.v1.SpecialistPool.getDefaultInstance()); + } + /** + * + * + *
+     * A list of SpecialistPools that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.SpecialistPool specialist_pools = 1; + */ + public com.google.cloud.aiplatform.v1.SpecialistPool.Builder addSpecialistPoolsBuilder( + int index) { + return getSpecialistPoolsFieldBuilder() + .addBuilder(index, com.google.cloud.aiplatform.v1.SpecialistPool.getDefaultInstance()); + } + /** + * + * + *
+     * A list of SpecialistPools that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.SpecialistPool specialist_pools = 1; + */ + public java.util.List + getSpecialistPoolsBuilderList() { + return getSpecialistPoolsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.SpecialistPool, + com.google.cloud.aiplatform.v1.SpecialistPool.Builder, + com.google.cloud.aiplatform.v1.SpecialistPoolOrBuilder> + getSpecialistPoolsFieldBuilder() { + if (specialistPoolsBuilder_ == null) { + specialistPoolsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.SpecialistPool, + com.google.cloud.aiplatform.v1.SpecialistPool.Builder, + com.google.cloud.aiplatform.v1.SpecialistPoolOrBuilder>( + specialistPools_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + specialistPools_ = null; + } + return specialistPoolsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * The standard List next-page token.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The standard List next-page token.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The standard List next-page token.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The standard List next-page token.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The standard List next-page token.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.ListSpecialistPoolsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ListSpecialistPoolsResponse) + private static final com.google.cloud.aiplatform.v1.ListSpecialistPoolsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ListSpecialistPoolsResponse(); + } + + public static com.google.cloud.aiplatform.v1.ListSpecialistPoolsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListSpecialistPoolsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListSpecialistPoolsResponse(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.v1.ListSpecialistPoolsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListSpecialistPoolsResponseOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListSpecialistPoolsResponseOrBuilder.java new file mode 100644 index 000000000..26f256505 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListSpecialistPoolsResponseOrBuilder.java @@ -0,0 +1,102 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/specialist_pool_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface ListSpecialistPoolsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ListSpecialistPoolsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A list of SpecialistPools that matches the specified filter in the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.SpecialistPool specialist_pools = 1; + */ + java.util.List getSpecialistPoolsList(); + /** + * + * + *
+   * A list of SpecialistPools that matches the specified filter in the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.SpecialistPool specialist_pools = 1; + */ + com.google.cloud.aiplatform.v1.SpecialistPool getSpecialistPools(int index); + /** + * + * + *
+   * A list of SpecialistPools that matches the specified filter in the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.SpecialistPool specialist_pools = 1; + */ + int getSpecialistPoolsCount(); + /** + * + * + *
+   * A list of SpecialistPools that matches the specified filter in the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.SpecialistPool specialist_pools = 1; + */ + java.util.List + getSpecialistPoolsOrBuilderList(); + /** + * + * + *
+   * A list of SpecialistPools that matches the specified filter in the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.SpecialistPool specialist_pools = 1; + */ + com.google.cloud.aiplatform.v1.SpecialistPoolOrBuilder getSpecialistPoolsOrBuilder(int index); + + /** + * + * + *
+   * The standard List next-page token.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * The standard List next-page token.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListTrainingPipelinesRequest.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListTrainingPipelinesRequest.java new file mode 100644 index 000000000..b3964de50 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListTrainingPipelinesRequest.java @@ -0,0 +1,1451 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/pipeline_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for [PipelineService.ListTrainingPipelines][google.cloud.aiplatform.v1.PipelineService.ListTrainingPipelines].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListTrainingPipelinesRequest} + */ +public final class ListTrainingPipelinesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ListTrainingPipelinesRequest) + ListTrainingPipelinesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListTrainingPipelinesRequest.newBuilder() to construct. + private ListTrainingPipelinesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListTrainingPipelinesRequest() { + parent_ = ""; + filter_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListTrainingPipelinesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListTrainingPipelinesRequest( + 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(); + + parent_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + filter_ = s; + break; + } + case 24: + { + pageSize_ = input.readInt32(); + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 42: + { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (readMask_ != null) { + subBuilder = readMask_.toBuilder(); + } + readMask_ = + input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(readMask_); + readMask_ = 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.v1.PipelineServiceProto + .internal_static_google_cloud_aiplatform_v1_ListTrainingPipelinesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.PipelineServiceProto + .internal_static_google_cloud_aiplatform_v1_ListTrainingPipelinesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListTrainingPipelinesRequest.class, + com.google.cloud.aiplatform.v1.ListTrainingPipelinesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The resource name of the Location to list the TrainingPipelines from.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the Location to list the TrainingPipelines from.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 2; + private volatile java.lang.Object filter_; + /** + * + * + *
+   * The standard list filter.
+   * Supported fields:
+   *   * `display_name` supports = and !=.
+   *   * `state` supports = and !=.
+   * Some examples of using the filter are:
+   *  * `state="PIPELINE_STATE_SUCCEEDED" AND display_name="my_pipeline"`
+   *  * `state="PIPELINE_STATE_RUNNING" OR display_name="my_pipeline"`
+   *  * `NOT display_name="my_pipeline"`
+   *  * `state="PIPELINE_STATE_FAILED"`
+   * 
+ * + * string filter = 2; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * The standard list filter.
+   * Supported fields:
+   *   * `display_name` supports = and !=.
+   *   * `state` supports = and !=.
+   * Some examples of using the filter are:
+   *  * `state="PIPELINE_STATE_SUCCEEDED" AND display_name="my_pipeline"`
+   *  * `state="PIPELINE_STATE_RUNNING" OR display_name="my_pipeline"`
+   *  * `NOT display_name="my_pipeline"`
+   *  * `state="PIPELINE_STATE_FAILED"`
+   * 
+ * + * string filter = 2; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 3; + private int pageSize_; + /** + * + * + *
+   * The standard list page size.
+   * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 4; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * The standard list page token.
+   * Typically obtained via
+   * [ListTrainingPipelinesResponse.next_page_token][google.cloud.aiplatform.v1.ListTrainingPipelinesResponse.next_page_token] of the previous
+   * [PipelineService.ListTrainingPipelines][google.cloud.aiplatform.v1.PipelineService.ListTrainingPipelines] call.
+   * 
+ * + * string page_token = 4; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The standard list page token.
+   * Typically obtained via
+   * [ListTrainingPipelinesResponse.next_page_token][google.cloud.aiplatform.v1.ListTrainingPipelinesResponse.next_page_token] of the previous
+   * [PipelineService.ListTrainingPipelines][google.cloud.aiplatform.v1.PipelineService.ListTrainingPipelines] call.
+   * 
+ * + * string page_token = 4; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int READ_MASK_FIELD_NUMBER = 5; + private com.google.protobuf.FieldMask readMask_; + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return Whether the readMask field is set. + */ + @java.lang.Override + public boolean hasReadMask() { + return readMask_ != null; + } + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return The readMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getReadMask() { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder() { + return getReadMask(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!getFilterBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); + } + if (pageSize_ != 0) { + output.writeInt32(3, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); + } + if (readMask_ != null) { + output.writeMessage(5, getReadMask()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!getFilterBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_); + } + if (readMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getReadMask()); + } + 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.v1.ListTrainingPipelinesRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ListTrainingPipelinesRequest other = + (com.google.cloud.aiplatform.v1.ListTrainingPipelinesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (hasReadMask() != other.hasReadMask()) return false; + if (hasReadMask()) { + if (!getReadMask().equals(other.getReadMask())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + if (hasReadMask()) { + hash = (37 * hash) + READ_MASK_FIELD_NUMBER; + hash = (53 * hash) + getReadMask().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.ListTrainingPipelinesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListTrainingPipelinesRequest 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.v1.ListTrainingPipelinesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListTrainingPipelinesRequest 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.v1.ListTrainingPipelinesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListTrainingPipelinesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListTrainingPipelinesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListTrainingPipelinesRequest 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.v1.ListTrainingPipelinesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListTrainingPipelinesRequest 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.v1.ListTrainingPipelinesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListTrainingPipelinesRequest 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.v1.ListTrainingPipelinesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [PipelineService.ListTrainingPipelines][google.cloud.aiplatform.v1.PipelineService.ListTrainingPipelines].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListTrainingPipelinesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ListTrainingPipelinesRequest) + com.google.cloud.aiplatform.v1.ListTrainingPipelinesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.PipelineServiceProto + .internal_static_google_cloud_aiplatform_v1_ListTrainingPipelinesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.PipelineServiceProto + .internal_static_google_cloud_aiplatform_v1_ListTrainingPipelinesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListTrainingPipelinesRequest.class, + com.google.cloud.aiplatform.v1.ListTrainingPipelinesRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ListTrainingPipelinesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + filter_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + if (readMaskBuilder_ == null) { + readMask_ = null; + } else { + readMask_ = null; + readMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.PipelineServiceProto + .internal_static_google_cloud_aiplatform_v1_ListTrainingPipelinesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListTrainingPipelinesRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ListTrainingPipelinesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListTrainingPipelinesRequest build() { + com.google.cloud.aiplatform.v1.ListTrainingPipelinesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListTrainingPipelinesRequest buildPartial() { + com.google.cloud.aiplatform.v1.ListTrainingPipelinesRequest result = + new com.google.cloud.aiplatform.v1.ListTrainingPipelinesRequest(this); + result.parent_ = parent_; + result.filter_ = filter_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + if (readMaskBuilder_ == null) { + result.readMask_ = readMask_; + } else { + result.readMask_ = readMaskBuilder_.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.v1.ListTrainingPipelinesRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.ListTrainingPipelinesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.ListTrainingPipelinesRequest other) { + if (other == com.google.cloud.aiplatform.v1.ListTrainingPipelinesRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + if (other.hasReadMask()) { + mergeReadMask(other.getReadMask()); + } + 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.v1.ListTrainingPipelinesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.ListTrainingPipelinesRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the Location to list the TrainingPipelines from.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Location to list the TrainingPipelines from.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Location to list the TrainingPipelines from.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Location to list the TrainingPipelines from.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Location to list the TrainingPipelines from.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * The standard list filter.
+     * Supported fields:
+     *   * `display_name` supports = and !=.
+     *   * `state` supports = and !=.
+     * Some examples of using the filter are:
+     *  * `state="PIPELINE_STATE_SUCCEEDED" AND display_name="my_pipeline"`
+     *  * `state="PIPELINE_STATE_RUNNING" OR display_name="my_pipeline"`
+     *  * `NOT display_name="my_pipeline"`
+     *  * `state="PIPELINE_STATE_FAILED"`
+     * 
+ * + * string filter = 2; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The standard list filter.
+     * Supported fields:
+     *   * `display_name` supports = and !=.
+     *   * `state` supports = and !=.
+     * Some examples of using the filter are:
+     *  * `state="PIPELINE_STATE_SUCCEEDED" AND display_name="my_pipeline"`
+     *  * `state="PIPELINE_STATE_RUNNING" OR display_name="my_pipeline"`
+     *  * `NOT display_name="my_pipeline"`
+     *  * `state="PIPELINE_STATE_FAILED"`
+     * 
+ * + * string filter = 2; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The standard list filter.
+     * Supported fields:
+     *   * `display_name` supports = and !=.
+     *   * `state` supports = and !=.
+     * Some examples of using the filter are:
+     *  * `state="PIPELINE_STATE_SUCCEEDED" AND display_name="my_pipeline"`
+     *  * `state="PIPELINE_STATE_RUNNING" OR display_name="my_pipeline"`
+     *  * `NOT display_name="my_pipeline"`
+     *  * `state="PIPELINE_STATE_FAILED"`
+     * 
+ * + * string filter = 2; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list filter.
+     * Supported fields:
+     *   * `display_name` supports = and !=.
+     *   * `state` supports = and !=.
+     * Some examples of using the filter are:
+     *  * `state="PIPELINE_STATE_SUCCEEDED" AND display_name="my_pipeline"`
+     *  * `state="PIPELINE_STATE_RUNNING" OR display_name="my_pipeline"`
+     *  * `NOT display_name="my_pipeline"`
+     *  * `state="PIPELINE_STATE_FAILED"`
+     * 
+ * + * string filter = 2; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list filter.
+     * Supported fields:
+     *   * `display_name` supports = and !=.
+     *   * `state` supports = and !=.
+     * Some examples of using the filter are:
+     *  * `state="PIPELINE_STATE_SUCCEEDED" AND display_name="my_pipeline"`
+     *  * `state="PIPELINE_STATE_RUNNING" OR display_name="my_pipeline"`
+     *  * `NOT display_name="my_pipeline"`
+     *  * `state="PIPELINE_STATE_FAILED"`
+     * 
+ * + * string filter = 2; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The standard list page size.
+     * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The standard list page size.
+     * 
+ * + * int32 page_size = 3; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list page size.
+     * 
+ * + * int32 page_size = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * The standard list page token.
+     * Typically obtained via
+     * [ListTrainingPipelinesResponse.next_page_token][google.cloud.aiplatform.v1.ListTrainingPipelinesResponse.next_page_token] of the previous
+     * [PipelineService.ListTrainingPipelines][google.cloud.aiplatform.v1.PipelineService.ListTrainingPipelines] call.
+     * 
+ * + * string page_token = 4; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The standard list page token.
+     * Typically obtained via
+     * [ListTrainingPipelinesResponse.next_page_token][google.cloud.aiplatform.v1.ListTrainingPipelinesResponse.next_page_token] of the previous
+     * [PipelineService.ListTrainingPipelines][google.cloud.aiplatform.v1.PipelineService.ListTrainingPipelines] call.
+     * 
+ * + * string page_token = 4; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The standard list page token.
+     * Typically obtained via
+     * [ListTrainingPipelinesResponse.next_page_token][google.cloud.aiplatform.v1.ListTrainingPipelinesResponse.next_page_token] of the previous
+     * [PipelineService.ListTrainingPipelines][google.cloud.aiplatform.v1.PipelineService.ListTrainingPipelines] call.
+     * 
+ * + * string page_token = 4; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list page token.
+     * Typically obtained via
+     * [ListTrainingPipelinesResponse.next_page_token][google.cloud.aiplatform.v1.ListTrainingPipelinesResponse.next_page_token] of the previous
+     * [PipelineService.ListTrainingPipelines][google.cloud.aiplatform.v1.PipelineService.ListTrainingPipelines] call.
+     * 
+ * + * string page_token = 4; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list page token.
+     * Typically obtained via
+     * [ListTrainingPipelinesResponse.next_page_token][google.cloud.aiplatform.v1.ListTrainingPipelinesResponse.next_page_token] of the previous
+     * [PipelineService.ListTrainingPipelines][google.cloud.aiplatform.v1.PipelineService.ListTrainingPipelines] call.
+     * 
+ * + * string page_token = 4; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.FieldMask readMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + readMaskBuilder_; + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return Whether the readMask field is set. + */ + public boolean hasReadMask() { + return readMaskBuilder_ != null || readMask_ != null; + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return The readMask. + */ + public com.google.protobuf.FieldMask getReadMask() { + if (readMaskBuilder_ == null) { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } else { + return readMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + public Builder setReadMask(com.google.protobuf.FieldMask value) { + if (readMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + readMask_ = value; + onChanged(); + } else { + readMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + public Builder setReadMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (readMaskBuilder_ == null) { + readMask_ = builderForValue.build(); + onChanged(); + } else { + readMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + public Builder mergeReadMask(com.google.protobuf.FieldMask value) { + if (readMaskBuilder_ == null) { + if (readMask_ != null) { + readMask_ = + com.google.protobuf.FieldMask.newBuilder(readMask_).mergeFrom(value).buildPartial(); + } else { + readMask_ = value; + } + onChanged(); + } else { + readMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + public Builder clearReadMask() { + if (readMaskBuilder_ == null) { + readMask_ = null; + onChanged(); + } else { + readMask_ = null; + readMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + public com.google.protobuf.FieldMask.Builder getReadMaskBuilder() { + + onChanged(); + return getReadMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + public com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder() { + if (readMaskBuilder_ != null) { + return readMaskBuilder_.getMessageOrBuilder(); + } else { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getReadMaskFieldBuilder() { + if (readMaskBuilder_ == null) { + readMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getReadMask(), getParentForChildren(), isClean()); + readMask_ = null; + } + return readMaskBuilder_; + } + + @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.v1.ListTrainingPipelinesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ListTrainingPipelinesRequest) + private static final com.google.cloud.aiplatform.v1.ListTrainingPipelinesRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ListTrainingPipelinesRequest(); + } + + public static com.google.cloud.aiplatform.v1.ListTrainingPipelinesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListTrainingPipelinesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListTrainingPipelinesRequest(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.v1.ListTrainingPipelinesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListTrainingPipelinesRequestOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListTrainingPipelinesRequestOrBuilder.java new file mode 100644 index 000000000..27be8acdc --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListTrainingPipelinesRequestOrBuilder.java @@ -0,0 +1,176 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/pipeline_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface ListTrainingPipelinesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ListTrainingPipelinesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the Location to list the TrainingPipelines from.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of the Location to list the TrainingPipelines from.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The standard list filter.
+   * Supported fields:
+   *   * `display_name` supports = and !=.
+   *   * `state` supports = and !=.
+   * Some examples of using the filter are:
+   *  * `state="PIPELINE_STATE_SUCCEEDED" AND display_name="my_pipeline"`
+   *  * `state="PIPELINE_STATE_RUNNING" OR display_name="my_pipeline"`
+   *  * `NOT display_name="my_pipeline"`
+   *  * `state="PIPELINE_STATE_FAILED"`
+   * 
+ * + * string filter = 2; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * The standard list filter.
+   * Supported fields:
+   *   * `display_name` supports = and !=.
+   *   * `state` supports = and !=.
+   * Some examples of using the filter are:
+   *  * `state="PIPELINE_STATE_SUCCEEDED" AND display_name="my_pipeline"`
+   *  * `state="PIPELINE_STATE_RUNNING" OR display_name="my_pipeline"`
+   *  * `NOT display_name="my_pipeline"`
+   *  * `state="PIPELINE_STATE_FAILED"`
+   * 
+ * + * string filter = 2; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * The standard list page size.
+   * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * The standard list page token.
+   * Typically obtained via
+   * [ListTrainingPipelinesResponse.next_page_token][google.cloud.aiplatform.v1.ListTrainingPipelinesResponse.next_page_token] of the previous
+   * [PipelineService.ListTrainingPipelines][google.cloud.aiplatform.v1.PipelineService.ListTrainingPipelines] call.
+   * 
+ * + * string page_token = 4; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * The standard list page token.
+   * Typically obtained via
+   * [ListTrainingPipelinesResponse.next_page_token][google.cloud.aiplatform.v1.ListTrainingPipelinesResponse.next_page_token] of the previous
+   * [PipelineService.ListTrainingPipelines][google.cloud.aiplatform.v1.PipelineService.ListTrainingPipelines] call.
+   * 
+ * + * string page_token = 4; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return Whether the readMask field is set. + */ + boolean hasReadMask(); + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return The readMask. + */ + com.google.protobuf.FieldMask getReadMask(); + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListTrainingPipelinesResponse.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListTrainingPipelinesResponse.java new file mode 100644 index 000000000..f3f5a1b99 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListTrainingPipelinesResponse.java @@ -0,0 +1,1155 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/pipeline_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Response message for [PipelineService.ListTrainingPipelines][google.cloud.aiplatform.v1.PipelineService.ListTrainingPipelines]
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListTrainingPipelinesResponse} + */ +public final class ListTrainingPipelinesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ListTrainingPipelinesResponse) + ListTrainingPipelinesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListTrainingPipelinesResponse.newBuilder() to construct. + private ListTrainingPipelinesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListTrainingPipelinesResponse() { + trainingPipelines_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListTrainingPipelinesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListTrainingPipelinesResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + trainingPipelines_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + trainingPipelines_.add( + input.readMessage( + com.google.cloud.aiplatform.v1.TrainingPipeline.parser(), extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + trainingPipelines_ = java.util.Collections.unmodifiableList(trainingPipelines_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.PipelineServiceProto + .internal_static_google_cloud_aiplatform_v1_ListTrainingPipelinesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.PipelineServiceProto + .internal_static_google_cloud_aiplatform_v1_ListTrainingPipelinesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListTrainingPipelinesResponse.class, + com.google.cloud.aiplatform.v1.ListTrainingPipelinesResponse.Builder.class); + } + + public static final int TRAINING_PIPELINES_FIELD_NUMBER = 1; + private java.util.List trainingPipelines_; + /** + * + * + *
+   * List of TrainingPipelines in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.TrainingPipeline training_pipelines = 1; + */ + @java.lang.Override + public java.util.List + getTrainingPipelinesList() { + return trainingPipelines_; + } + /** + * + * + *
+   * List of TrainingPipelines in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.TrainingPipeline training_pipelines = 1; + */ + @java.lang.Override + public java.util.List + getTrainingPipelinesOrBuilderList() { + return trainingPipelines_; + } + /** + * + * + *
+   * List of TrainingPipelines in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.TrainingPipeline training_pipelines = 1; + */ + @java.lang.Override + public int getTrainingPipelinesCount() { + return trainingPipelines_.size(); + } + /** + * + * + *
+   * List of TrainingPipelines in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.TrainingPipeline training_pipelines = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.TrainingPipeline getTrainingPipelines(int index) { + return trainingPipelines_.get(index); + } + /** + * + * + *
+   * List of TrainingPipelines in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.TrainingPipeline training_pipelines = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.TrainingPipelineOrBuilder getTrainingPipelinesOrBuilder( + int index) { + return trainingPipelines_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * Pass to [ListTrainingPipelinesRequest.page_token][google.cloud.aiplatform.v1.ListTrainingPipelinesRequest.page_token] to obtain that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * Pass to [ListTrainingPipelinesRequest.page_token][google.cloud.aiplatform.v1.ListTrainingPipelinesRequest.page_token] to obtain that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < trainingPipelines_.size(); i++) { + output.writeMessage(1, trainingPipelines_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < trainingPipelines_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, trainingPipelines_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.ListTrainingPipelinesResponse)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ListTrainingPipelinesResponse other = + (com.google.cloud.aiplatform.v1.ListTrainingPipelinesResponse) obj; + + if (!getTrainingPipelinesList().equals(other.getTrainingPipelinesList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getTrainingPipelinesCount() > 0) { + hash = (37 * hash) + TRAINING_PIPELINES_FIELD_NUMBER; + hash = (53 * hash) + getTrainingPipelinesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.ListTrainingPipelinesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListTrainingPipelinesResponse 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.v1.ListTrainingPipelinesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListTrainingPipelinesResponse 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.v1.ListTrainingPipelinesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListTrainingPipelinesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ListTrainingPipelinesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListTrainingPipelinesResponse 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.v1.ListTrainingPipelinesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListTrainingPipelinesResponse 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.v1.ListTrainingPipelinesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListTrainingPipelinesResponse 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.v1.ListTrainingPipelinesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for [PipelineService.ListTrainingPipelines][google.cloud.aiplatform.v1.PipelineService.ListTrainingPipelines]
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListTrainingPipelinesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ListTrainingPipelinesResponse) + com.google.cloud.aiplatform.v1.ListTrainingPipelinesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.PipelineServiceProto + .internal_static_google_cloud_aiplatform_v1_ListTrainingPipelinesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.PipelineServiceProto + .internal_static_google_cloud_aiplatform_v1_ListTrainingPipelinesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListTrainingPipelinesResponse.class, + com.google.cloud.aiplatform.v1.ListTrainingPipelinesResponse.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ListTrainingPipelinesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getTrainingPipelinesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (trainingPipelinesBuilder_ == null) { + trainingPipelines_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + trainingPipelinesBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.PipelineServiceProto + .internal_static_google_cloud_aiplatform_v1_ListTrainingPipelinesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListTrainingPipelinesResponse + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ListTrainingPipelinesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListTrainingPipelinesResponse build() { + com.google.cloud.aiplatform.v1.ListTrainingPipelinesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListTrainingPipelinesResponse buildPartial() { + com.google.cloud.aiplatform.v1.ListTrainingPipelinesResponse result = + new com.google.cloud.aiplatform.v1.ListTrainingPipelinesResponse(this); + int from_bitField0_ = bitField0_; + if (trainingPipelinesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + trainingPipelines_ = java.util.Collections.unmodifiableList(trainingPipelines_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.trainingPipelines_ = trainingPipelines_; + } else { + result.trainingPipelines_ = trainingPipelinesBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + 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.v1.ListTrainingPipelinesResponse) { + return mergeFrom((com.google.cloud.aiplatform.v1.ListTrainingPipelinesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.ListTrainingPipelinesResponse other) { + if (other + == com.google.cloud.aiplatform.v1.ListTrainingPipelinesResponse.getDefaultInstance()) + return this; + if (trainingPipelinesBuilder_ == null) { + if (!other.trainingPipelines_.isEmpty()) { + if (trainingPipelines_.isEmpty()) { + trainingPipelines_ = other.trainingPipelines_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTrainingPipelinesIsMutable(); + trainingPipelines_.addAll(other.trainingPipelines_); + } + onChanged(); + } + } else { + if (!other.trainingPipelines_.isEmpty()) { + if (trainingPipelinesBuilder_.isEmpty()) { + trainingPipelinesBuilder_.dispose(); + trainingPipelinesBuilder_ = null; + trainingPipelines_ = other.trainingPipelines_; + bitField0_ = (bitField0_ & ~0x00000001); + trainingPipelinesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getTrainingPipelinesFieldBuilder() + : null; + } else { + trainingPipelinesBuilder_.addAllMessages(other.trainingPipelines_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.aiplatform.v1.ListTrainingPipelinesResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.ListTrainingPipelinesResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List trainingPipelines_ = + java.util.Collections.emptyList(); + + private void ensureTrainingPipelinesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + trainingPipelines_ = + new java.util.ArrayList( + trainingPipelines_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.TrainingPipeline, + com.google.cloud.aiplatform.v1.TrainingPipeline.Builder, + com.google.cloud.aiplatform.v1.TrainingPipelineOrBuilder> + trainingPipelinesBuilder_; + + /** + * + * + *
+     * List of TrainingPipelines in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.TrainingPipeline training_pipelines = 1; + */ + public java.util.List + getTrainingPipelinesList() { + if (trainingPipelinesBuilder_ == null) { + return java.util.Collections.unmodifiableList(trainingPipelines_); + } else { + return trainingPipelinesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of TrainingPipelines in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.TrainingPipeline training_pipelines = 1; + */ + public int getTrainingPipelinesCount() { + if (trainingPipelinesBuilder_ == null) { + return trainingPipelines_.size(); + } else { + return trainingPipelinesBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of TrainingPipelines in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.TrainingPipeline training_pipelines = 1; + */ + public com.google.cloud.aiplatform.v1.TrainingPipeline getTrainingPipelines(int index) { + if (trainingPipelinesBuilder_ == null) { + return trainingPipelines_.get(index); + } else { + return trainingPipelinesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of TrainingPipelines in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.TrainingPipeline training_pipelines = 1; + */ + public Builder setTrainingPipelines( + int index, com.google.cloud.aiplatform.v1.TrainingPipeline value) { + if (trainingPipelinesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTrainingPipelinesIsMutable(); + trainingPipelines_.set(index, value); + onChanged(); + } else { + trainingPipelinesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of TrainingPipelines in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.TrainingPipeline training_pipelines = 1; + */ + public Builder setTrainingPipelines( + int index, com.google.cloud.aiplatform.v1.TrainingPipeline.Builder builderForValue) { + if (trainingPipelinesBuilder_ == null) { + ensureTrainingPipelinesIsMutable(); + trainingPipelines_.set(index, builderForValue.build()); + onChanged(); + } else { + trainingPipelinesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of TrainingPipelines in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.TrainingPipeline training_pipelines = 1; + */ + public Builder addTrainingPipelines(com.google.cloud.aiplatform.v1.TrainingPipeline value) { + if (trainingPipelinesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTrainingPipelinesIsMutable(); + trainingPipelines_.add(value); + onChanged(); + } else { + trainingPipelinesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of TrainingPipelines in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.TrainingPipeline training_pipelines = 1; + */ + public Builder addTrainingPipelines( + int index, com.google.cloud.aiplatform.v1.TrainingPipeline value) { + if (trainingPipelinesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTrainingPipelinesIsMutable(); + trainingPipelines_.add(index, value); + onChanged(); + } else { + trainingPipelinesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of TrainingPipelines in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.TrainingPipeline training_pipelines = 1; + */ + public Builder addTrainingPipelines( + com.google.cloud.aiplatform.v1.TrainingPipeline.Builder builderForValue) { + if (trainingPipelinesBuilder_ == null) { + ensureTrainingPipelinesIsMutable(); + trainingPipelines_.add(builderForValue.build()); + onChanged(); + } else { + trainingPipelinesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of TrainingPipelines in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.TrainingPipeline training_pipelines = 1; + */ + public Builder addTrainingPipelines( + int index, com.google.cloud.aiplatform.v1.TrainingPipeline.Builder builderForValue) { + if (trainingPipelinesBuilder_ == null) { + ensureTrainingPipelinesIsMutable(); + trainingPipelines_.add(index, builderForValue.build()); + onChanged(); + } else { + trainingPipelinesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of TrainingPipelines in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.TrainingPipeline training_pipelines = 1; + */ + public Builder addAllTrainingPipelines( + java.lang.Iterable values) { + if (trainingPipelinesBuilder_ == null) { + ensureTrainingPipelinesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, trainingPipelines_); + onChanged(); + } else { + trainingPipelinesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of TrainingPipelines in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.TrainingPipeline training_pipelines = 1; + */ + public Builder clearTrainingPipelines() { + if (trainingPipelinesBuilder_ == null) { + trainingPipelines_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + trainingPipelinesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of TrainingPipelines in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.TrainingPipeline training_pipelines = 1; + */ + public Builder removeTrainingPipelines(int index) { + if (trainingPipelinesBuilder_ == null) { + ensureTrainingPipelinesIsMutable(); + trainingPipelines_.remove(index); + onChanged(); + } else { + trainingPipelinesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of TrainingPipelines in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.TrainingPipeline training_pipelines = 1; + */ + public com.google.cloud.aiplatform.v1.TrainingPipeline.Builder getTrainingPipelinesBuilder( + int index) { + return getTrainingPipelinesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of TrainingPipelines in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.TrainingPipeline training_pipelines = 1; + */ + public com.google.cloud.aiplatform.v1.TrainingPipelineOrBuilder getTrainingPipelinesOrBuilder( + int index) { + if (trainingPipelinesBuilder_ == null) { + return trainingPipelines_.get(index); + } else { + return trainingPipelinesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of TrainingPipelines in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.TrainingPipeline training_pipelines = 1; + */ + public java.util.List + getTrainingPipelinesOrBuilderList() { + if (trainingPipelinesBuilder_ != null) { + return trainingPipelinesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(trainingPipelines_); + } + } + /** + * + * + *
+     * List of TrainingPipelines in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.TrainingPipeline training_pipelines = 1; + */ + public com.google.cloud.aiplatform.v1.TrainingPipeline.Builder addTrainingPipelinesBuilder() { + return getTrainingPipelinesFieldBuilder() + .addBuilder(com.google.cloud.aiplatform.v1.TrainingPipeline.getDefaultInstance()); + } + /** + * + * + *
+     * List of TrainingPipelines in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.TrainingPipeline training_pipelines = 1; + */ + public com.google.cloud.aiplatform.v1.TrainingPipeline.Builder addTrainingPipelinesBuilder( + int index) { + return getTrainingPipelinesFieldBuilder() + .addBuilder(index, com.google.cloud.aiplatform.v1.TrainingPipeline.getDefaultInstance()); + } + /** + * + * + *
+     * List of TrainingPipelines in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.TrainingPipeline training_pipelines = 1; + */ + public java.util.List + getTrainingPipelinesBuilderList() { + return getTrainingPipelinesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.TrainingPipeline, + com.google.cloud.aiplatform.v1.TrainingPipeline.Builder, + com.google.cloud.aiplatform.v1.TrainingPipelineOrBuilder> + getTrainingPipelinesFieldBuilder() { + if (trainingPipelinesBuilder_ == null) { + trainingPipelinesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.TrainingPipeline, + com.google.cloud.aiplatform.v1.TrainingPipeline.Builder, + com.google.cloud.aiplatform.v1.TrainingPipelineOrBuilder>( + trainingPipelines_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + trainingPipelines_ = null; + } + return trainingPipelinesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to [ListTrainingPipelinesRequest.page_token][google.cloud.aiplatform.v1.ListTrainingPipelinesRequest.page_token] to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to [ListTrainingPipelinesRequest.page_token][google.cloud.aiplatform.v1.ListTrainingPipelinesRequest.page_token] to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to [ListTrainingPipelinesRequest.page_token][google.cloud.aiplatform.v1.ListTrainingPipelinesRequest.page_token] to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to [ListTrainingPipelinesRequest.page_token][google.cloud.aiplatform.v1.ListTrainingPipelinesRequest.page_token] to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to [ListTrainingPipelinesRequest.page_token][google.cloud.aiplatform.v1.ListTrainingPipelinesRequest.page_token] to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.ListTrainingPipelinesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ListTrainingPipelinesResponse) + private static final com.google.cloud.aiplatform.v1.ListTrainingPipelinesResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ListTrainingPipelinesResponse(); + } + + public static com.google.cloud.aiplatform.v1.ListTrainingPipelinesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListTrainingPipelinesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListTrainingPipelinesResponse(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.v1.ListTrainingPipelinesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListTrainingPipelinesResponseOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListTrainingPipelinesResponseOrBuilder.java new file mode 100644 index 000000000..cb89a36cc --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListTrainingPipelinesResponseOrBuilder.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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/pipeline_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface ListTrainingPipelinesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ListTrainingPipelinesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * List of TrainingPipelines in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.TrainingPipeline training_pipelines = 1; + */ + java.util.List getTrainingPipelinesList(); + /** + * + * + *
+   * List of TrainingPipelines in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.TrainingPipeline training_pipelines = 1; + */ + com.google.cloud.aiplatform.v1.TrainingPipeline getTrainingPipelines(int index); + /** + * + * + *
+   * List of TrainingPipelines in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.TrainingPipeline training_pipelines = 1; + */ + int getTrainingPipelinesCount(); + /** + * + * + *
+   * List of TrainingPipelines in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.TrainingPipeline training_pipelines = 1; + */ + java.util.List + getTrainingPipelinesOrBuilderList(); + /** + * + * + *
+   * List of TrainingPipelines in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.TrainingPipeline training_pipelines = 1; + */ + com.google.cloud.aiplatform.v1.TrainingPipelineOrBuilder getTrainingPipelinesOrBuilder(int index); + + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * Pass to [ListTrainingPipelinesRequest.page_token][google.cloud.aiplatform.v1.ListTrainingPipelinesRequest.page_token] to obtain that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * Pass to [ListTrainingPipelinesRequest.page_token][google.cloud.aiplatform.v1.ListTrainingPipelinesRequest.page_token] to obtain that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/LocationName.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/LocationName.java new file mode 100644 index 000000000..9a0836b43 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/LocationName.java @@ -0,0 +1,192 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class LocationName implements ResourceName { + 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; + } + + public String getLocation() { + return location; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static LocationName of(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build(); + } + + public static String format(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build().toString(); + } + + public static LocationName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION.validatedMatch( + formattedString, "LocationName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (LocationName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION.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 (location != null) { + fieldMapBuilder.put("location", location); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION.instantiate("project", project, "location", location); + } + + @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; + } + + public String getLocation() { + return location; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + private Builder(LocationName locationName) { + project = locationName.project; + location = locationName.location; + } + + public LocationName build() { + return new LocationName(this); + } + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/MachineResourcesProto.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/MachineResourcesProto.java new file mode 100644 index 000000000..a4eceb4ed --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/MachineResourcesProto.java @@ -0,0 +1,157 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/machine_resources.proto + +package com.google.cloud.aiplatform.v1; + +public final class MachineResourcesProto { + private MachineResourcesProto() {} + + 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_v1_MachineSpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_MachineSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_DedicatedResources_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_DedicatedResources_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_AutomaticResources_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_AutomaticResources_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_BatchDedicatedResources_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_BatchDedicatedResources_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ResourcesConsumed_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ResourcesConsumed_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_DiskSpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_DiskSpec_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n2google/cloud/aiplatform/v1/machine_res" + + "ources.proto\022\032google.cloud.aiplatform.v1" + + "\032\037google/api/field_behavior.proto\0321googl" + + "e/cloud/aiplatform/v1/accelerator_type.p" + + "roto\032\034google/api/annotations.proto\"\217\001\n\013M" + + "achineSpec\022\031\n\014machine_type\030\001 \001(\tB\003\340A\005\022J\n" + + "\020accelerator_type\030\002 \001(\0162+.google.cloud.a" + + "iplatform.v1.AcceleratorTypeB\003\340A\005\022\031\n\021acc" + + "elerator_count\030\003 \001(\005\"\236\001\n\022DedicatedResour" + + "ces\022E\n\014machine_spec\030\001 \001(\0132\'.google.cloud" + + ".aiplatform.v1.MachineSpecB\006\340A\002\340A\005\022!\n\021mi" + + "n_replica_count\030\002 \001(\005B\006\340A\002\340A\005\022\036\n\021max_rep" + + "lica_count\030\003 \001(\005B\003\340A\005\"T\n\022AutomaticResour" + + "ces\022\036\n\021min_replica_count\030\001 \001(\005B\003\340A\005\022\036\n\021m" + + "ax_replica_count\030\002 \001(\005B\003\340A\005\"\245\001\n\027BatchDed" + + "icatedResources\022E\n\014machine_spec\030\001 \001(\0132\'." + + "google.cloud.aiplatform.v1.MachineSpecB\006" + + "\340A\002\340A\005\022#\n\026starting_replica_count\030\002 \001(\005B\003" + + "\340A\005\022\036\n\021max_replica_count\030\003 \001(\005B\003\340A\005\"/\n\021R" + + "esourcesConsumed\022\032\n\rreplica_hours\030\001 \001(\001B" + + "\003\340A\003\"=\n\010DiskSpec\022\026\n\016boot_disk_type\030\001 \001(\t" + + "\022\031\n\021boot_disk_size_gb\030\002 \001(\005B\177\n\036com.googl" + + "e.cloud.aiplatform.v1B\025MachineResourcesP" + + "rotoP\001ZDgoogle.golang.org/genproto/googl" + + "eapis/cloud/aiplatform/v1;aiplatformb\006pr" + + "oto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.cloud.aiplatform.v1.AcceleratorTypeProto.getDescriptor(), + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1_MachineSpec_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_MachineSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_MachineSpec_descriptor, + new java.lang.String[] { + "MachineType", "AcceleratorType", "AcceleratorCount", + }); + internal_static_google_cloud_aiplatform_v1_DedicatedResources_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_aiplatform_v1_DedicatedResources_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_DedicatedResources_descriptor, + new java.lang.String[] { + "MachineSpec", "MinReplicaCount", "MaxReplicaCount", + }); + internal_static_google_cloud_aiplatform_v1_AutomaticResources_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_aiplatform_v1_AutomaticResources_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_AutomaticResources_descriptor, + new java.lang.String[] { + "MinReplicaCount", "MaxReplicaCount", + }); + internal_static_google_cloud_aiplatform_v1_BatchDedicatedResources_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_aiplatform_v1_BatchDedicatedResources_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_BatchDedicatedResources_descriptor, + new java.lang.String[] { + "MachineSpec", "StartingReplicaCount", "MaxReplicaCount", + }); + internal_static_google_cloud_aiplatform_v1_ResourcesConsumed_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_aiplatform_v1_ResourcesConsumed_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ResourcesConsumed_descriptor, + new java.lang.String[] { + "ReplicaHours", + }); + internal_static_google_cloud_aiplatform_v1_DiskSpec_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_aiplatform_v1_DiskSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_DiskSpec_descriptor, + new java.lang.String[] { + "BootDiskType", "BootDiskSizeGb", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.cloud.aiplatform.v1.AcceleratorTypeProto.getDescriptor(); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/MachineSpec.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/MachineSpec.java new file mode 100644 index 000000000..ab891412c --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/MachineSpec.java @@ -0,0 +1,941 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/machine_resources.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Specification of a single machine.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.MachineSpec} + */ +public final class MachineSpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.MachineSpec) + MachineSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use MachineSpec.newBuilder() to construct. + private MachineSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MachineSpec() { + machineType_ = ""; + acceleratorType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MachineSpec(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private MachineSpec( + 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(); + + machineType_ = s; + break; + } + case 16: + { + int rawValue = input.readEnum(); + + acceleratorType_ = rawValue; + break; + } + case 24: + { + acceleratorCount_ = 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.v1.MachineResourcesProto + .internal_static_google_cloud_aiplatform_v1_MachineSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.MachineResourcesProto + .internal_static_google_cloud_aiplatform_v1_MachineSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.MachineSpec.class, + com.google.cloud.aiplatform.v1.MachineSpec.Builder.class); + } + + public static final int MACHINE_TYPE_FIELD_NUMBER = 1; + private volatile java.lang.Object machineType_; + /** + * + * + *
+   * Immutable. The type of the machine. For the machine types supported for prediction,
+   * see https://tinyurl.com/aip-docs/predictions/machine-types.
+   * For machine types supported for creating a custom training job, see
+   * https://tinyurl.com/aip-docs/training/configure-compute.
+   * For [DeployedModel][google.cloud.aiplatform.v1.DeployedModel] this field is optional, and the default
+   * value is `n1-standard-2`. For [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob] or as part of
+   * [WorkerPoolSpec][google.cloud.aiplatform.v1.WorkerPoolSpec] this field is required.
+   * 
+ * + * string machine_type = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The machineType. + */ + @java.lang.Override + public java.lang.String getMachineType() { + java.lang.Object ref = machineType_; + 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(); + machineType_ = s; + return s; + } + } + /** + * + * + *
+   * Immutable. The type of the machine. For the machine types supported for prediction,
+   * see https://tinyurl.com/aip-docs/predictions/machine-types.
+   * For machine types supported for creating a custom training job, see
+   * https://tinyurl.com/aip-docs/training/configure-compute.
+   * For [DeployedModel][google.cloud.aiplatform.v1.DeployedModel] this field is optional, and the default
+   * value is `n1-standard-2`. For [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob] or as part of
+   * [WorkerPoolSpec][google.cloud.aiplatform.v1.WorkerPoolSpec] this field is required.
+   * 
+ * + * string machine_type = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for machineType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMachineTypeBytes() { + java.lang.Object ref = machineType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + machineType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ACCELERATOR_TYPE_FIELD_NUMBER = 2; + private int acceleratorType_; + /** + * + * + *
+   * Immutable. The type of accelerator(s) that may be attached to the machine as per
+   * [accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count].
+   * 
+ * + * + * .google.cloud.aiplatform.v1.AcceleratorType accelerator_type = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for acceleratorType. + */ + @java.lang.Override + public int getAcceleratorTypeValue() { + return acceleratorType_; + } + /** + * + * + *
+   * Immutable. The type of accelerator(s) that may be attached to the machine as per
+   * [accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count].
+   * 
+ * + * + * .google.cloud.aiplatform.v1.AcceleratorType accelerator_type = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The acceleratorType. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.AcceleratorType getAcceleratorType() { + @SuppressWarnings("deprecation") + com.google.cloud.aiplatform.v1.AcceleratorType result = + com.google.cloud.aiplatform.v1.AcceleratorType.valueOf(acceleratorType_); + return result == null ? com.google.cloud.aiplatform.v1.AcceleratorType.UNRECOGNIZED : result; + } + + public static final int ACCELERATOR_COUNT_FIELD_NUMBER = 3; + private int acceleratorCount_; + /** + * + * + *
+   * The number of accelerators to attach to the machine.
+   * 
+ * + * int32 accelerator_count = 3; + * + * @return The acceleratorCount. + */ + @java.lang.Override + public int getAcceleratorCount() { + return acceleratorCount_; + } + + 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 (!getMachineTypeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, machineType_); + } + if (acceleratorType_ + != com.google.cloud.aiplatform.v1.AcceleratorType.ACCELERATOR_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, acceleratorType_); + } + if (acceleratorCount_ != 0) { + output.writeInt32(3, acceleratorCount_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getMachineTypeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, machineType_); + } + if (acceleratorType_ + != com.google.cloud.aiplatform.v1.AcceleratorType.ACCELERATOR_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, acceleratorType_); + } + if (acceleratorCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, acceleratorCount_); + } + 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.v1.MachineSpec)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.MachineSpec other = + (com.google.cloud.aiplatform.v1.MachineSpec) obj; + + if (!getMachineType().equals(other.getMachineType())) return false; + if (acceleratorType_ != other.acceleratorType_) return false; + if (getAcceleratorCount() != other.getAcceleratorCount()) 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) + MACHINE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getMachineType().hashCode(); + hash = (37 * hash) + ACCELERATOR_TYPE_FIELD_NUMBER; + hash = (53 * hash) + acceleratorType_; + hash = (37 * hash) + ACCELERATOR_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getAcceleratorCount(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.MachineSpec parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.MachineSpec 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.v1.MachineSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.MachineSpec 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.v1.MachineSpec parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.MachineSpec parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.MachineSpec parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.MachineSpec 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.v1.MachineSpec parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.MachineSpec 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.v1.MachineSpec parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.MachineSpec 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.v1.MachineSpec 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; + } + /** + * + * + *
+   * Specification of a single machine.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.MachineSpec} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.MachineSpec) + com.google.cloud.aiplatform.v1.MachineSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.MachineResourcesProto + .internal_static_google_cloud_aiplatform_v1_MachineSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.MachineResourcesProto + .internal_static_google_cloud_aiplatform_v1_MachineSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.MachineSpec.class, + com.google.cloud.aiplatform.v1.MachineSpec.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.MachineSpec.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(); + machineType_ = ""; + + acceleratorType_ = 0; + + acceleratorCount_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.MachineResourcesProto + .internal_static_google_cloud_aiplatform_v1_MachineSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.MachineSpec getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.MachineSpec.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.MachineSpec build() { + com.google.cloud.aiplatform.v1.MachineSpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.MachineSpec buildPartial() { + com.google.cloud.aiplatform.v1.MachineSpec result = + new com.google.cloud.aiplatform.v1.MachineSpec(this); + result.machineType_ = machineType_; + result.acceleratorType_ = acceleratorType_; + result.acceleratorCount_ = acceleratorCount_; + 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.v1.MachineSpec) { + return mergeFrom((com.google.cloud.aiplatform.v1.MachineSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.MachineSpec other) { + if (other == com.google.cloud.aiplatform.v1.MachineSpec.getDefaultInstance()) return this; + if (!other.getMachineType().isEmpty()) { + machineType_ = other.machineType_; + onChanged(); + } + if (other.acceleratorType_ != 0) { + setAcceleratorTypeValue(other.getAcceleratorTypeValue()); + } + if (other.getAcceleratorCount() != 0) { + setAcceleratorCount(other.getAcceleratorCount()); + } + 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.v1.MachineSpec parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.aiplatform.v1.MachineSpec) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object machineType_ = ""; + /** + * + * + *
+     * Immutable. The type of the machine. For the machine types supported for prediction,
+     * see https://tinyurl.com/aip-docs/predictions/machine-types.
+     * For machine types supported for creating a custom training job, see
+     * https://tinyurl.com/aip-docs/training/configure-compute.
+     * For [DeployedModel][google.cloud.aiplatform.v1.DeployedModel] this field is optional, and the default
+     * value is `n1-standard-2`. For [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob] or as part of
+     * [WorkerPoolSpec][google.cloud.aiplatform.v1.WorkerPoolSpec] this field is required.
+     * 
+ * + * string machine_type = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The machineType. + */ + public java.lang.String getMachineType() { + java.lang.Object ref = machineType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + machineType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Immutable. The type of the machine. For the machine types supported for prediction,
+     * see https://tinyurl.com/aip-docs/predictions/machine-types.
+     * For machine types supported for creating a custom training job, see
+     * https://tinyurl.com/aip-docs/training/configure-compute.
+     * For [DeployedModel][google.cloud.aiplatform.v1.DeployedModel] this field is optional, and the default
+     * value is `n1-standard-2`. For [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob] or as part of
+     * [WorkerPoolSpec][google.cloud.aiplatform.v1.WorkerPoolSpec] this field is required.
+     * 
+ * + * string machine_type = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for machineType. + */ + public com.google.protobuf.ByteString getMachineTypeBytes() { + java.lang.Object ref = machineType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + machineType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Immutable. The type of the machine. For the machine types supported for prediction,
+     * see https://tinyurl.com/aip-docs/predictions/machine-types.
+     * For machine types supported for creating a custom training job, see
+     * https://tinyurl.com/aip-docs/training/configure-compute.
+     * For [DeployedModel][google.cloud.aiplatform.v1.DeployedModel] this field is optional, and the default
+     * value is `n1-standard-2`. For [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob] or as part of
+     * [WorkerPoolSpec][google.cloud.aiplatform.v1.WorkerPoolSpec] this field is required.
+     * 
+ * + * string machine_type = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The machineType to set. + * @return This builder for chaining. + */ + public Builder setMachineType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + machineType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The type of the machine. For the machine types supported for prediction,
+     * see https://tinyurl.com/aip-docs/predictions/machine-types.
+     * For machine types supported for creating a custom training job, see
+     * https://tinyurl.com/aip-docs/training/configure-compute.
+     * For [DeployedModel][google.cloud.aiplatform.v1.DeployedModel] this field is optional, and the default
+     * value is `n1-standard-2`. For [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob] or as part of
+     * [WorkerPoolSpec][google.cloud.aiplatform.v1.WorkerPoolSpec] this field is required.
+     * 
+ * + * string machine_type = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearMachineType() { + + machineType_ = getDefaultInstance().getMachineType(); + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The type of the machine. For the machine types supported for prediction,
+     * see https://tinyurl.com/aip-docs/predictions/machine-types.
+     * For machine types supported for creating a custom training job, see
+     * https://tinyurl.com/aip-docs/training/configure-compute.
+     * For [DeployedModel][google.cloud.aiplatform.v1.DeployedModel] this field is optional, and the default
+     * value is `n1-standard-2`. For [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob] or as part of
+     * [WorkerPoolSpec][google.cloud.aiplatform.v1.WorkerPoolSpec] this field is required.
+     * 
+ * + * string machine_type = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The bytes for machineType to set. + * @return This builder for chaining. + */ + public Builder setMachineTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + machineType_ = value; + onChanged(); + return this; + } + + private int acceleratorType_ = 0; + /** + * + * + *
+     * Immutable. The type of accelerator(s) that may be attached to the machine as per
+     * [accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count].
+     * 
+ * + * + * .google.cloud.aiplatform.v1.AcceleratorType accelerator_type = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for acceleratorType. + */ + @java.lang.Override + public int getAcceleratorTypeValue() { + return acceleratorType_; + } + /** + * + * + *
+     * Immutable. The type of accelerator(s) that may be attached to the machine as per
+     * [accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count].
+     * 
+ * + * + * .google.cloud.aiplatform.v1.AcceleratorType accelerator_type = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The enum numeric value on the wire for acceleratorType to set. + * @return This builder for chaining. + */ + public Builder setAcceleratorTypeValue(int value) { + + acceleratorType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The type of accelerator(s) that may be attached to the machine as per
+     * [accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count].
+     * 
+ * + * + * .google.cloud.aiplatform.v1.AcceleratorType accelerator_type = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The acceleratorType. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.AcceleratorType getAcceleratorType() { + @SuppressWarnings("deprecation") + com.google.cloud.aiplatform.v1.AcceleratorType result = + com.google.cloud.aiplatform.v1.AcceleratorType.valueOf(acceleratorType_); + return result == null ? com.google.cloud.aiplatform.v1.AcceleratorType.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Immutable. The type of accelerator(s) that may be attached to the machine as per
+     * [accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count].
+     * 
+ * + * + * .google.cloud.aiplatform.v1.AcceleratorType accelerator_type = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The acceleratorType to set. + * @return This builder for chaining. + */ + public Builder setAcceleratorType(com.google.cloud.aiplatform.v1.AcceleratorType value) { + if (value == null) { + throw new NullPointerException(); + } + + acceleratorType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The type of accelerator(s) that may be attached to the machine as per
+     * [accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count].
+     * 
+ * + * + * .google.cloud.aiplatform.v1.AcceleratorType accelerator_type = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return This builder for chaining. + */ + public Builder clearAcceleratorType() { + + acceleratorType_ = 0; + onChanged(); + return this; + } + + private int acceleratorCount_; + /** + * + * + *
+     * The number of accelerators to attach to the machine.
+     * 
+ * + * int32 accelerator_count = 3; + * + * @return The acceleratorCount. + */ + @java.lang.Override + public int getAcceleratorCount() { + return acceleratorCount_; + } + /** + * + * + *
+     * The number of accelerators to attach to the machine.
+     * 
+ * + * int32 accelerator_count = 3; + * + * @param value The acceleratorCount to set. + * @return This builder for chaining. + */ + public Builder setAcceleratorCount(int value) { + + acceleratorCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The number of accelerators to attach to the machine.
+     * 
+ * + * int32 accelerator_count = 3; + * + * @return This builder for chaining. + */ + public Builder clearAcceleratorCount() { + + acceleratorCount_ = 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.v1.MachineSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.MachineSpec) + private static final com.google.cloud.aiplatform.v1.MachineSpec DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.MachineSpec(); + } + + public static com.google.cloud.aiplatform.v1.MachineSpec getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MachineSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new MachineSpec(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.v1.MachineSpec getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/MachineSpecOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/MachineSpecOrBuilder.java new file mode 100644 index 000000000..0719ef12a --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/MachineSpecOrBuilder.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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/machine_resources.proto + +package com.google.cloud.aiplatform.v1; + +public interface MachineSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.MachineSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Immutable. The type of the machine. For the machine types supported for prediction,
+   * see https://tinyurl.com/aip-docs/predictions/machine-types.
+   * For machine types supported for creating a custom training job, see
+   * https://tinyurl.com/aip-docs/training/configure-compute.
+   * For [DeployedModel][google.cloud.aiplatform.v1.DeployedModel] this field is optional, and the default
+   * value is `n1-standard-2`. For [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob] or as part of
+   * [WorkerPoolSpec][google.cloud.aiplatform.v1.WorkerPoolSpec] this field is required.
+   * 
+ * + * string machine_type = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The machineType. + */ + java.lang.String getMachineType(); + /** + * + * + *
+   * Immutable. The type of the machine. For the machine types supported for prediction,
+   * see https://tinyurl.com/aip-docs/predictions/machine-types.
+   * For machine types supported for creating a custom training job, see
+   * https://tinyurl.com/aip-docs/training/configure-compute.
+   * For [DeployedModel][google.cloud.aiplatform.v1.DeployedModel] this field is optional, and the default
+   * value is `n1-standard-2`. For [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob] or as part of
+   * [WorkerPoolSpec][google.cloud.aiplatform.v1.WorkerPoolSpec] this field is required.
+   * 
+ * + * string machine_type = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for machineType. + */ + com.google.protobuf.ByteString getMachineTypeBytes(); + + /** + * + * + *
+   * Immutable. The type of accelerator(s) that may be attached to the machine as per
+   * [accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count].
+   * 
+ * + * + * .google.cloud.aiplatform.v1.AcceleratorType accelerator_type = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for acceleratorType. + */ + int getAcceleratorTypeValue(); + /** + * + * + *
+   * Immutable. The type of accelerator(s) that may be attached to the machine as per
+   * [accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count].
+   * 
+ * + * + * .google.cloud.aiplatform.v1.AcceleratorType accelerator_type = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The acceleratorType. + */ + com.google.cloud.aiplatform.v1.AcceleratorType getAcceleratorType(); + + /** + * + * + *
+   * The number of accelerators to attach to the machine.
+   * 
+ * + * int32 accelerator_count = 3; + * + * @return The acceleratorCount. + */ + int getAcceleratorCount(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ManualBatchTuningParameters.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ManualBatchTuningParameters.java new file mode 100644 index 000000000..f27ac9d19 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ManualBatchTuningParameters.java @@ -0,0 +1,571 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/manual_batch_tuning_parameters.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Manual batch tuning parameters.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ManualBatchTuningParameters} + */ +public final class ManualBatchTuningParameters extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ManualBatchTuningParameters) + ManualBatchTuningParametersOrBuilder { + private static final long serialVersionUID = 0L; + // Use ManualBatchTuningParameters.newBuilder() to construct. + private ManualBatchTuningParameters(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ManualBatchTuningParameters() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ManualBatchTuningParameters(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ManualBatchTuningParameters( + 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: + { + batchSize_ = 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.v1.ManualBatchTuningParametersProto + .internal_static_google_cloud_aiplatform_v1_ManualBatchTuningParameters_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ManualBatchTuningParametersProto + .internal_static_google_cloud_aiplatform_v1_ManualBatchTuningParameters_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ManualBatchTuningParameters.class, + com.google.cloud.aiplatform.v1.ManualBatchTuningParameters.Builder.class); + } + + public static final int BATCH_SIZE_FIELD_NUMBER = 1; + private int batchSize_; + /** + * + * + *
+   * Immutable. The number of the records (e.g. instances) of the operation given in
+   * each batch to a machine replica. Machine type, and size of a single
+   * record should be considered when setting this parameter, higher value
+   * speeds up the batch operation's execution, but too high value will result
+   * in a whole batch not fitting in a machine's memory, and the whole
+   * operation will fail.
+   * The default value is 4.
+   * 
+ * + * int32 batch_size = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The batchSize. + */ + @java.lang.Override + public int getBatchSize() { + return batchSize_; + } + + 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 (batchSize_ != 0) { + output.writeInt32(1, batchSize_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (batchSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, batchSize_); + } + 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.v1.ManualBatchTuningParameters)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ManualBatchTuningParameters other = + (com.google.cloud.aiplatform.v1.ManualBatchTuningParameters) obj; + + if (getBatchSize() != other.getBatchSize()) 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) + BATCH_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getBatchSize(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.ManualBatchTuningParameters parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ManualBatchTuningParameters 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.v1.ManualBatchTuningParameters parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ManualBatchTuningParameters 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.v1.ManualBatchTuningParameters parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ManualBatchTuningParameters parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ManualBatchTuningParameters parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ManualBatchTuningParameters 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.v1.ManualBatchTuningParameters parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ManualBatchTuningParameters 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.v1.ManualBatchTuningParameters parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ManualBatchTuningParameters 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.v1.ManualBatchTuningParameters 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; + } + /** + * + * + *
+   * Manual batch tuning parameters.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ManualBatchTuningParameters} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ManualBatchTuningParameters) + com.google.cloud.aiplatform.v1.ManualBatchTuningParametersOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.ManualBatchTuningParametersProto + .internal_static_google_cloud_aiplatform_v1_ManualBatchTuningParameters_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ManualBatchTuningParametersProto + .internal_static_google_cloud_aiplatform_v1_ManualBatchTuningParameters_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ManualBatchTuningParameters.class, + com.google.cloud.aiplatform.v1.ManualBatchTuningParameters.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ManualBatchTuningParameters.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(); + batchSize_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.ManualBatchTuningParametersProto + .internal_static_google_cloud_aiplatform_v1_ManualBatchTuningParameters_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ManualBatchTuningParameters getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ManualBatchTuningParameters.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ManualBatchTuningParameters build() { + com.google.cloud.aiplatform.v1.ManualBatchTuningParameters result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ManualBatchTuningParameters buildPartial() { + com.google.cloud.aiplatform.v1.ManualBatchTuningParameters result = + new com.google.cloud.aiplatform.v1.ManualBatchTuningParameters(this); + result.batchSize_ = batchSize_; + 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.v1.ManualBatchTuningParameters) { + return mergeFrom((com.google.cloud.aiplatform.v1.ManualBatchTuningParameters) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.ManualBatchTuningParameters other) { + if (other == com.google.cloud.aiplatform.v1.ManualBatchTuningParameters.getDefaultInstance()) + return this; + if (other.getBatchSize() != 0) { + setBatchSize(other.getBatchSize()); + } + 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.v1.ManualBatchTuningParameters parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.ManualBatchTuningParameters) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int batchSize_; + /** + * + * + *
+     * Immutable. The number of the records (e.g. instances) of the operation given in
+     * each batch to a machine replica. Machine type, and size of a single
+     * record should be considered when setting this parameter, higher value
+     * speeds up the batch operation's execution, but too high value will result
+     * in a whole batch not fitting in a machine's memory, and the whole
+     * operation will fail.
+     * The default value is 4.
+     * 
+ * + * int32 batch_size = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The batchSize. + */ + @java.lang.Override + public int getBatchSize() { + return batchSize_; + } + /** + * + * + *
+     * Immutable. The number of the records (e.g. instances) of the operation given in
+     * each batch to a machine replica. Machine type, and size of a single
+     * record should be considered when setting this parameter, higher value
+     * speeds up the batch operation's execution, but too high value will result
+     * in a whole batch not fitting in a machine's memory, and the whole
+     * operation will fail.
+     * The default value is 4.
+     * 
+ * + * int32 batch_size = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The batchSize to set. + * @return This builder for chaining. + */ + public Builder setBatchSize(int value) { + + batchSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The number of the records (e.g. instances) of the operation given in
+     * each batch to a machine replica. Machine type, and size of a single
+     * record should be considered when setting this parameter, higher value
+     * speeds up the batch operation's execution, but too high value will result
+     * in a whole batch not fitting in a machine's memory, and the whole
+     * operation will fail.
+     * The default value is 4.
+     * 
+ * + * int32 batch_size = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearBatchSize() { + + batchSize_ = 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.v1.ManualBatchTuningParameters) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ManualBatchTuningParameters) + private static final com.google.cloud.aiplatform.v1.ManualBatchTuningParameters DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ManualBatchTuningParameters(); + } + + public static com.google.cloud.aiplatform.v1.ManualBatchTuningParameters getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ManualBatchTuningParameters parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ManualBatchTuningParameters(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.v1.ManualBatchTuningParameters getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ManualBatchTuningParametersOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ManualBatchTuningParametersOrBuilder.java new file mode 100644 index 000000000..6cddaf396 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ManualBatchTuningParametersOrBuilder.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/v1/manual_batch_tuning_parameters.proto + +package com.google.cloud.aiplatform.v1; + +public interface ManualBatchTuningParametersOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ManualBatchTuningParameters) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Immutable. The number of the records (e.g. instances) of the operation given in
+   * each batch to a machine replica. Machine type, and size of a single
+   * record should be considered when setting this parameter, higher value
+   * speeds up the batch operation's execution, but too high value will result
+   * in a whole batch not fitting in a machine's memory, and the whole
+   * operation will fail.
+   * The default value is 4.
+   * 
+ * + * int32 batch_size = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The batchSize. + */ + int getBatchSize(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ManualBatchTuningParametersProto.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ManualBatchTuningParametersProto.java new file mode 100644 index 000000000..d6b417b1c --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ManualBatchTuningParametersProto.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/v1/manual_batch_tuning_parameters.proto + +package com.google.cloud.aiplatform.v1; + +public final class ManualBatchTuningParametersProto { + private ManualBatchTuningParametersProto() {} + + 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_v1_ManualBatchTuningParameters_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ManualBatchTuningParameters_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/v1/manual_batc" + + "h_tuning_parameters.proto\022\032google.cloud." + + "aiplatform.v1\032\037google/api/field_behavior" + + ".proto\032\034google/api/annotations.proto\"6\n\033" + + "ManualBatchTuningParameters\022\027\n\nbatch_siz" + + "e\030\001 \001(\005B\003\340A\005B\212\001\n\036com.google.cloud.aiplat" + + "form.v1B ManualBatchTuningParametersProt" + + "oP\001ZDgoogle.golang.org/genproto/googleap" + + "is/cloud/aiplatform/v1;aiplatformb\006proto" + + "3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1_ManualBatchTuningParameters_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_ManualBatchTuningParameters_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ManualBatchTuningParameters_descriptor, + new java.lang.String[] { + "BatchSize", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/Measurement.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/Measurement.java new file mode 100644 index 000000000..ea85b8825 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/Measurement.java @@ -0,0 +1,1888 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/study.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * A message representing a Measurement of a Trial. A Measurement contains
+ * the Metrics got by executing a Trial using suggested hyperparameter
+ * values.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.Measurement} + */ +public final class Measurement extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.Measurement) + MeasurementOrBuilder { + private static final long serialVersionUID = 0L; + // Use Measurement.newBuilder() to construct. + private Measurement(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Measurement() { + metrics_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Measurement(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Measurement( + 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 16: + { + stepCount_ = input.readInt64(); + break; + } + case 26: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + metrics_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + metrics_.add( + input.readMessage( + com.google.cloud.aiplatform.v1.Measurement.Metric.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)) { + metrics_ = java.util.Collections.unmodifiableList(metrics_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_Measurement_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_Measurement_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.Measurement.class, + com.google.cloud.aiplatform.v1.Measurement.Builder.class); + } + + public interface MetricOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.Measurement.Metric) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Output only. The ID of the Metric. The Metric should be defined in
+     * [StudySpec's Metrics][google.cloud.aiplatform.v1.StudySpec.metrics].
+     * 
+ * + * string metric_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The metricId. + */ + java.lang.String getMetricId(); + /** + * + * + *
+     * Output only. The ID of the Metric. The Metric should be defined in
+     * [StudySpec's Metrics][google.cloud.aiplatform.v1.StudySpec.metrics].
+     * 
+ * + * string metric_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for metricId. + */ + com.google.protobuf.ByteString getMetricIdBytes(); + + /** + * + * + *
+     * Output only. The value for this metric.
+     * 
+ * + * double value = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The value. + */ + double getValue(); + } + /** + * + * + *
+   * A message representing a metric in the measurement.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.Measurement.Metric} + */ + public static final class Metric extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.Measurement.Metric) + MetricOrBuilder { + private static final long serialVersionUID = 0L; + // Use Metric.newBuilder() to construct. + private Metric(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Metric() { + metricId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Metric(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Metric( + 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(); + + metricId_ = s; + break; + } + case 17: + { + value_ = input.readDouble(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_Measurement_Metric_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_Measurement_Metric_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.Measurement.Metric.class, + com.google.cloud.aiplatform.v1.Measurement.Metric.Builder.class); + } + + public static final int METRIC_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object metricId_; + /** + * + * + *
+     * Output only. The ID of the Metric. The Metric should be defined in
+     * [StudySpec's Metrics][google.cloud.aiplatform.v1.StudySpec.metrics].
+     * 
+ * + * string metric_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The metricId. + */ + @java.lang.Override + public java.lang.String getMetricId() { + java.lang.Object ref = metricId_; + 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(); + metricId_ = s; + return s; + } + } + /** + * + * + *
+     * Output only. The ID of the Metric. The Metric should be defined in
+     * [StudySpec's Metrics][google.cloud.aiplatform.v1.StudySpec.metrics].
+     * 
+ * + * string metric_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for metricId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMetricIdBytes() { + java.lang.Object ref = metricId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + metricId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALUE_FIELD_NUMBER = 2; + private double value_; + /** + * + * + *
+     * Output only. The value for this metric.
+     * 
+ * + * double value = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The value. + */ + @java.lang.Override + public double getValue() { + return value_; + } + + 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 (!getMetricIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, metricId_); + } + if (value_ != 0D) { + output.writeDouble(2, value_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getMetricIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, metricId_); + } + if (value_ != 0D) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(2, value_); + } + 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.v1.Measurement.Metric)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.Measurement.Metric other = + (com.google.cloud.aiplatform.v1.Measurement.Metric) obj; + + if (!getMetricId().equals(other.getMetricId())) return false; + if (java.lang.Double.doubleToLongBits(getValue()) + != java.lang.Double.doubleToLongBits(other.getValue())) 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) + METRIC_ID_FIELD_NUMBER; + hash = (53 * hash) + getMetricId().hashCode(); + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getValue())); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.Measurement.Metric parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.Measurement.Metric 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.v1.Measurement.Metric parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.Measurement.Metric 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.v1.Measurement.Metric parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.Measurement.Metric parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.Measurement.Metric parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.Measurement.Metric 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.v1.Measurement.Metric parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.Measurement.Metric 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.v1.Measurement.Metric parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.Measurement.Metric 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.v1.Measurement.Metric 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 message representing a metric in the measurement.
+     * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.Measurement.Metric} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.Measurement.Metric) + com.google.cloud.aiplatform.v1.Measurement.MetricOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_Measurement_Metric_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_Measurement_Metric_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.Measurement.Metric.class, + com.google.cloud.aiplatform.v1.Measurement.Metric.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.Measurement.Metric.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(); + metricId_ = ""; + + value_ = 0D; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_Measurement_Metric_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.Measurement.Metric getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.Measurement.Metric.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.Measurement.Metric build() { + com.google.cloud.aiplatform.v1.Measurement.Metric result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.Measurement.Metric buildPartial() { + com.google.cloud.aiplatform.v1.Measurement.Metric result = + new com.google.cloud.aiplatform.v1.Measurement.Metric(this); + result.metricId_ = metricId_; + result.value_ = value_; + 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.v1.Measurement.Metric) { + return mergeFrom((com.google.cloud.aiplatform.v1.Measurement.Metric) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.Measurement.Metric other) { + if (other == com.google.cloud.aiplatform.v1.Measurement.Metric.getDefaultInstance()) + return this; + if (!other.getMetricId().isEmpty()) { + metricId_ = other.metricId_; + onChanged(); + } + if (other.getValue() != 0D) { + setValue(other.getValue()); + } + 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.v1.Measurement.Metric parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.Measurement.Metric) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object metricId_ = ""; + /** + * + * + *
+       * Output only. The ID of the Metric. The Metric should be defined in
+       * [StudySpec's Metrics][google.cloud.aiplatform.v1.StudySpec.metrics].
+       * 
+ * + * string metric_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The metricId. + */ + public java.lang.String getMetricId() { + java.lang.Object ref = metricId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + metricId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Output only. The ID of the Metric. The Metric should be defined in
+       * [StudySpec's Metrics][google.cloud.aiplatform.v1.StudySpec.metrics].
+       * 
+ * + * string metric_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for metricId. + */ + public com.google.protobuf.ByteString getMetricIdBytes() { + java.lang.Object ref = metricId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + metricId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Output only. The ID of the Metric. The Metric should be defined in
+       * [StudySpec's Metrics][google.cloud.aiplatform.v1.StudySpec.metrics].
+       * 
+ * + * string metric_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The metricId to set. + * @return This builder for chaining. + */ + public Builder setMetricId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + metricId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. The ID of the Metric. The Metric should be defined in
+       * [StudySpec's Metrics][google.cloud.aiplatform.v1.StudySpec.metrics].
+       * 
+ * + * string metric_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearMetricId() { + + metricId_ = getDefaultInstance().getMetricId(); + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. The ID of the Metric. The Metric should be defined in
+       * [StudySpec's Metrics][google.cloud.aiplatform.v1.StudySpec.metrics].
+       * 
+ * + * string metric_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for metricId to set. + * @return This builder for chaining. + */ + public Builder setMetricIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + metricId_ = value; + onChanged(); + return this; + } + + private double value_; + /** + * + * + *
+       * Output only. The value for this metric.
+       * 
+ * + * double value = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The value. + */ + @java.lang.Override + public double getValue() { + return value_; + } + /** + * + * + *
+       * Output only. The value for this metric.
+       * 
+ * + * double value = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The value to set. + * @return This builder for chaining. + */ + public Builder setValue(double value) { + + value_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. The value for this metric.
+       * 
+ * + * double value = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearValue() { + + value_ = 0D; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.Measurement.Metric) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.Measurement.Metric) + private static final com.google.cloud.aiplatform.v1.Measurement.Metric DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.Measurement.Metric(); + } + + public static com.google.cloud.aiplatform.v1.Measurement.Metric getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Metric parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Metric(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.v1.Measurement.Metric getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int STEP_COUNT_FIELD_NUMBER = 2; + private long stepCount_; + /** + * + * + *
+   * Output only. The number of steps the machine learning model has been trained for.
+   * Must be non-negative.
+   * 
+ * + * int64 step_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The stepCount. + */ + @java.lang.Override + public long getStepCount() { + return stepCount_; + } + + public static final int METRICS_FIELD_NUMBER = 3; + private java.util.List metrics_; + /** + * + * + *
+   * Output only. A list of metrics got by evaluating the objective functions using suggested
+   * Parameter values.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Measurement.Metric metrics = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List getMetricsList() { + return metrics_; + } + /** + * + * + *
+   * Output only. A list of metrics got by evaluating the objective functions using suggested
+   * Parameter values.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Measurement.Metric metrics = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getMetricsOrBuilderList() { + return metrics_; + } + /** + * + * + *
+   * Output only. A list of metrics got by evaluating the objective functions using suggested
+   * Parameter values.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Measurement.Metric metrics = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getMetricsCount() { + return metrics_.size(); + } + /** + * + * + *
+   * Output only. A list of metrics got by evaluating the objective functions using suggested
+   * Parameter values.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Measurement.Metric metrics = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.Measurement.Metric getMetrics(int index) { + return metrics_.get(index); + } + /** + * + * + *
+   * Output only. A list of metrics got by evaluating the objective functions using suggested
+   * Parameter values.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Measurement.Metric metrics = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.Measurement.MetricOrBuilder getMetricsOrBuilder(int index) { + return metrics_.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 (stepCount_ != 0L) { + output.writeInt64(2, stepCount_); + } + for (int i = 0; i < metrics_.size(); i++) { + output.writeMessage(3, metrics_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (stepCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, stepCount_); + } + for (int i = 0; i < metrics_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, metrics_.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.v1.Measurement)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.Measurement other = + (com.google.cloud.aiplatform.v1.Measurement) obj; + + if (getStepCount() != other.getStepCount()) return false; + if (!getMetricsList().equals(other.getMetricsList())) 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) + STEP_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getStepCount()); + if (getMetricsCount() > 0) { + hash = (37 * hash) + METRICS_FIELD_NUMBER; + hash = (53 * hash) + getMetricsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.Measurement parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.Measurement 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.v1.Measurement parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.Measurement 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.v1.Measurement parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.Measurement parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.Measurement parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.Measurement 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.v1.Measurement parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.Measurement 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.v1.Measurement parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.Measurement 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.v1.Measurement 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 message representing a Measurement of a Trial. A Measurement contains
+   * the Metrics got by executing a Trial using suggested hyperparameter
+   * values.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.Measurement} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.Measurement) + com.google.cloud.aiplatform.v1.MeasurementOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_Measurement_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_Measurement_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.Measurement.class, + com.google.cloud.aiplatform.v1.Measurement.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.Measurement.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getMetricsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + stepCount_ = 0L; + + if (metricsBuilder_ == null) { + metrics_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + metricsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_Measurement_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.Measurement getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.Measurement.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.Measurement build() { + com.google.cloud.aiplatform.v1.Measurement result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.Measurement buildPartial() { + com.google.cloud.aiplatform.v1.Measurement result = + new com.google.cloud.aiplatform.v1.Measurement(this); + int from_bitField0_ = bitField0_; + result.stepCount_ = stepCount_; + if (metricsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + metrics_ = java.util.Collections.unmodifiableList(metrics_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.metrics_ = metrics_; + } else { + result.metrics_ = metricsBuilder_.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.v1.Measurement) { + return mergeFrom((com.google.cloud.aiplatform.v1.Measurement) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.Measurement other) { + if (other == com.google.cloud.aiplatform.v1.Measurement.getDefaultInstance()) return this; + if (other.getStepCount() != 0L) { + setStepCount(other.getStepCount()); + } + if (metricsBuilder_ == null) { + if (!other.metrics_.isEmpty()) { + if (metrics_.isEmpty()) { + metrics_ = other.metrics_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureMetricsIsMutable(); + metrics_.addAll(other.metrics_); + } + onChanged(); + } + } else { + if (!other.metrics_.isEmpty()) { + if (metricsBuilder_.isEmpty()) { + metricsBuilder_.dispose(); + metricsBuilder_ = null; + metrics_ = other.metrics_; + bitField0_ = (bitField0_ & ~0x00000001); + metricsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getMetricsFieldBuilder() + : null; + } else { + metricsBuilder_.addAllMessages(other.metrics_); + } + } + } + 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.v1.Measurement parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.aiplatform.v1.Measurement) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private long stepCount_; + /** + * + * + *
+     * Output only. The number of steps the machine learning model has been trained for.
+     * Must be non-negative.
+     * 
+ * + * int64 step_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The stepCount. + */ + @java.lang.Override + public long getStepCount() { + return stepCount_; + } + /** + * + * + *
+     * Output only. The number of steps the machine learning model has been trained for.
+     * Must be non-negative.
+     * 
+ * + * int64 step_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The stepCount to set. + * @return This builder for chaining. + */ + public Builder setStepCount(long value) { + + stepCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The number of steps the machine learning model has been trained for.
+     * Must be non-negative.
+     * 
+ * + * int64 step_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearStepCount() { + + stepCount_ = 0L; + onChanged(); + return this; + } + + private java.util.List metrics_ = + java.util.Collections.emptyList(); + + private void ensureMetricsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + metrics_ = + new java.util.ArrayList(metrics_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.Measurement.Metric, + com.google.cloud.aiplatform.v1.Measurement.Metric.Builder, + com.google.cloud.aiplatform.v1.Measurement.MetricOrBuilder> + metricsBuilder_; + + /** + * + * + *
+     * Output only. A list of metrics got by evaluating the objective functions using suggested
+     * Parameter values.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Measurement.Metric metrics = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List getMetricsList() { + if (metricsBuilder_ == null) { + return java.util.Collections.unmodifiableList(metrics_); + } else { + return metricsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Output only. A list of metrics got by evaluating the objective functions using suggested
+     * Parameter values.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Measurement.Metric metrics = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getMetricsCount() { + if (metricsBuilder_ == null) { + return metrics_.size(); + } else { + return metricsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Output only. A list of metrics got by evaluating the objective functions using suggested
+     * Parameter values.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Measurement.Metric metrics = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.Measurement.Metric getMetrics(int index) { + if (metricsBuilder_ == null) { + return metrics_.get(index); + } else { + return metricsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Output only. A list of metrics got by evaluating the objective functions using suggested
+     * Parameter values.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Measurement.Metric metrics = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setMetrics(int index, com.google.cloud.aiplatform.v1.Measurement.Metric value) { + if (metricsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetricsIsMutable(); + metrics_.set(index, value); + onChanged(); + } else { + metricsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. A list of metrics got by evaluating the objective functions using suggested
+     * Parameter values.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Measurement.Metric metrics = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setMetrics( + int index, com.google.cloud.aiplatform.v1.Measurement.Metric.Builder builderForValue) { + if (metricsBuilder_ == null) { + ensureMetricsIsMutable(); + metrics_.set(index, builderForValue.build()); + onChanged(); + } else { + metricsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. A list of metrics got by evaluating the objective functions using suggested
+     * Parameter values.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Measurement.Metric metrics = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addMetrics(com.google.cloud.aiplatform.v1.Measurement.Metric value) { + if (metricsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetricsIsMutable(); + metrics_.add(value); + onChanged(); + } else { + metricsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Output only. A list of metrics got by evaluating the objective functions using suggested
+     * Parameter values.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Measurement.Metric metrics = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addMetrics(int index, com.google.cloud.aiplatform.v1.Measurement.Metric value) { + if (metricsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetricsIsMutable(); + metrics_.add(index, value); + onChanged(); + } else { + metricsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. A list of metrics got by evaluating the objective functions using suggested
+     * Parameter values.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Measurement.Metric metrics = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addMetrics( + com.google.cloud.aiplatform.v1.Measurement.Metric.Builder builderForValue) { + if (metricsBuilder_ == null) { + ensureMetricsIsMutable(); + metrics_.add(builderForValue.build()); + onChanged(); + } else { + metricsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. A list of metrics got by evaluating the objective functions using suggested
+     * Parameter values.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Measurement.Metric metrics = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addMetrics( + int index, com.google.cloud.aiplatform.v1.Measurement.Metric.Builder builderForValue) { + if (metricsBuilder_ == null) { + ensureMetricsIsMutable(); + metrics_.add(index, builderForValue.build()); + onChanged(); + } else { + metricsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. A list of metrics got by evaluating the objective functions using suggested
+     * Parameter values.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Measurement.Metric metrics = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllMetrics( + java.lang.Iterable values) { + if (metricsBuilder_ == null) { + ensureMetricsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, metrics_); + onChanged(); + } else { + metricsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Output only. A list of metrics got by evaluating the objective functions using suggested
+     * Parameter values.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Measurement.Metric metrics = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearMetrics() { + if (metricsBuilder_ == null) { + metrics_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + metricsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. A list of metrics got by evaluating the objective functions using suggested
+     * Parameter values.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Measurement.Metric metrics = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeMetrics(int index) { + if (metricsBuilder_ == null) { + ensureMetricsIsMutable(); + metrics_.remove(index); + onChanged(); + } else { + metricsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Output only. A list of metrics got by evaluating the objective functions using suggested
+     * Parameter values.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Measurement.Metric metrics = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.Measurement.Metric.Builder getMetricsBuilder(int index) { + return getMetricsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Output only. A list of metrics got by evaluating the objective functions using suggested
+     * Parameter values.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Measurement.Metric metrics = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.Measurement.MetricOrBuilder getMetricsOrBuilder( + int index) { + if (metricsBuilder_ == null) { + return metrics_.get(index); + } else { + return metricsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Output only. A list of metrics got by evaluating the objective functions using suggested
+     * Parameter values.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Measurement.Metric metrics = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getMetricsOrBuilderList() { + if (metricsBuilder_ != null) { + return metricsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(metrics_); + } + } + /** + * + * + *
+     * Output only. A list of metrics got by evaluating the objective functions using suggested
+     * Parameter values.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Measurement.Metric metrics = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.Measurement.Metric.Builder addMetricsBuilder() { + return getMetricsFieldBuilder() + .addBuilder(com.google.cloud.aiplatform.v1.Measurement.Metric.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. A list of metrics got by evaluating the objective functions using suggested
+     * Parameter values.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Measurement.Metric metrics = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.Measurement.Metric.Builder addMetricsBuilder(int index) { + return getMetricsFieldBuilder() + .addBuilder( + index, com.google.cloud.aiplatform.v1.Measurement.Metric.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. A list of metrics got by evaluating the objective functions using suggested
+     * Parameter values.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Measurement.Metric metrics = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getMetricsBuilderList() { + return getMetricsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.Measurement.Metric, + com.google.cloud.aiplatform.v1.Measurement.Metric.Builder, + com.google.cloud.aiplatform.v1.Measurement.MetricOrBuilder> + getMetricsFieldBuilder() { + if (metricsBuilder_ == null) { + metricsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.Measurement.Metric, + com.google.cloud.aiplatform.v1.Measurement.Metric.Builder, + com.google.cloud.aiplatform.v1.Measurement.MetricOrBuilder>( + metrics_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + metrics_ = null; + } + return metricsBuilder_; + } + + @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.v1.Measurement) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.Measurement) + private static final com.google.cloud.aiplatform.v1.Measurement DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.Measurement(); + } + + public static com.google.cloud.aiplatform.v1.Measurement getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Measurement parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Measurement(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.v1.Measurement getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/MeasurementOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/MeasurementOrBuilder.java new file mode 100644 index 000000000..2e78c07ab --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/MeasurementOrBuilder.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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/study.proto + +package com.google.cloud.aiplatform.v1; + +public interface MeasurementOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.Measurement) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The number of steps the machine learning model has been trained for.
+   * Must be non-negative.
+   * 
+ * + * int64 step_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The stepCount. + */ + long getStepCount(); + + /** + * + * + *
+   * Output only. A list of metrics got by evaluating the objective functions using suggested
+   * Parameter values.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Measurement.Metric metrics = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getMetricsList(); + /** + * + * + *
+   * Output only. A list of metrics got by evaluating the objective functions using suggested
+   * Parameter values.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Measurement.Metric metrics = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1.Measurement.Metric getMetrics(int index); + /** + * + * + *
+   * Output only. A list of metrics got by evaluating the objective functions using suggested
+   * Parameter values.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Measurement.Metric metrics = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getMetricsCount(); + /** + * + * + *
+   * Output only. A list of metrics got by evaluating the objective functions using suggested
+   * Parameter values.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Measurement.Metric metrics = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getMetricsOrBuilderList(); + /** + * + * + *
+   * Output only. A list of metrics got by evaluating the objective functions using suggested
+   * Parameter values.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Measurement.Metric metrics = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1.Measurement.MetricOrBuilder getMetricsOrBuilder(int index); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/MigratableResource.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/MigratableResource.java new file mode 100644 index 000000000..99e4f60f1 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/MigratableResource.java @@ -0,0 +1,7818 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/migratable_resource.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Represents one resource that exists in automl.googleapis.com,
+ * datalabeling.googleapis.com or ml.googleapis.com.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.MigratableResource} + */ +public final class MigratableResource extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.MigratableResource) + MigratableResourceOrBuilder { + private static final long serialVersionUID = 0L; + // Use MigratableResource.newBuilder() to construct. + private MigratableResource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MigratableResource() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MigratableResource(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private MigratableResource( + 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.v1.MigratableResource.MlEngineModelVersion.Builder + subBuilder = null; + if (resourceCase_ == 1) { + subBuilder = + ((com.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion) + resource_) + .toBuilder(); + } + resource_ = + input.readMessage( + com.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion) + resource_); + resource_ = subBuilder.buildPartial(); + } + resourceCase_ = 1; + break; + } + case 18: + { + com.google.cloud.aiplatform.v1.MigratableResource.AutomlModel.Builder subBuilder = + null; + if (resourceCase_ == 2) { + subBuilder = + ((com.google.cloud.aiplatform.v1.MigratableResource.AutomlModel) resource_) + .toBuilder(); + } + resource_ = + input.readMessage( + com.google.cloud.aiplatform.v1.MigratableResource.AutomlModel.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.aiplatform.v1.MigratableResource.AutomlModel) resource_); + resource_ = subBuilder.buildPartial(); + } + resourceCase_ = 2; + break; + } + case 26: + { + com.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset.Builder subBuilder = + null; + if (resourceCase_ == 3) { + subBuilder = + ((com.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset) resource_) + .toBuilder(); + } + resource_ = + input.readMessage( + com.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset) resource_); + resource_ = subBuilder.buildPartial(); + } + resourceCase_ = 3; + break; + } + case 34: + { + com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.Builder + subBuilder = null; + if (resourceCase_ == 4) { + subBuilder = + ((com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset) + resource_) + .toBuilder(); + } + resource_ = + input.readMessage( + com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset) + resource_); + resource_ = subBuilder.buildPartial(); + } + resourceCase_ = 4; + break; + } + case 42: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (lastMigrateTime_ != null) { + subBuilder = lastMigrateTime_.toBuilder(); + } + lastMigrateTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(lastMigrateTime_); + lastMigrateTime_ = subBuilder.buildPartial(); + } + + break; + } + case 50: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (lastUpdateTime_ != null) { + subBuilder = lastUpdateTime_.toBuilder(); + } + lastUpdateTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(lastUpdateTime_); + lastUpdateTime_ = 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.v1.MigratableResourceProto + .internal_static_google_cloud_aiplatform_v1_MigratableResource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.MigratableResourceProto + .internal_static_google_cloud_aiplatform_v1_MigratableResource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.MigratableResource.class, + com.google.cloud.aiplatform.v1.MigratableResource.Builder.class); + } + + public interface MlEngineModelVersionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The ml.googleapis.com endpoint that this model Version currently lives
+     * in.
+     * Example values:
+     * * ml.googleapis.com
+     * * us-centrall-ml.googleapis.com
+     * * europe-west4-ml.googleapis.com
+     * * asia-east1-ml.googleapis.com
+     * 
+ * + * string endpoint = 1; + * + * @return The endpoint. + */ + java.lang.String getEndpoint(); + /** + * + * + *
+     * The ml.googleapis.com endpoint that this model Version currently lives
+     * in.
+     * Example values:
+     * * ml.googleapis.com
+     * * us-centrall-ml.googleapis.com
+     * * europe-west4-ml.googleapis.com
+     * * asia-east1-ml.googleapis.com
+     * 
+ * + * string endpoint = 1; + * + * @return The bytes for endpoint. + */ + com.google.protobuf.ByteString getEndpointBytes(); + + /** + * + * + *
+     * Full resource name of ml engine model Version.
+     * Format: `projects/{project}/models/{model}/versions/{version}`.
+     * 
+ * + * string version = 2 [(.google.api.resource_reference) = { ... } + * + * @return The version. + */ + java.lang.String getVersion(); + /** + * + * + *
+     * Full resource name of ml engine model Version.
+     * Format: `projects/{project}/models/{model}/versions/{version}`.
+     * 
+ * + * string version = 2 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for version. + */ + com.google.protobuf.ByteString getVersionBytes(); + } + /** + * + * + *
+   * Represents one model Version in ml.googleapis.com.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion} + */ + public static final class MlEngineModelVersion extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion) + MlEngineModelVersionOrBuilder { + private static final long serialVersionUID = 0L; + // Use MlEngineModelVersion.newBuilder() to construct. + private MlEngineModelVersion(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MlEngineModelVersion() { + endpoint_ = ""; + version_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MlEngineModelVersion(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private MlEngineModelVersion( + 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(); + + endpoint_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + version_ = 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.v1.MigratableResourceProto + .internal_static_google_cloud_aiplatform_v1_MigratableResource_MlEngineModelVersion_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.MigratableResourceProto + .internal_static_google_cloud_aiplatform_v1_MigratableResource_MlEngineModelVersion_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion.class, + com.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion.Builder.class); + } + + public static final int ENDPOINT_FIELD_NUMBER = 1; + private volatile java.lang.Object endpoint_; + /** + * + * + *
+     * The ml.googleapis.com endpoint that this model Version currently lives
+     * in.
+     * Example values:
+     * * ml.googleapis.com
+     * * us-centrall-ml.googleapis.com
+     * * europe-west4-ml.googleapis.com
+     * * asia-east1-ml.googleapis.com
+     * 
+ * + * string endpoint = 1; + * + * @return The endpoint. + */ + @java.lang.Override + public java.lang.String getEndpoint() { + java.lang.Object ref = endpoint_; + 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(); + endpoint_ = s; + return s; + } + } + /** + * + * + *
+     * The ml.googleapis.com endpoint that this model Version currently lives
+     * in.
+     * Example values:
+     * * ml.googleapis.com
+     * * us-centrall-ml.googleapis.com
+     * * europe-west4-ml.googleapis.com
+     * * asia-east1-ml.googleapis.com
+     * 
+ * + * string endpoint = 1; + * + * @return The bytes for endpoint. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEndpointBytes() { + java.lang.Object ref = endpoint_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + endpoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERSION_FIELD_NUMBER = 2; + private volatile java.lang.Object version_; + /** + * + * + *
+     * Full resource name of ml engine model Version.
+     * Format: `projects/{project}/models/{model}/versions/{version}`.
+     * 
+ * + * string version = 2 [(.google.api.resource_reference) = { ... } + * + * @return The version. + */ + @java.lang.Override + public java.lang.String getVersion() { + java.lang.Object ref = version_; + 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(); + version_ = s; + return s; + } + } + /** + * + * + *
+     * Full resource name of ml engine model Version.
+     * Format: `projects/{project}/models/{model}/versions/{version}`.
+     * 
+ * + * string version = 2 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for version. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + version_ = 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 (!getEndpointBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, endpoint_); + } + if (!getVersionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, version_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getEndpointBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, endpoint_); + } + if (!getVersionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, version_); + } + 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.v1.MigratableResource.MlEngineModelVersion)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion other = + (com.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion) obj; + + if (!getEndpoint().equals(other.getEndpoint())) return false; + if (!getVersion().equals(other.getVersion())) 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) + ENDPOINT_FIELD_NUMBER; + hash = (53 * hash) + getEndpoint().hashCode(); + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion 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.v1.MigratableResource.MlEngineModelVersion parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion 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.v1.MigratableResource.MlEngineModelVersion parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion 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.v1.MigratableResource.MlEngineModelVersion + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion + 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.v1.MigratableResource.MlEngineModelVersion parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion 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.v1.MigratableResource.MlEngineModelVersion 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 one model Version in ml.googleapis.com.
+     * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion) + com.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.MigratableResourceProto + .internal_static_google_cloud_aiplatform_v1_MigratableResource_MlEngineModelVersion_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.MigratableResourceProto + .internal_static_google_cloud_aiplatform_v1_MigratableResource_MlEngineModelVersion_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion.class, + com.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion.Builder + .class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion.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(); + endpoint_ = ""; + + version_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.MigratableResourceProto + .internal_static_google_cloud_aiplatform_v1_MigratableResource_MlEngineModelVersion_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion build() { + com.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion buildPartial() { + com.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion result = + new com.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion(this); + result.endpoint_ = endpoint_; + result.version_ = version_; + 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.v1.MigratableResource.MlEngineModelVersion) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion other) { + if (other + == com.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion + .getDefaultInstance()) return this; + if (!other.getEndpoint().isEmpty()) { + endpoint_ = other.endpoint_; + onChanged(); + } + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + 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.v1.MigratableResource.MlEngineModelVersion parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object endpoint_ = ""; + /** + * + * + *
+       * The ml.googleapis.com endpoint that this model Version currently lives
+       * in.
+       * Example values:
+       * * ml.googleapis.com
+       * * us-centrall-ml.googleapis.com
+       * * europe-west4-ml.googleapis.com
+       * * asia-east1-ml.googleapis.com
+       * 
+ * + * string endpoint = 1; + * + * @return The endpoint. + */ + public java.lang.String getEndpoint() { + java.lang.Object ref = endpoint_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpoint_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The ml.googleapis.com endpoint that this model Version currently lives
+       * in.
+       * Example values:
+       * * ml.googleapis.com
+       * * us-centrall-ml.googleapis.com
+       * * europe-west4-ml.googleapis.com
+       * * asia-east1-ml.googleapis.com
+       * 
+ * + * string endpoint = 1; + * + * @return The bytes for endpoint. + */ + public com.google.protobuf.ByteString getEndpointBytes() { + java.lang.Object ref = endpoint_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + endpoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The ml.googleapis.com endpoint that this model Version currently lives
+       * in.
+       * Example values:
+       * * ml.googleapis.com
+       * * us-centrall-ml.googleapis.com
+       * * europe-west4-ml.googleapis.com
+       * * asia-east1-ml.googleapis.com
+       * 
+ * + * string endpoint = 1; + * + * @param value The endpoint to set. + * @return This builder for chaining. + */ + public Builder setEndpoint(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + endpoint_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The ml.googleapis.com endpoint that this model Version currently lives
+       * in.
+       * Example values:
+       * * ml.googleapis.com
+       * * us-centrall-ml.googleapis.com
+       * * europe-west4-ml.googleapis.com
+       * * asia-east1-ml.googleapis.com
+       * 
+ * + * string endpoint = 1; + * + * @return This builder for chaining. + */ + public Builder clearEndpoint() { + + endpoint_ = getDefaultInstance().getEndpoint(); + onChanged(); + return this; + } + /** + * + * + *
+       * The ml.googleapis.com endpoint that this model Version currently lives
+       * in.
+       * Example values:
+       * * ml.googleapis.com
+       * * us-centrall-ml.googleapis.com
+       * * europe-west4-ml.googleapis.com
+       * * asia-east1-ml.googleapis.com
+       * 
+ * + * string endpoint = 1; + * + * @param value The bytes for endpoint to set. + * @return This builder for chaining. + */ + public Builder setEndpointBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + endpoint_ = value; + onChanged(); + return this; + } + + private java.lang.Object version_ = ""; + /** + * + * + *
+       * Full resource name of ml engine model Version.
+       * Format: `projects/{project}/models/{model}/versions/{version}`.
+       * 
+ * + * string version = 2 [(.google.api.resource_reference) = { ... } + * + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Full resource name of ml engine model Version.
+       * Format: `projects/{project}/models/{model}/versions/{version}`.
+       * 
+ * + * string version = 2 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for version. + */ + public com.google.protobuf.ByteString getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Full resource name of ml engine model Version.
+       * Format: `projects/{project}/models/{model}/versions/{version}`.
+       * 
+ * + * string version = 2 [(.google.api.resource_reference) = { ... } + * + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + version_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Full resource name of ml engine model Version.
+       * Format: `projects/{project}/models/{model}/versions/{version}`.
+       * 
+ * + * string version = 2 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearVersion() { + + version_ = getDefaultInstance().getVersion(); + onChanged(); + return this; + } + /** + * + * + *
+       * Full resource name of ml engine model Version.
+       * Format: `projects/{project}/models/{model}/versions/{version}`.
+       * 
+ * + * string version = 2 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + version_ = 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.v1.MigratableResource.MlEngineModelVersion) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion) + private static final com.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion(); + } + + public static com.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MlEngineModelVersion parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new MlEngineModelVersion(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.v1.MigratableResource.MlEngineModelVersion + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface AutomlModelOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.MigratableResource.AutomlModel) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Full resource name of automl Model.
+     * Format:
+     * `projects/{project}/locations/{location}/models/{model}`.
+     * 
+ * + * string model = 1 [(.google.api.resource_reference) = { ... } + * + * @return The model. + */ + java.lang.String getModel(); + /** + * + * + *
+     * Full resource name of automl Model.
+     * Format:
+     * `projects/{project}/locations/{location}/models/{model}`.
+     * 
+ * + * string model = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for model. + */ + com.google.protobuf.ByteString getModelBytes(); + + /** + * + * + *
+     * The Model's display name in automl.googleapis.com.
+     * 
+ * + * string model_display_name = 3; + * + * @return The modelDisplayName. + */ + java.lang.String getModelDisplayName(); + /** + * + * + *
+     * The Model's display name in automl.googleapis.com.
+     * 
+ * + * string model_display_name = 3; + * + * @return The bytes for modelDisplayName. + */ + com.google.protobuf.ByteString getModelDisplayNameBytes(); + } + /** + * + * + *
+   * Represents one Model in automl.googleapis.com.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.MigratableResource.AutomlModel} + */ + public static final class AutomlModel extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.MigratableResource.AutomlModel) + AutomlModelOrBuilder { + private static final long serialVersionUID = 0L; + // Use AutomlModel.newBuilder() to construct. + private AutomlModel(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AutomlModel() { + model_ = ""; + modelDisplayName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AutomlModel(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AutomlModel( + 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(); + + model_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + modelDisplayName_ = 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.v1.MigratableResourceProto + .internal_static_google_cloud_aiplatform_v1_MigratableResource_AutomlModel_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.MigratableResourceProto + .internal_static_google_cloud_aiplatform_v1_MigratableResource_AutomlModel_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.MigratableResource.AutomlModel.class, + com.google.cloud.aiplatform.v1.MigratableResource.AutomlModel.Builder.class); + } + + public static final int MODEL_FIELD_NUMBER = 1; + private volatile java.lang.Object model_; + /** + * + * + *
+     * Full resource name of automl Model.
+     * Format:
+     * `projects/{project}/locations/{location}/models/{model}`.
+     * 
+ * + * string model = 1 [(.google.api.resource_reference) = { ... } + * + * @return The model. + */ + @java.lang.Override + public java.lang.String getModel() { + java.lang.Object ref = model_; + 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(); + model_ = s; + return s; + } + } + /** + * + * + *
+     * Full resource name of automl Model.
+     * Format:
+     * `projects/{project}/locations/{location}/models/{model}`.
+     * 
+ * + * string model = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for model. + */ + @java.lang.Override + public com.google.protobuf.ByteString getModelBytes() { + java.lang.Object ref = model_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + model_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MODEL_DISPLAY_NAME_FIELD_NUMBER = 3; + private volatile java.lang.Object modelDisplayName_; + /** + * + * + *
+     * The Model's display name in automl.googleapis.com.
+     * 
+ * + * string model_display_name = 3; + * + * @return The modelDisplayName. + */ + @java.lang.Override + public java.lang.String getModelDisplayName() { + java.lang.Object ref = modelDisplayName_; + 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(); + modelDisplayName_ = s; + return s; + } + } + /** + * + * + *
+     * The Model's display name in automl.googleapis.com.
+     * 
+ * + * string model_display_name = 3; + * + * @return The bytes for modelDisplayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getModelDisplayNameBytes() { + java.lang.Object ref = modelDisplayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + modelDisplayName_ = 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 (!getModelBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, model_); + } + if (!getModelDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, modelDisplayName_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getModelBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, model_); + } + if (!getModelDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, modelDisplayName_); + } + 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.v1.MigratableResource.AutomlModel)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.MigratableResource.AutomlModel other = + (com.google.cloud.aiplatform.v1.MigratableResource.AutomlModel) obj; + + if (!getModel().equals(other.getModel())) return false; + if (!getModelDisplayName().equals(other.getModelDisplayName())) 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_FIELD_NUMBER; + hash = (53 * hash) + getModel().hashCode(); + hash = (37 * hash) + MODEL_DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getModelDisplayName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.MigratableResource.AutomlModel parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.MigratableResource.AutomlModel 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.v1.MigratableResource.AutomlModel parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.MigratableResource.AutomlModel 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.v1.MigratableResource.AutomlModel parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.MigratableResource.AutomlModel parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.MigratableResource.AutomlModel parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.MigratableResource.AutomlModel 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.v1.MigratableResource.AutomlModel parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.MigratableResource.AutomlModel 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.v1.MigratableResource.AutomlModel parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.MigratableResource.AutomlModel 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.v1.MigratableResource.AutomlModel 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 one Model in automl.googleapis.com.
+     * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.MigratableResource.AutomlModel} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.MigratableResource.AutomlModel) + com.google.cloud.aiplatform.v1.MigratableResource.AutomlModelOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.MigratableResourceProto + .internal_static_google_cloud_aiplatform_v1_MigratableResource_AutomlModel_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.MigratableResourceProto + .internal_static_google_cloud_aiplatform_v1_MigratableResource_AutomlModel_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.MigratableResource.AutomlModel.class, + com.google.cloud.aiplatform.v1.MigratableResource.AutomlModel.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.MigratableResource.AutomlModel.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(); + model_ = ""; + + modelDisplayName_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.MigratableResourceProto + .internal_static_google_cloud_aiplatform_v1_MigratableResource_AutomlModel_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigratableResource.AutomlModel + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.MigratableResource.AutomlModel.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigratableResource.AutomlModel build() { + com.google.cloud.aiplatform.v1.MigratableResource.AutomlModel result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigratableResource.AutomlModel buildPartial() { + com.google.cloud.aiplatform.v1.MigratableResource.AutomlModel result = + new com.google.cloud.aiplatform.v1.MigratableResource.AutomlModel(this); + result.model_ = model_; + result.modelDisplayName_ = modelDisplayName_; + 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.v1.MigratableResource.AutomlModel) { + return mergeFrom((com.google.cloud.aiplatform.v1.MigratableResource.AutomlModel) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.MigratableResource.AutomlModel other) { + if (other + == com.google.cloud.aiplatform.v1.MigratableResource.AutomlModel.getDefaultInstance()) + return this; + if (!other.getModel().isEmpty()) { + model_ = other.model_; + onChanged(); + } + if (!other.getModelDisplayName().isEmpty()) { + modelDisplayName_ = other.modelDisplayName_; + 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.v1.MigratableResource.AutomlModel parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.MigratableResource.AutomlModel) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object model_ = ""; + /** + * + * + *
+       * Full resource name of automl Model.
+       * Format:
+       * `projects/{project}/locations/{location}/models/{model}`.
+       * 
+ * + * string model = 1 [(.google.api.resource_reference) = { ... } + * + * @return The model. + */ + public java.lang.String getModel() { + java.lang.Object ref = model_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + model_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Full resource name of automl Model.
+       * Format:
+       * `projects/{project}/locations/{location}/models/{model}`.
+       * 
+ * + * string model = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for model. + */ + public com.google.protobuf.ByteString getModelBytes() { + java.lang.Object ref = model_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + model_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Full resource name of automl Model.
+       * Format:
+       * `projects/{project}/locations/{location}/models/{model}`.
+       * 
+ * + * string model = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The model to set. + * @return This builder for chaining. + */ + public Builder setModel(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + model_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Full resource name of automl Model.
+       * Format:
+       * `projects/{project}/locations/{location}/models/{model}`.
+       * 
+ * + * string model = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearModel() { + + model_ = getDefaultInstance().getModel(); + onChanged(); + return this; + } + /** + * + * + *
+       * Full resource name of automl Model.
+       * Format:
+       * `projects/{project}/locations/{location}/models/{model}`.
+       * 
+ * + * string model = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for model to set. + * @return This builder for chaining. + */ + public Builder setModelBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + model_ = value; + onChanged(); + return this; + } + + private java.lang.Object modelDisplayName_ = ""; + /** + * + * + *
+       * The Model's display name in automl.googleapis.com.
+       * 
+ * + * string model_display_name = 3; + * + * @return The modelDisplayName. + */ + public java.lang.String getModelDisplayName() { + java.lang.Object ref = modelDisplayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + modelDisplayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The Model's display name in automl.googleapis.com.
+       * 
+ * + * string model_display_name = 3; + * + * @return The bytes for modelDisplayName. + */ + public com.google.protobuf.ByteString getModelDisplayNameBytes() { + java.lang.Object ref = modelDisplayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + modelDisplayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The Model's display name in automl.googleapis.com.
+       * 
+ * + * string model_display_name = 3; + * + * @param value The modelDisplayName to set. + * @return This builder for chaining. + */ + public Builder setModelDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + modelDisplayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The Model's display name in automl.googleapis.com.
+       * 
+ * + * string model_display_name = 3; + * + * @return This builder for chaining. + */ + public Builder clearModelDisplayName() { + + modelDisplayName_ = getDefaultInstance().getModelDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+       * The Model's display name in automl.googleapis.com.
+       * 
+ * + * string model_display_name = 3; + * + * @param value The bytes for modelDisplayName to set. + * @return This builder for chaining. + */ + public Builder setModelDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + modelDisplayName_ = 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.v1.MigratableResource.AutomlModel) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.MigratableResource.AutomlModel) + private static final com.google.cloud.aiplatform.v1.MigratableResource.AutomlModel + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.MigratableResource.AutomlModel(); + } + + public static com.google.cloud.aiplatform.v1.MigratableResource.AutomlModel + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AutomlModel parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AutomlModel(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.v1.MigratableResource.AutomlModel + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface AutomlDatasetOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.MigratableResource.AutomlDataset) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Full resource name of automl Dataset.
+     * Format:
+     * `projects/{project}/locations/{location}/datasets/{dataset}`.
+     * 
+ * + * string dataset = 1 [(.google.api.resource_reference) = { ... } + * + * @return The dataset. + */ + java.lang.String getDataset(); + /** + * + * + *
+     * Full resource name of automl Dataset.
+     * Format:
+     * `projects/{project}/locations/{location}/datasets/{dataset}`.
+     * 
+ * + * string dataset = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for dataset. + */ + com.google.protobuf.ByteString getDatasetBytes(); + + /** + * + * + *
+     * The Dataset's display name in automl.googleapis.com.
+     * 
+ * + * string dataset_display_name = 4; + * + * @return The datasetDisplayName. + */ + java.lang.String getDatasetDisplayName(); + /** + * + * + *
+     * The Dataset's display name in automl.googleapis.com.
+     * 
+ * + * string dataset_display_name = 4; + * + * @return The bytes for datasetDisplayName. + */ + com.google.protobuf.ByteString getDatasetDisplayNameBytes(); + } + /** + * + * + *
+   * Represents one Dataset in automl.googleapis.com.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.MigratableResource.AutomlDataset} + */ + public static final class AutomlDataset extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.MigratableResource.AutomlDataset) + AutomlDatasetOrBuilder { + private static final long serialVersionUID = 0L; + // Use AutomlDataset.newBuilder() to construct. + private AutomlDataset(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AutomlDataset() { + dataset_ = ""; + datasetDisplayName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AutomlDataset(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AutomlDataset( + 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(); + + dataset_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + datasetDisplayName_ = 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.v1.MigratableResourceProto + .internal_static_google_cloud_aiplatform_v1_MigratableResource_AutomlDataset_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.MigratableResourceProto + .internal_static_google_cloud_aiplatform_v1_MigratableResource_AutomlDataset_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset.class, + com.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset.Builder.class); + } + + public static final int DATASET_FIELD_NUMBER = 1; + private volatile java.lang.Object dataset_; + /** + * + * + *
+     * Full resource name of automl Dataset.
+     * Format:
+     * `projects/{project}/locations/{location}/datasets/{dataset}`.
+     * 
+ * + * string dataset = 1 [(.google.api.resource_reference) = { ... } + * + * @return The dataset. + */ + @java.lang.Override + public java.lang.String getDataset() { + java.lang.Object ref = dataset_; + 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(); + dataset_ = s; + return s; + } + } + /** + * + * + *
+     * Full resource name of automl Dataset.
+     * Format:
+     * `projects/{project}/locations/{location}/datasets/{dataset}`.
+     * 
+ * + * string dataset = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for dataset. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDatasetBytes() { + java.lang.Object ref = dataset_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataset_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATASET_DISPLAY_NAME_FIELD_NUMBER = 4; + private volatile java.lang.Object datasetDisplayName_; + /** + * + * + *
+     * The Dataset's display name in automl.googleapis.com.
+     * 
+ * + * string dataset_display_name = 4; + * + * @return The datasetDisplayName. + */ + @java.lang.Override + public java.lang.String getDatasetDisplayName() { + java.lang.Object ref = datasetDisplayName_; + 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(); + datasetDisplayName_ = s; + return s; + } + } + /** + * + * + *
+     * The Dataset's display name in automl.googleapis.com.
+     * 
+ * + * string dataset_display_name = 4; + * + * @return The bytes for datasetDisplayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDatasetDisplayNameBytes() { + java.lang.Object ref = datasetDisplayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + datasetDisplayName_ = 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 (!getDatasetBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, dataset_); + } + if (!getDatasetDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, datasetDisplayName_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getDatasetBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, dataset_); + } + if (!getDatasetDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, datasetDisplayName_); + } + 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.v1.MigratableResource.AutomlDataset)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset other = + (com.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset) obj; + + if (!getDataset().equals(other.getDataset())) return false; + if (!getDatasetDisplayName().equals(other.getDatasetDisplayName())) 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) + DATASET_FIELD_NUMBER; + hash = (53 * hash) + getDataset().hashCode(); + hash = (37 * hash) + DATASET_DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDatasetDisplayName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset 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.v1.MigratableResource.AutomlDataset parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset 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.v1.MigratableResource.AutomlDataset parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset 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.v1.MigratableResource.AutomlDataset + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset + 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.v1.MigratableResource.AutomlDataset parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset 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.v1.MigratableResource.AutomlDataset 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 one Dataset in automl.googleapis.com.
+     * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.MigratableResource.AutomlDataset} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.MigratableResource.AutomlDataset) + com.google.cloud.aiplatform.v1.MigratableResource.AutomlDatasetOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.MigratableResourceProto + .internal_static_google_cloud_aiplatform_v1_MigratableResource_AutomlDataset_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.MigratableResourceProto + .internal_static_google_cloud_aiplatform_v1_MigratableResource_AutomlDataset_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset.class, + com.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset.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(); + dataset_ = ""; + + datasetDisplayName_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.MigratableResourceProto + .internal_static_google_cloud_aiplatform_v1_MigratableResource_AutomlDataset_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset build() { + com.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset buildPartial() { + com.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset result = + new com.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset(this); + result.dataset_ = dataset_; + result.datasetDisplayName_ = datasetDisplayName_; + 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.v1.MigratableResource.AutomlDataset) { + return mergeFrom((com.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset other) { + if (other + == com.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset.getDefaultInstance()) + return this; + if (!other.getDataset().isEmpty()) { + dataset_ = other.dataset_; + onChanged(); + } + if (!other.getDatasetDisplayName().isEmpty()) { + datasetDisplayName_ = other.datasetDisplayName_; + 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.v1.MigratableResource.AutomlDataset parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object dataset_ = ""; + /** + * + * + *
+       * Full resource name of automl Dataset.
+       * Format:
+       * `projects/{project}/locations/{location}/datasets/{dataset}`.
+       * 
+ * + * string dataset = 1 [(.google.api.resource_reference) = { ... } + * + * @return The dataset. + */ + public java.lang.String getDataset() { + java.lang.Object ref = dataset_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataset_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Full resource name of automl Dataset.
+       * Format:
+       * `projects/{project}/locations/{location}/datasets/{dataset}`.
+       * 
+ * + * string dataset = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for dataset. + */ + public com.google.protobuf.ByteString getDatasetBytes() { + java.lang.Object ref = dataset_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataset_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Full resource name of automl Dataset.
+       * Format:
+       * `projects/{project}/locations/{location}/datasets/{dataset}`.
+       * 
+ * + * string dataset = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The dataset to set. + * @return This builder for chaining. + */ + public Builder setDataset(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + dataset_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Full resource name of automl Dataset.
+       * Format:
+       * `projects/{project}/locations/{location}/datasets/{dataset}`.
+       * 
+ * + * string dataset = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearDataset() { + + dataset_ = getDefaultInstance().getDataset(); + onChanged(); + return this; + } + /** + * + * + *
+       * Full resource name of automl Dataset.
+       * Format:
+       * `projects/{project}/locations/{location}/datasets/{dataset}`.
+       * 
+ * + * string dataset = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for dataset to set. + * @return This builder for chaining. + */ + public Builder setDatasetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + dataset_ = value; + onChanged(); + return this; + } + + private java.lang.Object datasetDisplayName_ = ""; + /** + * + * + *
+       * The Dataset's display name in automl.googleapis.com.
+       * 
+ * + * string dataset_display_name = 4; + * + * @return The datasetDisplayName. + */ + public java.lang.String getDatasetDisplayName() { + java.lang.Object ref = datasetDisplayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + datasetDisplayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The Dataset's display name in automl.googleapis.com.
+       * 
+ * + * string dataset_display_name = 4; + * + * @return The bytes for datasetDisplayName. + */ + public com.google.protobuf.ByteString getDatasetDisplayNameBytes() { + java.lang.Object ref = datasetDisplayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + datasetDisplayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The Dataset's display name in automl.googleapis.com.
+       * 
+ * + * string dataset_display_name = 4; + * + * @param value The datasetDisplayName to set. + * @return This builder for chaining. + */ + public Builder setDatasetDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + datasetDisplayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The Dataset's display name in automl.googleapis.com.
+       * 
+ * + * string dataset_display_name = 4; + * + * @return This builder for chaining. + */ + public Builder clearDatasetDisplayName() { + + datasetDisplayName_ = getDefaultInstance().getDatasetDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+       * The Dataset's display name in automl.googleapis.com.
+       * 
+ * + * string dataset_display_name = 4; + * + * @param value The bytes for datasetDisplayName to set. + * @return This builder for chaining. + */ + public Builder setDatasetDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + datasetDisplayName_ = 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.v1.MigratableResource.AutomlDataset) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.MigratableResource.AutomlDataset) + private static final com.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset(); + } + + public static com.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AutomlDataset parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AutomlDataset(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.v1.MigratableResource.AutomlDataset + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface DataLabelingDatasetOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Full resource name of data labeling Dataset.
+     * Format:
+     * `projects/{project}/datasets/{dataset}`.
+     * 
+ * + * string dataset = 1 [(.google.api.resource_reference) = { ... } + * + * @return The dataset. + */ + java.lang.String getDataset(); + /** + * + * + *
+     * Full resource name of data labeling Dataset.
+     * Format:
+     * `projects/{project}/datasets/{dataset}`.
+     * 
+ * + * string dataset = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for dataset. + */ + com.google.protobuf.ByteString getDatasetBytes(); + + /** + * + * + *
+     * The Dataset's display name in datalabeling.googleapis.com.
+     * 
+ * + * string dataset_display_name = 4; + * + * @return The datasetDisplayName. + */ + java.lang.String getDatasetDisplayName(); + /** + * + * + *
+     * The Dataset's display name in datalabeling.googleapis.com.
+     * 
+ * + * string dataset_display_name = 4; + * + * @return The bytes for datasetDisplayName. + */ + com.google.protobuf.ByteString getDatasetDisplayNameBytes(); + + /** + * + * + *
+     * The migratable AnnotatedDataset in datalabeling.googleapis.com belongs to
+     * the data labeling Dataset.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset data_labeling_annotated_datasets = 3; + * + */ + java.util.List< + com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDataset> + getDataLabelingAnnotatedDatasetsList(); + /** + * + * + *
+     * The migratable AnnotatedDataset in datalabeling.googleapis.com belongs to
+     * the data labeling Dataset.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset data_labeling_annotated_datasets = 3; + * + */ + com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDataset + getDataLabelingAnnotatedDatasets(int index); + /** + * + * + *
+     * The migratable AnnotatedDataset in datalabeling.googleapis.com belongs to
+     * the data labeling Dataset.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset data_labeling_annotated_datasets = 3; + * + */ + int getDataLabelingAnnotatedDatasetsCount(); + /** + * + * + *
+     * The migratable AnnotatedDataset in datalabeling.googleapis.com belongs to
+     * the data labeling Dataset.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset data_labeling_annotated_datasets = 3; + * + */ + java.util.List< + ? extends + com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDatasetOrBuilder> + getDataLabelingAnnotatedDatasetsOrBuilderList(); + /** + * + * + *
+     * The migratable AnnotatedDataset in datalabeling.googleapis.com belongs to
+     * the data labeling Dataset.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset data_labeling_annotated_datasets = 3; + * + */ + com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDatasetOrBuilder + getDataLabelingAnnotatedDatasetsOrBuilder(int index); + } + /** + * + * + *
+   * Represents one Dataset in datalabeling.googleapis.com.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset} + */ + public static final class DataLabelingDataset extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset) + DataLabelingDatasetOrBuilder { + private static final long serialVersionUID = 0L; + // Use DataLabelingDataset.newBuilder() to construct. + private DataLabelingDataset(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DataLabelingDataset() { + dataset_ = ""; + datasetDisplayName_ = ""; + dataLabelingAnnotatedDatasets_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DataLabelingDataset(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DataLabelingDataset( + 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(); + + dataset_ = s; + break; + } + case 26: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + dataLabelingAnnotatedDatasets_ = + new java.util.ArrayList< + com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDataset>(); + mutable_bitField0_ |= 0x00000001; + } + dataLabelingAnnotatedDatasets_.add( + input.readMessage( + com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDataset.parser(), + extensionRegistry)); + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + datasetDisplayName_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + dataLabelingAnnotatedDatasets_ = + java.util.Collections.unmodifiableList(dataLabelingAnnotatedDatasets_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.MigratableResourceProto + .internal_static_google_cloud_aiplatform_v1_MigratableResource_DataLabelingDataset_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.MigratableResourceProto + .internal_static_google_cloud_aiplatform_v1_MigratableResource_DataLabelingDataset_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.class, + com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.Builder.class); + } + + public interface DataLabelingAnnotatedDatasetOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Full resource name of data labeling AnnotatedDataset.
+       * Format:
+       * `projects/{project}/datasets/{dataset}/annotatedDatasets/{annotated_dataset}`.
+       * 
+ * + * string annotated_dataset = 1 [(.google.api.resource_reference) = { ... } + * + * @return The annotatedDataset. + */ + java.lang.String getAnnotatedDataset(); + /** + * + * + *
+       * Full resource name of data labeling AnnotatedDataset.
+       * Format:
+       * `projects/{project}/datasets/{dataset}/annotatedDatasets/{annotated_dataset}`.
+       * 
+ * + * string annotated_dataset = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for annotatedDataset. + */ + com.google.protobuf.ByteString getAnnotatedDatasetBytes(); + + /** + * + * + *
+       * The AnnotatedDataset's display name in datalabeling.googleapis.com.
+       * 
+ * + * string annotated_dataset_display_name = 3; + * + * @return The annotatedDatasetDisplayName. + */ + java.lang.String getAnnotatedDatasetDisplayName(); + /** + * + * + *
+       * The AnnotatedDataset's display name in datalabeling.googleapis.com.
+       * 
+ * + * string annotated_dataset_display_name = 3; + * + * @return The bytes for annotatedDatasetDisplayName. + */ + com.google.protobuf.ByteString getAnnotatedDatasetDisplayNameBytes(); + } + /** + * + * + *
+     * Represents one AnnotatedDataset in datalabeling.googleapis.com.
+     * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset} + */ + public static final class DataLabelingAnnotatedDataset + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset) + DataLabelingAnnotatedDatasetOrBuilder { + private static final long serialVersionUID = 0L; + // Use DataLabelingAnnotatedDataset.newBuilder() to construct. + private DataLabelingAnnotatedDataset( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DataLabelingAnnotatedDataset() { + annotatedDataset_ = ""; + annotatedDatasetDisplayName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DataLabelingAnnotatedDataset(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DataLabelingAnnotatedDataset( + 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(); + + annotatedDataset_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + annotatedDatasetDisplayName_ = 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.v1.MigratableResourceProto + .internal_static_google_cloud_aiplatform_v1_MigratableResource_DataLabelingDataset_DataLabelingAnnotatedDataset_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.MigratableResourceProto + .internal_static_google_cloud_aiplatform_v1_MigratableResource_DataLabelingDataset_DataLabelingAnnotatedDataset_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDataset.class, + com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDataset.Builder.class); + } + + public static final int ANNOTATED_DATASET_FIELD_NUMBER = 1; + private volatile java.lang.Object annotatedDataset_; + /** + * + * + *
+       * Full resource name of data labeling AnnotatedDataset.
+       * Format:
+       * `projects/{project}/datasets/{dataset}/annotatedDatasets/{annotated_dataset}`.
+       * 
+ * + * string annotated_dataset = 1 [(.google.api.resource_reference) = { ... } + * + * @return The annotatedDataset. + */ + @java.lang.Override + public java.lang.String getAnnotatedDataset() { + java.lang.Object ref = annotatedDataset_; + 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(); + annotatedDataset_ = s; + return s; + } + } + /** + * + * + *
+       * Full resource name of data labeling AnnotatedDataset.
+       * Format:
+       * `projects/{project}/datasets/{dataset}/annotatedDatasets/{annotated_dataset}`.
+       * 
+ * + * string annotated_dataset = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for annotatedDataset. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAnnotatedDatasetBytes() { + java.lang.Object ref = annotatedDataset_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + annotatedDataset_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ANNOTATED_DATASET_DISPLAY_NAME_FIELD_NUMBER = 3; + private volatile java.lang.Object annotatedDatasetDisplayName_; + /** + * + * + *
+       * The AnnotatedDataset's display name in datalabeling.googleapis.com.
+       * 
+ * + * string annotated_dataset_display_name = 3; + * + * @return The annotatedDatasetDisplayName. + */ + @java.lang.Override + public java.lang.String getAnnotatedDatasetDisplayName() { + java.lang.Object ref = annotatedDatasetDisplayName_; + 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(); + annotatedDatasetDisplayName_ = s; + return s; + } + } + /** + * + * + *
+       * The AnnotatedDataset's display name in datalabeling.googleapis.com.
+       * 
+ * + * string annotated_dataset_display_name = 3; + * + * @return The bytes for annotatedDatasetDisplayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAnnotatedDatasetDisplayNameBytes() { + java.lang.Object ref = annotatedDatasetDisplayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + annotatedDatasetDisplayName_ = 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 (!getAnnotatedDatasetBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, annotatedDataset_); + } + if (!getAnnotatedDatasetDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 3, annotatedDatasetDisplayName_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getAnnotatedDatasetBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, annotatedDataset_); + } + if (!getAnnotatedDatasetDisplayNameBytes().isEmpty()) { + size += + com.google.protobuf.GeneratedMessageV3.computeStringSize( + 3, annotatedDatasetDisplayName_); + } + 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.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDataset)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDataset + other = + (com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDataset) + obj; + + if (!getAnnotatedDataset().equals(other.getAnnotatedDataset())) return false; + if (!getAnnotatedDatasetDisplayName().equals(other.getAnnotatedDatasetDisplayName())) + 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) + ANNOTATED_DATASET_FIELD_NUMBER; + hash = (53 * hash) + getAnnotatedDataset().hashCode(); + hash = (37 * hash) + ANNOTATED_DATASET_DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getAnnotatedDatasetDisplayName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDataset + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDataset + 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.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDataset + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDataset + 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.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDataset + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDataset + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDataset + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDataset + 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.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDataset + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDataset + 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.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDataset + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDataset + 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.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDataset + 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 one AnnotatedDataset in datalabeling.googleapis.com.
+       * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset) + com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDatasetOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.MigratableResourceProto + .internal_static_google_cloud_aiplatform_v1_MigratableResource_DataLabelingDataset_DataLabelingAnnotatedDataset_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.MigratableResourceProto + .internal_static_google_cloud_aiplatform_v1_MigratableResource_DataLabelingDataset_DataLabelingAnnotatedDataset_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDataset.class, + com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDataset.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset.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(); + annotatedDataset_ = ""; + + annotatedDatasetDisplayName_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.MigratableResourceProto + .internal_static_google_cloud_aiplatform_v1_MigratableResource_DataLabelingDataset_DataLabelingAnnotatedDataset_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDataset + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDataset.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDataset + build() { + com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDataset + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDataset + buildPartial() { + com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDataset + result = + new com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDataset(this); + result.annotatedDataset_ = annotatedDataset_; + result.annotatedDatasetDisplayName_ = annotatedDatasetDisplayName_; + 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.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDataset) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDataset) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDataset + other) { + if (other + == com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDataset.getDefaultInstance()) return this; + if (!other.getAnnotatedDataset().isEmpty()) { + annotatedDataset_ = other.annotatedDataset_; + onChanged(); + } + if (!other.getAnnotatedDatasetDisplayName().isEmpty()) { + annotatedDatasetDisplayName_ = other.annotatedDatasetDisplayName_; + 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.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDataset + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDataset) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object annotatedDataset_ = ""; + /** + * + * + *
+         * Full resource name of data labeling AnnotatedDataset.
+         * Format:
+         * `projects/{project}/datasets/{dataset}/annotatedDatasets/{annotated_dataset}`.
+         * 
+ * + * string annotated_dataset = 1 [(.google.api.resource_reference) = { ... } + * + * @return The annotatedDataset. + */ + public java.lang.String getAnnotatedDataset() { + java.lang.Object ref = annotatedDataset_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + annotatedDataset_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * Full resource name of data labeling AnnotatedDataset.
+         * Format:
+         * `projects/{project}/datasets/{dataset}/annotatedDatasets/{annotated_dataset}`.
+         * 
+ * + * string annotated_dataset = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for annotatedDataset. + */ + public com.google.protobuf.ByteString getAnnotatedDatasetBytes() { + java.lang.Object ref = annotatedDataset_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + annotatedDataset_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * Full resource name of data labeling AnnotatedDataset.
+         * Format:
+         * `projects/{project}/datasets/{dataset}/annotatedDatasets/{annotated_dataset}`.
+         * 
+ * + * string annotated_dataset = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The annotatedDataset to set. + * @return This builder for chaining. + */ + public Builder setAnnotatedDataset(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + annotatedDataset_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Full resource name of data labeling AnnotatedDataset.
+         * Format:
+         * `projects/{project}/datasets/{dataset}/annotatedDatasets/{annotated_dataset}`.
+         * 
+ * + * string annotated_dataset = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearAnnotatedDataset() { + + annotatedDataset_ = getDefaultInstance().getAnnotatedDataset(); + onChanged(); + return this; + } + /** + * + * + *
+         * Full resource name of data labeling AnnotatedDataset.
+         * Format:
+         * `projects/{project}/datasets/{dataset}/annotatedDatasets/{annotated_dataset}`.
+         * 
+ * + * string annotated_dataset = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for annotatedDataset to set. + * @return This builder for chaining. + */ + public Builder setAnnotatedDatasetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + annotatedDataset_ = value; + onChanged(); + return this; + } + + private java.lang.Object annotatedDatasetDisplayName_ = ""; + /** + * + * + *
+         * The AnnotatedDataset's display name in datalabeling.googleapis.com.
+         * 
+ * + * string annotated_dataset_display_name = 3; + * + * @return The annotatedDatasetDisplayName. + */ + public java.lang.String getAnnotatedDatasetDisplayName() { + java.lang.Object ref = annotatedDatasetDisplayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + annotatedDatasetDisplayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * The AnnotatedDataset's display name in datalabeling.googleapis.com.
+         * 
+ * + * string annotated_dataset_display_name = 3; + * + * @return The bytes for annotatedDatasetDisplayName. + */ + public com.google.protobuf.ByteString getAnnotatedDatasetDisplayNameBytes() { + java.lang.Object ref = annotatedDatasetDisplayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + annotatedDatasetDisplayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * The AnnotatedDataset's display name in datalabeling.googleapis.com.
+         * 
+ * + * string annotated_dataset_display_name = 3; + * + * @param value The annotatedDatasetDisplayName to set. + * @return This builder for chaining. + */ + public Builder setAnnotatedDatasetDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + annotatedDatasetDisplayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * The AnnotatedDataset's display name in datalabeling.googleapis.com.
+         * 
+ * + * string annotated_dataset_display_name = 3; + * + * @return This builder for chaining. + */ + public Builder clearAnnotatedDatasetDisplayName() { + + annotatedDatasetDisplayName_ = getDefaultInstance().getAnnotatedDatasetDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+         * The AnnotatedDataset's display name in datalabeling.googleapis.com.
+         * 
+ * + * string annotated_dataset_display_name = 3; + * + * @param value The bytes for annotatedDatasetDisplayName to set. + * @return This builder for chaining. + */ + public Builder setAnnotatedDatasetDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + annotatedDatasetDisplayName_ = 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.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset) + private static final com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDataset + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDataset(); + } + + public static com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDataset + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DataLabelingAnnotatedDataset parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DataLabelingAnnotatedDataset(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.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDataset + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int DATASET_FIELD_NUMBER = 1; + private volatile java.lang.Object dataset_; + /** + * + * + *
+     * Full resource name of data labeling Dataset.
+     * Format:
+     * `projects/{project}/datasets/{dataset}`.
+     * 
+ * + * string dataset = 1 [(.google.api.resource_reference) = { ... } + * + * @return The dataset. + */ + @java.lang.Override + public java.lang.String getDataset() { + java.lang.Object ref = dataset_; + 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(); + dataset_ = s; + return s; + } + } + /** + * + * + *
+     * Full resource name of data labeling Dataset.
+     * Format:
+     * `projects/{project}/datasets/{dataset}`.
+     * 
+ * + * string dataset = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for dataset. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDatasetBytes() { + java.lang.Object ref = dataset_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataset_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATASET_DISPLAY_NAME_FIELD_NUMBER = 4; + private volatile java.lang.Object datasetDisplayName_; + /** + * + * + *
+     * The Dataset's display name in datalabeling.googleapis.com.
+     * 
+ * + * string dataset_display_name = 4; + * + * @return The datasetDisplayName. + */ + @java.lang.Override + public java.lang.String getDatasetDisplayName() { + java.lang.Object ref = datasetDisplayName_; + 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(); + datasetDisplayName_ = s; + return s; + } + } + /** + * + * + *
+     * The Dataset's display name in datalabeling.googleapis.com.
+     * 
+ * + * string dataset_display_name = 4; + * + * @return The bytes for datasetDisplayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDatasetDisplayNameBytes() { + java.lang.Object ref = datasetDisplayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + datasetDisplayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATA_LABELING_ANNOTATED_DATASETS_FIELD_NUMBER = 3; + private java.util.List< + com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDataset> + dataLabelingAnnotatedDatasets_; + /** + * + * + *
+     * The migratable AnnotatedDataset in datalabeling.googleapis.com belongs to
+     * the data labeling Dataset.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset data_labeling_annotated_datasets = 3; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDataset> + getDataLabelingAnnotatedDatasetsList() { + return dataLabelingAnnotatedDatasets_; + } + /** + * + * + *
+     * The migratable AnnotatedDataset in datalabeling.googleapis.com belongs to
+     * the data labeling Dataset.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset data_labeling_annotated_datasets = 3; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDatasetOrBuilder> + getDataLabelingAnnotatedDatasetsOrBuilderList() { + return dataLabelingAnnotatedDatasets_; + } + /** + * + * + *
+     * The migratable AnnotatedDataset in datalabeling.googleapis.com belongs to
+     * the data labeling Dataset.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset data_labeling_annotated_datasets = 3; + * + */ + @java.lang.Override + public int getDataLabelingAnnotatedDatasetsCount() { + return dataLabelingAnnotatedDatasets_.size(); + } + /** + * + * + *
+     * The migratable AnnotatedDataset in datalabeling.googleapis.com belongs to
+     * the data labeling Dataset.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset data_labeling_annotated_datasets = 3; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDataset + getDataLabelingAnnotatedDatasets(int index) { + return dataLabelingAnnotatedDatasets_.get(index); + } + /** + * + * + *
+     * The migratable AnnotatedDataset in datalabeling.googleapis.com belongs to
+     * the data labeling Dataset.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset data_labeling_annotated_datasets = 3; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDatasetOrBuilder + getDataLabelingAnnotatedDatasetsOrBuilder(int index) { + return dataLabelingAnnotatedDatasets_.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 (!getDatasetBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, dataset_); + } + for (int i = 0; i < dataLabelingAnnotatedDatasets_.size(); i++) { + output.writeMessage(3, dataLabelingAnnotatedDatasets_.get(i)); + } + if (!getDatasetDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, datasetDisplayName_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getDatasetBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, dataset_); + } + for (int i = 0; i < dataLabelingAnnotatedDatasets_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, dataLabelingAnnotatedDatasets_.get(i)); + } + if (!getDatasetDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, datasetDisplayName_); + } + 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.v1.MigratableResource.DataLabelingDataset)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset other = + (com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset) obj; + + if (!getDataset().equals(other.getDataset())) return false; + if (!getDatasetDisplayName().equals(other.getDatasetDisplayName())) return false; + if (!getDataLabelingAnnotatedDatasetsList() + .equals(other.getDataLabelingAnnotatedDatasetsList())) 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) + DATASET_FIELD_NUMBER; + hash = (53 * hash) + getDataset().hashCode(); + hash = (37 * hash) + DATASET_DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDatasetDisplayName().hashCode(); + if (getDataLabelingAnnotatedDatasetsCount() > 0) { + hash = (37 * hash) + DATA_LABELING_ANNOTATED_DATASETS_FIELD_NUMBER; + hash = (53 * hash) + getDataLabelingAnnotatedDatasetsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset 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.v1.MigratableResource.DataLabelingDataset parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset 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.v1.MigratableResource.DataLabelingDataset parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset 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.v1.MigratableResource.DataLabelingDataset + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + 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.v1.MigratableResource.DataLabelingDataset parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset 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.v1.MigratableResource.DataLabelingDataset 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 one Dataset in datalabeling.googleapis.com.
+     * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset) + com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDatasetOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.MigratableResourceProto + .internal_static_google_cloud_aiplatform_v1_MigratableResource_DataLabelingDataset_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.MigratableResourceProto + .internal_static_google_cloud_aiplatform_v1_MigratableResource_DataLabelingDataset_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.class, + com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.Builder + .class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getDataLabelingAnnotatedDatasetsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + dataset_ = ""; + + datasetDisplayName_ = ""; + + if (dataLabelingAnnotatedDatasetsBuilder_ == null) { + dataLabelingAnnotatedDatasets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + dataLabelingAnnotatedDatasetsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.MigratableResourceProto + .internal_static_google_cloud_aiplatform_v1_MigratableResource_DataLabelingDataset_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset build() { + com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset buildPartial() { + com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset result = + new com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset(this); + int from_bitField0_ = bitField0_; + result.dataset_ = dataset_; + result.datasetDisplayName_ = datasetDisplayName_; + if (dataLabelingAnnotatedDatasetsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + dataLabelingAnnotatedDatasets_ = + java.util.Collections.unmodifiableList(dataLabelingAnnotatedDatasets_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.dataLabelingAnnotatedDatasets_ = dataLabelingAnnotatedDatasets_; + } else { + result.dataLabelingAnnotatedDatasets_ = dataLabelingAnnotatedDatasetsBuilder_.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.v1.MigratableResource.DataLabelingDataset) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset other) { + if (other + == com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .getDefaultInstance()) return this; + if (!other.getDataset().isEmpty()) { + dataset_ = other.dataset_; + onChanged(); + } + if (!other.getDatasetDisplayName().isEmpty()) { + datasetDisplayName_ = other.datasetDisplayName_; + onChanged(); + } + if (dataLabelingAnnotatedDatasetsBuilder_ == null) { + if (!other.dataLabelingAnnotatedDatasets_.isEmpty()) { + if (dataLabelingAnnotatedDatasets_.isEmpty()) { + dataLabelingAnnotatedDatasets_ = other.dataLabelingAnnotatedDatasets_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDataLabelingAnnotatedDatasetsIsMutable(); + dataLabelingAnnotatedDatasets_.addAll(other.dataLabelingAnnotatedDatasets_); + } + onChanged(); + } + } else { + if (!other.dataLabelingAnnotatedDatasets_.isEmpty()) { + if (dataLabelingAnnotatedDatasetsBuilder_.isEmpty()) { + dataLabelingAnnotatedDatasetsBuilder_.dispose(); + dataLabelingAnnotatedDatasetsBuilder_ = null; + dataLabelingAnnotatedDatasets_ = other.dataLabelingAnnotatedDatasets_; + bitField0_ = (bitField0_ & ~0x00000001); + dataLabelingAnnotatedDatasetsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDataLabelingAnnotatedDatasetsFieldBuilder() + : null; + } else { + dataLabelingAnnotatedDatasetsBuilder_.addAllMessages( + other.dataLabelingAnnotatedDatasets_); + } + } + } + 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.v1.MigratableResource.DataLabelingDataset parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object dataset_ = ""; + /** + * + * + *
+       * Full resource name of data labeling Dataset.
+       * Format:
+       * `projects/{project}/datasets/{dataset}`.
+       * 
+ * + * string dataset = 1 [(.google.api.resource_reference) = { ... } + * + * @return The dataset. + */ + public java.lang.String getDataset() { + java.lang.Object ref = dataset_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataset_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Full resource name of data labeling Dataset.
+       * Format:
+       * `projects/{project}/datasets/{dataset}`.
+       * 
+ * + * string dataset = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for dataset. + */ + public com.google.protobuf.ByteString getDatasetBytes() { + java.lang.Object ref = dataset_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataset_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Full resource name of data labeling Dataset.
+       * Format:
+       * `projects/{project}/datasets/{dataset}`.
+       * 
+ * + * string dataset = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The dataset to set. + * @return This builder for chaining. + */ + public Builder setDataset(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + dataset_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Full resource name of data labeling Dataset.
+       * Format:
+       * `projects/{project}/datasets/{dataset}`.
+       * 
+ * + * string dataset = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearDataset() { + + dataset_ = getDefaultInstance().getDataset(); + onChanged(); + return this; + } + /** + * + * + *
+       * Full resource name of data labeling Dataset.
+       * Format:
+       * `projects/{project}/datasets/{dataset}`.
+       * 
+ * + * string dataset = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for dataset to set. + * @return This builder for chaining. + */ + public Builder setDatasetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + dataset_ = value; + onChanged(); + return this; + } + + private java.lang.Object datasetDisplayName_ = ""; + /** + * + * + *
+       * The Dataset's display name in datalabeling.googleapis.com.
+       * 
+ * + * string dataset_display_name = 4; + * + * @return The datasetDisplayName. + */ + public java.lang.String getDatasetDisplayName() { + java.lang.Object ref = datasetDisplayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + datasetDisplayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The Dataset's display name in datalabeling.googleapis.com.
+       * 
+ * + * string dataset_display_name = 4; + * + * @return The bytes for datasetDisplayName. + */ + public com.google.protobuf.ByteString getDatasetDisplayNameBytes() { + java.lang.Object ref = datasetDisplayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + datasetDisplayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The Dataset's display name in datalabeling.googleapis.com.
+       * 
+ * + * string dataset_display_name = 4; + * + * @param value The datasetDisplayName to set. + * @return This builder for chaining. + */ + public Builder setDatasetDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + datasetDisplayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The Dataset's display name in datalabeling.googleapis.com.
+       * 
+ * + * string dataset_display_name = 4; + * + * @return This builder for chaining. + */ + public Builder clearDatasetDisplayName() { + + datasetDisplayName_ = getDefaultInstance().getDatasetDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+       * The Dataset's display name in datalabeling.googleapis.com.
+       * 
+ * + * string dataset_display_name = 4; + * + * @param value The bytes for datasetDisplayName to set. + * @return This builder for chaining. + */ + public Builder setDatasetDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + datasetDisplayName_ = value; + onChanged(); + return this; + } + + private java.util.List< + com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDataset> + dataLabelingAnnotatedDatasets_ = java.util.Collections.emptyList(); + + private void ensureDataLabelingAnnotatedDatasetsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + dataLabelingAnnotatedDatasets_ = + new java.util.ArrayList< + com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDataset>(dataLabelingAnnotatedDatasets_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDataset, + com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDataset.Builder, + com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDatasetOrBuilder> + dataLabelingAnnotatedDatasetsBuilder_; + + /** + * + * + *
+       * The migratable AnnotatedDataset in datalabeling.googleapis.com belongs to
+       * the data labeling Dataset.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset data_labeling_annotated_datasets = 3; + * + */ + public java.util.List< + com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDataset> + getDataLabelingAnnotatedDatasetsList() { + if (dataLabelingAnnotatedDatasetsBuilder_ == null) { + return java.util.Collections.unmodifiableList(dataLabelingAnnotatedDatasets_); + } else { + return dataLabelingAnnotatedDatasetsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * The migratable AnnotatedDataset in datalabeling.googleapis.com belongs to
+       * the data labeling Dataset.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset data_labeling_annotated_datasets = 3; + * + */ + public int getDataLabelingAnnotatedDatasetsCount() { + if (dataLabelingAnnotatedDatasetsBuilder_ == null) { + return dataLabelingAnnotatedDatasets_.size(); + } else { + return dataLabelingAnnotatedDatasetsBuilder_.getCount(); + } + } + /** + * + * + *
+       * The migratable AnnotatedDataset in datalabeling.googleapis.com belongs to
+       * the data labeling Dataset.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset data_labeling_annotated_datasets = 3; + * + */ + public com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDataset + getDataLabelingAnnotatedDatasets(int index) { + if (dataLabelingAnnotatedDatasetsBuilder_ == null) { + return dataLabelingAnnotatedDatasets_.get(index); + } else { + return dataLabelingAnnotatedDatasetsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * The migratable AnnotatedDataset in datalabeling.googleapis.com belongs to
+       * the data labeling Dataset.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset data_labeling_annotated_datasets = 3; + * + */ + public Builder setDataLabelingAnnotatedDatasets( + int index, + com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDataset + value) { + if (dataLabelingAnnotatedDatasetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataLabelingAnnotatedDatasetsIsMutable(); + dataLabelingAnnotatedDatasets_.set(index, value); + onChanged(); + } else { + dataLabelingAnnotatedDatasetsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * The migratable AnnotatedDataset in datalabeling.googleapis.com belongs to
+       * the data labeling Dataset.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset data_labeling_annotated_datasets = 3; + * + */ + public Builder setDataLabelingAnnotatedDatasets( + int index, + com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDataset.Builder + builderForValue) { + if (dataLabelingAnnotatedDatasetsBuilder_ == null) { + ensureDataLabelingAnnotatedDatasetsIsMutable(); + dataLabelingAnnotatedDatasets_.set(index, builderForValue.build()); + onChanged(); + } else { + dataLabelingAnnotatedDatasetsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The migratable AnnotatedDataset in datalabeling.googleapis.com belongs to
+       * the data labeling Dataset.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset data_labeling_annotated_datasets = 3; + * + */ + public Builder addDataLabelingAnnotatedDatasets( + com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDataset + value) { + if (dataLabelingAnnotatedDatasetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataLabelingAnnotatedDatasetsIsMutable(); + dataLabelingAnnotatedDatasets_.add(value); + onChanged(); + } else { + dataLabelingAnnotatedDatasetsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * The migratable AnnotatedDataset in datalabeling.googleapis.com belongs to
+       * the data labeling Dataset.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset data_labeling_annotated_datasets = 3; + * + */ + public Builder addDataLabelingAnnotatedDatasets( + int index, + com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDataset + value) { + if (dataLabelingAnnotatedDatasetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataLabelingAnnotatedDatasetsIsMutable(); + dataLabelingAnnotatedDatasets_.add(index, value); + onChanged(); + } else { + dataLabelingAnnotatedDatasetsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * The migratable AnnotatedDataset in datalabeling.googleapis.com belongs to
+       * the data labeling Dataset.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset data_labeling_annotated_datasets = 3; + * + */ + public Builder addDataLabelingAnnotatedDatasets( + com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDataset.Builder + builderForValue) { + if (dataLabelingAnnotatedDatasetsBuilder_ == null) { + ensureDataLabelingAnnotatedDatasetsIsMutable(); + dataLabelingAnnotatedDatasets_.add(builderForValue.build()); + onChanged(); + } else { + dataLabelingAnnotatedDatasetsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The migratable AnnotatedDataset in datalabeling.googleapis.com belongs to
+       * the data labeling Dataset.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset data_labeling_annotated_datasets = 3; + * + */ + public Builder addDataLabelingAnnotatedDatasets( + int index, + com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDataset.Builder + builderForValue) { + if (dataLabelingAnnotatedDatasetsBuilder_ == null) { + ensureDataLabelingAnnotatedDatasetsIsMutable(); + dataLabelingAnnotatedDatasets_.add(index, builderForValue.build()); + onChanged(); + } else { + dataLabelingAnnotatedDatasetsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The migratable AnnotatedDataset in datalabeling.googleapis.com belongs to
+       * the data labeling Dataset.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset data_labeling_annotated_datasets = 3; + * + */ + public Builder addAllDataLabelingAnnotatedDatasets( + java.lang.Iterable< + ? extends + com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDataset> + values) { + if (dataLabelingAnnotatedDatasetsBuilder_ == null) { + ensureDataLabelingAnnotatedDatasetsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, dataLabelingAnnotatedDatasets_); + onChanged(); + } else { + dataLabelingAnnotatedDatasetsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * The migratable AnnotatedDataset in datalabeling.googleapis.com belongs to
+       * the data labeling Dataset.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset data_labeling_annotated_datasets = 3; + * + */ + public Builder clearDataLabelingAnnotatedDatasets() { + if (dataLabelingAnnotatedDatasetsBuilder_ == null) { + dataLabelingAnnotatedDatasets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + dataLabelingAnnotatedDatasetsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * The migratable AnnotatedDataset in datalabeling.googleapis.com belongs to
+       * the data labeling Dataset.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset data_labeling_annotated_datasets = 3; + * + */ + public Builder removeDataLabelingAnnotatedDatasets(int index) { + if (dataLabelingAnnotatedDatasetsBuilder_ == null) { + ensureDataLabelingAnnotatedDatasetsIsMutable(); + dataLabelingAnnotatedDatasets_.remove(index); + onChanged(); + } else { + dataLabelingAnnotatedDatasetsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * The migratable AnnotatedDataset in datalabeling.googleapis.com belongs to
+       * the data labeling Dataset.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset data_labeling_annotated_datasets = 3; + * + */ + public com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDataset.Builder + getDataLabelingAnnotatedDatasetsBuilder(int index) { + return getDataLabelingAnnotatedDatasetsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * The migratable AnnotatedDataset in datalabeling.googleapis.com belongs to
+       * the data labeling Dataset.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset data_labeling_annotated_datasets = 3; + * + */ + public com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDatasetOrBuilder + getDataLabelingAnnotatedDatasetsOrBuilder(int index) { + if (dataLabelingAnnotatedDatasetsBuilder_ == null) { + return dataLabelingAnnotatedDatasets_.get(index); + } else { + return dataLabelingAnnotatedDatasetsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * The migratable AnnotatedDataset in datalabeling.googleapis.com belongs to
+       * the data labeling Dataset.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset data_labeling_annotated_datasets = 3; + * + */ + public java.util.List< + ? extends + com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDatasetOrBuilder> + getDataLabelingAnnotatedDatasetsOrBuilderList() { + if (dataLabelingAnnotatedDatasetsBuilder_ != null) { + return dataLabelingAnnotatedDatasetsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(dataLabelingAnnotatedDatasets_); + } + } + /** + * + * + *
+       * The migratable AnnotatedDataset in datalabeling.googleapis.com belongs to
+       * the data labeling Dataset.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset data_labeling_annotated_datasets = 3; + * + */ + public com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDataset.Builder + addDataLabelingAnnotatedDatasetsBuilder() { + return getDataLabelingAnnotatedDatasetsFieldBuilder() + .addBuilder( + com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDataset.getDefaultInstance()); + } + /** + * + * + *
+       * The migratable AnnotatedDataset in datalabeling.googleapis.com belongs to
+       * the data labeling Dataset.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset data_labeling_annotated_datasets = 3; + * + */ + public com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDataset.Builder + addDataLabelingAnnotatedDatasetsBuilder(int index) { + return getDataLabelingAnnotatedDatasetsFieldBuilder() + .addBuilder( + index, + com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDataset.getDefaultInstance()); + } + /** + * + * + *
+       * The migratable AnnotatedDataset in datalabeling.googleapis.com belongs to
+       * the data labeling Dataset.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset data_labeling_annotated_datasets = 3; + * + */ + public java.util.List< + com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDataset.Builder> + getDataLabelingAnnotatedDatasetsBuilderList() { + return getDataLabelingAnnotatedDatasetsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDataset, + com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDataset.Builder, + com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDatasetOrBuilder> + getDataLabelingAnnotatedDatasetsFieldBuilder() { + if (dataLabelingAnnotatedDatasetsBuilder_ == null) { + dataLabelingAnnotatedDatasetsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDataset, + com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDataset.Builder, + com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .DataLabelingAnnotatedDatasetOrBuilder>( + dataLabelingAnnotatedDatasets_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + dataLabelingAnnotatedDatasets_ = null; + } + return dataLabelingAnnotatedDatasetsBuilder_; + } + + @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.v1.MigratableResource.DataLabelingDataset) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset) + private static final com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset(); + } + + public static com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DataLabelingDataset parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DataLabelingDataset(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.v1.MigratableResource.DataLabelingDataset + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int resourceCase_ = 0; + private java.lang.Object resource_; + + public enum ResourceCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + ML_ENGINE_MODEL_VERSION(1), + AUTOML_MODEL(2), + AUTOML_DATASET(3), + DATA_LABELING_DATASET(4), + RESOURCE_NOT_SET(0); + private final int value; + + private ResourceCase(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 ResourceCase valueOf(int value) { + return forNumber(value); + } + + public static ResourceCase forNumber(int value) { + switch (value) { + case 1: + return ML_ENGINE_MODEL_VERSION; + case 2: + return AUTOML_MODEL; + case 3: + return AUTOML_DATASET; + case 4: + return DATA_LABELING_DATASET; + case 0: + return RESOURCE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ResourceCase getResourceCase() { + return ResourceCase.forNumber(resourceCase_); + } + + public static final int ML_ENGINE_MODEL_VERSION_FIELD_NUMBER = 1; + /** + * + * + *
+   * Output only. Represents one Version in ml.googleapis.com.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion ml_engine_model_version = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the mlEngineModelVersion field is set. + */ + @java.lang.Override + public boolean hasMlEngineModelVersion() { + return resourceCase_ == 1; + } + /** + * + * + *
+   * Output only. Represents one Version in ml.googleapis.com.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion ml_engine_model_version = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The mlEngineModelVersion. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion + getMlEngineModelVersion() { + if (resourceCase_ == 1) { + return (com.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion) resource_; + } + return com.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion + .getDefaultInstance(); + } + /** + * + * + *
+   * Output only. Represents one Version in ml.googleapis.com.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion ml_engine_model_version = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersionOrBuilder + getMlEngineModelVersionOrBuilder() { + if (resourceCase_ == 1) { + return (com.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion) resource_; + } + return com.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion + .getDefaultInstance(); + } + + public static final int AUTOML_MODEL_FIELD_NUMBER = 2; + /** + * + * + *
+   * Output only. Represents one Model in automl.googleapis.com.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MigratableResource.AutomlModel automl_model = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the automlModel field is set. + */ + @java.lang.Override + public boolean hasAutomlModel() { + return resourceCase_ == 2; + } + /** + * + * + *
+   * Output only. Represents one Model in automl.googleapis.com.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MigratableResource.AutomlModel automl_model = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The automlModel. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigratableResource.AutomlModel getAutomlModel() { + if (resourceCase_ == 2) { + return (com.google.cloud.aiplatform.v1.MigratableResource.AutomlModel) resource_; + } + return com.google.cloud.aiplatform.v1.MigratableResource.AutomlModel.getDefaultInstance(); + } + /** + * + * + *
+   * Output only. Represents one Model in automl.googleapis.com.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MigratableResource.AutomlModel automl_model = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigratableResource.AutomlModelOrBuilder + getAutomlModelOrBuilder() { + if (resourceCase_ == 2) { + return (com.google.cloud.aiplatform.v1.MigratableResource.AutomlModel) resource_; + } + return com.google.cloud.aiplatform.v1.MigratableResource.AutomlModel.getDefaultInstance(); + } + + public static final int AUTOML_DATASET_FIELD_NUMBER = 3; + /** + * + * + *
+   * Output only. Represents one Dataset in automl.googleapis.com.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MigratableResource.AutomlDataset automl_dataset = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the automlDataset field is set. + */ + @java.lang.Override + public boolean hasAutomlDataset() { + return resourceCase_ == 3; + } + /** + * + * + *
+   * Output only. Represents one Dataset in automl.googleapis.com.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MigratableResource.AutomlDataset automl_dataset = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The automlDataset. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset getAutomlDataset() { + if (resourceCase_ == 3) { + return (com.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset) resource_; + } + return com.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset.getDefaultInstance(); + } + /** + * + * + *
+   * Output only. Represents one Dataset in automl.googleapis.com.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MigratableResource.AutomlDataset automl_dataset = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigratableResource.AutomlDatasetOrBuilder + getAutomlDatasetOrBuilder() { + if (resourceCase_ == 3) { + return (com.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset) resource_; + } + return com.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset.getDefaultInstance(); + } + + public static final int DATA_LABELING_DATASET_FIELD_NUMBER = 4; + /** + * + * + *
+   * Output only. Represents one Dataset in datalabeling.googleapis.com.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset data_labeling_dataset = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the dataLabelingDataset field is set. + */ + @java.lang.Override + public boolean hasDataLabelingDataset() { + return resourceCase_ == 4; + } + /** + * + * + *
+   * Output only. Represents one Dataset in datalabeling.googleapis.com.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset data_labeling_dataset = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The dataLabelingDataset. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + getDataLabelingDataset() { + if (resourceCase_ == 4) { + return (com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset) resource_; + } + return com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .getDefaultInstance(); + } + /** + * + * + *
+   * Output only. Represents one Dataset in datalabeling.googleapis.com.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset data_labeling_dataset = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDatasetOrBuilder + getDataLabelingDatasetOrBuilder() { + if (resourceCase_ == 4) { + return (com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset) resource_; + } + return com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .getDefaultInstance(); + } + + public static final int LAST_MIGRATE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp lastMigrateTime_; + /** + * + * + *
+   * Output only. Timestamp when the last migration attempt on this MigratableResource started.
+   * Will not be set if there's no migration attempt on this MigratableResource.
+   * 
+ * + * + * .google.protobuf.Timestamp last_migrate_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the lastMigrateTime field is set. + */ + @java.lang.Override + public boolean hasLastMigrateTime() { + return lastMigrateTime_ != null; + } + /** + * + * + *
+   * Output only. Timestamp when the last migration attempt on this MigratableResource started.
+   * Will not be set if there's no migration attempt on this MigratableResource.
+   * 
+ * + * + * .google.protobuf.Timestamp last_migrate_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastMigrateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getLastMigrateTime() { + return lastMigrateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastMigrateTime_; + } + /** + * + * + *
+   * Output only. Timestamp when the last migration attempt on this MigratableResource started.
+   * Will not be set if there's no migration attempt on this MigratableResource.
+   * 
+ * + * + * .google.protobuf.Timestamp last_migrate_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getLastMigrateTimeOrBuilder() { + return getLastMigrateTime(); + } + + public static final int LAST_UPDATE_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp lastUpdateTime_; + /** + * + * + *
+   * Output only. Timestamp when this MigratableResource was last updated.
+   * 
+ * + * + * .google.protobuf.Timestamp last_update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the lastUpdateTime field is set. + */ + @java.lang.Override + public boolean hasLastUpdateTime() { + return lastUpdateTime_ != null; + } + /** + * + * + *
+   * Output only. Timestamp when this MigratableResource was last updated.
+   * 
+ * + * + * .google.protobuf.Timestamp last_update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastUpdateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getLastUpdateTime() { + return lastUpdateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastUpdateTime_; + } + /** + * + * + *
+   * Output only. Timestamp when this MigratableResource was last updated.
+   * 
+ * + * + * .google.protobuf.Timestamp last_update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getLastUpdateTimeOrBuilder() { + return getLastUpdateTime(); + } + + 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 (resourceCase_ == 1) { + output.writeMessage( + 1, (com.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion) resource_); + } + if (resourceCase_ == 2) { + output.writeMessage( + 2, (com.google.cloud.aiplatform.v1.MigratableResource.AutomlModel) resource_); + } + if (resourceCase_ == 3) { + output.writeMessage( + 3, (com.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset) resource_); + } + if (resourceCase_ == 4) { + output.writeMessage( + 4, (com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset) resource_); + } + if (lastMigrateTime_ != null) { + output.writeMessage(5, getLastMigrateTime()); + } + if (lastUpdateTime_ != null) { + output.writeMessage(6, getLastUpdateTime()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (resourceCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, + (com.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion) resource_); + } + if (resourceCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.aiplatform.v1.MigratableResource.AutomlModel) resource_); + } + if (resourceCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset) resource_); + } + if (resourceCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, (com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset) resource_); + } + if (lastMigrateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getLastMigrateTime()); + } + if (lastUpdateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getLastUpdateTime()); + } + 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.v1.MigratableResource)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.MigratableResource other = + (com.google.cloud.aiplatform.v1.MigratableResource) obj; + + if (hasLastMigrateTime() != other.hasLastMigrateTime()) return false; + if (hasLastMigrateTime()) { + if (!getLastMigrateTime().equals(other.getLastMigrateTime())) return false; + } + if (hasLastUpdateTime() != other.hasLastUpdateTime()) return false; + if (hasLastUpdateTime()) { + if (!getLastUpdateTime().equals(other.getLastUpdateTime())) return false; + } + if (!getResourceCase().equals(other.getResourceCase())) return false; + switch (resourceCase_) { + case 1: + if (!getMlEngineModelVersion().equals(other.getMlEngineModelVersion())) return false; + break; + case 2: + if (!getAutomlModel().equals(other.getAutomlModel())) return false; + break; + case 3: + if (!getAutomlDataset().equals(other.getAutomlDataset())) return false; + break; + case 4: + if (!getDataLabelingDataset().equals(other.getDataLabelingDataset())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasLastMigrateTime()) { + hash = (37 * hash) + LAST_MIGRATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getLastMigrateTime().hashCode(); + } + if (hasLastUpdateTime()) { + hash = (37 * hash) + LAST_UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getLastUpdateTime().hashCode(); + } + switch (resourceCase_) { + case 1: + hash = (37 * hash) + ML_ENGINE_MODEL_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getMlEngineModelVersion().hashCode(); + break; + case 2: + hash = (37 * hash) + AUTOML_MODEL_FIELD_NUMBER; + hash = (53 * hash) + getAutomlModel().hashCode(); + break; + case 3: + hash = (37 * hash) + AUTOML_DATASET_FIELD_NUMBER; + hash = (53 * hash) + getAutomlDataset().hashCode(); + break; + case 4: + hash = (37 * hash) + DATA_LABELING_DATASET_FIELD_NUMBER; + hash = (53 * hash) + getDataLabelingDataset().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.MigratableResource parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.MigratableResource 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.v1.MigratableResource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.MigratableResource 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.v1.MigratableResource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.MigratableResource parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.MigratableResource parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.MigratableResource 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.v1.MigratableResource parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.MigratableResource 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.v1.MigratableResource parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.MigratableResource 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.v1.MigratableResource 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 one resource that exists in automl.googleapis.com,
+   * datalabeling.googleapis.com or ml.googleapis.com.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.MigratableResource} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.MigratableResource) + com.google.cloud.aiplatform.v1.MigratableResourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.MigratableResourceProto + .internal_static_google_cloud_aiplatform_v1_MigratableResource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.MigratableResourceProto + .internal_static_google_cloud_aiplatform_v1_MigratableResource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.MigratableResource.class, + com.google.cloud.aiplatform.v1.MigratableResource.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.MigratableResource.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 (lastMigrateTimeBuilder_ == null) { + lastMigrateTime_ = null; + } else { + lastMigrateTime_ = null; + lastMigrateTimeBuilder_ = null; + } + if (lastUpdateTimeBuilder_ == null) { + lastUpdateTime_ = null; + } else { + lastUpdateTime_ = null; + lastUpdateTimeBuilder_ = null; + } + resourceCase_ = 0; + resource_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.MigratableResourceProto + .internal_static_google_cloud_aiplatform_v1_MigratableResource_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigratableResource getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.MigratableResource.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigratableResource build() { + com.google.cloud.aiplatform.v1.MigratableResource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigratableResource buildPartial() { + com.google.cloud.aiplatform.v1.MigratableResource result = + new com.google.cloud.aiplatform.v1.MigratableResource(this); + if (resourceCase_ == 1) { + if (mlEngineModelVersionBuilder_ == null) { + result.resource_ = resource_; + } else { + result.resource_ = mlEngineModelVersionBuilder_.build(); + } + } + if (resourceCase_ == 2) { + if (automlModelBuilder_ == null) { + result.resource_ = resource_; + } else { + result.resource_ = automlModelBuilder_.build(); + } + } + if (resourceCase_ == 3) { + if (automlDatasetBuilder_ == null) { + result.resource_ = resource_; + } else { + result.resource_ = automlDatasetBuilder_.build(); + } + } + if (resourceCase_ == 4) { + if (dataLabelingDatasetBuilder_ == null) { + result.resource_ = resource_; + } else { + result.resource_ = dataLabelingDatasetBuilder_.build(); + } + } + if (lastMigrateTimeBuilder_ == null) { + result.lastMigrateTime_ = lastMigrateTime_; + } else { + result.lastMigrateTime_ = lastMigrateTimeBuilder_.build(); + } + if (lastUpdateTimeBuilder_ == null) { + result.lastUpdateTime_ = lastUpdateTime_; + } else { + result.lastUpdateTime_ = lastUpdateTimeBuilder_.build(); + } + result.resourceCase_ = resourceCase_; + 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.v1.MigratableResource) { + return mergeFrom((com.google.cloud.aiplatform.v1.MigratableResource) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.MigratableResource other) { + if (other == com.google.cloud.aiplatform.v1.MigratableResource.getDefaultInstance()) + return this; + if (other.hasLastMigrateTime()) { + mergeLastMigrateTime(other.getLastMigrateTime()); + } + if (other.hasLastUpdateTime()) { + mergeLastUpdateTime(other.getLastUpdateTime()); + } + switch (other.getResourceCase()) { + case ML_ENGINE_MODEL_VERSION: + { + mergeMlEngineModelVersion(other.getMlEngineModelVersion()); + break; + } + case AUTOML_MODEL: + { + mergeAutomlModel(other.getAutomlModel()); + break; + } + case AUTOML_DATASET: + { + mergeAutomlDataset(other.getAutomlDataset()); + break; + } + case DATA_LABELING_DATASET: + { + mergeDataLabelingDataset(other.getDataLabelingDataset()); + break; + } + case RESOURCE_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.v1.MigratableResource parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.MigratableResource) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int resourceCase_ = 0; + private java.lang.Object resource_; + + public ResourceCase getResourceCase() { + return ResourceCase.forNumber(resourceCase_); + } + + public Builder clearResource() { + resourceCase_ = 0; + resource_ = null; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion, + com.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion.Builder, + com.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersionOrBuilder> + mlEngineModelVersionBuilder_; + /** + * + * + *
+     * Output only. Represents one Version in ml.googleapis.com.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion ml_engine_model_version = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the mlEngineModelVersion field is set. + */ + @java.lang.Override + public boolean hasMlEngineModelVersion() { + return resourceCase_ == 1; + } + /** + * + * + *
+     * Output only. Represents one Version in ml.googleapis.com.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion ml_engine_model_version = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The mlEngineModelVersion. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion + getMlEngineModelVersion() { + if (mlEngineModelVersionBuilder_ == null) { + if (resourceCase_ == 1) { + return (com.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion) resource_; + } + return com.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion + .getDefaultInstance(); + } else { + if (resourceCase_ == 1) { + return mlEngineModelVersionBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Output only. Represents one Version in ml.googleapis.com.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion ml_engine_model_version = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setMlEngineModelVersion( + com.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion value) { + if (mlEngineModelVersionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + resource_ = value; + onChanged(); + } else { + mlEngineModelVersionBuilder_.setMessage(value); + } + resourceCase_ = 1; + return this; + } + /** + * + * + *
+     * Output only. Represents one Version in ml.googleapis.com.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion ml_engine_model_version = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setMlEngineModelVersion( + com.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion.Builder + builderForValue) { + if (mlEngineModelVersionBuilder_ == null) { + resource_ = builderForValue.build(); + onChanged(); + } else { + mlEngineModelVersionBuilder_.setMessage(builderForValue.build()); + } + resourceCase_ = 1; + return this; + } + /** + * + * + *
+     * Output only. Represents one Version in ml.googleapis.com.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion ml_engine_model_version = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeMlEngineModelVersion( + com.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion value) { + if (mlEngineModelVersionBuilder_ == null) { + if (resourceCase_ == 1 + && resource_ + != com.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion + .getDefaultInstance()) { + resource_ = + com.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion.newBuilder( + (com.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion) + resource_) + .mergeFrom(value) + .buildPartial(); + } else { + resource_ = value; + } + onChanged(); + } else { + if (resourceCase_ == 1) { + mlEngineModelVersionBuilder_.mergeFrom(value); + } + mlEngineModelVersionBuilder_.setMessage(value); + } + resourceCase_ = 1; + return this; + } + /** + * + * + *
+     * Output only. Represents one Version in ml.googleapis.com.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion ml_engine_model_version = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearMlEngineModelVersion() { + if (mlEngineModelVersionBuilder_ == null) { + if (resourceCase_ == 1) { + resourceCase_ = 0; + resource_ = null; + onChanged(); + } + } else { + if (resourceCase_ == 1) { + resourceCase_ = 0; + resource_ = null; + } + mlEngineModelVersionBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. Represents one Version in ml.googleapis.com.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion ml_engine_model_version = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion.Builder + getMlEngineModelVersionBuilder() { + return getMlEngineModelVersionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Represents one Version in ml.googleapis.com.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion ml_engine_model_version = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersionOrBuilder + getMlEngineModelVersionOrBuilder() { + if ((resourceCase_ == 1) && (mlEngineModelVersionBuilder_ != null)) { + return mlEngineModelVersionBuilder_.getMessageOrBuilder(); + } else { + if (resourceCase_ == 1) { + return (com.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion) resource_; + } + return com.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Output only. Represents one Version in ml.googleapis.com.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion ml_engine_model_version = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion, + com.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion.Builder, + com.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersionOrBuilder> + getMlEngineModelVersionFieldBuilder() { + if (mlEngineModelVersionBuilder_ == null) { + if (!(resourceCase_ == 1)) { + resource_ = + com.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion + .getDefaultInstance(); + } + mlEngineModelVersionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion, + com.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion.Builder, + com.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersionOrBuilder>( + (com.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion) resource_, + getParentForChildren(), + isClean()); + resource_ = null; + } + resourceCase_ = 1; + onChanged(); + ; + return mlEngineModelVersionBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.MigratableResource.AutomlModel, + com.google.cloud.aiplatform.v1.MigratableResource.AutomlModel.Builder, + com.google.cloud.aiplatform.v1.MigratableResource.AutomlModelOrBuilder> + automlModelBuilder_; + /** + * + * + *
+     * Output only. Represents one Model in automl.googleapis.com.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MigratableResource.AutomlModel automl_model = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the automlModel field is set. + */ + @java.lang.Override + public boolean hasAutomlModel() { + return resourceCase_ == 2; + } + /** + * + * + *
+     * Output only. Represents one Model in automl.googleapis.com.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MigratableResource.AutomlModel automl_model = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The automlModel. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigratableResource.AutomlModel getAutomlModel() { + if (automlModelBuilder_ == null) { + if (resourceCase_ == 2) { + return (com.google.cloud.aiplatform.v1.MigratableResource.AutomlModel) resource_; + } + return com.google.cloud.aiplatform.v1.MigratableResource.AutomlModel.getDefaultInstance(); + } else { + if (resourceCase_ == 2) { + return automlModelBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1.MigratableResource.AutomlModel.getDefaultInstance(); + } + } + /** + * + * + *
+     * Output only. Represents one Model in automl.googleapis.com.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MigratableResource.AutomlModel automl_model = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setAutomlModel( + com.google.cloud.aiplatform.v1.MigratableResource.AutomlModel value) { + if (automlModelBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + resource_ = value; + onChanged(); + } else { + automlModelBuilder_.setMessage(value); + } + resourceCase_ = 2; + return this; + } + /** + * + * + *
+     * Output only. Represents one Model in automl.googleapis.com.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MigratableResource.AutomlModel automl_model = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setAutomlModel( + com.google.cloud.aiplatform.v1.MigratableResource.AutomlModel.Builder builderForValue) { + if (automlModelBuilder_ == null) { + resource_ = builderForValue.build(); + onChanged(); + } else { + automlModelBuilder_.setMessage(builderForValue.build()); + } + resourceCase_ = 2; + return this; + } + /** + * + * + *
+     * Output only. Represents one Model in automl.googleapis.com.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MigratableResource.AutomlModel automl_model = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeAutomlModel( + com.google.cloud.aiplatform.v1.MigratableResource.AutomlModel value) { + if (automlModelBuilder_ == null) { + if (resourceCase_ == 2 + && resource_ + != com.google.cloud.aiplatform.v1.MigratableResource.AutomlModel + .getDefaultInstance()) { + resource_ = + com.google.cloud.aiplatform.v1.MigratableResource.AutomlModel.newBuilder( + (com.google.cloud.aiplatform.v1.MigratableResource.AutomlModel) resource_) + .mergeFrom(value) + .buildPartial(); + } else { + resource_ = value; + } + onChanged(); + } else { + if (resourceCase_ == 2) { + automlModelBuilder_.mergeFrom(value); + } + automlModelBuilder_.setMessage(value); + } + resourceCase_ = 2; + return this; + } + /** + * + * + *
+     * Output only. Represents one Model in automl.googleapis.com.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MigratableResource.AutomlModel automl_model = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearAutomlModel() { + if (automlModelBuilder_ == null) { + if (resourceCase_ == 2) { + resourceCase_ = 0; + resource_ = null; + onChanged(); + } + } else { + if (resourceCase_ == 2) { + resourceCase_ = 0; + resource_ = null; + } + automlModelBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. Represents one Model in automl.googleapis.com.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MigratableResource.AutomlModel automl_model = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.MigratableResource.AutomlModel.Builder + getAutomlModelBuilder() { + return getAutomlModelFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Represents one Model in automl.googleapis.com.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MigratableResource.AutomlModel automl_model = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigratableResource.AutomlModelOrBuilder + getAutomlModelOrBuilder() { + if ((resourceCase_ == 2) && (automlModelBuilder_ != null)) { + return automlModelBuilder_.getMessageOrBuilder(); + } else { + if (resourceCase_ == 2) { + return (com.google.cloud.aiplatform.v1.MigratableResource.AutomlModel) resource_; + } + return com.google.cloud.aiplatform.v1.MigratableResource.AutomlModel.getDefaultInstance(); + } + } + /** + * + * + *
+     * Output only. Represents one Model in automl.googleapis.com.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MigratableResource.AutomlModel automl_model = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.MigratableResource.AutomlModel, + com.google.cloud.aiplatform.v1.MigratableResource.AutomlModel.Builder, + com.google.cloud.aiplatform.v1.MigratableResource.AutomlModelOrBuilder> + getAutomlModelFieldBuilder() { + if (automlModelBuilder_ == null) { + if (!(resourceCase_ == 2)) { + resource_ = + com.google.cloud.aiplatform.v1.MigratableResource.AutomlModel.getDefaultInstance(); + } + automlModelBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.MigratableResource.AutomlModel, + com.google.cloud.aiplatform.v1.MigratableResource.AutomlModel.Builder, + com.google.cloud.aiplatform.v1.MigratableResource.AutomlModelOrBuilder>( + (com.google.cloud.aiplatform.v1.MigratableResource.AutomlModel) resource_, + getParentForChildren(), + isClean()); + resource_ = null; + } + resourceCase_ = 2; + onChanged(); + ; + return automlModelBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset, + com.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset.Builder, + com.google.cloud.aiplatform.v1.MigratableResource.AutomlDatasetOrBuilder> + automlDatasetBuilder_; + /** + * + * + *
+     * Output only. Represents one Dataset in automl.googleapis.com.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MigratableResource.AutomlDataset automl_dataset = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the automlDataset field is set. + */ + @java.lang.Override + public boolean hasAutomlDataset() { + return resourceCase_ == 3; + } + /** + * + * + *
+     * Output only. Represents one Dataset in automl.googleapis.com.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MigratableResource.AutomlDataset automl_dataset = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The automlDataset. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset getAutomlDataset() { + if (automlDatasetBuilder_ == null) { + if (resourceCase_ == 3) { + return (com.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset) resource_; + } + return com.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset.getDefaultInstance(); + } else { + if (resourceCase_ == 3) { + return automlDatasetBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset.getDefaultInstance(); + } + } + /** + * + * + *
+     * Output only. Represents one Dataset in automl.googleapis.com.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MigratableResource.AutomlDataset automl_dataset = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setAutomlDataset( + com.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset value) { + if (automlDatasetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + resource_ = value; + onChanged(); + } else { + automlDatasetBuilder_.setMessage(value); + } + resourceCase_ = 3; + return this; + } + /** + * + * + *
+     * Output only. Represents one Dataset in automl.googleapis.com.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MigratableResource.AutomlDataset automl_dataset = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setAutomlDataset( + com.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset.Builder builderForValue) { + if (automlDatasetBuilder_ == null) { + resource_ = builderForValue.build(); + onChanged(); + } else { + automlDatasetBuilder_.setMessage(builderForValue.build()); + } + resourceCase_ = 3; + return this; + } + /** + * + * + *
+     * Output only. Represents one Dataset in automl.googleapis.com.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MigratableResource.AutomlDataset automl_dataset = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeAutomlDataset( + com.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset value) { + if (automlDatasetBuilder_ == null) { + if (resourceCase_ == 3 + && resource_ + != com.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset + .getDefaultInstance()) { + resource_ = + com.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset.newBuilder( + (com.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset) resource_) + .mergeFrom(value) + .buildPartial(); + } else { + resource_ = value; + } + onChanged(); + } else { + if (resourceCase_ == 3) { + automlDatasetBuilder_.mergeFrom(value); + } + automlDatasetBuilder_.setMessage(value); + } + resourceCase_ = 3; + return this; + } + /** + * + * + *
+     * Output only. Represents one Dataset in automl.googleapis.com.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MigratableResource.AutomlDataset automl_dataset = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearAutomlDataset() { + if (automlDatasetBuilder_ == null) { + if (resourceCase_ == 3) { + resourceCase_ = 0; + resource_ = null; + onChanged(); + } + } else { + if (resourceCase_ == 3) { + resourceCase_ = 0; + resource_ = null; + } + automlDatasetBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. Represents one Dataset in automl.googleapis.com.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MigratableResource.AutomlDataset automl_dataset = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset.Builder + getAutomlDatasetBuilder() { + return getAutomlDatasetFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Represents one Dataset in automl.googleapis.com.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MigratableResource.AutomlDataset automl_dataset = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigratableResource.AutomlDatasetOrBuilder + getAutomlDatasetOrBuilder() { + if ((resourceCase_ == 3) && (automlDatasetBuilder_ != null)) { + return automlDatasetBuilder_.getMessageOrBuilder(); + } else { + if (resourceCase_ == 3) { + return (com.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset) resource_; + } + return com.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset.getDefaultInstance(); + } + } + /** + * + * + *
+     * Output only. Represents one Dataset in automl.googleapis.com.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MigratableResource.AutomlDataset automl_dataset = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset, + com.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset.Builder, + com.google.cloud.aiplatform.v1.MigratableResource.AutomlDatasetOrBuilder> + getAutomlDatasetFieldBuilder() { + if (automlDatasetBuilder_ == null) { + if (!(resourceCase_ == 3)) { + resource_ = + com.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset.getDefaultInstance(); + } + automlDatasetBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset, + com.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset.Builder, + com.google.cloud.aiplatform.v1.MigratableResource.AutomlDatasetOrBuilder>( + (com.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset) resource_, + getParentForChildren(), + isClean()); + resource_ = null; + } + resourceCase_ = 3; + onChanged(); + ; + return automlDatasetBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset, + com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.Builder, + com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDatasetOrBuilder> + dataLabelingDatasetBuilder_; + /** + * + * + *
+     * Output only. Represents one Dataset in datalabeling.googleapis.com.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset data_labeling_dataset = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the dataLabelingDataset field is set. + */ + @java.lang.Override + public boolean hasDataLabelingDataset() { + return resourceCase_ == 4; + } + /** + * + * + *
+     * Output only. Represents one Dataset in datalabeling.googleapis.com.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset data_labeling_dataset = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The dataLabelingDataset. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + getDataLabelingDataset() { + if (dataLabelingDatasetBuilder_ == null) { + if (resourceCase_ == 4) { + return (com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset) resource_; + } + return com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .getDefaultInstance(); + } else { + if (resourceCase_ == 4) { + return dataLabelingDatasetBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Output only. Represents one Dataset in datalabeling.googleapis.com.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset data_labeling_dataset = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDataLabelingDataset( + com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset value) { + if (dataLabelingDatasetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + resource_ = value; + onChanged(); + } else { + dataLabelingDatasetBuilder_.setMessage(value); + } + resourceCase_ = 4; + return this; + } + /** + * + * + *
+     * Output only. Represents one Dataset in datalabeling.googleapis.com.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset data_labeling_dataset = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDataLabelingDataset( + com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.Builder + builderForValue) { + if (dataLabelingDatasetBuilder_ == null) { + resource_ = builderForValue.build(); + onChanged(); + } else { + dataLabelingDatasetBuilder_.setMessage(builderForValue.build()); + } + resourceCase_ = 4; + return this; + } + /** + * + * + *
+     * Output only. Represents one Dataset in datalabeling.googleapis.com.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset data_labeling_dataset = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeDataLabelingDataset( + com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset value) { + if (dataLabelingDatasetBuilder_ == null) { + if (resourceCase_ == 4 + && resource_ + != com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .getDefaultInstance()) { + resource_ = + com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.newBuilder( + (com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset) + resource_) + .mergeFrom(value) + .buildPartial(); + } else { + resource_ = value; + } + onChanged(); + } else { + if (resourceCase_ == 4) { + dataLabelingDatasetBuilder_.mergeFrom(value); + } + dataLabelingDatasetBuilder_.setMessage(value); + } + resourceCase_ = 4; + return this; + } + /** + * + * + *
+     * Output only. Represents one Dataset in datalabeling.googleapis.com.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset data_labeling_dataset = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearDataLabelingDataset() { + if (dataLabelingDatasetBuilder_ == null) { + if (resourceCase_ == 4) { + resourceCase_ = 0; + resource_ = null; + onChanged(); + } + } else { + if (resourceCase_ == 4) { + resourceCase_ = 0; + resource_ = null; + } + dataLabelingDatasetBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. Represents one Dataset in datalabeling.googleapis.com.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset data_labeling_dataset = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.Builder + getDataLabelingDatasetBuilder() { + return getDataLabelingDatasetFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Represents one Dataset in datalabeling.googleapis.com.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset data_labeling_dataset = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDatasetOrBuilder + getDataLabelingDatasetOrBuilder() { + if ((resourceCase_ == 4) && (dataLabelingDatasetBuilder_ != null)) { + return dataLabelingDatasetBuilder_.getMessageOrBuilder(); + } else { + if (resourceCase_ == 4) { + return (com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset) resource_; + } + return com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Output only. Represents one Dataset in datalabeling.googleapis.com.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset data_labeling_dataset = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset, + com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.Builder, + com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDatasetOrBuilder> + getDataLabelingDatasetFieldBuilder() { + if (dataLabelingDatasetBuilder_ == null) { + if (!(resourceCase_ == 4)) { + resource_ = + com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset + .getDefaultInstance(); + } + dataLabelingDatasetBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset, + com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.Builder, + com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDatasetOrBuilder>( + (com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset) resource_, + getParentForChildren(), + isClean()); + resource_ = null; + } + resourceCase_ = 4; + onChanged(); + ; + return dataLabelingDatasetBuilder_; + } + + private com.google.protobuf.Timestamp lastMigrateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + lastMigrateTimeBuilder_; + /** + * + * + *
+     * Output only. Timestamp when the last migration attempt on this MigratableResource started.
+     * Will not be set if there's no migration attempt on this MigratableResource.
+     * 
+ * + * + * .google.protobuf.Timestamp last_migrate_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the lastMigrateTime field is set. + */ + public boolean hasLastMigrateTime() { + return lastMigrateTimeBuilder_ != null || lastMigrateTime_ != null; + } + /** + * + * + *
+     * Output only. Timestamp when the last migration attempt on this MigratableResource started.
+     * Will not be set if there's no migration attempt on this MigratableResource.
+     * 
+ * + * + * .google.protobuf.Timestamp last_migrate_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastMigrateTime. + */ + public com.google.protobuf.Timestamp getLastMigrateTime() { + if (lastMigrateTimeBuilder_ == null) { + return lastMigrateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastMigrateTime_; + } else { + return lastMigrateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Timestamp when the last migration attempt on this MigratableResource started.
+     * Will not be set if there's no migration attempt on this MigratableResource.
+     * 
+ * + * + * .google.protobuf.Timestamp last_migrate_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setLastMigrateTime(com.google.protobuf.Timestamp value) { + if (lastMigrateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + lastMigrateTime_ = value; + onChanged(); + } else { + lastMigrateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when the last migration attempt on this MigratableResource started.
+     * Will not be set if there's no migration attempt on this MigratableResource.
+     * 
+ * + * + * .google.protobuf.Timestamp last_migrate_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setLastMigrateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (lastMigrateTimeBuilder_ == null) { + lastMigrateTime_ = builderForValue.build(); + onChanged(); + } else { + lastMigrateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when the last migration attempt on this MigratableResource started.
+     * Will not be set if there's no migration attempt on this MigratableResource.
+     * 
+ * + * + * .google.protobuf.Timestamp last_migrate_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeLastMigrateTime(com.google.protobuf.Timestamp value) { + if (lastMigrateTimeBuilder_ == null) { + if (lastMigrateTime_ != null) { + lastMigrateTime_ = + com.google.protobuf.Timestamp.newBuilder(lastMigrateTime_) + .mergeFrom(value) + .buildPartial(); + } else { + lastMigrateTime_ = value; + } + onChanged(); + } else { + lastMigrateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when the last migration attempt on this MigratableResource started.
+     * Will not be set if there's no migration attempt on this MigratableResource.
+     * 
+ * + * + * .google.protobuf.Timestamp last_migrate_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearLastMigrateTime() { + if (lastMigrateTimeBuilder_ == null) { + lastMigrateTime_ = null; + onChanged(); + } else { + lastMigrateTime_ = null; + lastMigrateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when the last migration attempt on this MigratableResource started.
+     * Will not be set if there's no migration attempt on this MigratableResource.
+     * 
+ * + * + * .google.protobuf.Timestamp last_migrate_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getLastMigrateTimeBuilder() { + + onChanged(); + return getLastMigrateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Timestamp when the last migration attempt on this MigratableResource started.
+     * Will not be set if there's no migration attempt on this MigratableResource.
+     * 
+ * + * + * .google.protobuf.Timestamp last_migrate_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getLastMigrateTimeOrBuilder() { + if (lastMigrateTimeBuilder_ != null) { + return lastMigrateTimeBuilder_.getMessageOrBuilder(); + } else { + return lastMigrateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastMigrateTime_; + } + } + /** + * + * + *
+     * Output only. Timestamp when the last migration attempt on this MigratableResource started.
+     * Will not be set if there's no migration attempt on this MigratableResource.
+     * 
+ * + * + * .google.protobuf.Timestamp last_migrate_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getLastMigrateTimeFieldBuilder() { + if (lastMigrateTimeBuilder_ == null) { + lastMigrateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getLastMigrateTime(), getParentForChildren(), isClean()); + lastMigrateTime_ = null; + } + return lastMigrateTimeBuilder_; + } + + private com.google.protobuf.Timestamp lastUpdateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + lastUpdateTimeBuilder_; + /** + * + * + *
+     * Output only. Timestamp when this MigratableResource was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp last_update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the lastUpdateTime field is set. + */ + public boolean hasLastUpdateTime() { + return lastUpdateTimeBuilder_ != null || lastUpdateTime_ != null; + } + /** + * + * + *
+     * Output only. Timestamp when this MigratableResource was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp last_update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastUpdateTime. + */ + public com.google.protobuf.Timestamp getLastUpdateTime() { + if (lastUpdateTimeBuilder_ == null) { + return lastUpdateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastUpdateTime_; + } else { + return lastUpdateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Timestamp when this MigratableResource was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp last_update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setLastUpdateTime(com.google.protobuf.Timestamp value) { + if (lastUpdateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + lastUpdateTime_ = value; + onChanged(); + } else { + lastUpdateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this MigratableResource was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp last_update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setLastUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (lastUpdateTimeBuilder_ == null) { + lastUpdateTime_ = builderForValue.build(); + onChanged(); + } else { + lastUpdateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this MigratableResource was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp last_update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeLastUpdateTime(com.google.protobuf.Timestamp value) { + if (lastUpdateTimeBuilder_ == null) { + if (lastUpdateTime_ != null) { + lastUpdateTime_ = + com.google.protobuf.Timestamp.newBuilder(lastUpdateTime_) + .mergeFrom(value) + .buildPartial(); + } else { + lastUpdateTime_ = value; + } + onChanged(); + } else { + lastUpdateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this MigratableResource was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp last_update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearLastUpdateTime() { + if (lastUpdateTimeBuilder_ == null) { + lastUpdateTime_ = null; + onChanged(); + } else { + lastUpdateTime_ = null; + lastUpdateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this MigratableResource was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp last_update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getLastUpdateTimeBuilder() { + + onChanged(); + return getLastUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Timestamp when this MigratableResource was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp last_update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getLastUpdateTimeOrBuilder() { + if (lastUpdateTimeBuilder_ != null) { + return lastUpdateTimeBuilder_.getMessageOrBuilder(); + } else { + return lastUpdateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastUpdateTime_; + } + } + /** + * + * + *
+     * Output only. Timestamp when this MigratableResource was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp last_update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getLastUpdateTimeFieldBuilder() { + if (lastUpdateTimeBuilder_ == null) { + lastUpdateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getLastUpdateTime(), getParentForChildren(), isClean()); + lastUpdateTime_ = null; + } + return lastUpdateTimeBuilder_; + } + + @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.v1.MigratableResource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.MigratableResource) + private static final com.google.cloud.aiplatform.v1.MigratableResource DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.MigratableResource(); + } + + public static com.google.cloud.aiplatform.v1.MigratableResource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MigratableResource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new MigratableResource(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.v1.MigratableResource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/MigratableResourceOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/MigratableResourceOrBuilder.java new file mode 100644 index 000000000..7af63e0c4 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/MigratableResourceOrBuilder.java @@ -0,0 +1,279 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/migratable_resource.proto + +package com.google.cloud.aiplatform.v1; + +public interface MigratableResourceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.MigratableResource) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Represents one Version in ml.googleapis.com.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion ml_engine_model_version = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the mlEngineModelVersion field is set. + */ + boolean hasMlEngineModelVersion(); + /** + * + * + *
+   * Output only. Represents one Version in ml.googleapis.com.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion ml_engine_model_version = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The mlEngineModelVersion. + */ + com.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion getMlEngineModelVersion(); + /** + * + * + *
+   * Output only. Represents one Version in ml.googleapis.com.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion ml_engine_model_version = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersionOrBuilder + getMlEngineModelVersionOrBuilder(); + + /** + * + * + *
+   * Output only. Represents one Model in automl.googleapis.com.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MigratableResource.AutomlModel automl_model = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the automlModel field is set. + */ + boolean hasAutomlModel(); + /** + * + * + *
+   * Output only. Represents one Model in automl.googleapis.com.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MigratableResource.AutomlModel automl_model = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The automlModel. + */ + com.google.cloud.aiplatform.v1.MigratableResource.AutomlModel getAutomlModel(); + /** + * + * + *
+   * Output only. Represents one Model in automl.googleapis.com.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MigratableResource.AutomlModel automl_model = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1.MigratableResource.AutomlModelOrBuilder getAutomlModelOrBuilder(); + + /** + * + * + *
+   * Output only. Represents one Dataset in automl.googleapis.com.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MigratableResource.AutomlDataset automl_dataset = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the automlDataset field is set. + */ + boolean hasAutomlDataset(); + /** + * + * + *
+   * Output only. Represents one Dataset in automl.googleapis.com.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MigratableResource.AutomlDataset automl_dataset = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The automlDataset. + */ + com.google.cloud.aiplatform.v1.MigratableResource.AutomlDataset getAutomlDataset(); + /** + * + * + *
+   * Output only. Represents one Dataset in automl.googleapis.com.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MigratableResource.AutomlDataset automl_dataset = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1.MigratableResource.AutomlDatasetOrBuilder + getAutomlDatasetOrBuilder(); + + /** + * + * + *
+   * Output only. Represents one Dataset in datalabeling.googleapis.com.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset data_labeling_dataset = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the dataLabelingDataset field is set. + */ + boolean hasDataLabelingDataset(); + /** + * + * + *
+   * Output only. Represents one Dataset in datalabeling.googleapis.com.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset data_labeling_dataset = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The dataLabelingDataset. + */ + com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset getDataLabelingDataset(); + /** + * + * + *
+   * Output only. Represents one Dataset in datalabeling.googleapis.com.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset data_labeling_dataset = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1.MigratableResource.DataLabelingDatasetOrBuilder + getDataLabelingDatasetOrBuilder(); + + /** + * + * + *
+   * Output only. Timestamp when the last migration attempt on this MigratableResource started.
+   * Will not be set if there's no migration attempt on this MigratableResource.
+   * 
+ * + * + * .google.protobuf.Timestamp last_migrate_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the lastMigrateTime field is set. + */ + boolean hasLastMigrateTime(); + /** + * + * + *
+   * Output only. Timestamp when the last migration attempt on this MigratableResource started.
+   * Will not be set if there's no migration attempt on this MigratableResource.
+   * 
+ * + * + * .google.protobuf.Timestamp last_migrate_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastMigrateTime. + */ + com.google.protobuf.Timestamp getLastMigrateTime(); + /** + * + * + *
+   * Output only. Timestamp when the last migration attempt on this MigratableResource started.
+   * Will not be set if there's no migration attempt on this MigratableResource.
+   * 
+ * + * + * .google.protobuf.Timestamp last_migrate_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getLastMigrateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Timestamp when this MigratableResource was last updated.
+   * 
+ * + * + * .google.protobuf.Timestamp last_update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the lastUpdateTime field is set. + */ + boolean hasLastUpdateTime(); + /** + * + * + *
+   * Output only. Timestamp when this MigratableResource was last updated.
+   * 
+ * + * + * .google.protobuf.Timestamp last_update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastUpdateTime. + */ + com.google.protobuf.Timestamp getLastUpdateTime(); + /** + * + * + *
+   * Output only. Timestamp when this MigratableResource was last updated.
+   * 
+ * + * + * .google.protobuf.Timestamp last_update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getLastUpdateTimeOrBuilder(); + + public com.google.cloud.aiplatform.v1.MigratableResource.ResourceCase getResourceCase(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/MigratableResourceProto.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/MigratableResourceProto.java new file mode 100644 index 000000000..2096f3f31 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/MigratableResourceProto.java @@ -0,0 +1,203 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/migratable_resource.proto + +package com.google.cloud.aiplatform.v1; + +public final class MigratableResourceProto { + private MigratableResourceProto() {} + + 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_v1_MigratableResource_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_MigratableResource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_MigratableResource_MlEngineModelVersion_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_MigratableResource_MlEngineModelVersion_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_MigratableResource_AutomlModel_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_MigratableResource_AutomlModel_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_MigratableResource_AutomlDataset_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_MigratableResource_AutomlDataset_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_MigratableResource_DataLabelingDataset_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_MigratableResource_DataLabelingDataset_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_MigratableResource_DataLabelingDataset_DataLabelingAnnotatedDataset_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_MigratableResource_DataLabelingDataset_DataLabelingAnnotatedDataset_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n4google/cloud/aiplatform/v1/migratable_" + + "resource.proto\022\032google.cloud.aiplatform." + + "v1\032\037google/api/field_behavior.proto\032\031goo" + + "gle/api/resource.proto\032\037google/protobuf/" + + "timestamp.proto\032\034google/api/annotations." + + "proto\"\323\t\n\022MigratableResource\022k\n\027ml_engin" + + "e_model_version\030\001 \001(\0132C.google.cloud.aip" + + "latform.v1.MigratableResource.MlEngineMo" + + "delVersionB\003\340A\003H\000\022W\n\014automl_model\030\002 \001(\0132" + + ":.google.cloud.aiplatform.v1.MigratableR" + + "esource.AutomlModelB\003\340A\003H\000\022[\n\016automl_dat" + + "aset\030\003 \001(\0132<.google.cloud.aiplatform.v1." + + "MigratableResource.AutomlDatasetB\003\340A\003H\000\022" + + "h\n\025data_labeling_dataset\030\004 \001(\0132B.google." + + "cloud.aiplatform.v1.MigratableResource.D" + + "ataLabelingDatasetB\003\340A\003H\000\022:\n\021last_migrat" + + "e_time\030\005 \001(\0132\032.google.protobuf.Timestamp" + + "B\003\340A\003\0229\n\020last_update_time\030\006 \001(\0132\032.google" + + ".protobuf.TimestampB\003\340A\003\032Y\n\024MlEngineMode" + + "lVersion\022\020\n\010endpoint\030\001 \001(\t\022/\n\007version\030\002 " + + "\001(\tB\036\372A\033\n\031ml.googleapis.com/Version\032Z\n\013A" + + "utomlModel\022/\n\005model\030\001 \001(\tB \372A\035\n\033automl.g" + + "oogleapis.com/Model\022\032\n\022model_display_nam" + + "e\030\003 \001(\t\032b\n\rAutomlDataset\0223\n\007dataset\030\001 \001(" + + "\tB\"\372A\037\n\035automl.googleapis.com/Dataset\022\034\n" + + "\024dataset_display_name\030\004 \001(\t\032\221\003\n\023DataLabe" + + "lingDataset\0229\n\007dataset\030\001 \001(\tB(\372A%\n#datal" + + "abeling.googleapis.com/Dataset\022\034\n\024datase" + + "t_display_name\030\004 \001(\t\022\211\001\n data_labeling_a" + + "nnotated_datasets\030\003 \003(\0132_.google.cloud.a" + + "iplatform.v1.MigratableResource.DataLabe" + + "lingDataset.DataLabelingAnnotatedDataset" + + "\032\224\001\n\034DataLabelingAnnotatedDataset\022L\n\021ann" + + "otated_dataset\030\001 \001(\tB1\372A.\n,datalabeling." + + "googleapis.com/AnnotatedDataset\022&\n\036annot" + + "ated_dataset_display_name\030\003 \001(\tB\n\n\010resou" + + "rceB\330\004\n\036com.google.cloud.aiplatform.v1B\027" + + "MigratableResourceProtoP\001ZDgoogle.golang" + + ".org/genproto/googleapis/cloud/aiplatfor" + + "m/v1;aiplatform\352AQ\n\031ml.googleapis.com/Ve" + + "rsion\0224projects/{project}/models/{model}" + + "/versions/{version}\352AU\n\033automl.googleapi" + + "s.com/Model\0226projects/{project}/location" + + "s/{location}/models/{model}\352A[\n\035automl.g" + + "oogleapis.com/Dataset\022:projects/{project" + + "}/locations/{location}/datasets/{dataset" + + "}\352AL\n#datalabeling.googleapis.com/Datase" + + "t\022%projects/{project}/datasets/{dataset}" + + "\352A{\n,datalabeling.googleapis.com/Annotat" + + "edDataset\022Kprojects/{project}/datasets/{" + + "dataset}/annotatedDatasets/{annotated_da" + + "taset}b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1_MigratableResource_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_MigratableResource_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_MigratableResource_descriptor, + new java.lang.String[] { + "MlEngineModelVersion", + "AutomlModel", + "AutomlDataset", + "DataLabelingDataset", + "LastMigrateTime", + "LastUpdateTime", + "Resource", + }); + internal_static_google_cloud_aiplatform_v1_MigratableResource_MlEngineModelVersion_descriptor = + internal_static_google_cloud_aiplatform_v1_MigratableResource_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_aiplatform_v1_MigratableResource_MlEngineModelVersion_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_MigratableResource_MlEngineModelVersion_descriptor, + new java.lang.String[] { + "Endpoint", "Version", + }); + internal_static_google_cloud_aiplatform_v1_MigratableResource_AutomlModel_descriptor = + internal_static_google_cloud_aiplatform_v1_MigratableResource_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_aiplatform_v1_MigratableResource_AutomlModel_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_MigratableResource_AutomlModel_descriptor, + new java.lang.String[] { + "Model", "ModelDisplayName", + }); + internal_static_google_cloud_aiplatform_v1_MigratableResource_AutomlDataset_descriptor = + internal_static_google_cloud_aiplatform_v1_MigratableResource_descriptor + .getNestedTypes() + .get(2); + internal_static_google_cloud_aiplatform_v1_MigratableResource_AutomlDataset_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_MigratableResource_AutomlDataset_descriptor, + new java.lang.String[] { + "Dataset", "DatasetDisplayName", + }); + internal_static_google_cloud_aiplatform_v1_MigratableResource_DataLabelingDataset_descriptor = + internal_static_google_cloud_aiplatform_v1_MigratableResource_descriptor + .getNestedTypes() + .get(3); + internal_static_google_cloud_aiplatform_v1_MigratableResource_DataLabelingDataset_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_MigratableResource_DataLabelingDataset_descriptor, + new java.lang.String[] { + "Dataset", "DatasetDisplayName", "DataLabelingAnnotatedDatasets", + }); + internal_static_google_cloud_aiplatform_v1_MigratableResource_DataLabelingDataset_DataLabelingAnnotatedDataset_descriptor = + internal_static_google_cloud_aiplatform_v1_MigratableResource_DataLabelingDataset_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_aiplatform_v1_MigratableResource_DataLabelingDataset_DataLabelingAnnotatedDataset_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_MigratableResource_DataLabelingDataset_DataLabelingAnnotatedDataset_descriptor, + new java.lang.String[] { + "AnnotatedDataset", "AnnotatedDatasetDisplayName", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resourceDefinition); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/MigrateResourceRequest.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/MigrateResourceRequest.java new file mode 100644 index 000000000..547cc7564 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/MigrateResourceRequest.java @@ -0,0 +1,7698 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/migration_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Config of migrating one resource from automl.googleapis.com,
+ * datalabeling.googleapis.com and ml.googleapis.com to AI Platform.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.MigrateResourceRequest} + */ +public final class MigrateResourceRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.MigrateResourceRequest) + MigrateResourceRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use MigrateResourceRequest.newBuilder() to construct. + private MigrateResourceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MigrateResourceRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MigrateResourceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private MigrateResourceRequest( + 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.v1.MigrateResourceRequest + .MigrateMlEngineModelVersionConfig.Builder + subBuilder = null; + if (requestCase_ == 1) { + subBuilder = + ((com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateMlEngineModelVersionConfig) + request_) + .toBuilder(); + } + request_ = + input.readMessage( + com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateMlEngineModelVersionConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateMlEngineModelVersionConfig) + request_); + request_ = subBuilder.buildPartial(); + } + requestCase_ = 1; + break; + } + case 18: + { + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig.Builder + subBuilder = null; + if (requestCase_ == 2) { + subBuilder = + ((com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateAutomlModelConfig) + request_) + .toBuilder(); + } + request_ = + input.readMessage( + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig) + request_); + request_ = subBuilder.buildPartial(); + } + requestCase_ = 2; + break; + } + case 26: + { + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig + .Builder + subBuilder = null; + if (requestCase_ == 3) { + subBuilder = + ((com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateAutomlDatasetConfig) + request_) + .toBuilder(); + } + request_ = + input.readMessage( + com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateAutomlDatasetConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateAutomlDatasetConfig) + request_); + request_ = subBuilder.buildPartial(); + } + requestCase_ = 3; + break; + } + case 34: + { + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + .Builder + subBuilder = null; + if (requestCase_ == 4) { + subBuilder = + ((com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig) + request_) + .toBuilder(); + } + request_ = + input.readMessage( + com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig) + request_); + request_ = subBuilder.buildPartial(); + } + requestCase_ = 4; + 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.v1.MigrationServiceProto + .internal_static_google_cloud_aiplatform_v1_MigrateResourceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.MigrationServiceProto + .internal_static_google_cloud_aiplatform_v1_MigrateResourceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.MigrateResourceRequest.class, + com.google.cloud.aiplatform.v1.MigrateResourceRequest.Builder.class); + } + + public interface MigrateMlEngineModelVersionConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The ml.googleapis.com endpoint that this model version should be migrated
+     * from.
+     * Example values:
+     * * ml.googleapis.com
+     * * us-centrall-ml.googleapis.com
+     * * europe-west4-ml.googleapis.com
+     * * asia-east1-ml.googleapis.com
+     * 
+ * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The endpoint. + */ + java.lang.String getEndpoint(); + /** + * + * + *
+     * Required. The ml.googleapis.com endpoint that this model version should be migrated
+     * from.
+     * Example values:
+     * * ml.googleapis.com
+     * * us-centrall-ml.googleapis.com
+     * * europe-west4-ml.googleapis.com
+     * * asia-east1-ml.googleapis.com
+     * 
+ * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for endpoint. + */ + com.google.protobuf.ByteString getEndpointBytes(); + + /** + * + * + *
+     * Required. Full resource name of ml engine model version.
+     * Format: `projects/{project}/models/{model}/versions/{version}`.
+     * 
+ * + * + * string model_version = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The modelVersion. + */ + java.lang.String getModelVersion(); + /** + * + * + *
+     * Required. Full resource name of ml engine model version.
+     * Format: `projects/{project}/models/{model}/versions/{version}`.
+     * 
+ * + * + * string model_version = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for modelVersion. + */ + com.google.protobuf.ByteString getModelVersionBytes(); + + /** + * + * + *
+     * Required. Display name of the model in AI Platform.
+     * System will pick a display name if unspecified.
+     * 
+ * + * string model_display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The modelDisplayName. + */ + java.lang.String getModelDisplayName(); + /** + * + * + *
+     * Required. Display name of the model in AI Platform.
+     * System will pick a display name if unspecified.
+     * 
+ * + * string model_display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for modelDisplayName. + */ + com.google.protobuf.ByteString getModelDisplayNameBytes(); + } + /** + * + * + *
+   * Config for migrating version in ml.googleapis.com to AI Platform's Model.
+   * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig} + */ + public static final class MigrateMlEngineModelVersionConfig + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig) + MigrateMlEngineModelVersionConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use MigrateMlEngineModelVersionConfig.newBuilder() to construct. + private MigrateMlEngineModelVersionConfig( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MigrateMlEngineModelVersionConfig() { + endpoint_ = ""; + modelVersion_ = ""; + modelDisplayName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MigrateMlEngineModelVersionConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private MigrateMlEngineModelVersionConfig( + 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(); + + endpoint_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + modelVersion_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + modelDisplayName_ = 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.v1.MigrationServiceProto + .internal_static_google_cloud_aiplatform_v1_MigrateResourceRequest_MigrateMlEngineModelVersionConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.MigrationServiceProto + .internal_static_google_cloud_aiplatform_v1_MigrateResourceRequest_MigrateMlEngineModelVersionConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateMlEngineModelVersionConfig.class, + com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateMlEngineModelVersionConfig.Builder.class); + } + + public static final int ENDPOINT_FIELD_NUMBER = 1; + private volatile java.lang.Object endpoint_; + /** + * + * + *
+     * Required. The ml.googleapis.com endpoint that this model version should be migrated
+     * from.
+     * Example values:
+     * * ml.googleapis.com
+     * * us-centrall-ml.googleapis.com
+     * * europe-west4-ml.googleapis.com
+     * * asia-east1-ml.googleapis.com
+     * 
+ * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The endpoint. + */ + @java.lang.Override + public java.lang.String getEndpoint() { + java.lang.Object ref = endpoint_; + 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(); + endpoint_ = s; + return s; + } + } + /** + * + * + *
+     * Required. The ml.googleapis.com endpoint that this model version should be migrated
+     * from.
+     * Example values:
+     * * ml.googleapis.com
+     * * us-centrall-ml.googleapis.com
+     * * europe-west4-ml.googleapis.com
+     * * asia-east1-ml.googleapis.com
+     * 
+ * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for endpoint. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEndpointBytes() { + java.lang.Object ref = endpoint_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + endpoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MODEL_VERSION_FIELD_NUMBER = 2; + private volatile java.lang.Object modelVersion_; + /** + * + * + *
+     * Required. Full resource name of ml engine model version.
+     * Format: `projects/{project}/models/{model}/versions/{version}`.
+     * 
+ * + * + * string model_version = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The modelVersion. + */ + @java.lang.Override + public java.lang.String getModelVersion() { + java.lang.Object ref = modelVersion_; + 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(); + modelVersion_ = s; + return s; + } + } + /** + * + * + *
+     * Required. Full resource name of ml engine model version.
+     * Format: `projects/{project}/models/{model}/versions/{version}`.
+     * 
+ * + * + * string model_version = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for modelVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getModelVersionBytes() { + java.lang.Object ref = modelVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + modelVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MODEL_DISPLAY_NAME_FIELD_NUMBER = 3; + private volatile java.lang.Object modelDisplayName_; + /** + * + * + *
+     * Required. Display name of the model in AI Platform.
+     * System will pick a display name if unspecified.
+     * 
+ * + * string model_display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The modelDisplayName. + */ + @java.lang.Override + public java.lang.String getModelDisplayName() { + java.lang.Object ref = modelDisplayName_; + 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(); + modelDisplayName_ = s; + return s; + } + } + /** + * + * + *
+     * Required. Display name of the model in AI Platform.
+     * System will pick a display name if unspecified.
+     * 
+ * + * string model_display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for modelDisplayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getModelDisplayNameBytes() { + java.lang.Object ref = modelDisplayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + modelDisplayName_ = 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 (!getEndpointBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, endpoint_); + } + if (!getModelVersionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, modelVersion_); + } + if (!getModelDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, modelDisplayName_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getEndpointBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, endpoint_); + } + if (!getModelVersionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, modelVersion_); + } + if (!getModelDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, modelDisplayName_); + } + 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.v1.MigrateResourceRequest + .MigrateMlEngineModelVersionConfig)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig + other = + (com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateMlEngineModelVersionConfig) + obj; + + if (!getEndpoint().equals(other.getEndpoint())) return false; + if (!getModelVersion().equals(other.getModelVersion())) return false; + if (!getModelDisplayName().equals(other.getModelDisplayName())) 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) + ENDPOINT_FIELD_NUMBER; + hash = (53 * hash) + getEndpoint().hashCode(); + hash = (37 * hash) + MODEL_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getModelVersion().hashCode(); + hash = (37 * hash) + MODEL_DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getModelDisplayName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateMlEngineModelVersionConfig + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateMlEngineModelVersionConfig + 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.v1.MigrateResourceRequest + .MigrateMlEngineModelVersionConfig + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateMlEngineModelVersionConfig + 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.v1.MigrateResourceRequest + .MigrateMlEngineModelVersionConfig + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateMlEngineModelVersionConfig + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateMlEngineModelVersionConfig + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateMlEngineModelVersionConfig + 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.v1.MigrateResourceRequest + .MigrateMlEngineModelVersionConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateMlEngineModelVersionConfig + 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.v1.MigrateResourceRequest + .MigrateMlEngineModelVersionConfig + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateMlEngineModelVersionConfig + 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.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig + 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; + } + /** + * + * + *
+     * Config for migrating version in ml.googleapis.com to AI Platform's Model.
+     * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig) + com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateMlEngineModelVersionConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.MigrationServiceProto + .internal_static_google_cloud_aiplatform_v1_MigrateResourceRequest_MigrateMlEngineModelVersionConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.MigrationServiceProto + .internal_static_google_cloud_aiplatform_v1_MigrateResourceRequest_MigrateMlEngineModelVersionConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateMlEngineModelVersionConfig.class, + com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateMlEngineModelVersionConfig.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig.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(); + endpoint_ = ""; + + modelVersion_ = ""; + + modelDisplayName_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.MigrationServiceProto + .internal_static_google_cloud_aiplatform_v1_MigrateResourceRequest_MigrateMlEngineModelVersionConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateMlEngineModelVersionConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig + build() { + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig + buildPartial() { + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig + result = + new com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateMlEngineModelVersionConfig(this); + result.endpoint_ = endpoint_; + result.modelVersion_ = modelVersion_; + result.modelDisplayName_ = modelDisplayName_; + 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.v1.MigrateResourceRequest + .MigrateMlEngineModelVersionConfig) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateMlEngineModelVersionConfig) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig + other) { + if (other + == com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateMlEngineModelVersionConfig.getDefaultInstance()) return this; + if (!other.getEndpoint().isEmpty()) { + endpoint_ = other.endpoint_; + onChanged(); + } + if (!other.getModelVersion().isEmpty()) { + modelVersion_ = other.modelVersion_; + onChanged(); + } + if (!other.getModelDisplayName().isEmpty()) { + modelDisplayName_ = other.modelDisplayName_; + 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.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateMlEngineModelVersionConfig) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object endpoint_ = ""; + /** + * + * + *
+       * Required. The ml.googleapis.com endpoint that this model version should be migrated
+       * from.
+       * Example values:
+       * * ml.googleapis.com
+       * * us-centrall-ml.googleapis.com
+       * * europe-west4-ml.googleapis.com
+       * * asia-east1-ml.googleapis.com
+       * 
+ * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The endpoint. + */ + public java.lang.String getEndpoint() { + java.lang.Object ref = endpoint_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpoint_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. The ml.googleapis.com endpoint that this model version should be migrated
+       * from.
+       * Example values:
+       * * ml.googleapis.com
+       * * us-centrall-ml.googleapis.com
+       * * europe-west4-ml.googleapis.com
+       * * asia-east1-ml.googleapis.com
+       * 
+ * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for endpoint. + */ + public com.google.protobuf.ByteString getEndpointBytes() { + java.lang.Object ref = endpoint_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + endpoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. The ml.googleapis.com endpoint that this model version should be migrated
+       * from.
+       * Example values:
+       * * ml.googleapis.com
+       * * us-centrall-ml.googleapis.com
+       * * europe-west4-ml.googleapis.com
+       * * asia-east1-ml.googleapis.com
+       * 
+ * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The endpoint to set. + * @return This builder for chaining. + */ + public Builder setEndpoint(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + endpoint_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The ml.googleapis.com endpoint that this model version should be migrated
+       * from.
+       * Example values:
+       * * ml.googleapis.com
+       * * us-centrall-ml.googleapis.com
+       * * europe-west4-ml.googleapis.com
+       * * asia-east1-ml.googleapis.com
+       * 
+ * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearEndpoint() { + + endpoint_ = getDefaultInstance().getEndpoint(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The ml.googleapis.com endpoint that this model version should be migrated
+       * from.
+       * Example values:
+       * * ml.googleapis.com
+       * * us-centrall-ml.googleapis.com
+       * * europe-west4-ml.googleapis.com
+       * * asia-east1-ml.googleapis.com
+       * 
+ * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for endpoint to set. + * @return This builder for chaining. + */ + public Builder setEndpointBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + endpoint_ = value; + onChanged(); + return this; + } + + private java.lang.Object modelVersion_ = ""; + /** + * + * + *
+       * Required. Full resource name of ml engine model version.
+       * Format: `projects/{project}/models/{model}/versions/{version}`.
+       * 
+ * + * + * string model_version = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The modelVersion. + */ + public java.lang.String getModelVersion() { + java.lang.Object ref = modelVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + modelVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. Full resource name of ml engine model version.
+       * Format: `projects/{project}/models/{model}/versions/{version}`.
+       * 
+ * + * + * string model_version = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for modelVersion. + */ + public com.google.protobuf.ByteString getModelVersionBytes() { + java.lang.Object ref = modelVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + modelVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. Full resource name of ml engine model version.
+       * Format: `projects/{project}/models/{model}/versions/{version}`.
+       * 
+ * + * + * string model_version = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The modelVersion to set. + * @return This builder for chaining. + */ + public Builder setModelVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + modelVersion_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Full resource name of ml engine model version.
+       * Format: `projects/{project}/models/{model}/versions/{version}`.
+       * 
+ * + * + * string model_version = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearModelVersion() { + + modelVersion_ = getDefaultInstance().getModelVersion(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Full resource name of ml engine model version.
+       * Format: `projects/{project}/models/{model}/versions/{version}`.
+       * 
+ * + * + * string model_version = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for modelVersion to set. + * @return This builder for chaining. + */ + public Builder setModelVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + modelVersion_ = value; + onChanged(); + return this; + } + + private java.lang.Object modelDisplayName_ = ""; + /** + * + * + *
+       * Required. Display name of the model in AI Platform.
+       * System will pick a display name if unspecified.
+       * 
+ * + * string model_display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The modelDisplayName. + */ + public java.lang.String getModelDisplayName() { + java.lang.Object ref = modelDisplayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + modelDisplayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. Display name of the model in AI Platform.
+       * System will pick a display name if unspecified.
+       * 
+ * + * string model_display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for modelDisplayName. + */ + public com.google.protobuf.ByteString getModelDisplayNameBytes() { + java.lang.Object ref = modelDisplayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + modelDisplayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. Display name of the model in AI Platform.
+       * System will pick a display name if unspecified.
+       * 
+ * + * string model_display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The modelDisplayName to set. + * @return This builder for chaining. + */ + public Builder setModelDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + modelDisplayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Display name of the model in AI Platform.
+       * System will pick a display name if unspecified.
+       * 
+ * + * string model_display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearModelDisplayName() { + + modelDisplayName_ = getDefaultInstance().getModelDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Display name of the model in AI Platform.
+       * System will pick a display name if unspecified.
+       * 
+ * + * string model_display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for modelDisplayName to set. + * @return This builder for chaining. + */ + public Builder setModelDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + modelDisplayName_ = 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.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig) + private static final com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateMlEngineModelVersionConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateMlEngineModelVersionConfig(); + } + + public static com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateMlEngineModelVersionConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MigrateMlEngineModelVersionConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new MigrateMlEngineModelVersionConfig(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.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface MigrateAutomlModelConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. Full resource name of automl Model.
+     * Format:
+     * `projects/{project}/locations/{location}/models/{model}`.
+     * 
+ * + * + * string model = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The model. + */ + java.lang.String getModel(); + /** + * + * + *
+     * Required. Full resource name of automl Model.
+     * Format:
+     * `projects/{project}/locations/{location}/models/{model}`.
+     * 
+ * + * + * string model = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for model. + */ + com.google.protobuf.ByteString getModelBytes(); + + /** + * + * + *
+     * Optional. Display name of the model in AI Platform.
+     * System will pick a display name if unspecified.
+     * 
+ * + * string model_display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The modelDisplayName. + */ + java.lang.String getModelDisplayName(); + /** + * + * + *
+     * Optional. Display name of the model in AI Platform.
+     * System will pick a display name if unspecified.
+     * 
+ * + * string model_display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for modelDisplayName. + */ + com.google.protobuf.ByteString getModelDisplayNameBytes(); + } + /** + * + * + *
+   * Config for migrating Model in automl.googleapis.com to AI Platform's Model.
+   * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig} + */ + public static final class MigrateAutomlModelConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig) + MigrateAutomlModelConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use MigrateAutomlModelConfig.newBuilder() to construct. + private MigrateAutomlModelConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MigrateAutomlModelConfig() { + model_ = ""; + modelDisplayName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MigrateAutomlModelConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private MigrateAutomlModelConfig( + 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(); + + model_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + modelDisplayName_ = 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.v1.MigrationServiceProto + .internal_static_google_cloud_aiplatform_v1_MigrateResourceRequest_MigrateAutomlModelConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.MigrationServiceProto + .internal_static_google_cloud_aiplatform_v1_MigrateResourceRequest_MigrateAutomlModelConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig.class, + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig.Builder + .class); + } + + public static final int MODEL_FIELD_NUMBER = 1; + private volatile java.lang.Object model_; + /** + * + * + *
+     * Required. Full resource name of automl Model.
+     * Format:
+     * `projects/{project}/locations/{location}/models/{model}`.
+     * 
+ * + * + * string model = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The model. + */ + @java.lang.Override + public java.lang.String getModel() { + java.lang.Object ref = model_; + 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(); + model_ = s; + return s; + } + } + /** + * + * + *
+     * Required. Full resource name of automl Model.
+     * Format:
+     * `projects/{project}/locations/{location}/models/{model}`.
+     * 
+ * + * + * string model = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for model. + */ + @java.lang.Override + public com.google.protobuf.ByteString getModelBytes() { + java.lang.Object ref = model_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + model_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MODEL_DISPLAY_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object modelDisplayName_; + /** + * + * + *
+     * Optional. Display name of the model in AI Platform.
+     * System will pick a display name if unspecified.
+     * 
+ * + * string model_display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The modelDisplayName. + */ + @java.lang.Override + public java.lang.String getModelDisplayName() { + java.lang.Object ref = modelDisplayName_; + 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(); + modelDisplayName_ = s; + return s; + } + } + /** + * + * + *
+     * Optional. Display name of the model in AI Platform.
+     * System will pick a display name if unspecified.
+     * 
+ * + * string model_display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for modelDisplayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getModelDisplayNameBytes() { + java.lang.Object ref = modelDisplayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + modelDisplayName_ = 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 (!getModelBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, model_); + } + if (!getModelDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, modelDisplayName_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getModelBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, model_); + } + if (!getModelDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, modelDisplayName_); + } + 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.v1.MigrateResourceRequest.MigrateAutomlModelConfig)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig other = + (com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig) obj; + + if (!getModel().equals(other.getModel())) return false; + if (!getModelDisplayName().equals(other.getModelDisplayName())) 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_FIELD_NUMBER; + hash = (53 * hash) + getModel().hashCode(); + hash = (37 * hash) + MODEL_DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getModelDisplayName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig + 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.v1.MigrateResourceRequest.MigrateAutomlModelConfig + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig + 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.v1.MigrateResourceRequest.MigrateAutomlModelConfig + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig + 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.v1.MigrateResourceRequest.MigrateAutomlModelConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig + 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.v1.MigrateResourceRequest.MigrateAutomlModelConfig + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig + 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.v1.MigrateResourceRequest.MigrateAutomlModelConfig 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; + } + /** + * + * + *
+     * Config for migrating Model in automl.googleapis.com to AI Platform's Model.
+     * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig) + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.MigrationServiceProto + .internal_static_google_cloud_aiplatform_v1_MigrateResourceRequest_MigrateAutomlModelConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.MigrationServiceProto + .internal_static_google_cloud_aiplatform_v1_MigrateResourceRequest_MigrateAutomlModelConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig + .class, + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig + .Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig.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(); + model_ = ""; + + modelDisplayName_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.MigrationServiceProto + .internal_static_google_cloud_aiplatform_v1_MigrateResourceRequest_MigrateAutomlModelConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig + build() { + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig + buildPartial() { + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig result = + new com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig( + this); + result.model_ = model_; + result.modelDisplayName_ = modelDisplayName_; + 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.v1.MigrateResourceRequest.MigrateAutomlModelConfig) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig other) { + if (other + == com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig + .getDefaultInstance()) return this; + if (!other.getModel().isEmpty()) { + model_ = other.model_; + onChanged(); + } + if (!other.getModelDisplayName().isEmpty()) { + modelDisplayName_ = other.modelDisplayName_; + 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.v1.MigrateResourceRequest.MigrateAutomlModelConfig + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object model_ = ""; + /** + * + * + *
+       * Required. Full resource name of automl Model.
+       * Format:
+       * `projects/{project}/locations/{location}/models/{model}`.
+       * 
+ * + * + * string model = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The model. + */ + public java.lang.String getModel() { + java.lang.Object ref = model_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + model_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. Full resource name of automl Model.
+       * Format:
+       * `projects/{project}/locations/{location}/models/{model}`.
+       * 
+ * + * + * string model = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for model. + */ + public com.google.protobuf.ByteString getModelBytes() { + java.lang.Object ref = model_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + model_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. Full resource name of automl Model.
+       * Format:
+       * `projects/{project}/locations/{location}/models/{model}`.
+       * 
+ * + * + * string model = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The model to set. + * @return This builder for chaining. + */ + public Builder setModel(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + model_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Full resource name of automl Model.
+       * Format:
+       * `projects/{project}/locations/{location}/models/{model}`.
+       * 
+ * + * + * string model = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearModel() { + + model_ = getDefaultInstance().getModel(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Full resource name of automl Model.
+       * Format:
+       * `projects/{project}/locations/{location}/models/{model}`.
+       * 
+ * + * + * string model = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for model to set. + * @return This builder for chaining. + */ + public Builder setModelBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + model_ = value; + onChanged(); + return this; + } + + private java.lang.Object modelDisplayName_ = ""; + /** + * + * + *
+       * Optional. Display name of the model in AI Platform.
+       * System will pick a display name if unspecified.
+       * 
+ * + * string model_display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The modelDisplayName. + */ + public java.lang.String getModelDisplayName() { + java.lang.Object ref = modelDisplayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + modelDisplayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Optional. Display name of the model in AI Platform.
+       * System will pick a display name if unspecified.
+       * 
+ * + * string model_display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for modelDisplayName. + */ + public com.google.protobuf.ByteString getModelDisplayNameBytes() { + java.lang.Object ref = modelDisplayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + modelDisplayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Optional. Display name of the model in AI Platform.
+       * System will pick a display name if unspecified.
+       * 
+ * + * string model_display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The modelDisplayName to set. + * @return This builder for chaining. + */ + public Builder setModelDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + modelDisplayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Display name of the model in AI Platform.
+       * System will pick a display name if unspecified.
+       * 
+ * + * string model_display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearModelDisplayName() { + + modelDisplayName_ = getDefaultInstance().getModelDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Display name of the model in AI Platform.
+       * System will pick a display name if unspecified.
+       * 
+ * + * string model_display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for modelDisplayName to set. + * @return This builder for chaining. + */ + public Builder setModelDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + modelDisplayName_ = 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.v1.MigrateResourceRequest.MigrateAutomlModelConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig) + private static final com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateAutomlModelConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig(); + } + + public static com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MigrateAutomlModelConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new MigrateAutomlModelConfig(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.v1.MigrateResourceRequest.MigrateAutomlModelConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface MigrateAutomlDatasetConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. Full resource name of automl Dataset.
+     * Format:
+     * `projects/{project}/locations/{location}/datasets/{dataset}`.
+     * 
+ * + * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The dataset. + */ + java.lang.String getDataset(); + /** + * + * + *
+     * Required. Full resource name of automl Dataset.
+     * Format:
+     * `projects/{project}/locations/{location}/datasets/{dataset}`.
+     * 
+ * + * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for dataset. + */ + com.google.protobuf.ByteString getDatasetBytes(); + + /** + * + * + *
+     * Required. Display name of the Dataset in AI Platform.
+     * System will pick a display name if unspecified.
+     * 
+ * + * string dataset_display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The datasetDisplayName. + */ + java.lang.String getDatasetDisplayName(); + /** + * + * + *
+     * Required. Display name of the Dataset in AI Platform.
+     * System will pick a display name if unspecified.
+     * 
+ * + * string dataset_display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for datasetDisplayName. + */ + com.google.protobuf.ByteString getDatasetDisplayNameBytes(); + } + /** + * + * + *
+   * Config for migrating Dataset in automl.googleapis.com to AI Platform's
+   * Dataset.
+   * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig} + */ + public static final class MigrateAutomlDatasetConfig + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig) + MigrateAutomlDatasetConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use MigrateAutomlDatasetConfig.newBuilder() to construct. + private MigrateAutomlDatasetConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MigrateAutomlDatasetConfig() { + dataset_ = ""; + datasetDisplayName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MigrateAutomlDatasetConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private MigrateAutomlDatasetConfig( + 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(); + + dataset_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + datasetDisplayName_ = 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.v1.MigrationServiceProto + .internal_static_google_cloud_aiplatform_v1_MigrateResourceRequest_MigrateAutomlDatasetConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.MigrationServiceProto + .internal_static_google_cloud_aiplatform_v1_MigrateResourceRequest_MigrateAutomlDatasetConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig + .class, + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig + .Builder.class); + } + + public static final int DATASET_FIELD_NUMBER = 1; + private volatile java.lang.Object dataset_; + /** + * + * + *
+     * Required. Full resource name of automl Dataset.
+     * Format:
+     * `projects/{project}/locations/{location}/datasets/{dataset}`.
+     * 
+ * + * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The dataset. + */ + @java.lang.Override + public java.lang.String getDataset() { + java.lang.Object ref = dataset_; + 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(); + dataset_ = s; + return s; + } + } + /** + * + * + *
+     * Required. Full resource name of automl Dataset.
+     * Format:
+     * `projects/{project}/locations/{location}/datasets/{dataset}`.
+     * 
+ * + * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for dataset. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDatasetBytes() { + java.lang.Object ref = dataset_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataset_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATASET_DISPLAY_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object datasetDisplayName_; + /** + * + * + *
+     * Required. Display name of the Dataset in AI Platform.
+     * System will pick a display name if unspecified.
+     * 
+ * + * string dataset_display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The datasetDisplayName. + */ + @java.lang.Override + public java.lang.String getDatasetDisplayName() { + java.lang.Object ref = datasetDisplayName_; + 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(); + datasetDisplayName_ = s; + return s; + } + } + /** + * + * + *
+     * Required. Display name of the Dataset in AI Platform.
+     * System will pick a display name if unspecified.
+     * 
+ * + * string dataset_display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for datasetDisplayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDatasetDisplayNameBytes() { + java.lang.Object ref = datasetDisplayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + datasetDisplayName_ = 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 (!getDatasetBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, dataset_); + } + if (!getDatasetDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, datasetDisplayName_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getDatasetBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, dataset_); + } + if (!getDatasetDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, datasetDisplayName_); + } + 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.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig other = + (com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig) obj; + + if (!getDataset().equals(other.getDataset())) return false; + if (!getDatasetDisplayName().equals(other.getDatasetDisplayName())) 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) + DATASET_FIELD_NUMBER; + hash = (53 * hash) + getDataset().hashCode(); + hash = (37 * hash) + DATASET_DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDatasetDisplayName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig + 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.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig + 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.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig + 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.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig + 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.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig + 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.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig + 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; + } + /** + * + * + *
+     * Config for migrating Dataset in automl.googleapis.com to AI Platform's
+     * Dataset.
+     * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig) + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.MigrationServiceProto + .internal_static_google_cloud_aiplatform_v1_MigrateResourceRequest_MigrateAutomlDatasetConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.MigrationServiceProto + .internal_static_google_cloud_aiplatform_v1_MigrateResourceRequest_MigrateAutomlDatasetConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig + .class, + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig + .Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig.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(); + dataset_ = ""; + + datasetDisplayName_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.MigrationServiceProto + .internal_static_google_cloud_aiplatform_v1_MigrateResourceRequest_MigrateAutomlDatasetConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig + build() { + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig + buildPartial() { + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig result = + new com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig( + this); + result.dataset_ = dataset_; + result.datasetDisplayName_ = datasetDisplayName_; + 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.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig other) { + if (other + == com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig + .getDefaultInstance()) return this; + if (!other.getDataset().isEmpty()) { + dataset_ = other.dataset_; + onChanged(); + } + if (!other.getDatasetDisplayName().isEmpty()) { + datasetDisplayName_ = other.datasetDisplayName_; + 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.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object dataset_ = ""; + /** + * + * + *
+       * Required. Full resource name of automl Dataset.
+       * Format:
+       * `projects/{project}/locations/{location}/datasets/{dataset}`.
+       * 
+ * + * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The dataset. + */ + public java.lang.String getDataset() { + java.lang.Object ref = dataset_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataset_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. Full resource name of automl Dataset.
+       * Format:
+       * `projects/{project}/locations/{location}/datasets/{dataset}`.
+       * 
+ * + * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for dataset. + */ + public com.google.protobuf.ByteString getDatasetBytes() { + java.lang.Object ref = dataset_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataset_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. Full resource name of automl Dataset.
+       * Format:
+       * `projects/{project}/locations/{location}/datasets/{dataset}`.
+       * 
+ * + * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The dataset to set. + * @return This builder for chaining. + */ + public Builder setDataset(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + dataset_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Full resource name of automl Dataset.
+       * Format:
+       * `projects/{project}/locations/{location}/datasets/{dataset}`.
+       * 
+ * + * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearDataset() { + + dataset_ = getDefaultInstance().getDataset(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Full resource name of automl Dataset.
+       * Format:
+       * `projects/{project}/locations/{location}/datasets/{dataset}`.
+       * 
+ * + * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for dataset to set. + * @return This builder for chaining. + */ + public Builder setDatasetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + dataset_ = value; + onChanged(); + return this; + } + + private java.lang.Object datasetDisplayName_ = ""; + /** + * + * + *
+       * Required. Display name of the Dataset in AI Platform.
+       * System will pick a display name if unspecified.
+       * 
+ * + * string dataset_display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The datasetDisplayName. + */ + public java.lang.String getDatasetDisplayName() { + java.lang.Object ref = datasetDisplayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + datasetDisplayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. Display name of the Dataset in AI Platform.
+       * System will pick a display name if unspecified.
+       * 
+ * + * string dataset_display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for datasetDisplayName. + */ + public com.google.protobuf.ByteString getDatasetDisplayNameBytes() { + java.lang.Object ref = datasetDisplayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + datasetDisplayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. Display name of the Dataset in AI Platform.
+       * System will pick a display name if unspecified.
+       * 
+ * + * string dataset_display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The datasetDisplayName to set. + * @return This builder for chaining. + */ + public Builder setDatasetDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + datasetDisplayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Display name of the Dataset in AI Platform.
+       * System will pick a display name if unspecified.
+       * 
+ * + * string dataset_display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDatasetDisplayName() { + + datasetDisplayName_ = getDefaultInstance().getDatasetDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Display name of the Dataset in AI Platform.
+       * System will pick a display name if unspecified.
+       * 
+ * + * string dataset_display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for datasetDisplayName to set. + * @return This builder for chaining. + */ + public Builder setDatasetDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + datasetDisplayName_ = 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.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig) + private static final com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateAutomlDatasetConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig(); + } + + public static com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MigrateAutomlDatasetConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new MigrateAutomlDatasetConfig(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.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface MigrateDataLabelingDatasetConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. Full resource name of data labeling Dataset.
+     * Format:
+     * `projects/{project}/datasets/{dataset}`.
+     * 
+ * + * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The dataset. + */ + java.lang.String getDataset(); + /** + * + * + *
+     * Required. Full resource name of data labeling Dataset.
+     * Format:
+     * `projects/{project}/datasets/{dataset}`.
+     * 
+ * + * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for dataset. + */ + com.google.protobuf.ByteString getDatasetBytes(); + + /** + * + * + *
+     * Optional. Display name of the Dataset in AI Platform.
+     * System will pick a display name if unspecified.
+     * 
+ * + * string dataset_display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The datasetDisplayName. + */ + java.lang.String getDatasetDisplayName(); + /** + * + * + *
+     * Optional. Display name of the Dataset in AI Platform.
+     * System will pick a display name if unspecified.
+     * 
+ * + * string dataset_display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for datasetDisplayName. + */ + com.google.protobuf.ByteString getDatasetDisplayNameBytes(); + + /** + * + * + *
+     * Optional. Configs for migrating AnnotatedDataset in datalabeling.googleapis.com to
+     * AI Platform's SavedQuery. The specified AnnotatedDatasets have to belong
+     * to the datalabeling Dataset.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig migrate_data_labeling_annotated_dataset_configs = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List< + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + .MigrateDataLabelingAnnotatedDatasetConfig> + getMigrateDataLabelingAnnotatedDatasetConfigsList(); + /** + * + * + *
+     * Optional. Configs for migrating AnnotatedDataset in datalabeling.googleapis.com to
+     * AI Platform's SavedQuery. The specified AnnotatedDatasets have to belong
+     * to the datalabeling Dataset.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig migrate_data_labeling_annotated_dataset_configs = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + .MigrateDataLabelingAnnotatedDatasetConfig + getMigrateDataLabelingAnnotatedDatasetConfigs(int index); + /** + * + * + *
+     * Optional. Configs for migrating AnnotatedDataset in datalabeling.googleapis.com to
+     * AI Platform's SavedQuery. The specified AnnotatedDatasets have to belong
+     * to the datalabeling Dataset.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig migrate_data_labeling_annotated_dataset_configs = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getMigrateDataLabelingAnnotatedDatasetConfigsCount(); + /** + * + * + *
+     * Optional. Configs for migrating AnnotatedDataset in datalabeling.googleapis.com to
+     * AI Platform's SavedQuery. The specified AnnotatedDatasets have to belong
+     * to the datalabeling Dataset.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig migrate_data_labeling_annotated_dataset_configs = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List< + ? extends + com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig + .MigrateDataLabelingAnnotatedDatasetConfigOrBuilder> + getMigrateDataLabelingAnnotatedDatasetConfigsOrBuilderList(); + /** + * + * + *
+     * Optional. Configs for migrating AnnotatedDataset in datalabeling.googleapis.com to
+     * AI Platform's SavedQuery. The specified AnnotatedDatasets have to belong
+     * to the datalabeling Dataset.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig migrate_data_labeling_annotated_dataset_configs = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + .MigrateDataLabelingAnnotatedDatasetConfigOrBuilder + getMigrateDataLabelingAnnotatedDatasetConfigsOrBuilder(int index); + } + /** + * + * + *
+   * Config for migrating Dataset in datalabeling.googleapis.com to AI
+   * Platform's Dataset.
+   * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig} + */ + public static final class MigrateDataLabelingDatasetConfig + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig) + MigrateDataLabelingDatasetConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use MigrateDataLabelingDatasetConfig.newBuilder() to construct. + private MigrateDataLabelingDatasetConfig( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MigrateDataLabelingDatasetConfig() { + dataset_ = ""; + datasetDisplayName_ = ""; + migrateDataLabelingAnnotatedDatasetConfigs_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MigrateDataLabelingDatasetConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private MigrateDataLabelingDatasetConfig( + 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(); + + dataset_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + datasetDisplayName_ = s; + break; + } + case 26: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + migrateDataLabelingAnnotatedDatasetConfigs_ = + new java.util.ArrayList< + com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig + .MigrateDataLabelingAnnotatedDatasetConfig>(); + mutable_bitField0_ |= 0x00000001; + } + migrateDataLabelingAnnotatedDatasetConfigs_.add( + input.readMessage( + com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig + .MigrateDataLabelingAnnotatedDatasetConfig.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)) { + migrateDataLabelingAnnotatedDatasetConfigs_ = + java.util.Collections.unmodifiableList(migrateDataLabelingAnnotatedDatasetConfigs_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.MigrationServiceProto + .internal_static_google_cloud_aiplatform_v1_MigrateResourceRequest_MigrateDataLabelingDatasetConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.MigrationServiceProto + .internal_static_google_cloud_aiplatform_v1_MigrateResourceRequest_MigrateDataLabelingDatasetConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + .class, + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + .Builder.class); + } + + public interface MigrateDataLabelingAnnotatedDatasetConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Required. Full resource name of data labeling AnnotatedDataset.
+       * Format:
+       * `projects/{project}/datasets/{dataset}/annotatedDatasets/{annotated_dataset}`.
+       * 
+ * + * + * string annotated_dataset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The annotatedDataset. + */ + java.lang.String getAnnotatedDataset(); + /** + * + * + *
+       * Required. Full resource name of data labeling AnnotatedDataset.
+       * Format:
+       * `projects/{project}/datasets/{dataset}/annotatedDatasets/{annotated_dataset}`.
+       * 
+ * + * + * string annotated_dataset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for annotatedDataset. + */ + com.google.protobuf.ByteString getAnnotatedDatasetBytes(); + } + /** + * + * + *
+     * Config for migrating AnnotatedDataset in datalabeling.googleapis.com to
+     * AI Platform's SavedQuery.
+     * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig} + */ + public static final class MigrateDataLabelingAnnotatedDatasetConfig + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig) + MigrateDataLabelingAnnotatedDatasetConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use MigrateDataLabelingAnnotatedDatasetConfig.newBuilder() to construct. + private MigrateDataLabelingAnnotatedDatasetConfig( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MigrateDataLabelingAnnotatedDatasetConfig() { + annotatedDataset_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MigrateDataLabelingAnnotatedDatasetConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private MigrateDataLabelingAnnotatedDatasetConfig( + 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(); + + annotatedDataset_ = 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.v1.MigrationServiceProto + .internal_static_google_cloud_aiplatform_v1_MigrateResourceRequest_MigrateDataLabelingDatasetConfig_MigrateDataLabelingAnnotatedDatasetConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.MigrationServiceProto + .internal_static_google_cloud_aiplatform_v1_MigrateResourceRequest_MigrateDataLabelingDatasetConfig_MigrateDataLabelingAnnotatedDatasetConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig + .class, + com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig + .Builder.class); + } + + public static final int ANNOTATED_DATASET_FIELD_NUMBER = 1; + private volatile java.lang.Object annotatedDataset_; + /** + * + * + *
+       * Required. Full resource name of data labeling AnnotatedDataset.
+       * Format:
+       * `projects/{project}/datasets/{dataset}/annotatedDatasets/{annotated_dataset}`.
+       * 
+ * + * + * string annotated_dataset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The annotatedDataset. + */ + @java.lang.Override + public java.lang.String getAnnotatedDataset() { + java.lang.Object ref = annotatedDataset_; + 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(); + annotatedDataset_ = s; + return s; + } + } + /** + * + * + *
+       * Required. Full resource name of data labeling AnnotatedDataset.
+       * Format:
+       * `projects/{project}/datasets/{dataset}/annotatedDatasets/{annotated_dataset}`.
+       * 
+ * + * + * string annotated_dataset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for annotatedDataset. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAnnotatedDatasetBytes() { + java.lang.Object ref = annotatedDataset_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + annotatedDataset_ = 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 (!getAnnotatedDatasetBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, annotatedDataset_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getAnnotatedDatasetBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, annotatedDataset_); + } + 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.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + .MigrateDataLabelingAnnotatedDatasetConfig)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + .MigrateDataLabelingAnnotatedDatasetConfig + other = + (com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig) + obj; + + if (!getAnnotatedDataset().equals(other.getAnnotatedDataset())) 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) + ANNOTATED_DATASET_FIELD_NUMBER; + hash = (53 * hash) + getAnnotatedDataset().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig + 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.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig + 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.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig + 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.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig + 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.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig + 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.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + .MigrateDataLabelingAnnotatedDatasetConfig + 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; + } + /** + * + * + *
+       * Config for migrating AnnotatedDataset in datalabeling.googleapis.com to
+       * AI Platform's SavedQuery.
+       * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig) + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + .MigrateDataLabelingAnnotatedDatasetConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.MigrationServiceProto + .internal_static_google_cloud_aiplatform_v1_MigrateResourceRequest_MigrateDataLabelingDatasetConfig_MigrateDataLabelingAnnotatedDatasetConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.MigrationServiceProto + .internal_static_google_cloud_aiplatform_v1_MigrateResourceRequest_MigrateDataLabelingDatasetConfig_MigrateDataLabelingAnnotatedDatasetConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig + .class, + com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig + .Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig.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(); + annotatedDataset_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.MigrationServiceProto + .internal_static_google_cloud_aiplatform_v1_MigrateResourceRequest_MigrateDataLabelingDatasetConfig_MigrateDataLabelingAnnotatedDatasetConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig + build() { + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + .MigrateDataLabelingAnnotatedDatasetConfig + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig + buildPartial() { + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + .MigrateDataLabelingAnnotatedDatasetConfig + result = + new com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig( + this); + result.annotatedDataset_ = annotatedDataset_; + 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.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + .MigrateDataLabelingAnnotatedDatasetConfig) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + .MigrateDataLabelingAnnotatedDatasetConfig + other) { + if (other + == com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig + .getDefaultInstance()) return this; + if (!other.getAnnotatedDataset().isEmpty()) { + annotatedDataset_ = other.annotatedDataset_; + 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.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + .MigrateDataLabelingAnnotatedDatasetConfig + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object annotatedDataset_ = ""; + /** + * + * + *
+         * Required. Full resource name of data labeling AnnotatedDataset.
+         * Format:
+         * `projects/{project}/datasets/{dataset}/annotatedDatasets/{annotated_dataset}`.
+         * 
+ * + * + * string annotated_dataset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The annotatedDataset. + */ + public java.lang.String getAnnotatedDataset() { + java.lang.Object ref = annotatedDataset_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + annotatedDataset_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * Required. Full resource name of data labeling AnnotatedDataset.
+         * Format:
+         * `projects/{project}/datasets/{dataset}/annotatedDatasets/{annotated_dataset}`.
+         * 
+ * + * + * string annotated_dataset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for annotatedDataset. + */ + public com.google.protobuf.ByteString getAnnotatedDatasetBytes() { + java.lang.Object ref = annotatedDataset_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + annotatedDataset_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * Required. Full resource name of data labeling AnnotatedDataset.
+         * Format:
+         * `projects/{project}/datasets/{dataset}/annotatedDatasets/{annotated_dataset}`.
+         * 
+ * + * + * string annotated_dataset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The annotatedDataset to set. + * @return This builder for chaining. + */ + public Builder setAnnotatedDataset(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + annotatedDataset_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Required. Full resource name of data labeling AnnotatedDataset.
+         * Format:
+         * `projects/{project}/datasets/{dataset}/annotatedDatasets/{annotated_dataset}`.
+         * 
+ * + * + * string annotated_dataset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearAnnotatedDataset() { + + annotatedDataset_ = getDefaultInstance().getAnnotatedDataset(); + onChanged(); + return this; + } + /** + * + * + *
+         * Required. Full resource name of data labeling AnnotatedDataset.
+         * Format:
+         * `projects/{project}/datasets/{dataset}/annotatedDatasets/{annotated_dataset}`.
+         * 
+ * + * + * string annotated_dataset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for annotatedDataset to set. + * @return This builder for chaining. + */ + public Builder setAnnotatedDatasetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + annotatedDataset_ = 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.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig) + private static final com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig(); + } + + public static com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MigrateDataLabelingAnnotatedDatasetConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new MigrateDataLabelingAnnotatedDatasetConfig(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.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + .MigrateDataLabelingAnnotatedDatasetConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int DATASET_FIELD_NUMBER = 1; + private volatile java.lang.Object dataset_; + /** + * + * + *
+     * Required. Full resource name of data labeling Dataset.
+     * Format:
+     * `projects/{project}/datasets/{dataset}`.
+     * 
+ * + * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The dataset. + */ + @java.lang.Override + public java.lang.String getDataset() { + java.lang.Object ref = dataset_; + 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(); + dataset_ = s; + return s; + } + } + /** + * + * + *
+     * Required. Full resource name of data labeling Dataset.
+     * Format:
+     * `projects/{project}/datasets/{dataset}`.
+     * 
+ * + * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for dataset. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDatasetBytes() { + java.lang.Object ref = dataset_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataset_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATASET_DISPLAY_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object datasetDisplayName_; + /** + * + * + *
+     * Optional. Display name of the Dataset in AI Platform.
+     * System will pick a display name if unspecified.
+     * 
+ * + * string dataset_display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The datasetDisplayName. + */ + @java.lang.Override + public java.lang.String getDatasetDisplayName() { + java.lang.Object ref = datasetDisplayName_; + 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(); + datasetDisplayName_ = s; + return s; + } + } + /** + * + * + *
+     * Optional. Display name of the Dataset in AI Platform.
+     * System will pick a display name if unspecified.
+     * 
+ * + * string dataset_display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for datasetDisplayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDatasetDisplayNameBytes() { + java.lang.Object ref = datasetDisplayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + datasetDisplayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MIGRATE_DATA_LABELING_ANNOTATED_DATASET_CONFIGS_FIELD_NUMBER = 3; + private java.util.List< + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + .MigrateDataLabelingAnnotatedDatasetConfig> + migrateDataLabelingAnnotatedDatasetConfigs_; + /** + * + * + *
+     * Optional. Configs for migrating AnnotatedDataset in datalabeling.googleapis.com to
+     * AI Platform's SavedQuery. The specified AnnotatedDatasets have to belong
+     * to the datalabeling Dataset.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig migrate_data_labeling_annotated_dataset_configs = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + .MigrateDataLabelingAnnotatedDatasetConfig> + getMigrateDataLabelingAnnotatedDatasetConfigsList() { + return migrateDataLabelingAnnotatedDatasetConfigs_; + } + /** + * + * + *
+     * Optional. Configs for migrating AnnotatedDataset in datalabeling.googleapis.com to
+     * AI Platform's SavedQuery. The specified AnnotatedDatasets have to belong
+     * to the datalabeling Dataset.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig migrate_data_labeling_annotated_dataset_configs = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig + .MigrateDataLabelingAnnotatedDatasetConfigOrBuilder> + getMigrateDataLabelingAnnotatedDatasetConfigsOrBuilderList() { + return migrateDataLabelingAnnotatedDatasetConfigs_; + } + /** + * + * + *
+     * Optional. Configs for migrating AnnotatedDataset in datalabeling.googleapis.com to
+     * AI Platform's SavedQuery. The specified AnnotatedDatasets have to belong
+     * to the datalabeling Dataset.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig migrate_data_labeling_annotated_dataset_configs = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getMigrateDataLabelingAnnotatedDatasetConfigsCount() { + return migrateDataLabelingAnnotatedDatasetConfigs_.size(); + } + /** + * + * + *
+     * Optional. Configs for migrating AnnotatedDataset in datalabeling.googleapis.com to
+     * AI Platform's SavedQuery. The specified AnnotatedDatasets have to belong
+     * to the datalabeling Dataset.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig migrate_data_labeling_annotated_dataset_configs = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + .MigrateDataLabelingAnnotatedDatasetConfig + getMigrateDataLabelingAnnotatedDatasetConfigs(int index) { + return migrateDataLabelingAnnotatedDatasetConfigs_.get(index); + } + /** + * + * + *
+     * Optional. Configs for migrating AnnotatedDataset in datalabeling.googleapis.com to
+     * AI Platform's SavedQuery. The specified AnnotatedDatasets have to belong
+     * to the datalabeling Dataset.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig migrate_data_labeling_annotated_dataset_configs = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + .MigrateDataLabelingAnnotatedDatasetConfigOrBuilder + getMigrateDataLabelingAnnotatedDatasetConfigsOrBuilder(int index) { + return migrateDataLabelingAnnotatedDatasetConfigs_.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 (!getDatasetBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, dataset_); + } + if (!getDatasetDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, datasetDisplayName_); + } + for (int i = 0; i < migrateDataLabelingAnnotatedDatasetConfigs_.size(); i++) { + output.writeMessage(3, migrateDataLabelingAnnotatedDatasetConfigs_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getDatasetBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, dataset_); + } + if (!getDatasetDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, datasetDisplayName_); + } + for (int i = 0; i < migrateDataLabelingAnnotatedDatasetConfigs_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, migrateDataLabelingAnnotatedDatasetConfigs_.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.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig other = + (com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig) + obj; + + if (!getDataset().equals(other.getDataset())) return false; + if (!getDatasetDisplayName().equals(other.getDatasetDisplayName())) return false; + if (!getMigrateDataLabelingAnnotatedDatasetConfigsList() + .equals(other.getMigrateDataLabelingAnnotatedDatasetConfigsList())) 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) + DATASET_FIELD_NUMBER; + hash = (53 * hash) + getDataset().hashCode(); + hash = (37 * hash) + DATASET_DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDatasetDisplayName().hashCode(); + if (getMigrateDataLabelingAnnotatedDatasetConfigsCount() > 0) { + hash = (37 * hash) + MIGRATE_DATA_LABELING_ANNOTATED_DATASET_CONFIGS_FIELD_NUMBER; + hash = (53 * hash) + getMigrateDataLabelingAnnotatedDatasetConfigsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig + 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.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig + 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.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig + 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.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig + 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.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig + 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.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + 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; + } + /** + * + * + *
+     * Config for migrating Dataset in datalabeling.googleapis.com to AI
+     * Platform's Dataset.
+     * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig) + com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.MigrationServiceProto + .internal_static_google_cloud_aiplatform_v1_MigrateResourceRequest_MigrateDataLabelingDatasetConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.MigrationServiceProto + .internal_static_google_cloud_aiplatform_v1_MigrateResourceRequest_MigrateDataLabelingDatasetConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig.class, + com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getMigrateDataLabelingAnnotatedDatasetConfigsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + dataset_ = ""; + + datasetDisplayName_ = ""; + + if (migrateDataLabelingAnnotatedDatasetConfigsBuilder_ == null) { + migrateDataLabelingAnnotatedDatasetConfigs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + migrateDataLabelingAnnotatedDatasetConfigsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.MigrationServiceProto + .internal_static_google_cloud_aiplatform_v1_MigrateResourceRequest_MigrateDataLabelingDatasetConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + build() { + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + buildPartial() { + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + result = + new com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig(this); + int from_bitField0_ = bitField0_; + result.dataset_ = dataset_; + result.datasetDisplayName_ = datasetDisplayName_; + if (migrateDataLabelingAnnotatedDatasetConfigsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + migrateDataLabelingAnnotatedDatasetConfigs_ = + java.util.Collections.unmodifiableList(migrateDataLabelingAnnotatedDatasetConfigs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.migrateDataLabelingAnnotatedDatasetConfigs_ = + migrateDataLabelingAnnotatedDatasetConfigs_; + } else { + result.migrateDataLabelingAnnotatedDatasetConfigs_ = + migrateDataLabelingAnnotatedDatasetConfigsBuilder_.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.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + other) { + if (other + == com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig.getDefaultInstance()) return this; + if (!other.getDataset().isEmpty()) { + dataset_ = other.dataset_; + onChanged(); + } + if (!other.getDatasetDisplayName().isEmpty()) { + datasetDisplayName_ = other.datasetDisplayName_; + onChanged(); + } + if (migrateDataLabelingAnnotatedDatasetConfigsBuilder_ == null) { + if (!other.migrateDataLabelingAnnotatedDatasetConfigs_.isEmpty()) { + if (migrateDataLabelingAnnotatedDatasetConfigs_.isEmpty()) { + migrateDataLabelingAnnotatedDatasetConfigs_ = + other.migrateDataLabelingAnnotatedDatasetConfigs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureMigrateDataLabelingAnnotatedDatasetConfigsIsMutable(); + migrateDataLabelingAnnotatedDatasetConfigs_.addAll( + other.migrateDataLabelingAnnotatedDatasetConfigs_); + } + onChanged(); + } + } else { + if (!other.migrateDataLabelingAnnotatedDatasetConfigs_.isEmpty()) { + if (migrateDataLabelingAnnotatedDatasetConfigsBuilder_.isEmpty()) { + migrateDataLabelingAnnotatedDatasetConfigsBuilder_.dispose(); + migrateDataLabelingAnnotatedDatasetConfigsBuilder_ = null; + migrateDataLabelingAnnotatedDatasetConfigs_ = + other.migrateDataLabelingAnnotatedDatasetConfigs_; + bitField0_ = (bitField0_ & ~0x00000001); + migrateDataLabelingAnnotatedDatasetConfigsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getMigrateDataLabelingAnnotatedDatasetConfigsFieldBuilder() + : null; + } else { + migrateDataLabelingAnnotatedDatasetConfigsBuilder_.addAllMessages( + other.migrateDataLabelingAnnotatedDatasetConfigs_); + } + } + } + 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.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object dataset_ = ""; + /** + * + * + *
+       * Required. Full resource name of data labeling Dataset.
+       * Format:
+       * `projects/{project}/datasets/{dataset}`.
+       * 
+ * + * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The dataset. + */ + public java.lang.String getDataset() { + java.lang.Object ref = dataset_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataset_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. Full resource name of data labeling Dataset.
+       * Format:
+       * `projects/{project}/datasets/{dataset}`.
+       * 
+ * + * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for dataset. + */ + public com.google.protobuf.ByteString getDatasetBytes() { + java.lang.Object ref = dataset_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataset_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. Full resource name of data labeling Dataset.
+       * Format:
+       * `projects/{project}/datasets/{dataset}`.
+       * 
+ * + * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The dataset to set. + * @return This builder for chaining. + */ + public Builder setDataset(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + dataset_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Full resource name of data labeling Dataset.
+       * Format:
+       * `projects/{project}/datasets/{dataset}`.
+       * 
+ * + * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearDataset() { + + dataset_ = getDefaultInstance().getDataset(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Full resource name of data labeling Dataset.
+       * Format:
+       * `projects/{project}/datasets/{dataset}`.
+       * 
+ * + * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for dataset to set. + * @return This builder for chaining. + */ + public Builder setDatasetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + dataset_ = value; + onChanged(); + return this; + } + + private java.lang.Object datasetDisplayName_ = ""; + /** + * + * + *
+       * Optional. Display name of the Dataset in AI Platform.
+       * System will pick a display name if unspecified.
+       * 
+ * + * string dataset_display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The datasetDisplayName. + */ + public java.lang.String getDatasetDisplayName() { + java.lang.Object ref = datasetDisplayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + datasetDisplayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Optional. Display name of the Dataset in AI Platform.
+       * System will pick a display name if unspecified.
+       * 
+ * + * string dataset_display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for datasetDisplayName. + */ + public com.google.protobuf.ByteString getDatasetDisplayNameBytes() { + java.lang.Object ref = datasetDisplayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + datasetDisplayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Optional. Display name of the Dataset in AI Platform.
+       * System will pick a display name if unspecified.
+       * 
+ * + * string dataset_display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The datasetDisplayName to set. + * @return This builder for chaining. + */ + public Builder setDatasetDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + datasetDisplayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Display name of the Dataset in AI Platform.
+       * System will pick a display name if unspecified.
+       * 
+ * + * string dataset_display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDatasetDisplayName() { + + datasetDisplayName_ = getDefaultInstance().getDatasetDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Display name of the Dataset in AI Platform.
+       * System will pick a display name if unspecified.
+       * 
+ * + * string dataset_display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for datasetDisplayName to set. + * @return This builder for chaining. + */ + public Builder setDatasetDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + datasetDisplayName_ = value; + onChanged(); + return this; + } + + private java.util.List< + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + .MigrateDataLabelingAnnotatedDatasetConfig> + migrateDataLabelingAnnotatedDatasetConfigs_ = java.util.Collections.emptyList(); + + private void ensureMigrateDataLabelingAnnotatedDatasetConfigsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + migrateDataLabelingAnnotatedDatasetConfigs_ = + new java.util.ArrayList< + com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig>( + migrateDataLabelingAnnotatedDatasetConfigs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + .MigrateDataLabelingAnnotatedDatasetConfig, + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + .MigrateDataLabelingAnnotatedDatasetConfig.Builder, + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + .MigrateDataLabelingAnnotatedDatasetConfigOrBuilder> + migrateDataLabelingAnnotatedDatasetConfigsBuilder_; + + /** + * + * + *
+       * Optional. Configs for migrating AnnotatedDataset in datalabeling.googleapis.com to
+       * AI Platform's SavedQuery. The specified AnnotatedDatasets have to belong
+       * to the datalabeling Dataset.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig migrate_data_labeling_annotated_dataset_configs = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List< + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + .MigrateDataLabelingAnnotatedDatasetConfig> + getMigrateDataLabelingAnnotatedDatasetConfigsList() { + if (migrateDataLabelingAnnotatedDatasetConfigsBuilder_ == null) { + return java.util.Collections.unmodifiableList( + migrateDataLabelingAnnotatedDatasetConfigs_); + } else { + return migrateDataLabelingAnnotatedDatasetConfigsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Optional. Configs for migrating AnnotatedDataset in datalabeling.googleapis.com to
+       * AI Platform's SavedQuery. The specified AnnotatedDatasets have to belong
+       * to the datalabeling Dataset.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig migrate_data_labeling_annotated_dataset_configs = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getMigrateDataLabelingAnnotatedDatasetConfigsCount() { + if (migrateDataLabelingAnnotatedDatasetConfigsBuilder_ == null) { + return migrateDataLabelingAnnotatedDatasetConfigs_.size(); + } else { + return migrateDataLabelingAnnotatedDatasetConfigsBuilder_.getCount(); + } + } + /** + * + * + *
+       * Optional. Configs for migrating AnnotatedDataset in datalabeling.googleapis.com to
+       * AI Platform's SavedQuery. The specified AnnotatedDatasets have to belong
+       * to the datalabeling Dataset.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig migrate_data_labeling_annotated_dataset_configs = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + .MigrateDataLabelingAnnotatedDatasetConfig + getMigrateDataLabelingAnnotatedDatasetConfigs(int index) { + if (migrateDataLabelingAnnotatedDatasetConfigsBuilder_ == null) { + return migrateDataLabelingAnnotatedDatasetConfigs_.get(index); + } else { + return migrateDataLabelingAnnotatedDatasetConfigsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Optional. Configs for migrating AnnotatedDataset in datalabeling.googleapis.com to
+       * AI Platform's SavedQuery. The specified AnnotatedDatasets have to belong
+       * to the datalabeling Dataset.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig migrate_data_labeling_annotated_dataset_configs = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setMigrateDataLabelingAnnotatedDatasetConfigs( + int index, + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + .MigrateDataLabelingAnnotatedDatasetConfig + value) { + if (migrateDataLabelingAnnotatedDatasetConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMigrateDataLabelingAnnotatedDatasetConfigsIsMutable(); + migrateDataLabelingAnnotatedDatasetConfigs_.set(index, value); + onChanged(); + } else { + migrateDataLabelingAnnotatedDatasetConfigsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Optional. Configs for migrating AnnotatedDataset in datalabeling.googleapis.com to
+       * AI Platform's SavedQuery. The specified AnnotatedDatasets have to belong
+       * to the datalabeling Dataset.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig migrate_data_labeling_annotated_dataset_configs = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setMigrateDataLabelingAnnotatedDatasetConfigs( + int index, + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + .MigrateDataLabelingAnnotatedDatasetConfig.Builder + builderForValue) { + if (migrateDataLabelingAnnotatedDatasetConfigsBuilder_ == null) { + ensureMigrateDataLabelingAnnotatedDatasetConfigsIsMutable(); + migrateDataLabelingAnnotatedDatasetConfigs_.set(index, builderForValue.build()); + onChanged(); + } else { + migrateDataLabelingAnnotatedDatasetConfigsBuilder_.setMessage( + index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Optional. Configs for migrating AnnotatedDataset in datalabeling.googleapis.com to
+       * AI Platform's SavedQuery. The specified AnnotatedDatasets have to belong
+       * to the datalabeling Dataset.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig migrate_data_labeling_annotated_dataset_configs = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addMigrateDataLabelingAnnotatedDatasetConfigs( + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + .MigrateDataLabelingAnnotatedDatasetConfig + value) { + if (migrateDataLabelingAnnotatedDatasetConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMigrateDataLabelingAnnotatedDatasetConfigsIsMutable(); + migrateDataLabelingAnnotatedDatasetConfigs_.add(value); + onChanged(); + } else { + migrateDataLabelingAnnotatedDatasetConfigsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Optional. Configs for migrating AnnotatedDataset in datalabeling.googleapis.com to
+       * AI Platform's SavedQuery. The specified AnnotatedDatasets have to belong
+       * to the datalabeling Dataset.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig migrate_data_labeling_annotated_dataset_configs = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addMigrateDataLabelingAnnotatedDatasetConfigs( + int index, + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + .MigrateDataLabelingAnnotatedDatasetConfig + value) { + if (migrateDataLabelingAnnotatedDatasetConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMigrateDataLabelingAnnotatedDatasetConfigsIsMutable(); + migrateDataLabelingAnnotatedDatasetConfigs_.add(index, value); + onChanged(); + } else { + migrateDataLabelingAnnotatedDatasetConfigsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Optional. Configs for migrating AnnotatedDataset in datalabeling.googleapis.com to
+       * AI Platform's SavedQuery. The specified AnnotatedDatasets have to belong
+       * to the datalabeling Dataset.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig migrate_data_labeling_annotated_dataset_configs = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addMigrateDataLabelingAnnotatedDatasetConfigs( + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + .MigrateDataLabelingAnnotatedDatasetConfig.Builder + builderForValue) { + if (migrateDataLabelingAnnotatedDatasetConfigsBuilder_ == null) { + ensureMigrateDataLabelingAnnotatedDatasetConfigsIsMutable(); + migrateDataLabelingAnnotatedDatasetConfigs_.add(builderForValue.build()); + onChanged(); + } else { + migrateDataLabelingAnnotatedDatasetConfigsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Optional. Configs for migrating AnnotatedDataset in datalabeling.googleapis.com to
+       * AI Platform's SavedQuery. The specified AnnotatedDatasets have to belong
+       * to the datalabeling Dataset.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig migrate_data_labeling_annotated_dataset_configs = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addMigrateDataLabelingAnnotatedDatasetConfigs( + int index, + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + .MigrateDataLabelingAnnotatedDatasetConfig.Builder + builderForValue) { + if (migrateDataLabelingAnnotatedDatasetConfigsBuilder_ == null) { + ensureMigrateDataLabelingAnnotatedDatasetConfigsIsMutable(); + migrateDataLabelingAnnotatedDatasetConfigs_.add(index, builderForValue.build()); + onChanged(); + } else { + migrateDataLabelingAnnotatedDatasetConfigsBuilder_.addMessage( + index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Optional. Configs for migrating AnnotatedDataset in datalabeling.googleapis.com to
+       * AI Platform's SavedQuery. The specified AnnotatedDatasets have to belong
+       * to the datalabeling Dataset.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig migrate_data_labeling_annotated_dataset_configs = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllMigrateDataLabelingAnnotatedDatasetConfigs( + java.lang.Iterable< + ? extends + com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig + .MigrateDataLabelingAnnotatedDatasetConfig> + values) { + if (migrateDataLabelingAnnotatedDatasetConfigsBuilder_ == null) { + ensureMigrateDataLabelingAnnotatedDatasetConfigsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, migrateDataLabelingAnnotatedDatasetConfigs_); + onChanged(); + } else { + migrateDataLabelingAnnotatedDatasetConfigsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Optional. Configs for migrating AnnotatedDataset in datalabeling.googleapis.com to
+       * AI Platform's SavedQuery. The specified AnnotatedDatasets have to belong
+       * to the datalabeling Dataset.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig migrate_data_labeling_annotated_dataset_configs = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearMigrateDataLabelingAnnotatedDatasetConfigs() { + if (migrateDataLabelingAnnotatedDatasetConfigsBuilder_ == null) { + migrateDataLabelingAnnotatedDatasetConfigs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + migrateDataLabelingAnnotatedDatasetConfigsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Optional. Configs for migrating AnnotatedDataset in datalabeling.googleapis.com to
+       * AI Platform's SavedQuery. The specified AnnotatedDatasets have to belong
+       * to the datalabeling Dataset.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig migrate_data_labeling_annotated_dataset_configs = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeMigrateDataLabelingAnnotatedDatasetConfigs(int index) { + if (migrateDataLabelingAnnotatedDatasetConfigsBuilder_ == null) { + ensureMigrateDataLabelingAnnotatedDatasetConfigsIsMutable(); + migrateDataLabelingAnnotatedDatasetConfigs_.remove(index); + onChanged(); + } else { + migrateDataLabelingAnnotatedDatasetConfigsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Optional. Configs for migrating AnnotatedDataset in datalabeling.googleapis.com to
+       * AI Platform's SavedQuery. The specified AnnotatedDatasets have to belong
+       * to the datalabeling Dataset.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig migrate_data_labeling_annotated_dataset_configs = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + .MigrateDataLabelingAnnotatedDatasetConfig.Builder + getMigrateDataLabelingAnnotatedDatasetConfigsBuilder(int index) { + return getMigrateDataLabelingAnnotatedDatasetConfigsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Optional. Configs for migrating AnnotatedDataset in datalabeling.googleapis.com to
+       * AI Platform's SavedQuery. The specified AnnotatedDatasets have to belong
+       * to the datalabeling Dataset.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig migrate_data_labeling_annotated_dataset_configs = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + .MigrateDataLabelingAnnotatedDatasetConfigOrBuilder + getMigrateDataLabelingAnnotatedDatasetConfigsOrBuilder(int index) { + if (migrateDataLabelingAnnotatedDatasetConfigsBuilder_ == null) { + return migrateDataLabelingAnnotatedDatasetConfigs_.get(index); + } else { + return migrateDataLabelingAnnotatedDatasetConfigsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Optional. Configs for migrating AnnotatedDataset in datalabeling.googleapis.com to
+       * AI Platform's SavedQuery. The specified AnnotatedDatasets have to belong
+       * to the datalabeling Dataset.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig migrate_data_labeling_annotated_dataset_configs = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List< + ? extends + com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig + .MigrateDataLabelingAnnotatedDatasetConfigOrBuilder> + getMigrateDataLabelingAnnotatedDatasetConfigsOrBuilderList() { + if (migrateDataLabelingAnnotatedDatasetConfigsBuilder_ != null) { + return migrateDataLabelingAnnotatedDatasetConfigsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList( + migrateDataLabelingAnnotatedDatasetConfigs_); + } + } + /** + * + * + *
+       * Optional. Configs for migrating AnnotatedDataset in datalabeling.googleapis.com to
+       * AI Platform's SavedQuery. The specified AnnotatedDatasets have to belong
+       * to the datalabeling Dataset.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig migrate_data_labeling_annotated_dataset_configs = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + .MigrateDataLabelingAnnotatedDatasetConfig.Builder + addMigrateDataLabelingAnnotatedDatasetConfigsBuilder() { + return getMigrateDataLabelingAnnotatedDatasetConfigsFieldBuilder() + .addBuilder( + com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig + .getDefaultInstance()); + } + /** + * + * + *
+       * Optional. Configs for migrating AnnotatedDataset in datalabeling.googleapis.com to
+       * AI Platform's SavedQuery. The specified AnnotatedDatasets have to belong
+       * to the datalabeling Dataset.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig migrate_data_labeling_annotated_dataset_configs = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + .MigrateDataLabelingAnnotatedDatasetConfig.Builder + addMigrateDataLabelingAnnotatedDatasetConfigsBuilder(int index) { + return getMigrateDataLabelingAnnotatedDatasetConfigsFieldBuilder() + .addBuilder( + index, + com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig + .getDefaultInstance()); + } + /** + * + * + *
+       * Optional. Configs for migrating AnnotatedDataset in datalabeling.googleapis.com to
+       * AI Platform's SavedQuery. The specified AnnotatedDatasets have to belong
+       * to the datalabeling Dataset.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig migrate_data_labeling_annotated_dataset_configs = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List< + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + .MigrateDataLabelingAnnotatedDatasetConfig.Builder> + getMigrateDataLabelingAnnotatedDatasetConfigsBuilderList() { + return getMigrateDataLabelingAnnotatedDatasetConfigsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + .MigrateDataLabelingAnnotatedDatasetConfig, + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + .MigrateDataLabelingAnnotatedDatasetConfig.Builder, + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + .MigrateDataLabelingAnnotatedDatasetConfigOrBuilder> + getMigrateDataLabelingAnnotatedDatasetConfigsFieldBuilder() { + if (migrateDataLabelingAnnotatedDatasetConfigsBuilder_ == null) { + migrateDataLabelingAnnotatedDatasetConfigsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig, + com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig + .Builder, + com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig + .MigrateDataLabelingAnnotatedDatasetConfigOrBuilder>( + migrateDataLabelingAnnotatedDatasetConfigs_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + migrateDataLabelingAnnotatedDatasetConfigs_ = null; + } + return migrateDataLabelingAnnotatedDatasetConfigsBuilder_; + } + + @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.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig) + private static final com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig(); + } + + public static com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MigrateDataLabelingDatasetConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new MigrateDataLabelingDatasetConfig(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.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int requestCase_ = 0; + private java.lang.Object request_; + + public enum RequestCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + MIGRATE_ML_ENGINE_MODEL_VERSION_CONFIG(1), + MIGRATE_AUTOML_MODEL_CONFIG(2), + MIGRATE_AUTOML_DATASET_CONFIG(3), + MIGRATE_DATA_LABELING_DATASET_CONFIG(4), + REQUEST_NOT_SET(0); + private final int value; + + private RequestCase(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 RequestCase valueOf(int value) { + return forNumber(value); + } + + public static RequestCase forNumber(int value) { + switch (value) { + case 1: + return MIGRATE_ML_ENGINE_MODEL_VERSION_CONFIG; + case 2: + return MIGRATE_AUTOML_MODEL_CONFIG; + case 3: + return MIGRATE_AUTOML_DATASET_CONFIG; + case 4: + return MIGRATE_DATA_LABELING_DATASET_CONFIG; + case 0: + return REQUEST_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public RequestCase getRequestCase() { + return RequestCase.forNumber(requestCase_); + } + + public static final int MIGRATE_ML_ENGINE_MODEL_VERSION_CONFIG_FIELD_NUMBER = 1; + /** + * + * + *
+   * Config for migrating Version in ml.googleapis.com to AI Platform's Model.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig migrate_ml_engine_model_version_config = 1; + * + * + * @return Whether the migrateMlEngineModelVersionConfig field is set. + */ + @java.lang.Override + public boolean hasMigrateMlEngineModelVersionConfig() { + return requestCase_ == 1; + } + /** + * + * + *
+   * Config for migrating Version in ml.googleapis.com to AI Platform's Model.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig migrate_ml_engine_model_version_config = 1; + * + * + * @return The migrateMlEngineModelVersionConfig. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig + getMigrateMlEngineModelVersionConfig() { + if (requestCase_ == 1) { + return (com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateMlEngineModelVersionConfig) + request_; + } + return com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig + .getDefaultInstance(); + } + /** + * + * + *
+   * Config for migrating Version in ml.googleapis.com to AI Platform's Model.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig migrate_ml_engine_model_version_config = 1; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateMlEngineModelVersionConfigOrBuilder + getMigrateMlEngineModelVersionConfigOrBuilder() { + if (requestCase_ == 1) { + return (com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateMlEngineModelVersionConfig) + request_; + } + return com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig + .getDefaultInstance(); + } + + public static final int MIGRATE_AUTOML_MODEL_CONFIG_FIELD_NUMBER = 2; + /** + * + * + *
+   * Config for migrating Model in automl.googleapis.com to AI Platform's
+   * Model.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig migrate_automl_model_config = 2; + * + * + * @return Whether the migrateAutomlModelConfig field is set. + */ + @java.lang.Override + public boolean hasMigrateAutomlModelConfig() { + return requestCase_ == 2; + } + /** + * + * + *
+   * Config for migrating Model in automl.googleapis.com to AI Platform's
+   * Model.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig migrate_automl_model_config = 2; + * + * + * @return The migrateAutomlModelConfig. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig + getMigrateAutomlModelConfig() { + if (requestCase_ == 2) { + return (com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig) + request_; + } + return com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig + .getDefaultInstance(); + } + /** + * + * + *
+   * Config for migrating Model in automl.googleapis.com to AI Platform's
+   * Model.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig migrate_automl_model_config = 2; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfigOrBuilder + getMigrateAutomlModelConfigOrBuilder() { + if (requestCase_ == 2) { + return (com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig) + request_; + } + return com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig + .getDefaultInstance(); + } + + public static final int MIGRATE_AUTOML_DATASET_CONFIG_FIELD_NUMBER = 3; + /** + * + * + *
+   * Config for migrating Dataset in automl.googleapis.com to AI Platform's
+   * Dataset.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig migrate_automl_dataset_config = 3; + * + * + * @return Whether the migrateAutomlDatasetConfig field is set. + */ + @java.lang.Override + public boolean hasMigrateAutomlDatasetConfig() { + return requestCase_ == 3; + } + /** + * + * + *
+   * Config for migrating Dataset in automl.googleapis.com to AI Platform's
+   * Dataset.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig migrate_automl_dataset_config = 3; + * + * + * @return The migrateAutomlDatasetConfig. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig + getMigrateAutomlDatasetConfig() { + if (requestCase_ == 3) { + return (com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig) + request_; + } + return com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig + .getDefaultInstance(); + } + /** + * + * + *
+   * Config for migrating Dataset in automl.googleapis.com to AI Platform's
+   * Dataset.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig migrate_automl_dataset_config = 3; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfigOrBuilder + getMigrateAutomlDatasetConfigOrBuilder() { + if (requestCase_ == 3) { + return (com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig) + request_; + } + return com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig + .getDefaultInstance(); + } + + public static final int MIGRATE_DATA_LABELING_DATASET_CONFIG_FIELD_NUMBER = 4; + /** + * + * + *
+   * Config for migrating Dataset in datalabeling.googleapis.com to
+   * AI Platform's Dataset.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig migrate_data_labeling_dataset_config = 4; + * + * + * @return Whether the migrateDataLabelingDatasetConfig field is set. + */ + @java.lang.Override + public boolean hasMigrateDataLabelingDatasetConfig() { + return requestCase_ == 4; + } + /** + * + * + *
+   * Config for migrating Dataset in datalabeling.googleapis.com to
+   * AI Platform's Dataset.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig migrate_data_labeling_dataset_config = 4; + * + * + * @return The migrateDataLabelingDatasetConfig. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + getMigrateDataLabelingDatasetConfig() { + if (requestCase_ == 4) { + return (com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig) + request_; + } + return com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + .getDefaultInstance(); + } + /** + * + * + *
+   * Config for migrating Dataset in datalabeling.googleapis.com to
+   * AI Platform's Dataset.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig migrate_data_labeling_dataset_config = 4; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfigOrBuilder + getMigrateDataLabelingDatasetConfigOrBuilder() { + if (requestCase_ == 4) { + return (com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig) + request_; + } + return com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + .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 (requestCase_ == 1) { + output.writeMessage( + 1, + (com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig) + request_); + } + if (requestCase_ == 2) { + output.writeMessage( + 2, + (com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig) + request_); + } + if (requestCase_ == 3) { + output.writeMessage( + 3, + (com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig) + request_); + } + if (requestCase_ == 4) { + output.writeMessage( + 4, + (com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig) + request_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (requestCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, + (com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateMlEngineModelVersionConfig) + request_); + } + if (requestCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, + (com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig) + request_); + } + if (requestCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, + (com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig) + request_); + } + if (requestCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, + (com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig) + request_); + } + 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.v1.MigrateResourceRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.MigrateResourceRequest other = + (com.google.cloud.aiplatform.v1.MigrateResourceRequest) obj; + + if (!getRequestCase().equals(other.getRequestCase())) return false; + switch (requestCase_) { + case 1: + if (!getMigrateMlEngineModelVersionConfig() + .equals(other.getMigrateMlEngineModelVersionConfig())) return false; + break; + case 2: + if (!getMigrateAutomlModelConfig().equals(other.getMigrateAutomlModelConfig())) + return false; + break; + case 3: + if (!getMigrateAutomlDatasetConfig().equals(other.getMigrateAutomlDatasetConfig())) + return false; + break; + case 4: + if (!getMigrateDataLabelingDatasetConfig() + .equals(other.getMigrateDataLabelingDatasetConfig())) 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 (requestCase_) { + case 1: + hash = (37 * hash) + MIGRATE_ML_ENGINE_MODEL_VERSION_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getMigrateMlEngineModelVersionConfig().hashCode(); + break; + case 2: + hash = (37 * hash) + MIGRATE_AUTOML_MODEL_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getMigrateAutomlModelConfig().hashCode(); + break; + case 3: + hash = (37 * hash) + MIGRATE_AUTOML_DATASET_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getMigrateAutomlDatasetConfig().hashCode(); + break; + case 4: + hash = (37 * hash) + MIGRATE_DATA_LABELING_DATASET_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getMigrateDataLabelingDatasetConfig().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.MigrateResourceRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.MigrateResourceRequest 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.v1.MigrateResourceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.MigrateResourceRequest 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.v1.MigrateResourceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.MigrateResourceRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.MigrateResourceRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.MigrateResourceRequest 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.v1.MigrateResourceRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.MigrateResourceRequest 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.v1.MigrateResourceRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.MigrateResourceRequest 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.v1.MigrateResourceRequest 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; + } + /** + * + * + *
+   * Config of migrating one resource from automl.googleapis.com,
+   * datalabeling.googleapis.com and ml.googleapis.com to AI Platform.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.MigrateResourceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.MigrateResourceRequest) + com.google.cloud.aiplatform.v1.MigrateResourceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.MigrationServiceProto + .internal_static_google_cloud_aiplatform_v1_MigrateResourceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.MigrationServiceProto + .internal_static_google_cloud_aiplatform_v1_MigrateResourceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.MigrateResourceRequest.class, + com.google.cloud.aiplatform.v1.MigrateResourceRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.MigrateResourceRequest.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(); + requestCase_ = 0; + request_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.MigrationServiceProto + .internal_static_google_cloud_aiplatform_v1_MigrateResourceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigrateResourceRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.MigrateResourceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigrateResourceRequest build() { + com.google.cloud.aiplatform.v1.MigrateResourceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigrateResourceRequest buildPartial() { + com.google.cloud.aiplatform.v1.MigrateResourceRequest result = + new com.google.cloud.aiplatform.v1.MigrateResourceRequest(this); + if (requestCase_ == 1) { + if (migrateMlEngineModelVersionConfigBuilder_ == null) { + result.request_ = request_; + } else { + result.request_ = migrateMlEngineModelVersionConfigBuilder_.build(); + } + } + if (requestCase_ == 2) { + if (migrateAutomlModelConfigBuilder_ == null) { + result.request_ = request_; + } else { + result.request_ = migrateAutomlModelConfigBuilder_.build(); + } + } + if (requestCase_ == 3) { + if (migrateAutomlDatasetConfigBuilder_ == null) { + result.request_ = request_; + } else { + result.request_ = migrateAutomlDatasetConfigBuilder_.build(); + } + } + if (requestCase_ == 4) { + if (migrateDataLabelingDatasetConfigBuilder_ == null) { + result.request_ = request_; + } else { + result.request_ = migrateDataLabelingDatasetConfigBuilder_.build(); + } + } + result.requestCase_ = requestCase_; + 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.v1.MigrateResourceRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.MigrateResourceRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.MigrateResourceRequest other) { + if (other == com.google.cloud.aiplatform.v1.MigrateResourceRequest.getDefaultInstance()) + return this; + switch (other.getRequestCase()) { + case MIGRATE_ML_ENGINE_MODEL_VERSION_CONFIG: + { + mergeMigrateMlEngineModelVersionConfig(other.getMigrateMlEngineModelVersionConfig()); + break; + } + case MIGRATE_AUTOML_MODEL_CONFIG: + { + mergeMigrateAutomlModelConfig(other.getMigrateAutomlModelConfig()); + break; + } + case MIGRATE_AUTOML_DATASET_CONFIG: + { + mergeMigrateAutomlDatasetConfig(other.getMigrateAutomlDatasetConfig()); + break; + } + case MIGRATE_DATA_LABELING_DATASET_CONFIG: + { + mergeMigrateDataLabelingDatasetConfig(other.getMigrateDataLabelingDatasetConfig()); + break; + } + case REQUEST_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.v1.MigrateResourceRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.MigrateResourceRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int requestCase_ = 0; + private java.lang.Object request_; + + public RequestCase getRequestCase() { + return RequestCase.forNumber(requestCase_); + } + + public Builder clearRequest() { + requestCase_ = 0; + request_ = null; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig, + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig + .Builder, + com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateMlEngineModelVersionConfigOrBuilder> + migrateMlEngineModelVersionConfigBuilder_; + /** + * + * + *
+     * Config for migrating Version in ml.googleapis.com to AI Platform's Model.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig migrate_ml_engine_model_version_config = 1; + * + * + * @return Whether the migrateMlEngineModelVersionConfig field is set. + */ + @java.lang.Override + public boolean hasMigrateMlEngineModelVersionConfig() { + return requestCase_ == 1; + } + /** + * + * + *
+     * Config for migrating Version in ml.googleapis.com to AI Platform's Model.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig migrate_ml_engine_model_version_config = 1; + * + * + * @return The migrateMlEngineModelVersionConfig. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig + getMigrateMlEngineModelVersionConfig() { + if (migrateMlEngineModelVersionConfigBuilder_ == null) { + if (requestCase_ == 1) { + return (com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateMlEngineModelVersionConfig) + request_; + } + return com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateMlEngineModelVersionConfig.getDefaultInstance(); + } else { + if (requestCase_ == 1) { + return migrateMlEngineModelVersionConfigBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateMlEngineModelVersionConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Config for migrating Version in ml.googleapis.com to AI Platform's Model.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig migrate_ml_engine_model_version_config = 1; + * + */ + public Builder setMigrateMlEngineModelVersionConfig( + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig + value) { + if (migrateMlEngineModelVersionConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + request_ = value; + onChanged(); + } else { + migrateMlEngineModelVersionConfigBuilder_.setMessage(value); + } + requestCase_ = 1; + return this; + } + /** + * + * + *
+     * Config for migrating Version in ml.googleapis.com to AI Platform's Model.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig migrate_ml_engine_model_version_config = 1; + * + */ + public Builder setMigrateMlEngineModelVersionConfig( + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig + .Builder + builderForValue) { + if (migrateMlEngineModelVersionConfigBuilder_ == null) { + request_ = builderForValue.build(); + onChanged(); + } else { + migrateMlEngineModelVersionConfigBuilder_.setMessage(builderForValue.build()); + } + requestCase_ = 1; + return this; + } + /** + * + * + *
+     * Config for migrating Version in ml.googleapis.com to AI Platform's Model.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig migrate_ml_engine_model_version_config = 1; + * + */ + public Builder mergeMigrateMlEngineModelVersionConfig( + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig + value) { + if (migrateMlEngineModelVersionConfigBuilder_ == null) { + if (requestCase_ == 1 + && request_ + != com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateMlEngineModelVersionConfig.getDefaultInstance()) { + request_ = + com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateMlEngineModelVersionConfig.newBuilder( + (com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateMlEngineModelVersionConfig) + request_) + .mergeFrom(value) + .buildPartial(); + } else { + request_ = value; + } + onChanged(); + } else { + if (requestCase_ == 1) { + migrateMlEngineModelVersionConfigBuilder_.mergeFrom(value); + } + migrateMlEngineModelVersionConfigBuilder_.setMessage(value); + } + requestCase_ = 1; + return this; + } + /** + * + * + *
+     * Config for migrating Version in ml.googleapis.com to AI Platform's Model.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig migrate_ml_engine_model_version_config = 1; + * + */ + public Builder clearMigrateMlEngineModelVersionConfig() { + if (migrateMlEngineModelVersionConfigBuilder_ == null) { + if (requestCase_ == 1) { + requestCase_ = 0; + request_ = null; + onChanged(); + } + } else { + if (requestCase_ == 1) { + requestCase_ = 0; + request_ = null; + } + migrateMlEngineModelVersionConfigBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Config for migrating Version in ml.googleapis.com to AI Platform's Model.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig migrate_ml_engine_model_version_config = 1; + * + */ + public com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig + .Builder + getMigrateMlEngineModelVersionConfigBuilder() { + return getMigrateMlEngineModelVersionConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Config for migrating Version in ml.googleapis.com to AI Platform's Model.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig migrate_ml_engine_model_version_config = 1; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateMlEngineModelVersionConfigOrBuilder + getMigrateMlEngineModelVersionConfigOrBuilder() { + if ((requestCase_ == 1) && (migrateMlEngineModelVersionConfigBuilder_ != null)) { + return migrateMlEngineModelVersionConfigBuilder_.getMessageOrBuilder(); + } else { + if (requestCase_ == 1) { + return (com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateMlEngineModelVersionConfig) + request_; + } + return com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateMlEngineModelVersionConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Config for migrating Version in ml.googleapis.com to AI Platform's Model.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig migrate_ml_engine_model_version_config = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig, + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig + .Builder, + com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateMlEngineModelVersionConfigOrBuilder> + getMigrateMlEngineModelVersionConfigFieldBuilder() { + if (migrateMlEngineModelVersionConfigBuilder_ == null) { + if (!(requestCase_ == 1)) { + request_ = + com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateMlEngineModelVersionConfig.getDefaultInstance(); + } + migrateMlEngineModelVersionConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateMlEngineModelVersionConfig, + com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateMlEngineModelVersionConfig.Builder, + com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateMlEngineModelVersionConfigOrBuilder>( + (com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateMlEngineModelVersionConfig) + request_, + getParentForChildren(), + isClean()); + request_ = null; + } + requestCase_ = 1; + onChanged(); + ; + return migrateMlEngineModelVersionConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig, + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig.Builder, + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfigOrBuilder> + migrateAutomlModelConfigBuilder_; + /** + * + * + *
+     * Config for migrating Model in automl.googleapis.com to AI Platform's
+     * Model.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig migrate_automl_model_config = 2; + * + * + * @return Whether the migrateAutomlModelConfig field is set. + */ + @java.lang.Override + public boolean hasMigrateAutomlModelConfig() { + return requestCase_ == 2; + } + /** + * + * + *
+     * Config for migrating Model in automl.googleapis.com to AI Platform's
+     * Model.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig migrate_automl_model_config = 2; + * + * + * @return The migrateAutomlModelConfig. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig + getMigrateAutomlModelConfig() { + if (migrateAutomlModelConfigBuilder_ == null) { + if (requestCase_ == 2) { + return (com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig) + request_; + } + return com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig + .getDefaultInstance(); + } else { + if (requestCase_ == 2) { + return migrateAutomlModelConfigBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Config for migrating Model in automl.googleapis.com to AI Platform's
+     * Model.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig migrate_automl_model_config = 2; + * + */ + public Builder setMigrateAutomlModelConfig( + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig value) { + if (migrateAutomlModelConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + request_ = value; + onChanged(); + } else { + migrateAutomlModelConfigBuilder_.setMessage(value); + } + requestCase_ = 2; + return this; + } + /** + * + * + *
+     * Config for migrating Model in automl.googleapis.com to AI Platform's
+     * Model.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig migrate_automl_model_config = 2; + * + */ + public Builder setMigrateAutomlModelConfig( + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig.Builder + builderForValue) { + if (migrateAutomlModelConfigBuilder_ == null) { + request_ = builderForValue.build(); + onChanged(); + } else { + migrateAutomlModelConfigBuilder_.setMessage(builderForValue.build()); + } + requestCase_ = 2; + return this; + } + /** + * + * + *
+     * Config for migrating Model in automl.googleapis.com to AI Platform's
+     * Model.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig migrate_automl_model_config = 2; + * + */ + public Builder mergeMigrateAutomlModelConfig( + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig value) { + if (migrateAutomlModelConfigBuilder_ == null) { + if (requestCase_ == 2 + && request_ + != com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig + .getDefaultInstance()) { + request_ = + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig + .newBuilder( + (com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateAutomlModelConfig) + request_) + .mergeFrom(value) + .buildPartial(); + } else { + request_ = value; + } + onChanged(); + } else { + if (requestCase_ == 2) { + migrateAutomlModelConfigBuilder_.mergeFrom(value); + } + migrateAutomlModelConfigBuilder_.setMessage(value); + } + requestCase_ = 2; + return this; + } + /** + * + * + *
+     * Config for migrating Model in automl.googleapis.com to AI Platform's
+     * Model.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig migrate_automl_model_config = 2; + * + */ + public Builder clearMigrateAutomlModelConfig() { + if (migrateAutomlModelConfigBuilder_ == null) { + if (requestCase_ == 2) { + requestCase_ = 0; + request_ = null; + onChanged(); + } + } else { + if (requestCase_ == 2) { + requestCase_ = 0; + request_ = null; + } + migrateAutomlModelConfigBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Config for migrating Model in automl.googleapis.com to AI Platform's
+     * Model.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig migrate_automl_model_config = 2; + * + */ + public com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig.Builder + getMigrateAutomlModelConfigBuilder() { + return getMigrateAutomlModelConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Config for migrating Model in automl.googleapis.com to AI Platform's
+     * Model.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig migrate_automl_model_config = 2; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfigOrBuilder + getMigrateAutomlModelConfigOrBuilder() { + if ((requestCase_ == 2) && (migrateAutomlModelConfigBuilder_ != null)) { + return migrateAutomlModelConfigBuilder_.getMessageOrBuilder(); + } else { + if (requestCase_ == 2) { + return (com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig) + request_; + } + return com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Config for migrating Model in automl.googleapis.com to AI Platform's
+     * Model.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig migrate_automl_model_config = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig, + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig.Builder, + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfigOrBuilder> + getMigrateAutomlModelConfigFieldBuilder() { + if (migrateAutomlModelConfigBuilder_ == null) { + if (!(requestCase_ == 2)) { + request_ = + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig + .getDefaultInstance(); + } + migrateAutomlModelConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig, + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig + .Builder, + com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateAutomlModelConfigOrBuilder>( + (com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig) + request_, + getParentForChildren(), + isClean()); + request_ = null; + } + requestCase_ = 2; + onChanged(); + ; + return migrateAutomlModelConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig, + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig + .Builder, + com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateAutomlDatasetConfigOrBuilder> + migrateAutomlDatasetConfigBuilder_; + /** + * + * + *
+     * Config for migrating Dataset in automl.googleapis.com to AI Platform's
+     * Dataset.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig migrate_automl_dataset_config = 3; + * + * + * @return Whether the migrateAutomlDatasetConfig field is set. + */ + @java.lang.Override + public boolean hasMigrateAutomlDatasetConfig() { + return requestCase_ == 3; + } + /** + * + * + *
+     * Config for migrating Dataset in automl.googleapis.com to AI Platform's
+     * Dataset.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig migrate_automl_dataset_config = 3; + * + * + * @return The migrateAutomlDatasetConfig. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig + getMigrateAutomlDatasetConfig() { + if (migrateAutomlDatasetConfigBuilder_ == null) { + if (requestCase_ == 3) { + return (com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig) + request_; + } + return com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig + .getDefaultInstance(); + } else { + if (requestCase_ == 3) { + return migrateAutomlDatasetConfigBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Config for migrating Dataset in automl.googleapis.com to AI Platform's
+     * Dataset.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig migrate_automl_dataset_config = 3; + * + */ + public Builder setMigrateAutomlDatasetConfig( + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig value) { + if (migrateAutomlDatasetConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + request_ = value; + onChanged(); + } else { + migrateAutomlDatasetConfigBuilder_.setMessage(value); + } + requestCase_ = 3; + return this; + } + /** + * + * + *
+     * Config for migrating Dataset in automl.googleapis.com to AI Platform's
+     * Dataset.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig migrate_automl_dataset_config = 3; + * + */ + public Builder setMigrateAutomlDatasetConfig( + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig.Builder + builderForValue) { + if (migrateAutomlDatasetConfigBuilder_ == null) { + request_ = builderForValue.build(); + onChanged(); + } else { + migrateAutomlDatasetConfigBuilder_.setMessage(builderForValue.build()); + } + requestCase_ = 3; + return this; + } + /** + * + * + *
+     * Config for migrating Dataset in automl.googleapis.com to AI Platform's
+     * Dataset.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig migrate_automl_dataset_config = 3; + * + */ + public Builder mergeMigrateAutomlDatasetConfig( + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig value) { + if (migrateAutomlDatasetConfigBuilder_ == null) { + if (requestCase_ == 3 + && request_ + != com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig + .getDefaultInstance()) { + request_ = + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig + .newBuilder( + (com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateAutomlDatasetConfig) + request_) + .mergeFrom(value) + .buildPartial(); + } else { + request_ = value; + } + onChanged(); + } else { + if (requestCase_ == 3) { + migrateAutomlDatasetConfigBuilder_.mergeFrom(value); + } + migrateAutomlDatasetConfigBuilder_.setMessage(value); + } + requestCase_ = 3; + return this; + } + /** + * + * + *
+     * Config for migrating Dataset in automl.googleapis.com to AI Platform's
+     * Dataset.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig migrate_automl_dataset_config = 3; + * + */ + public Builder clearMigrateAutomlDatasetConfig() { + if (migrateAutomlDatasetConfigBuilder_ == null) { + if (requestCase_ == 3) { + requestCase_ = 0; + request_ = null; + onChanged(); + } + } else { + if (requestCase_ == 3) { + requestCase_ = 0; + request_ = null; + } + migrateAutomlDatasetConfigBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Config for migrating Dataset in automl.googleapis.com to AI Platform's
+     * Dataset.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig migrate_automl_dataset_config = 3; + * + */ + public com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig.Builder + getMigrateAutomlDatasetConfigBuilder() { + return getMigrateAutomlDatasetConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Config for migrating Dataset in automl.googleapis.com to AI Platform's
+     * Dataset.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig migrate_automl_dataset_config = 3; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfigOrBuilder + getMigrateAutomlDatasetConfigOrBuilder() { + if ((requestCase_ == 3) && (migrateAutomlDatasetConfigBuilder_ != null)) { + return migrateAutomlDatasetConfigBuilder_.getMessageOrBuilder(); + } else { + if (requestCase_ == 3) { + return (com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig) + request_; + } + return com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Config for migrating Dataset in automl.googleapis.com to AI Platform's
+     * Dataset.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig migrate_automl_dataset_config = 3; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig, + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig + .Builder, + com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateAutomlDatasetConfigOrBuilder> + getMigrateAutomlDatasetConfigFieldBuilder() { + if (migrateAutomlDatasetConfigBuilder_ == null) { + if (!(requestCase_ == 3)) { + request_ = + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig + .getDefaultInstance(); + } + migrateAutomlDatasetConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig, + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig + .Builder, + com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateAutomlDatasetConfigOrBuilder>( + (com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig) + request_, + getParentForChildren(), + isClean()); + request_ = null; + } + requestCase_ = 3; + onChanged(); + ; + return migrateAutomlDatasetConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig, + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + .Builder, + com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfigOrBuilder> + migrateDataLabelingDatasetConfigBuilder_; + /** + * + * + *
+     * Config for migrating Dataset in datalabeling.googleapis.com to
+     * AI Platform's Dataset.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig migrate_data_labeling_dataset_config = 4; + * + * + * @return Whether the migrateDataLabelingDatasetConfig field is set. + */ + @java.lang.Override + public boolean hasMigrateDataLabelingDatasetConfig() { + return requestCase_ == 4; + } + /** + * + * + *
+     * Config for migrating Dataset in datalabeling.googleapis.com to
+     * AI Platform's Dataset.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig migrate_data_labeling_dataset_config = 4; + * + * + * @return The migrateDataLabelingDatasetConfig. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + getMigrateDataLabelingDatasetConfig() { + if (migrateDataLabelingDatasetConfigBuilder_ == null) { + if (requestCase_ == 4) { + return (com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig) + request_; + } + return com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig.getDefaultInstance(); + } else { + if (requestCase_ == 4) { + return migrateDataLabelingDatasetConfigBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Config for migrating Dataset in datalabeling.googleapis.com to
+     * AI Platform's Dataset.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig migrate_data_labeling_dataset_config = 4; + * + */ + public Builder setMigrateDataLabelingDatasetConfig( + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + value) { + if (migrateDataLabelingDatasetConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + request_ = value; + onChanged(); + } else { + migrateDataLabelingDatasetConfigBuilder_.setMessage(value); + } + requestCase_ = 4; + return this; + } + /** + * + * + *
+     * Config for migrating Dataset in datalabeling.googleapis.com to
+     * AI Platform's Dataset.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig migrate_data_labeling_dataset_config = 4; + * + */ + public Builder setMigrateDataLabelingDatasetConfig( + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + .Builder + builderForValue) { + if (migrateDataLabelingDatasetConfigBuilder_ == null) { + request_ = builderForValue.build(); + onChanged(); + } else { + migrateDataLabelingDatasetConfigBuilder_.setMessage(builderForValue.build()); + } + requestCase_ = 4; + return this; + } + /** + * + * + *
+     * Config for migrating Dataset in datalabeling.googleapis.com to
+     * AI Platform's Dataset.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig migrate_data_labeling_dataset_config = 4; + * + */ + public Builder mergeMigrateDataLabelingDatasetConfig( + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + value) { + if (migrateDataLabelingDatasetConfigBuilder_ == null) { + if (requestCase_ == 4 + && request_ + != com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig.getDefaultInstance()) { + request_ = + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + .newBuilder( + (com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig) + request_) + .mergeFrom(value) + .buildPartial(); + } else { + request_ = value; + } + onChanged(); + } else { + if (requestCase_ == 4) { + migrateDataLabelingDatasetConfigBuilder_.mergeFrom(value); + } + migrateDataLabelingDatasetConfigBuilder_.setMessage(value); + } + requestCase_ = 4; + return this; + } + /** + * + * + *
+     * Config for migrating Dataset in datalabeling.googleapis.com to
+     * AI Platform's Dataset.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig migrate_data_labeling_dataset_config = 4; + * + */ + public Builder clearMigrateDataLabelingDatasetConfig() { + if (migrateDataLabelingDatasetConfigBuilder_ == null) { + if (requestCase_ == 4) { + requestCase_ = 0; + request_ = null; + onChanged(); + } + } else { + if (requestCase_ == 4) { + requestCase_ = 0; + request_ = null; + } + migrateDataLabelingDatasetConfigBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Config for migrating Dataset in datalabeling.googleapis.com to
+     * AI Platform's Dataset.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig migrate_data_labeling_dataset_config = 4; + * + */ + public com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + .Builder + getMigrateDataLabelingDatasetConfigBuilder() { + return getMigrateDataLabelingDatasetConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Config for migrating Dataset in datalabeling.googleapis.com to
+     * AI Platform's Dataset.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig migrate_data_labeling_dataset_config = 4; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfigOrBuilder + getMigrateDataLabelingDatasetConfigOrBuilder() { + if ((requestCase_ == 4) && (migrateDataLabelingDatasetConfigBuilder_ != null)) { + return migrateDataLabelingDatasetConfigBuilder_.getMessageOrBuilder(); + } else { + if (requestCase_ == 4) { + return (com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig) + request_; + } + return com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Config for migrating Dataset in datalabeling.googleapis.com to
+     * AI Platform's Dataset.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig migrate_data_labeling_dataset_config = 4; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig, + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + .Builder, + com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfigOrBuilder> + getMigrateDataLabelingDatasetConfigFieldBuilder() { + if (migrateDataLabelingDatasetConfigBuilder_ == null) { + if (!(requestCase_ == 4)) { + request_ = + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + .getDefaultInstance(); + } + migrateDataLabelingDatasetConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig, + com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig.Builder, + com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfigOrBuilder>( + (com.google.cloud.aiplatform.v1.MigrateResourceRequest + .MigrateDataLabelingDatasetConfig) + request_, + getParentForChildren(), + isClean()); + request_ = null; + } + requestCase_ = 4; + onChanged(); + ; + return migrateDataLabelingDatasetConfigBuilder_; + } + + @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.v1.MigrateResourceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.MigrateResourceRequest) + private static final com.google.cloud.aiplatform.v1.MigrateResourceRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.MigrateResourceRequest(); + } + + public static com.google.cloud.aiplatform.v1.MigrateResourceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MigrateResourceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new MigrateResourceRequest(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.v1.MigrateResourceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/MigrateResourceRequestOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/MigrateResourceRequestOrBuilder.java new file mode 100644 index 000000000..213a5b433 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/MigrateResourceRequestOrBuilder.java @@ -0,0 +1,208 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/migration_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface MigrateResourceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.MigrateResourceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Config for migrating Version in ml.googleapis.com to AI Platform's Model.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig migrate_ml_engine_model_version_config = 1; + * + * + * @return Whether the migrateMlEngineModelVersionConfig field is set. + */ + boolean hasMigrateMlEngineModelVersionConfig(); + /** + * + * + *
+   * Config for migrating Version in ml.googleapis.com to AI Platform's Model.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig migrate_ml_engine_model_version_config = 1; + * + * + * @return The migrateMlEngineModelVersionConfig. + */ + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig + getMigrateMlEngineModelVersionConfig(); + /** + * + * + *
+   * Config for migrating Version in ml.googleapis.com to AI Platform's Model.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig migrate_ml_engine_model_version_config = 1; + * + */ + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfigOrBuilder + getMigrateMlEngineModelVersionConfigOrBuilder(); + + /** + * + * + *
+   * Config for migrating Model in automl.googleapis.com to AI Platform's
+   * Model.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig migrate_automl_model_config = 2; + * + * + * @return Whether the migrateAutomlModelConfig field is set. + */ + boolean hasMigrateAutomlModelConfig(); + /** + * + * + *
+   * Config for migrating Model in automl.googleapis.com to AI Platform's
+   * Model.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig migrate_automl_model_config = 2; + * + * + * @return The migrateAutomlModelConfig. + */ + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig + getMigrateAutomlModelConfig(); + /** + * + * + *
+   * Config for migrating Model in automl.googleapis.com to AI Platform's
+   * Model.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig migrate_automl_model_config = 2; + * + */ + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfigOrBuilder + getMigrateAutomlModelConfigOrBuilder(); + + /** + * + * + *
+   * Config for migrating Dataset in automl.googleapis.com to AI Platform's
+   * Dataset.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig migrate_automl_dataset_config = 3; + * + * + * @return Whether the migrateAutomlDatasetConfig field is set. + */ + boolean hasMigrateAutomlDatasetConfig(); + /** + * + * + *
+   * Config for migrating Dataset in automl.googleapis.com to AI Platform's
+   * Dataset.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig migrate_automl_dataset_config = 3; + * + * + * @return The migrateAutomlDatasetConfig. + */ + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig + getMigrateAutomlDatasetConfig(); + /** + * + * + *
+   * Config for migrating Dataset in automl.googleapis.com to AI Platform's
+   * Dataset.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig migrate_automl_dataset_config = 3; + * + */ + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfigOrBuilder + getMigrateAutomlDatasetConfigOrBuilder(); + + /** + * + * + *
+   * Config for migrating Dataset in datalabeling.googleapis.com to
+   * AI Platform's Dataset.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig migrate_data_labeling_dataset_config = 4; + * + * + * @return Whether the migrateDataLabelingDatasetConfig field is set. + */ + boolean hasMigrateDataLabelingDatasetConfig(); + /** + * + * + *
+   * Config for migrating Dataset in datalabeling.googleapis.com to
+   * AI Platform's Dataset.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig migrate_data_labeling_dataset_config = 4; + * + * + * @return The migrateDataLabelingDatasetConfig. + */ + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig + getMigrateDataLabelingDatasetConfig(); + /** + * + * + *
+   * Config for migrating Dataset in datalabeling.googleapis.com to
+   * AI Platform's Dataset.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig migrate_data_labeling_dataset_config = 4; + * + */ + com.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfigOrBuilder + getMigrateDataLabelingDatasetConfigOrBuilder(); + + public com.google.cloud.aiplatform.v1.MigrateResourceRequest.RequestCase getRequestCase(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/MigrateResourceResponse.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/MigrateResourceResponse.java new file mode 100644 index 000000000..9f5d810d0 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/MigrateResourceResponse.java @@ -0,0 +1,1241 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/migration_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Describes a successfully migrated resource.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.MigrateResourceResponse} + */ +public final class MigrateResourceResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.MigrateResourceResponse) + MigrateResourceResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use MigrateResourceResponse.newBuilder() to construct. + private MigrateResourceResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MigrateResourceResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MigrateResourceResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private MigrateResourceResponse( + 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(); + migratedResourceCase_ = 1; + migratedResource_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + migratedResourceCase_ = 2; + migratedResource_ = s; + break; + } + case 26: + { + com.google.cloud.aiplatform.v1.MigratableResource.Builder subBuilder = null; + if (migratableResource_ != null) { + subBuilder = migratableResource_.toBuilder(); + } + migratableResource_ = + input.readMessage( + com.google.cloud.aiplatform.v1.MigratableResource.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(migratableResource_); + migratableResource_ = 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.v1.MigrationServiceProto + .internal_static_google_cloud_aiplatform_v1_MigrateResourceResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.MigrationServiceProto + .internal_static_google_cloud_aiplatform_v1_MigrateResourceResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.MigrateResourceResponse.class, + com.google.cloud.aiplatform.v1.MigrateResourceResponse.Builder.class); + } + + private int migratedResourceCase_ = 0; + private java.lang.Object migratedResource_; + + public enum MigratedResourceCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + DATASET(1), + MODEL(2), + MIGRATEDRESOURCE_NOT_SET(0); + private final int value; + + private MigratedResourceCase(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 MigratedResourceCase valueOf(int value) { + return forNumber(value); + } + + public static MigratedResourceCase forNumber(int value) { + switch (value) { + case 1: + return DATASET; + case 2: + return MODEL; + case 0: + return MIGRATEDRESOURCE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public MigratedResourceCase getMigratedResourceCase() { + return MigratedResourceCase.forNumber(migratedResourceCase_); + } + + public static final int DATASET_FIELD_NUMBER = 1; + /** + * + * + *
+   * Migrated Dataset's resource name.
+   * 
+ * + * string dataset = 1 [(.google.api.resource_reference) = { ... } + * + * @return The dataset. + */ + public java.lang.String getDataset() { + java.lang.Object ref = ""; + if (migratedResourceCase_ == 1) { + ref = migratedResource_; + } + 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(); + if (migratedResourceCase_ == 1) { + migratedResource_ = s; + } + return s; + } + } + /** + * + * + *
+   * Migrated Dataset's resource name.
+   * 
+ * + * string dataset = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for dataset. + */ + public com.google.protobuf.ByteString getDatasetBytes() { + java.lang.Object ref = ""; + if (migratedResourceCase_ == 1) { + ref = migratedResource_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (migratedResourceCase_ == 1) { + migratedResource_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MODEL_FIELD_NUMBER = 2; + /** + * + * + *
+   * Migrated Model's resource name.
+   * 
+ * + * string model = 2 [(.google.api.resource_reference) = { ... } + * + * @return The model. + */ + public java.lang.String getModel() { + java.lang.Object ref = ""; + if (migratedResourceCase_ == 2) { + ref = migratedResource_; + } + 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(); + if (migratedResourceCase_ == 2) { + migratedResource_ = s; + } + return s; + } + } + /** + * + * + *
+   * Migrated Model's resource name.
+   * 
+ * + * string model = 2 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for model. + */ + public com.google.protobuf.ByteString getModelBytes() { + java.lang.Object ref = ""; + if (migratedResourceCase_ == 2) { + ref = migratedResource_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (migratedResourceCase_ == 2) { + migratedResource_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MIGRATABLE_RESOURCE_FIELD_NUMBER = 3; + private com.google.cloud.aiplatform.v1.MigratableResource migratableResource_; + /** + * + * + *
+   * Before migration, the identifier in ml.googleapis.com,
+   * automl.googleapis.com or datalabeling.googleapis.com.
+   * 
+ * + * .google.cloud.aiplatform.v1.MigratableResource migratable_resource = 3; + * + * @return Whether the migratableResource field is set. + */ + @java.lang.Override + public boolean hasMigratableResource() { + return migratableResource_ != null; + } + /** + * + * + *
+   * Before migration, the identifier in ml.googleapis.com,
+   * automl.googleapis.com or datalabeling.googleapis.com.
+   * 
+ * + * .google.cloud.aiplatform.v1.MigratableResource migratable_resource = 3; + * + * @return The migratableResource. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigratableResource getMigratableResource() { + return migratableResource_ == null + ? com.google.cloud.aiplatform.v1.MigratableResource.getDefaultInstance() + : migratableResource_; + } + /** + * + * + *
+   * Before migration, the identifier in ml.googleapis.com,
+   * automl.googleapis.com or datalabeling.googleapis.com.
+   * 
+ * + * .google.cloud.aiplatform.v1.MigratableResource migratable_resource = 3; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigratableResourceOrBuilder + getMigratableResourceOrBuilder() { + return getMigratableResource(); + } + + 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 (migratedResourceCase_ == 1) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, migratedResource_); + } + if (migratedResourceCase_ == 2) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, migratedResource_); + } + if (migratableResource_ != null) { + output.writeMessage(3, getMigratableResource()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (migratedResourceCase_ == 1) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, migratedResource_); + } + if (migratedResourceCase_ == 2) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, migratedResource_); + } + if (migratableResource_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getMigratableResource()); + } + 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.v1.MigrateResourceResponse)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.MigrateResourceResponse other = + (com.google.cloud.aiplatform.v1.MigrateResourceResponse) obj; + + if (hasMigratableResource() != other.hasMigratableResource()) return false; + if (hasMigratableResource()) { + if (!getMigratableResource().equals(other.getMigratableResource())) return false; + } + if (!getMigratedResourceCase().equals(other.getMigratedResourceCase())) return false; + switch (migratedResourceCase_) { + case 1: + if (!getDataset().equals(other.getDataset())) return false; + break; + case 2: + if (!getModel().equals(other.getModel())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasMigratableResource()) { + hash = (37 * hash) + MIGRATABLE_RESOURCE_FIELD_NUMBER; + hash = (53 * hash) + getMigratableResource().hashCode(); + } + switch (migratedResourceCase_) { + case 1: + hash = (37 * hash) + DATASET_FIELD_NUMBER; + hash = (53 * hash) + getDataset().hashCode(); + break; + case 2: + hash = (37 * hash) + MODEL_FIELD_NUMBER; + hash = (53 * hash) + getModel().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.MigrateResourceResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.MigrateResourceResponse 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.v1.MigrateResourceResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.MigrateResourceResponse 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.v1.MigrateResourceResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.MigrateResourceResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.MigrateResourceResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.MigrateResourceResponse 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.v1.MigrateResourceResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.MigrateResourceResponse 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.v1.MigrateResourceResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.MigrateResourceResponse 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.v1.MigrateResourceResponse 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; + } + /** + * + * + *
+   * Describes a successfully migrated resource.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.MigrateResourceResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.MigrateResourceResponse) + com.google.cloud.aiplatform.v1.MigrateResourceResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.MigrationServiceProto + .internal_static_google_cloud_aiplatform_v1_MigrateResourceResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.MigrationServiceProto + .internal_static_google_cloud_aiplatform_v1_MigrateResourceResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.MigrateResourceResponse.class, + com.google.cloud.aiplatform.v1.MigrateResourceResponse.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.MigrateResourceResponse.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 (migratableResourceBuilder_ == null) { + migratableResource_ = null; + } else { + migratableResource_ = null; + migratableResourceBuilder_ = null; + } + migratedResourceCase_ = 0; + migratedResource_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.MigrationServiceProto + .internal_static_google_cloud_aiplatform_v1_MigrateResourceResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigrateResourceResponse getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.MigrateResourceResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigrateResourceResponse build() { + com.google.cloud.aiplatform.v1.MigrateResourceResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigrateResourceResponse buildPartial() { + com.google.cloud.aiplatform.v1.MigrateResourceResponse result = + new com.google.cloud.aiplatform.v1.MigrateResourceResponse(this); + if (migratedResourceCase_ == 1) { + result.migratedResource_ = migratedResource_; + } + if (migratedResourceCase_ == 2) { + result.migratedResource_ = migratedResource_; + } + if (migratableResourceBuilder_ == null) { + result.migratableResource_ = migratableResource_; + } else { + result.migratableResource_ = migratableResourceBuilder_.build(); + } + result.migratedResourceCase_ = migratedResourceCase_; + 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.v1.MigrateResourceResponse) { + return mergeFrom((com.google.cloud.aiplatform.v1.MigrateResourceResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.MigrateResourceResponse other) { + if (other == com.google.cloud.aiplatform.v1.MigrateResourceResponse.getDefaultInstance()) + return this; + if (other.hasMigratableResource()) { + mergeMigratableResource(other.getMigratableResource()); + } + switch (other.getMigratedResourceCase()) { + case DATASET: + { + migratedResourceCase_ = 1; + migratedResource_ = other.migratedResource_; + onChanged(); + break; + } + case MODEL: + { + migratedResourceCase_ = 2; + migratedResource_ = other.migratedResource_; + onChanged(); + break; + } + case MIGRATEDRESOURCE_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.v1.MigrateResourceResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.MigrateResourceResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int migratedResourceCase_ = 0; + private java.lang.Object migratedResource_; + + public MigratedResourceCase getMigratedResourceCase() { + return MigratedResourceCase.forNumber(migratedResourceCase_); + } + + public Builder clearMigratedResource() { + migratedResourceCase_ = 0; + migratedResource_ = null; + onChanged(); + return this; + } + + /** + * + * + *
+     * Migrated Dataset's resource name.
+     * 
+ * + * string dataset = 1 [(.google.api.resource_reference) = { ... } + * + * @return The dataset. + */ + @java.lang.Override + public java.lang.String getDataset() { + java.lang.Object ref = ""; + if (migratedResourceCase_ == 1) { + ref = migratedResource_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (migratedResourceCase_ == 1) { + migratedResource_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Migrated Dataset's resource name.
+     * 
+ * + * string dataset = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for dataset. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDatasetBytes() { + java.lang.Object ref = ""; + if (migratedResourceCase_ == 1) { + ref = migratedResource_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (migratedResourceCase_ == 1) { + migratedResource_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Migrated Dataset's resource name.
+     * 
+ * + * string dataset = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The dataset to set. + * @return This builder for chaining. + */ + public Builder setDataset(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + migratedResourceCase_ = 1; + migratedResource_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Migrated Dataset's resource name.
+     * 
+ * + * string dataset = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearDataset() { + if (migratedResourceCase_ == 1) { + migratedResourceCase_ = 0; + migratedResource_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Migrated Dataset's resource name.
+     * 
+ * + * string dataset = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for dataset to set. + * @return This builder for chaining. + */ + public Builder setDatasetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + migratedResourceCase_ = 1; + migratedResource_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Migrated Model's resource name.
+     * 
+ * + * string model = 2 [(.google.api.resource_reference) = { ... } + * + * @return The model. + */ + @java.lang.Override + public java.lang.String getModel() { + java.lang.Object ref = ""; + if (migratedResourceCase_ == 2) { + ref = migratedResource_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (migratedResourceCase_ == 2) { + migratedResource_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Migrated Model's resource name.
+     * 
+ * + * string model = 2 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for model. + */ + @java.lang.Override + public com.google.protobuf.ByteString getModelBytes() { + java.lang.Object ref = ""; + if (migratedResourceCase_ == 2) { + ref = migratedResource_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (migratedResourceCase_ == 2) { + migratedResource_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Migrated Model's resource name.
+     * 
+ * + * string model = 2 [(.google.api.resource_reference) = { ... } + * + * @param value The model to set. + * @return This builder for chaining. + */ + public Builder setModel(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + migratedResourceCase_ = 2; + migratedResource_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Migrated Model's resource name.
+     * 
+ * + * string model = 2 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearModel() { + if (migratedResourceCase_ == 2) { + migratedResourceCase_ = 0; + migratedResource_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Migrated Model's resource name.
+     * 
+ * + * string model = 2 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for model to set. + * @return This builder for chaining. + */ + public Builder setModelBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + migratedResourceCase_ = 2; + migratedResource_ = value; + onChanged(); + return this; + } + + private com.google.cloud.aiplatform.v1.MigratableResource migratableResource_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.MigratableResource, + com.google.cloud.aiplatform.v1.MigratableResource.Builder, + com.google.cloud.aiplatform.v1.MigratableResourceOrBuilder> + migratableResourceBuilder_; + /** + * + * + *
+     * Before migration, the identifier in ml.googleapis.com,
+     * automl.googleapis.com or datalabeling.googleapis.com.
+     * 
+ * + * .google.cloud.aiplatform.v1.MigratableResource migratable_resource = 3; + * + * @return Whether the migratableResource field is set. + */ + public boolean hasMigratableResource() { + return migratableResourceBuilder_ != null || migratableResource_ != null; + } + /** + * + * + *
+     * Before migration, the identifier in ml.googleapis.com,
+     * automl.googleapis.com or datalabeling.googleapis.com.
+     * 
+ * + * .google.cloud.aiplatform.v1.MigratableResource migratable_resource = 3; + * + * @return The migratableResource. + */ + public com.google.cloud.aiplatform.v1.MigratableResource getMigratableResource() { + if (migratableResourceBuilder_ == null) { + return migratableResource_ == null + ? com.google.cloud.aiplatform.v1.MigratableResource.getDefaultInstance() + : migratableResource_; + } else { + return migratableResourceBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Before migration, the identifier in ml.googleapis.com,
+     * automl.googleapis.com or datalabeling.googleapis.com.
+     * 
+ * + * .google.cloud.aiplatform.v1.MigratableResource migratable_resource = 3; + */ + public Builder setMigratableResource(com.google.cloud.aiplatform.v1.MigratableResource value) { + if (migratableResourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + migratableResource_ = value; + onChanged(); + } else { + migratableResourceBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Before migration, the identifier in ml.googleapis.com,
+     * automl.googleapis.com or datalabeling.googleapis.com.
+     * 
+ * + * .google.cloud.aiplatform.v1.MigratableResource migratable_resource = 3; + */ + public Builder setMigratableResource( + com.google.cloud.aiplatform.v1.MigratableResource.Builder builderForValue) { + if (migratableResourceBuilder_ == null) { + migratableResource_ = builderForValue.build(); + onChanged(); + } else { + migratableResourceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Before migration, the identifier in ml.googleapis.com,
+     * automl.googleapis.com or datalabeling.googleapis.com.
+     * 
+ * + * .google.cloud.aiplatform.v1.MigratableResource migratable_resource = 3; + */ + public Builder mergeMigratableResource( + com.google.cloud.aiplatform.v1.MigratableResource value) { + if (migratableResourceBuilder_ == null) { + if (migratableResource_ != null) { + migratableResource_ = + com.google.cloud.aiplatform.v1.MigratableResource.newBuilder(migratableResource_) + .mergeFrom(value) + .buildPartial(); + } else { + migratableResource_ = value; + } + onChanged(); + } else { + migratableResourceBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Before migration, the identifier in ml.googleapis.com,
+     * automl.googleapis.com or datalabeling.googleapis.com.
+     * 
+ * + * .google.cloud.aiplatform.v1.MigratableResource migratable_resource = 3; + */ + public Builder clearMigratableResource() { + if (migratableResourceBuilder_ == null) { + migratableResource_ = null; + onChanged(); + } else { + migratableResource_ = null; + migratableResourceBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Before migration, the identifier in ml.googleapis.com,
+     * automl.googleapis.com or datalabeling.googleapis.com.
+     * 
+ * + * .google.cloud.aiplatform.v1.MigratableResource migratable_resource = 3; + */ + public com.google.cloud.aiplatform.v1.MigratableResource.Builder + getMigratableResourceBuilder() { + + onChanged(); + return getMigratableResourceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Before migration, the identifier in ml.googleapis.com,
+     * automl.googleapis.com or datalabeling.googleapis.com.
+     * 
+ * + * .google.cloud.aiplatform.v1.MigratableResource migratable_resource = 3; + */ + public com.google.cloud.aiplatform.v1.MigratableResourceOrBuilder + getMigratableResourceOrBuilder() { + if (migratableResourceBuilder_ != null) { + return migratableResourceBuilder_.getMessageOrBuilder(); + } else { + return migratableResource_ == null + ? com.google.cloud.aiplatform.v1.MigratableResource.getDefaultInstance() + : migratableResource_; + } + } + /** + * + * + *
+     * Before migration, the identifier in ml.googleapis.com,
+     * automl.googleapis.com or datalabeling.googleapis.com.
+     * 
+ * + * .google.cloud.aiplatform.v1.MigratableResource migratable_resource = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.MigratableResource, + com.google.cloud.aiplatform.v1.MigratableResource.Builder, + com.google.cloud.aiplatform.v1.MigratableResourceOrBuilder> + getMigratableResourceFieldBuilder() { + if (migratableResourceBuilder_ == null) { + migratableResourceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.MigratableResource, + com.google.cloud.aiplatform.v1.MigratableResource.Builder, + com.google.cloud.aiplatform.v1.MigratableResourceOrBuilder>( + getMigratableResource(), getParentForChildren(), isClean()); + migratableResource_ = null; + } + return migratableResourceBuilder_; + } + + @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.v1.MigrateResourceResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.MigrateResourceResponse) + private static final com.google.cloud.aiplatform.v1.MigrateResourceResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.MigrateResourceResponse(); + } + + public static com.google.cloud.aiplatform.v1.MigrateResourceResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MigrateResourceResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new MigrateResourceResponse(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.v1.MigrateResourceResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/MigrateResourceResponseOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/MigrateResourceResponseOrBuilder.java new file mode 100644 index 000000000..5273b637e --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/MigrateResourceResponseOrBuilder.java @@ -0,0 +1,116 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/migration_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface MigrateResourceResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.MigrateResourceResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Migrated Dataset's resource name.
+   * 
+ * + * string dataset = 1 [(.google.api.resource_reference) = { ... } + * + * @return The dataset. + */ + java.lang.String getDataset(); + /** + * + * + *
+   * Migrated Dataset's resource name.
+   * 
+ * + * string dataset = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for dataset. + */ + com.google.protobuf.ByteString getDatasetBytes(); + + /** + * + * + *
+   * Migrated Model's resource name.
+   * 
+ * + * string model = 2 [(.google.api.resource_reference) = { ... } + * + * @return The model. + */ + java.lang.String getModel(); + /** + * + * + *
+   * Migrated Model's resource name.
+   * 
+ * + * string model = 2 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for model. + */ + com.google.protobuf.ByteString getModelBytes(); + + /** + * + * + *
+   * Before migration, the identifier in ml.googleapis.com,
+   * automl.googleapis.com or datalabeling.googleapis.com.
+   * 
+ * + * .google.cloud.aiplatform.v1.MigratableResource migratable_resource = 3; + * + * @return Whether the migratableResource field is set. + */ + boolean hasMigratableResource(); + /** + * + * + *
+   * Before migration, the identifier in ml.googleapis.com,
+   * automl.googleapis.com or datalabeling.googleapis.com.
+   * 
+ * + * .google.cloud.aiplatform.v1.MigratableResource migratable_resource = 3; + * + * @return The migratableResource. + */ + com.google.cloud.aiplatform.v1.MigratableResource getMigratableResource(); + /** + * + * + *
+   * Before migration, the identifier in ml.googleapis.com,
+   * automl.googleapis.com or datalabeling.googleapis.com.
+   * 
+ * + * .google.cloud.aiplatform.v1.MigratableResource migratable_resource = 3; + */ + com.google.cloud.aiplatform.v1.MigratableResourceOrBuilder getMigratableResourceOrBuilder(); + + public com.google.cloud.aiplatform.v1.MigrateResourceResponse.MigratedResourceCase + getMigratedResourceCase(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/MigrationServiceProto.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/MigrationServiceProto.java new file mode 100644 index 000000000..a3881088b --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/MigrationServiceProto.java @@ -0,0 +1,349 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/migration_service.proto + +package com.google.cloud.aiplatform.v1; + +public final class MigrationServiceProto { + private MigrationServiceProto() {} + + 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_v1_SearchMigratableResourcesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_SearchMigratableResourcesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_SearchMigratableResourcesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_SearchMigratableResourcesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_BatchMigrateResourcesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_BatchMigrateResourcesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_MigrateResourceRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_MigrateResourceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_MigrateResourceRequest_MigrateMlEngineModelVersionConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_MigrateResourceRequest_MigrateMlEngineModelVersionConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_MigrateResourceRequest_MigrateAutomlModelConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_MigrateResourceRequest_MigrateAutomlModelConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_MigrateResourceRequest_MigrateAutomlDatasetConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_MigrateResourceRequest_MigrateAutomlDatasetConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_MigrateResourceRequest_MigrateDataLabelingDatasetConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_MigrateResourceRequest_MigrateDataLabelingDatasetConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_MigrateResourceRequest_MigrateDataLabelingDatasetConfig_MigrateDataLabelingAnnotatedDatasetConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_MigrateResourceRequest_MigrateDataLabelingDatasetConfig_MigrateDataLabelingAnnotatedDatasetConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_BatchMigrateResourcesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_BatchMigrateResourcesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_MigrateResourceResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_MigrateResourceResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_BatchMigrateResourcesOperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_BatchMigrateResourcesOperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_BatchMigrateResourcesOperationMetadata_PartialResult_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_BatchMigrateResourcesOperationMetadata_PartialResult_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n2google/cloud/aiplatform/v1/migration_s" + + "ervice.proto\022\032google.cloud.aiplatform.v1" + + "\032(google/cloud/aiplatform/v1/dataset.pro" + + "to\032&google/cloud/aiplatform/v1/model.pro" + + "to\032\034google/api/annotations.proto\032\027google" + + "/api/client.proto\032\037google/api/field_beha" + + "vior.proto\032\031google/api/resource.proto\0324g" + + "oogle/cloud/aiplatform/v1/migratable_res" + + "ource.proto\032*google/cloud/aiplatform/v1/" + + "operation.proto\032#google/longrunning/oper" + + "ations.proto\032\027google/rpc/status.proto\"\224\001" + + "\n SearchMigratableResourcesRequest\0229\n\006pa" + + "rent\030\001 \001(\tB)\340A\002\372A#\n!locations.googleapis" + + ".com/Location\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage" + + "_token\030\003 \001(\t\022\016\n\006filter\030\004 \001(\t\"\212\001\n!SearchM" + + "igratableResourcesResponse\022L\n\024migratable" + + "_resources\030\001 \003(\0132..google.cloud.aiplatfo" + + "rm.v1.MigratableResource\022\027\n\017next_page_to" + + "ken\030\002 \001(\t\"\265\001\n\034BatchMigrateResourcesReque" + + "st\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!locations.go" + + "ogleapis.com/Location\022Z\n\031migrate_resourc" + + "e_requests\030\002 \003(\01322.google.cloud.aiplatfo" + + "rm.v1.MigrateResourceRequestB\003\340A\002\"\342\n\n\026Mi" + + "grateResourceRequest\022\206\001\n&migrate_ml_engi" + + "ne_model_version_config\030\001 \001(\0132T.google.c" + + "loud.aiplatform.v1.MigrateResourceReques" + + "t.MigrateMlEngineModelVersionConfigH\000\022r\n" + + "\033migrate_automl_model_config\030\002 \001(\0132K.goo" + + "gle.cloud.aiplatform.v1.MigrateResourceR" + + "equest.MigrateAutomlModelConfigH\000\022v\n\035mig" + + "rate_automl_dataset_config\030\003 \001(\0132M.googl" + + "e.cloud.aiplatform.v1.MigrateResourceReq" + + "uest.MigrateAutomlDatasetConfigH\000\022\203\001\n$mi" + + "grate_data_labeling_dataset_config\030\004 \001(\013" + + "2S.google.cloud.aiplatform.v1.MigrateRes" + + "ourceRequest.MigrateDataLabelingDatasetC" + + "onfigH\000\032\225\001\n!MigrateMlEngineModelVersionC" + + "onfig\022\025\n\010endpoint\030\001 \001(\tB\003\340A\002\0228\n\rmodel_ve" + + "rsion\030\002 \001(\tB!\340A\002\372A\033\n\031ml.googleapis.com/V" + + "ersion\022\037\n\022model_display_name\030\003 \001(\tB\003\340A\002\032" + + "o\n\030MigrateAutomlModelConfig\0222\n\005model\030\001 \001" + + "(\tB#\340A\002\372A\035\n\033automl.googleapis.com/Model\022" + + "\037\n\022model_display_name\030\002 \001(\tB\003\340A\001\032w\n\032Migr" + + "ateAutomlDatasetConfig\0226\n\007dataset\030\001 \001(\tB" + + "%\340A\002\372A\037\n\035automl.googleapis.com/Dataset\022!" + + "\n\024dataset_display_name\030\002 \001(\tB\003\340A\002\032\277\003\n Mi" + + "grateDataLabelingDatasetConfig\022<\n\007datase" + + "t\030\001 \001(\tB+\340A\002\372A%\n#datalabeling.googleapis" + + ".com/Dataset\022!\n\024dataset_display_name\030\002 \001" + + "(\tB\003\340A\001\022\273\001\n/migrate_data_labeling_annota" + + "ted_dataset_configs\030\003 \003(\0132}.google.cloud" + + ".aiplatform.v1.MigrateResourceRequest.Mi" + + "grateDataLabelingDatasetConfig.MigrateDa" + + "taLabelingAnnotatedDatasetConfigB\003\340A\001\032|\n" + + ")MigrateDataLabelingAnnotatedDatasetConf" + + "ig\022O\n\021annotated_dataset\030\001 \001(\tB4\340A\002\372A.\n,d" + + "atalabeling.googleapis.com/AnnotatedData" + + "setB\t\n\007request\"x\n\035BatchMigrateResourcesR" + + "esponse\022W\n\032migrate_resource_responses\030\001 " + + "\003(\01323.google.cloud.aiplatform.v1.Migrate" + + "ResourceResponse\"\355\001\n\027MigrateResourceResp" + + "onse\0229\n\007dataset\030\001 \001(\tB&\372A#\n!aiplatform.g" + + "oogleapis.com/DatasetH\000\0225\n\005model\030\002 \001(\tB$" + + "\372A!\n\037aiplatform.googleapis.com/ModelH\000\022K" + + "\n\023migratable_resource\030\003 \001(\0132..google.clo" + + "ud.aiplatform.v1.MigratableResourceB\023\n\021m" + + "igrated_resource\"\333\003\n&BatchMigrateResourc" + + "esOperationMetadata\022N\n\020generic_metadata\030" + + "\001 \001(\01324.google.cloud.aiplatform.v1.Gener" + + "icOperationMetadata\022i\n\017partial_results\030\002" + + " \003(\0132P.google.cloud.aiplatform.v1.BatchM" + + "igrateResourcesOperationMetadata.Partial" + + "Result\032\365\001\n\rPartialResult\022#\n\005error\030\002 \001(\0132" + + "\022.google.rpc.StatusH\000\0225\n\005model\030\003 \001(\tB$\372A" + + "!\n\037aiplatform.googleapis.com/ModelH\000\0229\n\007" + + "dataset\030\004 \001(\tB&\372A#\n!aiplatform.googleapi" + + "s.com/DatasetH\000\022C\n\007request\030\001 \001(\01322.googl" + + "e.cloud.aiplatform.v1.MigrateResourceReq" + + "uestB\010\n\006result2\202\005\n\020MigrationService\022\354\001\n\031" + + "SearchMigratableResources\022<.google.cloud" + + ".aiplatform.v1.SearchMigratableResources" + + "Request\032=.google.cloud.aiplatform.v1.Sea" + + "rchMigratableResourcesResponse\"R\202\323\344\223\002C\">" + + "/v1/{parent=projects/*/locations/*}/migr" + + "atableResources:search:\001*\332A\006parent\022\257\002\n\025B" + + "atchMigrateResources\0228.google.cloud.aipl" + + "atform.v1.BatchMigrateResourcesRequest\032\035" + + ".google.longrunning.Operation\"\274\001\202\323\344\223\002I\"D" + + "/v1/{parent=projects/*/locations/*}/migr" + + "atableResources:batchMigrate:\001*\332A parent" + + ",migrate_resource_requests\312AG\n\035BatchMigr" + + "ateResourcesResponse\022&BatchMigrateResour" + + "cesOperationMetadata\032M\312A\031aiplatform.goog" + + "leapis.com\322A.https://www.googleapis.com/" + + "auth/cloud-platformB\177\n\036com.google.cloud." + + "aiplatform.v1B\025MigrationServiceProtoP\001ZD" + + "google.golang.org/genproto/googleapis/cl" + + "oud/aiplatform/v1;aiplatformb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.cloud.aiplatform.v1.DatasetProto.getDescriptor(), + com.google.cloud.aiplatform.v1.ModelProto.getDescriptor(), + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.aiplatform.v1.MigratableResourceProto.getDescriptor(), + com.google.cloud.aiplatform.v1.OperationProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.rpc.StatusProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1_SearchMigratableResourcesRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_SearchMigratableResourcesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_SearchMigratableResourcesRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", + }); + internal_static_google_cloud_aiplatform_v1_SearchMigratableResourcesResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_aiplatform_v1_SearchMigratableResourcesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_SearchMigratableResourcesResponse_descriptor, + new java.lang.String[] { + "MigratableResources", "NextPageToken", + }); + internal_static_google_cloud_aiplatform_v1_BatchMigrateResourcesRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_aiplatform_v1_BatchMigrateResourcesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_BatchMigrateResourcesRequest_descriptor, + new java.lang.String[] { + "Parent", "MigrateResourceRequests", + }); + internal_static_google_cloud_aiplatform_v1_MigrateResourceRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_aiplatform_v1_MigrateResourceRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_MigrateResourceRequest_descriptor, + new java.lang.String[] { + "MigrateMlEngineModelVersionConfig", + "MigrateAutomlModelConfig", + "MigrateAutomlDatasetConfig", + "MigrateDataLabelingDatasetConfig", + "Request", + }); + internal_static_google_cloud_aiplatform_v1_MigrateResourceRequest_MigrateMlEngineModelVersionConfig_descriptor = + internal_static_google_cloud_aiplatform_v1_MigrateResourceRequest_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_aiplatform_v1_MigrateResourceRequest_MigrateMlEngineModelVersionConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_MigrateResourceRequest_MigrateMlEngineModelVersionConfig_descriptor, + new java.lang.String[] { + "Endpoint", "ModelVersion", "ModelDisplayName", + }); + internal_static_google_cloud_aiplatform_v1_MigrateResourceRequest_MigrateAutomlModelConfig_descriptor = + internal_static_google_cloud_aiplatform_v1_MigrateResourceRequest_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_aiplatform_v1_MigrateResourceRequest_MigrateAutomlModelConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_MigrateResourceRequest_MigrateAutomlModelConfig_descriptor, + new java.lang.String[] { + "Model", "ModelDisplayName", + }); + internal_static_google_cloud_aiplatform_v1_MigrateResourceRequest_MigrateAutomlDatasetConfig_descriptor = + internal_static_google_cloud_aiplatform_v1_MigrateResourceRequest_descriptor + .getNestedTypes() + .get(2); + internal_static_google_cloud_aiplatform_v1_MigrateResourceRequest_MigrateAutomlDatasetConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_MigrateResourceRequest_MigrateAutomlDatasetConfig_descriptor, + new java.lang.String[] { + "Dataset", "DatasetDisplayName", + }); + internal_static_google_cloud_aiplatform_v1_MigrateResourceRequest_MigrateDataLabelingDatasetConfig_descriptor = + internal_static_google_cloud_aiplatform_v1_MigrateResourceRequest_descriptor + .getNestedTypes() + .get(3); + internal_static_google_cloud_aiplatform_v1_MigrateResourceRequest_MigrateDataLabelingDatasetConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_MigrateResourceRequest_MigrateDataLabelingDatasetConfig_descriptor, + new java.lang.String[] { + "Dataset", "DatasetDisplayName", "MigrateDataLabelingAnnotatedDatasetConfigs", + }); + internal_static_google_cloud_aiplatform_v1_MigrateResourceRequest_MigrateDataLabelingDatasetConfig_MigrateDataLabelingAnnotatedDatasetConfig_descriptor = + internal_static_google_cloud_aiplatform_v1_MigrateResourceRequest_MigrateDataLabelingDatasetConfig_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_aiplatform_v1_MigrateResourceRequest_MigrateDataLabelingDatasetConfig_MigrateDataLabelingAnnotatedDatasetConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_MigrateResourceRequest_MigrateDataLabelingDatasetConfig_MigrateDataLabelingAnnotatedDatasetConfig_descriptor, + new java.lang.String[] { + "AnnotatedDataset", + }); + internal_static_google_cloud_aiplatform_v1_BatchMigrateResourcesResponse_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_aiplatform_v1_BatchMigrateResourcesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_BatchMigrateResourcesResponse_descriptor, + new java.lang.String[] { + "MigrateResourceResponses", + }); + internal_static_google_cloud_aiplatform_v1_MigrateResourceResponse_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_aiplatform_v1_MigrateResourceResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_MigrateResourceResponse_descriptor, + new java.lang.String[] { + "Dataset", "Model", "MigratableResource", "MigratedResource", + }); + internal_static_google_cloud_aiplatform_v1_BatchMigrateResourcesOperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_aiplatform_v1_BatchMigrateResourcesOperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_BatchMigrateResourcesOperationMetadata_descriptor, + new java.lang.String[] { + "GenericMetadata", "PartialResults", + }); + internal_static_google_cloud_aiplatform_v1_BatchMigrateResourcesOperationMetadata_PartialResult_descriptor = + internal_static_google_cloud_aiplatform_v1_BatchMigrateResourcesOperationMetadata_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_aiplatform_v1_BatchMigrateResourcesOperationMetadata_PartialResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_BatchMigrateResourcesOperationMetadata_PartialResult_descriptor, + new java.lang.String[] { + "Error", "Model", "Dataset", "Request", "Result", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resourceReference); + registry.add(com.google.longrunning.OperationsProto.operationInfo); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.cloud.aiplatform.v1.DatasetProto.getDescriptor(); + com.google.cloud.aiplatform.v1.ModelProto.getDescriptor(); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.aiplatform.v1.MigratableResourceProto.getDescriptor(); + com.google.cloud.aiplatform.v1.OperationProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.rpc.StatusProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/Model.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/Model.java new file mode 100644 index 000000000..ff1b7216e --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/Model.java @@ -0,0 +1,8704 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/model.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * A trained machine learning Model.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.Model} + */ +public final class Model extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.Model) + ModelOrBuilder { + private static final long serialVersionUID = 0L; + // Use Model.newBuilder() to construct. + private Model(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Model() { + name_ = ""; + displayName_ = ""; + description_ = ""; + metadataSchemaUri_ = ""; + supportedExportFormats_ = java.util.Collections.emptyList(); + trainingPipeline_ = ""; + artifactUri_ = ""; + supportedDeploymentResourcesTypes_ = java.util.Collections.emptyList(); + supportedInputStorageFormats_ = com.google.protobuf.LazyStringArrayList.EMPTY; + supportedOutputStorageFormats_ = com.google.protobuf.LazyStringArrayList.EMPTY; + deployedModels_ = java.util.Collections.emptyList(); + etag_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Model(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Model( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 34: + { + com.google.cloud.aiplatform.v1.PredictSchemata.Builder subBuilder = null; + if (predictSchemata_ != null) { + subBuilder = predictSchemata_.toBuilder(); + } + predictSchemata_ = + input.readMessage( + com.google.cloud.aiplatform.v1.PredictSchemata.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(predictSchemata_); + predictSchemata_ = subBuilder.buildPartial(); + } + + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + metadataSchemaUri_ = s; + break; + } + case 50: + { + com.google.protobuf.Value.Builder subBuilder = null; + if (metadata_ != null) { + subBuilder = metadata_.toBuilder(); + } + metadata_ = input.readMessage(com.google.protobuf.Value.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(metadata_); + metadata_ = subBuilder.buildPartial(); + } + + break; + } + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + + trainingPipeline_ = s; + break; + } + case 74: + { + com.google.cloud.aiplatform.v1.ModelContainerSpec.Builder subBuilder = null; + if (containerSpec_ != null) { + subBuilder = containerSpec_.toBuilder(); + } + containerSpec_ = + input.readMessage( + com.google.cloud.aiplatform.v1.ModelContainerSpec.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(containerSpec_); + containerSpec_ = subBuilder.buildPartial(); + } + + break; + } + case 80: + { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + supportedDeploymentResourcesTypes_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + supportedDeploymentResourcesTypes_.add(rawValue); + break; + } + case 82: + { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while (input.getBytesUntilLimit() > 0) { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + supportedDeploymentResourcesTypes_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + supportedDeploymentResourcesTypes_.add(rawValue); + } + input.popLimit(oldLimit); + break; + } + case 90: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + supportedInputStorageFormats_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000004; + } + supportedInputStorageFormats_.add(s); + break; + } + case 98: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000008) != 0)) { + supportedOutputStorageFormats_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000008; + } + supportedOutputStorageFormats_.add(s); + break; + } + case 106: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 114: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + case 122: + { + if (!((mutable_bitField0_ & 0x00000010) != 0)) { + deployedModels_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000010; + } + deployedModels_.add( + input.readMessage( + com.google.cloud.aiplatform.v1.DeployedModelRef.parser(), extensionRegistry)); + break; + } + case 130: + { + java.lang.String s = input.readStringRequireUtf8(); + + etag_ = s; + break; + } + case 138: + { + if (!((mutable_bitField0_ & 0x00000020) != 0)) { + labels_ = + com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000020; + } + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); + break; + } + case 162: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + supportedExportFormats_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + supportedExportFormats_.add( + input.readMessage( + com.google.cloud.aiplatform.v1.Model.ExportFormat.parser(), + extensionRegistry)); + break; + } + case 194: + { + com.google.cloud.aiplatform.v1.EncryptionSpec.Builder subBuilder = null; + if (encryptionSpec_ != null) { + subBuilder = encryptionSpec_.toBuilder(); + } + encryptionSpec_ = + input.readMessage( + com.google.cloud.aiplatform.v1.EncryptionSpec.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(encryptionSpec_); + encryptionSpec_ = subBuilder.buildPartial(); + } + + break; + } + case 210: + { + java.lang.String s = input.readStringRequireUtf8(); + + artifactUri_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000002) != 0)) { + supportedDeploymentResourcesTypes_ = + java.util.Collections.unmodifiableList(supportedDeploymentResourcesTypes_); + } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + supportedInputStorageFormats_ = supportedInputStorageFormats_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000008) != 0)) { + supportedOutputStorageFormats_ = supportedOutputStorageFormats_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000010) != 0)) { + deployedModels_ = java.util.Collections.unmodifiableList(deployedModels_); + } + if (((mutable_bitField0_ & 0x00000001) != 0)) { + supportedExportFormats_ = java.util.Collections.unmodifiableList(supportedExportFormats_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.ModelProto + .internal_static_google_cloud_aiplatform_v1_Model_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 17: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ModelProto + .internal_static_google_cloud_aiplatform_v1_Model_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.Model.class, + com.google.cloud.aiplatform.v1.Model.Builder.class); + } + + /** + * + * + *
+   * Identifies a type of Model's prediction resources.
+   * 
+ * + * Protobuf enum {@code google.cloud.aiplatform.v1.Model.DeploymentResourcesType} + */ + public enum DeploymentResourcesType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Should not be used.
+     * 
+ * + * DEPLOYMENT_RESOURCES_TYPE_UNSPECIFIED = 0; + */ + DEPLOYMENT_RESOURCES_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Resources that are dedicated to the [DeployedModel][google.cloud.aiplatform.v1.DeployedModel], and that need a
+     * higher degree of manual configuration.
+     * 
+ * + * DEDICATED_RESOURCES = 1; + */ + DEDICATED_RESOURCES(1), + /** + * + * + *
+     * Resources that to large degree are decided by AI Platform, and require
+     * only a modest additional configuration.
+     * 
+ * + * AUTOMATIC_RESOURCES = 2; + */ + AUTOMATIC_RESOURCES(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Should not be used.
+     * 
+ * + * DEPLOYMENT_RESOURCES_TYPE_UNSPECIFIED = 0; + */ + public static final int DEPLOYMENT_RESOURCES_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Resources that are dedicated to the [DeployedModel][google.cloud.aiplatform.v1.DeployedModel], and that need a
+     * higher degree of manual configuration.
+     * 
+ * + * DEDICATED_RESOURCES = 1; + */ + public static final int DEDICATED_RESOURCES_VALUE = 1; + /** + * + * + *
+     * Resources that to large degree are decided by AI Platform, and require
+     * only a modest additional configuration.
+     * 
+ * + * AUTOMATIC_RESOURCES = 2; + */ + public static final int AUTOMATIC_RESOURCES_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 DeploymentResourcesType 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 DeploymentResourcesType forNumber(int value) { + switch (value) { + case 0: + return DEPLOYMENT_RESOURCES_TYPE_UNSPECIFIED; + case 1: + return DEDICATED_RESOURCES; + case 2: + return AUTOMATIC_RESOURCES; + 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 DeploymentResourcesType findValueByNumber(int number) { + return DeploymentResourcesType.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.v1.Model.getDescriptor().getEnumTypes().get(0); + } + + private static final DeploymentResourcesType[] VALUES = values(); + + public static DeploymentResourcesType 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 DeploymentResourcesType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.aiplatform.v1.Model.DeploymentResourcesType) + } + + public interface ExportFormatOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.Model.ExportFormat) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Output only. The ID of the export format.
+     * The possible format IDs are:
+     * * `tflite`
+     * Used for Android mobile devices.
+     * * `edgetpu-tflite`
+     * Used for [Edge TPU](https://cloud.google.com/edge-tpu/) devices.
+     * * `tf-saved-model`
+     * A tensorflow model in SavedModel format.
+     * * `tf-js`
+     * A [TensorFlow.js](https://www.tensorflow.org/js) model that can be used
+     * in the browser and in Node.js using JavaScript.
+     * * `core-ml`
+     * Used for iOS mobile devices.
+     * * `custom-trained`
+     * A Model that was uploaded or trained by custom code.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The id. + */ + java.lang.String getId(); + /** + * + * + *
+     * Output only. The ID of the export format.
+     * The possible format IDs are:
+     * * `tflite`
+     * Used for Android mobile devices.
+     * * `edgetpu-tflite`
+     * Used for [Edge TPU](https://cloud.google.com/edge-tpu/) devices.
+     * * `tf-saved-model`
+     * A tensorflow model in SavedModel format.
+     * * `tf-js`
+     * A [TensorFlow.js](https://www.tensorflow.org/js) model that can be used
+     * in the browser and in Node.js using JavaScript.
+     * * `core-ml`
+     * Used for iOS mobile devices.
+     * * `custom-trained`
+     * A Model that was uploaded or trained by custom code.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for id. + */ + com.google.protobuf.ByteString getIdBytes(); + + /** + * + * + *
+     * Output only. The content of this Model that may be exported.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Model.ExportFormat.ExportableContent exportable_contents = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the exportableContents. + */ + java.util.List + getExportableContentsList(); + /** + * + * + *
+     * Output only. The content of this Model that may be exported.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Model.ExportFormat.ExportableContent exportable_contents = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of exportableContents. + */ + int getExportableContentsCount(); + /** + * + * + *
+     * Output only. The content of this Model that may be exported.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Model.ExportFormat.ExportableContent exportable_contents = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The exportableContents at the given index. + */ + com.google.cloud.aiplatform.v1.Model.ExportFormat.ExportableContent getExportableContents( + int index); + /** + * + * + *
+     * Output only. The content of this Model that may be exported.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Model.ExportFormat.ExportableContent exportable_contents = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the enum numeric values on the wire for exportableContents. + */ + java.util.List getExportableContentsValueList(); + /** + * + * + *
+     * Output only. The content of this Model that may be exported.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Model.ExportFormat.ExportableContent exportable_contents = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of exportableContents at the given index. + */ + int getExportableContentsValue(int index); + } + /** + * + * + *
+   * Represents export format supported by the Model.
+   * All formats export to Google Cloud Storage.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.Model.ExportFormat} + */ + public static final class ExportFormat extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.Model.ExportFormat) + ExportFormatOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExportFormat.newBuilder() to construct. + private ExportFormat(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExportFormat() { + id_ = ""; + exportableContents_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExportFormat(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ExportFormat( + 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 16: + { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + exportableContents_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + exportableContents_.add(rawValue); + break; + } + case 18: + { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while (input.getBytesUntilLimit() > 0) { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + exportableContents_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + exportableContents_.add(rawValue); + } + input.popLimit(oldLimit); + 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)) { + exportableContents_ = java.util.Collections.unmodifiableList(exportableContents_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.ModelProto + .internal_static_google_cloud_aiplatform_v1_Model_ExportFormat_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ModelProto + .internal_static_google_cloud_aiplatform_v1_Model_ExportFormat_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.Model.ExportFormat.class, + com.google.cloud.aiplatform.v1.Model.ExportFormat.Builder.class); + } + + /** + * + * + *
+     * The Model content that can be exported.
+     * 
+ * + * Protobuf enum {@code google.cloud.aiplatform.v1.Model.ExportFormat.ExportableContent} + */ + public enum ExportableContent implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Should not be used.
+       * 
+ * + * EXPORTABLE_CONTENT_UNSPECIFIED = 0; + */ + EXPORTABLE_CONTENT_UNSPECIFIED(0), + /** + * + * + *
+       * Model artifact and any of its supported files. Will be exported to the
+       * location specified by the `artifactDestination` field of the
+       * [ExportModelRequest.output_config][google.cloud.aiplatform.v1.ExportModelRequest.output_config] object.
+       * 
+ * + * ARTIFACT = 1; + */ + ARTIFACT(1), + /** + * + * + *
+       * The container image that is to be used when deploying this Model. Will
+       * be exported to the location specified by the `imageDestination` field
+       * of the [ExportModelRequest.output_config][google.cloud.aiplatform.v1.ExportModelRequest.output_config] object.
+       * 
+ * + * IMAGE = 2; + */ + IMAGE(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * Should not be used.
+       * 
+ * + * EXPORTABLE_CONTENT_UNSPECIFIED = 0; + */ + public static final int EXPORTABLE_CONTENT_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * Model artifact and any of its supported files. Will be exported to the
+       * location specified by the `artifactDestination` field of the
+       * [ExportModelRequest.output_config][google.cloud.aiplatform.v1.ExportModelRequest.output_config] object.
+       * 
+ * + * ARTIFACT = 1; + */ + public static final int ARTIFACT_VALUE = 1; + /** + * + * + *
+       * The container image that is to be used when deploying this Model. Will
+       * be exported to the location specified by the `imageDestination` field
+       * of the [ExportModelRequest.output_config][google.cloud.aiplatform.v1.ExportModelRequest.output_config] object.
+       * 
+ * + * IMAGE = 2; + */ + public static final int IMAGE_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 ExportableContent 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 ExportableContent forNumber(int value) { + switch (value) { + case 0: + return EXPORTABLE_CONTENT_UNSPECIFIED; + case 1: + return ARTIFACT; + case 2: + return IMAGE; + 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 ExportableContent findValueByNumber(int number) { + return ExportableContent.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.v1.Model.ExportFormat.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final ExportableContent[] VALUES = values(); + + public static ExportableContent 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 ExportableContent(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.aiplatform.v1.Model.ExportFormat.ExportableContent) + } + + public static final int ID_FIELD_NUMBER = 1; + private volatile java.lang.Object id_; + /** + * + * + *
+     * Output only. The ID of the export format.
+     * The possible format IDs are:
+     * * `tflite`
+     * Used for Android mobile devices.
+     * * `edgetpu-tflite`
+     * Used for [Edge TPU](https://cloud.google.com/edge-tpu/) devices.
+     * * `tf-saved-model`
+     * A tensorflow model in SavedModel format.
+     * * `tf-js`
+     * A [TensorFlow.js](https://www.tensorflow.org/js) model that can be used
+     * in the browser and in Node.js using JavaScript.
+     * * `core-ml`
+     * Used for iOS mobile devices.
+     * * `custom-trained`
+     * A Model that was uploaded or trained by custom code.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + /** + * + * + *
+     * Output only. The ID of the export format.
+     * The possible format IDs are:
+     * * `tflite`
+     * Used for Android mobile devices.
+     * * `edgetpu-tflite`
+     * Used for [Edge TPU](https://cloud.google.com/edge-tpu/) devices.
+     * * `tf-saved-model`
+     * A tensorflow model in SavedModel format.
+     * * `tf-js`
+     * A [TensorFlow.js](https://www.tensorflow.org/js) model that can be used
+     * in the browser and in Node.js using JavaScript.
+     * * `core-ml`
+     * Used for iOS mobile devices.
+     * * `custom-trained`
+     * A Model that was uploaded or trained by custom code.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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 EXPORTABLE_CONTENTS_FIELD_NUMBER = 2; + private java.util.List exportableContents_; + private static final com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.cloud.aiplatform.v1.Model.ExportFormat.ExportableContent> + exportableContents_converter_ = + new com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, + com.google.cloud.aiplatform.v1.Model.ExportFormat.ExportableContent>() { + public com.google.cloud.aiplatform.v1.Model.ExportFormat.ExportableContent convert( + java.lang.Integer from) { + @SuppressWarnings("deprecation") + com.google.cloud.aiplatform.v1.Model.ExportFormat.ExportableContent result = + com.google.cloud.aiplatform.v1.Model.ExportFormat.ExportableContent.valueOf( + from); + return result == null + ? com.google.cloud.aiplatform.v1.Model.ExportFormat.ExportableContent + .UNRECOGNIZED + : result; + } + }; + /** + * + * + *
+     * Output only. The content of this Model that may be exported.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Model.ExportFormat.ExportableContent exportable_contents = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the exportableContents. + */ + @java.lang.Override + public java.util.List + getExportableContentsList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.cloud.aiplatform.v1.Model.ExportFormat.ExportableContent>( + exportableContents_, exportableContents_converter_); + } + /** + * + * + *
+     * Output only. The content of this Model that may be exported.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Model.ExportFormat.ExportableContent exportable_contents = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of exportableContents. + */ + @java.lang.Override + public int getExportableContentsCount() { + return exportableContents_.size(); + } + /** + * + * + *
+     * Output only. The content of this Model that may be exported.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Model.ExportFormat.ExportableContent exportable_contents = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The exportableContents at the given index. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.Model.ExportFormat.ExportableContent + getExportableContents(int index) { + return exportableContents_converter_.convert(exportableContents_.get(index)); + } + /** + * + * + *
+     * Output only. The content of this Model that may be exported.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Model.ExportFormat.ExportableContent exportable_contents = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the enum numeric values on the wire for exportableContents. + */ + @java.lang.Override + public java.util.List getExportableContentsValueList() { + return exportableContents_; + } + /** + * + * + *
+     * Output only. The content of this Model that may be exported.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Model.ExportFormat.ExportableContent exportable_contents = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of exportableContents at the given index. + */ + @java.lang.Override + public int getExportableContentsValue(int index) { + return exportableContents_.get(index); + } + + private int exportableContentsMemoizedSerializedSize; + + 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 (!getIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + if (getExportableContentsList().size() > 0) { + output.writeUInt32NoTag(18); + output.writeUInt32NoTag(exportableContentsMemoizedSerializedSize); + } + for (int i = 0; i < exportableContents_.size(); i++) { + output.writeEnumNoTag(exportableContents_.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_); + } + { + int dataSize = 0; + for (int i = 0; i < exportableContents_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag( + exportableContents_.get(i)); + } + size += dataSize; + if (!getExportableContentsList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + exportableContentsMemoizedSerializedSize = 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.v1.Model.ExportFormat)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.Model.ExportFormat other = + (com.google.cloud.aiplatform.v1.Model.ExportFormat) obj; + + if (!getId().equals(other.getId())) return false; + if (!exportableContents_.equals(other.exportableContents_)) 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(); + if (getExportableContentsCount() > 0) { + hash = (37 * hash) + EXPORTABLE_CONTENTS_FIELD_NUMBER; + hash = (53 * hash) + exportableContents_.hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.Model.ExportFormat parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.Model.ExportFormat 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.v1.Model.ExportFormat parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.Model.ExportFormat 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.v1.Model.ExportFormat parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.Model.ExportFormat parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.Model.ExportFormat parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.Model.ExportFormat 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.v1.Model.ExportFormat parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.Model.ExportFormat 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.v1.Model.ExportFormat parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.Model.ExportFormat 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.v1.Model.ExportFormat 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 export format supported by the Model.
+     * All formats export to Google Cloud Storage.
+     * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.Model.ExportFormat} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.Model.ExportFormat) + com.google.cloud.aiplatform.v1.Model.ExportFormatOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.ModelProto + .internal_static_google_cloud_aiplatform_v1_Model_ExportFormat_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ModelProto + .internal_static_google_cloud_aiplatform_v1_Model_ExportFormat_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.Model.ExportFormat.class, + com.google.cloud.aiplatform.v1.Model.ExportFormat.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.Model.ExportFormat.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_ = ""; + + exportableContents_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.ModelProto + .internal_static_google_cloud_aiplatform_v1_Model_ExportFormat_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.Model.ExportFormat getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.Model.ExportFormat.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.Model.ExportFormat build() { + com.google.cloud.aiplatform.v1.Model.ExportFormat result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.Model.ExportFormat buildPartial() { + com.google.cloud.aiplatform.v1.Model.ExportFormat result = + new com.google.cloud.aiplatform.v1.Model.ExportFormat(this); + int from_bitField0_ = bitField0_; + result.id_ = id_; + if (((bitField0_ & 0x00000001) != 0)) { + exportableContents_ = java.util.Collections.unmodifiableList(exportableContents_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.exportableContents_ = exportableContents_; + 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.v1.Model.ExportFormat) { + return mergeFrom((com.google.cloud.aiplatform.v1.Model.ExportFormat) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.Model.ExportFormat other) { + if (other == com.google.cloud.aiplatform.v1.Model.ExportFormat.getDefaultInstance()) + return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + onChanged(); + } + if (!other.exportableContents_.isEmpty()) { + if (exportableContents_.isEmpty()) { + exportableContents_ = other.exportableContents_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureExportableContentsIsMutable(); + exportableContents_.addAll(other.exportableContents_); + } + 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.v1.Model.ExportFormat parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.Model.ExportFormat) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + * + * + *
+       * Output only. The ID of the export format.
+       * The possible format IDs are:
+       * * `tflite`
+       * Used for Android mobile devices.
+       * * `edgetpu-tflite`
+       * Used for [Edge TPU](https://cloud.google.com/edge-tpu/) devices.
+       * * `tf-saved-model`
+       * A tensorflow model in SavedModel format.
+       * * `tf-js`
+       * A [TensorFlow.js](https://www.tensorflow.org/js) model that can be used
+       * in the browser and in Node.js using JavaScript.
+       * * `core-ml`
+       * Used for iOS mobile devices.
+       * * `custom-trained`
+       * A Model that was uploaded or trained by custom code.
+       * 
+ * + * string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + /** + * + * + *
+       * Output only. The ID of the export format.
+       * The possible format IDs are:
+       * * `tflite`
+       * Used for Android mobile devices.
+       * * `edgetpu-tflite`
+       * Used for [Edge TPU](https://cloud.google.com/edge-tpu/) devices.
+       * * `tf-saved-model`
+       * A tensorflow model in SavedModel format.
+       * * `tf-js`
+       * A [TensorFlow.js](https://www.tensorflow.org/js) model that can be used
+       * in the browser and in Node.js using JavaScript.
+       * * `core-ml`
+       * Used for iOS mobile devices.
+       * * `custom-trained`
+       * A Model that was uploaded or trained by custom code.
+       * 
+ * + * string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + /** + * + * + *
+       * Output only. The ID of the export format.
+       * The possible format IDs are:
+       * * `tflite`
+       * Used for Android mobile devices.
+       * * `edgetpu-tflite`
+       * Used for [Edge TPU](https://cloud.google.com/edge-tpu/) devices.
+       * * `tf-saved-model`
+       * A tensorflow model in SavedModel format.
+       * * `tf-js`
+       * A [TensorFlow.js](https://www.tensorflow.org/js) model that can be used
+       * in the browser and in Node.js using JavaScript.
+       * * `core-ml`
+       * Used for iOS mobile devices.
+       * * `custom-trained`
+       * A Model that was uploaded or trained by custom code.
+       * 
+ * + * string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + /** + * + * + *
+       * Output only. The ID of the export format.
+       * The possible format IDs are:
+       * * `tflite`
+       * Used for Android mobile devices.
+       * * `edgetpu-tflite`
+       * Used for [Edge TPU](https://cloud.google.com/edge-tpu/) devices.
+       * * `tf-saved-model`
+       * A tensorflow model in SavedModel format.
+       * * `tf-js`
+       * A [TensorFlow.js](https://www.tensorflow.org/js) model that can be used
+       * in the browser and in Node.js using JavaScript.
+       * * `core-ml`
+       * Used for iOS mobile devices.
+       * * `custom-trained`
+       * A Model that was uploaded or trained by custom code.
+       * 
+ * + * string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearId() { + + id_ = getDefaultInstance().getId(); + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. The ID of the export format.
+       * The possible format IDs are:
+       * * `tflite`
+       * Used for Android mobile devices.
+       * * `edgetpu-tflite`
+       * Used for [Edge TPU](https://cloud.google.com/edge-tpu/) devices.
+       * * `tf-saved-model`
+       * A tensorflow model in SavedModel format.
+       * * `tf-js`
+       * A [TensorFlow.js](https://www.tensorflow.org/js) model that can be used
+       * in the browser and in Node.js using JavaScript.
+       * * `core-ml`
+       * Used for iOS mobile devices.
+       * * `custom-trained`
+       * A Model that was uploaded or trained by custom code.
+       * 
+ * + * string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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.util.List exportableContents_ = + java.util.Collections.emptyList(); + + private void ensureExportableContentsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + exportableContents_ = new java.util.ArrayList(exportableContents_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+       * Output only. The content of this Model that may be exported.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Model.ExportFormat.ExportableContent exportable_contents = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the exportableContents. + */ + public java.util.List + getExportableContentsList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.cloud.aiplatform.v1.Model.ExportFormat.ExportableContent>( + exportableContents_, exportableContents_converter_); + } + /** + * + * + *
+       * Output only. The content of this Model that may be exported.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Model.ExportFormat.ExportableContent exportable_contents = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of exportableContents. + */ + public int getExportableContentsCount() { + return exportableContents_.size(); + } + /** + * + * + *
+       * Output only. The content of this Model that may be exported.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Model.ExportFormat.ExportableContent exportable_contents = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The exportableContents at the given index. + */ + public com.google.cloud.aiplatform.v1.Model.ExportFormat.ExportableContent + getExportableContents(int index) { + return exportableContents_converter_.convert(exportableContents_.get(index)); + } + /** + * + * + *
+       * Output only. The content of this Model that may be exported.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Model.ExportFormat.ExportableContent exportable_contents = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index to set the value at. + * @param value The exportableContents to set. + * @return This builder for chaining. + */ + public Builder setExportableContents( + int index, com.google.cloud.aiplatform.v1.Model.ExportFormat.ExportableContent value) { + if (value == null) { + throw new NullPointerException(); + } + ensureExportableContentsIsMutable(); + exportableContents_.set(index, value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. The content of this Model that may be exported.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Model.ExportFormat.ExportableContent exportable_contents = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The exportableContents to add. + * @return This builder for chaining. + */ + public Builder addExportableContents( + com.google.cloud.aiplatform.v1.Model.ExportFormat.ExportableContent value) { + if (value == null) { + throw new NullPointerException(); + } + ensureExportableContentsIsMutable(); + exportableContents_.add(value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. The content of this Model that may be exported.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Model.ExportFormat.ExportableContent exportable_contents = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param values The exportableContents to add. + * @return This builder for chaining. + */ + public Builder addAllExportableContents( + java.lang.Iterable< + ? extends com.google.cloud.aiplatform.v1.Model.ExportFormat.ExportableContent> + values) { + ensureExportableContentsIsMutable(); + for (com.google.cloud.aiplatform.v1.Model.ExportFormat.ExportableContent value : values) { + exportableContents_.add(value.getNumber()); + } + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. The content of this Model that may be exported.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Model.ExportFormat.ExportableContent exportable_contents = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearExportableContents() { + exportableContents_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. The content of this Model that may be exported.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Model.ExportFormat.ExportableContent exportable_contents = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the enum numeric values on the wire for exportableContents. + */ + public java.util.List getExportableContentsValueList() { + return java.util.Collections.unmodifiableList(exportableContents_); + } + /** + * + * + *
+       * Output only. The content of this Model that may be exported.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Model.ExportFormat.ExportableContent exportable_contents = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of exportableContents at the given index. + */ + public int getExportableContentsValue(int index) { + return exportableContents_.get(index); + } + /** + * + * + *
+       * Output only. The content of this Model that may be exported.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Model.ExportFormat.ExportableContent exportable_contents = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of exportableContents at the given index. + * @return This builder for chaining. + */ + public Builder setExportableContentsValue(int index, int value) { + ensureExportableContentsIsMutable(); + exportableContents_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. The content of this Model that may be exported.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Model.ExportFormat.ExportableContent exportable_contents = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for exportableContents to add. + * @return This builder for chaining. + */ + public Builder addExportableContentsValue(int value) { + ensureExportableContentsIsMutable(); + exportableContents_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. The content of this Model that may be exported.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Model.ExportFormat.ExportableContent exportable_contents = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param values The enum numeric values on the wire for exportableContents to add. + * @return This builder for chaining. + */ + public Builder addAllExportableContentsValue(java.lang.Iterable values) { + ensureExportableContentsIsMutable(); + for (int value : values) { + exportableContents_.add(value); + } + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.Model.ExportFormat) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.Model.ExportFormat) + private static final com.google.cloud.aiplatform.v1.Model.ExportFormat DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.Model.ExportFormat(); + } + + public static com.google.cloud.aiplatform.v1.Model.ExportFormat getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExportFormat parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ExportFormat(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.v1.Model.ExportFormat getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * The resource name of the Model.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * The resource name of the Model.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * Required. The display name of the Model.
+   * The name can be up to 128 characters long and can be consist of any UTF-8
+   * characters.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+   * Required. The display name of the Model.
+   * The name can be up to 128 characters long and can be consist of any UTF-8
+   * characters.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 DESCRIPTION_FIELD_NUMBER = 3; + private volatile java.lang.Object description_; + /** + * + * + *
+   * The description of the Model.
+   * 
+ * + * string description = 3; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * The description of the Model.
+   * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PREDICT_SCHEMATA_FIELD_NUMBER = 4; + private com.google.cloud.aiplatform.v1.PredictSchemata predictSchemata_; + /** + * + * + *
+   * The schemata that describe formats of the Model's predictions and
+   * explanations as given and returned via
+   * [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] and [PredictionService.Explain][].
+   * 
+ * + * .google.cloud.aiplatform.v1.PredictSchemata predict_schemata = 4; + * + * @return Whether the predictSchemata field is set. + */ + @java.lang.Override + public boolean hasPredictSchemata() { + return predictSchemata_ != null; + } + /** + * + * + *
+   * The schemata that describe formats of the Model's predictions and
+   * explanations as given and returned via
+   * [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] and [PredictionService.Explain][].
+   * 
+ * + * .google.cloud.aiplatform.v1.PredictSchemata predict_schemata = 4; + * + * @return The predictSchemata. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.PredictSchemata getPredictSchemata() { + return predictSchemata_ == null + ? com.google.cloud.aiplatform.v1.PredictSchemata.getDefaultInstance() + : predictSchemata_; + } + /** + * + * + *
+   * The schemata that describe formats of the Model's predictions and
+   * explanations as given and returned via
+   * [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] and [PredictionService.Explain][].
+   * 
+ * + * .google.cloud.aiplatform.v1.PredictSchemata predict_schemata = 4; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.PredictSchemataOrBuilder getPredictSchemataOrBuilder() { + return getPredictSchemata(); + } + + public static final int METADATA_SCHEMA_URI_FIELD_NUMBER = 5; + private volatile java.lang.Object metadataSchemaUri_; + /** + * + * + *
+   * Immutable. Points to a YAML file stored on Google Cloud Storage describing additional
+   * information about the Model, that is specific to it. Unset if the Model
+   * does not have any additional information.
+   * The schema is defined as an OpenAPI 3.0.2
+   * [Schema Object](https://tinyurl.com/y538mdwt#schema-object).
+   * AutoML Models always have this field populated by AI Platform, if no
+   * additional metadata is needed, this field is set to an empty string.
+   * Note: The URI given on output will be immutable and probably different,
+   * including the URI scheme, than the one given on input. The output URI will
+   * point to a location where the user only has a read access.
+   * 
+ * + * string metadata_schema_uri = 5 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The metadataSchemaUri. + */ + @java.lang.Override + public java.lang.String getMetadataSchemaUri() { + java.lang.Object ref = metadataSchemaUri_; + 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(); + metadataSchemaUri_ = s; + return s; + } + } + /** + * + * + *
+   * Immutable. Points to a YAML file stored on Google Cloud Storage describing additional
+   * information about the Model, that is specific to it. Unset if the Model
+   * does not have any additional information.
+   * The schema is defined as an OpenAPI 3.0.2
+   * [Schema Object](https://tinyurl.com/y538mdwt#schema-object).
+   * AutoML Models always have this field populated by AI Platform, if no
+   * additional metadata is needed, this field is set to an empty string.
+   * Note: The URI given on output will be immutable and probably different,
+   * including the URI scheme, than the one given on input. The output URI will
+   * point to a location where the user only has a read access.
+   * 
+ * + * string metadata_schema_uri = 5 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for metadataSchemaUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMetadataSchemaUriBytes() { + java.lang.Object ref = metadataSchemaUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + metadataSchemaUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int METADATA_FIELD_NUMBER = 6; + private com.google.protobuf.Value metadata_; + /** + * + * + *
+   * Immutable. An additional information about the Model; the schema of the metadata can
+   * be found in [metadata_schema][google.cloud.aiplatform.v1.Model.metadata_schema_uri].
+   * Unset if the Model does not have any additional information.
+   * 
+ * + * .google.protobuf.Value metadata = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return Whether the metadata field is set. + */ + @java.lang.Override + public boolean hasMetadata() { + return metadata_ != null; + } + /** + * + * + *
+   * Immutable. An additional information about the Model; the schema of the metadata can
+   * be found in [metadata_schema][google.cloud.aiplatform.v1.Model.metadata_schema_uri].
+   * Unset if the Model does not have any additional information.
+   * 
+ * + * .google.protobuf.Value metadata = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The metadata. + */ + @java.lang.Override + public com.google.protobuf.Value getMetadata() { + return metadata_ == null ? com.google.protobuf.Value.getDefaultInstance() : metadata_; + } + /** + * + * + *
+   * Immutable. An additional information about the Model; the schema of the metadata can
+   * be found in [metadata_schema][google.cloud.aiplatform.v1.Model.metadata_schema_uri].
+   * Unset if the Model does not have any additional information.
+   * 
+ * + * .google.protobuf.Value metadata = 6 [(.google.api.field_behavior) = IMMUTABLE]; + */ + @java.lang.Override + public com.google.protobuf.ValueOrBuilder getMetadataOrBuilder() { + return getMetadata(); + } + + public static final int SUPPORTED_EXPORT_FORMATS_FIELD_NUMBER = 20; + private java.util.List supportedExportFormats_; + /** + * + * + *
+   * Output only. The formats in which this Model may be exported. If empty, this Model is
+   * not available for export.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Model.ExportFormat supported_export_formats = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getSupportedExportFormatsList() { + return supportedExportFormats_; + } + /** + * + * + *
+   * Output only. The formats in which this Model may be exported. If empty, this Model is
+   * not available for export.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Model.ExportFormat supported_export_formats = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getSupportedExportFormatsOrBuilderList() { + return supportedExportFormats_; + } + /** + * + * + *
+   * Output only. The formats in which this Model may be exported. If empty, this Model is
+   * not available for export.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Model.ExportFormat supported_export_formats = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getSupportedExportFormatsCount() { + return supportedExportFormats_.size(); + } + /** + * + * + *
+   * Output only. The formats in which this Model may be exported. If empty, this Model is
+   * not available for export.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Model.ExportFormat supported_export_formats = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.Model.ExportFormat getSupportedExportFormats(int index) { + return supportedExportFormats_.get(index); + } + /** + * + * + *
+   * Output only. The formats in which this Model may be exported. If empty, this Model is
+   * not available for export.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Model.ExportFormat supported_export_formats = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.Model.ExportFormatOrBuilder + getSupportedExportFormatsOrBuilder(int index) { + return supportedExportFormats_.get(index); + } + + public static final int TRAINING_PIPELINE_FIELD_NUMBER = 7; + private volatile java.lang.Object trainingPipeline_; + /** + * + * + *
+   * Output only. The resource name of the TrainingPipeline that uploaded this Model, if any.
+   * 
+ * + * + * string training_pipeline = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The trainingPipeline. + */ + @java.lang.Override + public java.lang.String getTrainingPipeline() { + java.lang.Object ref = trainingPipeline_; + 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(); + trainingPipeline_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The resource name of the TrainingPipeline that uploaded this Model, if any.
+   * 
+ * + * + * string training_pipeline = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for trainingPipeline. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTrainingPipelineBytes() { + java.lang.Object ref = trainingPipeline_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + trainingPipeline_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONTAINER_SPEC_FIELD_NUMBER = 9; + private com.google.cloud.aiplatform.v1.ModelContainerSpec containerSpec_; + /** + * + * + *
+   * Input only. The specification of the container that is to be used when deploying
+   * this Model. The specification is ingested upon
+   * [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel], and all binaries it contains are copied
+   * and stored internally by AI Platform.
+   * Not present for AutoML Models.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ModelContainerSpec container_spec = 9 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return Whether the containerSpec field is set. + */ + @java.lang.Override + public boolean hasContainerSpec() { + return containerSpec_ != null; + } + /** + * + * + *
+   * Input only. The specification of the container that is to be used when deploying
+   * this Model. The specification is ingested upon
+   * [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel], and all binaries it contains are copied
+   * and stored internally by AI Platform.
+   * Not present for AutoML Models.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ModelContainerSpec container_spec = 9 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The containerSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ModelContainerSpec getContainerSpec() { + return containerSpec_ == null + ? com.google.cloud.aiplatform.v1.ModelContainerSpec.getDefaultInstance() + : containerSpec_; + } + /** + * + * + *
+   * Input only. The specification of the container that is to be used when deploying
+   * this Model. The specification is ingested upon
+   * [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel], and all binaries it contains are copied
+   * and stored internally by AI Platform.
+   * Not present for AutoML Models.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ModelContainerSpec container_spec = 9 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ModelContainerSpecOrBuilder getContainerSpecOrBuilder() { + return getContainerSpec(); + } + + public static final int ARTIFACT_URI_FIELD_NUMBER = 26; + private volatile java.lang.Object artifactUri_; + /** + * + * + *
+   * Immutable. The path to the directory containing the Model artifact and any of its
+   * supporting files.
+   * Not present for AutoML Models.
+   * 
+ * + * string artifact_uri = 26 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The artifactUri. + */ + @java.lang.Override + public java.lang.String getArtifactUri() { + java.lang.Object ref = artifactUri_; + 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(); + artifactUri_ = s; + return s; + } + } + /** + * + * + *
+   * Immutable. The path to the directory containing the Model artifact and any of its
+   * supporting files.
+   * Not present for AutoML Models.
+   * 
+ * + * string artifact_uri = 26 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for artifactUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getArtifactUriBytes() { + java.lang.Object ref = artifactUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + artifactUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SUPPORTED_DEPLOYMENT_RESOURCES_TYPES_FIELD_NUMBER = 10; + private java.util.List supportedDeploymentResourcesTypes_; + private static final com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.cloud.aiplatform.v1.Model.DeploymentResourcesType> + supportedDeploymentResourcesTypes_converter_ = + new com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.cloud.aiplatform.v1.Model.DeploymentResourcesType>() { + public com.google.cloud.aiplatform.v1.Model.DeploymentResourcesType convert( + java.lang.Integer from) { + @SuppressWarnings("deprecation") + com.google.cloud.aiplatform.v1.Model.DeploymentResourcesType result = + com.google.cloud.aiplatform.v1.Model.DeploymentResourcesType.valueOf(from); + return result == null + ? com.google.cloud.aiplatform.v1.Model.DeploymentResourcesType.UNRECOGNIZED + : result; + } + }; + /** + * + * + *
+   * Output only. When this Model is deployed, its prediction resources are described by the
+   * `prediction_resources` field of the [Endpoint.deployed_models][google.cloud.aiplatform.v1.Endpoint.deployed_models] object.
+   * Because not all Models support all resource configuration types, the
+   * configuration types this Model supports are listed here. If no
+   * configuration types are listed, the Model cannot be deployed to an
+   * [Endpoint][google.cloud.aiplatform.v1.Endpoint] and does not support
+   * online predictions ([PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] or
+   * [PredictionService.Explain][]). Such a Model can serve predictions by
+   * using a [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob], if it has at least one entry each in
+   * [supported_input_storage_formats][google.cloud.aiplatform.v1.Model.supported_input_storage_formats] and
+   * [supported_output_storage_formats][google.cloud.aiplatform.v1.Model.supported_output_storage_formats].
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Model.DeploymentResourcesType supported_deployment_resources_types = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the supportedDeploymentResourcesTypes. + */ + @java.lang.Override + public java.util.List + getSupportedDeploymentResourcesTypesList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.cloud.aiplatform.v1.Model.DeploymentResourcesType>( + supportedDeploymentResourcesTypes_, supportedDeploymentResourcesTypes_converter_); + } + /** + * + * + *
+   * Output only. When this Model is deployed, its prediction resources are described by the
+   * `prediction_resources` field of the [Endpoint.deployed_models][google.cloud.aiplatform.v1.Endpoint.deployed_models] object.
+   * Because not all Models support all resource configuration types, the
+   * configuration types this Model supports are listed here. If no
+   * configuration types are listed, the Model cannot be deployed to an
+   * [Endpoint][google.cloud.aiplatform.v1.Endpoint] and does not support
+   * online predictions ([PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] or
+   * [PredictionService.Explain][]). Such a Model can serve predictions by
+   * using a [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob], if it has at least one entry each in
+   * [supported_input_storage_formats][google.cloud.aiplatform.v1.Model.supported_input_storage_formats] and
+   * [supported_output_storage_formats][google.cloud.aiplatform.v1.Model.supported_output_storage_formats].
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Model.DeploymentResourcesType supported_deployment_resources_types = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of supportedDeploymentResourcesTypes. + */ + @java.lang.Override + public int getSupportedDeploymentResourcesTypesCount() { + return supportedDeploymentResourcesTypes_.size(); + } + /** + * + * + *
+   * Output only. When this Model is deployed, its prediction resources are described by the
+   * `prediction_resources` field of the [Endpoint.deployed_models][google.cloud.aiplatform.v1.Endpoint.deployed_models] object.
+   * Because not all Models support all resource configuration types, the
+   * configuration types this Model supports are listed here. If no
+   * configuration types are listed, the Model cannot be deployed to an
+   * [Endpoint][google.cloud.aiplatform.v1.Endpoint] and does not support
+   * online predictions ([PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] or
+   * [PredictionService.Explain][]). Such a Model can serve predictions by
+   * using a [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob], if it has at least one entry each in
+   * [supported_input_storage_formats][google.cloud.aiplatform.v1.Model.supported_input_storage_formats] and
+   * [supported_output_storage_formats][google.cloud.aiplatform.v1.Model.supported_output_storage_formats].
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Model.DeploymentResourcesType supported_deployment_resources_types = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The supportedDeploymentResourcesTypes at the given index. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.Model.DeploymentResourcesType + getSupportedDeploymentResourcesTypes(int index) { + return supportedDeploymentResourcesTypes_converter_.convert( + supportedDeploymentResourcesTypes_.get(index)); + } + /** + * + * + *
+   * Output only. When this Model is deployed, its prediction resources are described by the
+   * `prediction_resources` field of the [Endpoint.deployed_models][google.cloud.aiplatform.v1.Endpoint.deployed_models] object.
+   * Because not all Models support all resource configuration types, the
+   * configuration types this Model supports are listed here. If no
+   * configuration types are listed, the Model cannot be deployed to an
+   * [Endpoint][google.cloud.aiplatform.v1.Endpoint] and does not support
+   * online predictions ([PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] or
+   * [PredictionService.Explain][]). Such a Model can serve predictions by
+   * using a [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob], if it has at least one entry each in
+   * [supported_input_storage_formats][google.cloud.aiplatform.v1.Model.supported_input_storage_formats] and
+   * [supported_output_storage_formats][google.cloud.aiplatform.v1.Model.supported_output_storage_formats].
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Model.DeploymentResourcesType supported_deployment_resources_types = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the enum numeric values on the wire for + * supportedDeploymentResourcesTypes. + */ + @java.lang.Override + public java.util.List getSupportedDeploymentResourcesTypesValueList() { + return supportedDeploymentResourcesTypes_; + } + /** + * + * + *
+   * Output only. When this Model is deployed, its prediction resources are described by the
+   * `prediction_resources` field of the [Endpoint.deployed_models][google.cloud.aiplatform.v1.Endpoint.deployed_models] object.
+   * Because not all Models support all resource configuration types, the
+   * configuration types this Model supports are listed here. If no
+   * configuration types are listed, the Model cannot be deployed to an
+   * [Endpoint][google.cloud.aiplatform.v1.Endpoint] and does not support
+   * online predictions ([PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] or
+   * [PredictionService.Explain][]). Such a Model can serve predictions by
+   * using a [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob], if it has at least one entry each in
+   * [supported_input_storage_formats][google.cloud.aiplatform.v1.Model.supported_input_storage_formats] and
+   * [supported_output_storage_formats][google.cloud.aiplatform.v1.Model.supported_output_storage_formats].
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Model.DeploymentResourcesType supported_deployment_resources_types = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of supportedDeploymentResourcesTypes at the given + * index. + */ + @java.lang.Override + public int getSupportedDeploymentResourcesTypesValue(int index) { + return supportedDeploymentResourcesTypes_.get(index); + } + + private int supportedDeploymentResourcesTypesMemoizedSerializedSize; + + public static final int SUPPORTED_INPUT_STORAGE_FORMATS_FIELD_NUMBER = 11; + private com.google.protobuf.LazyStringList supportedInputStorageFormats_; + /** + * + * + *
+   * Output only. The formats this Model supports in
+   * [BatchPredictionJob.input_config][google.cloud.aiplatform.v1.BatchPredictionJob.input_config]. If
+   * [PredictSchemata.instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri] exists, the instances
+   * should be given as per that schema.
+   * The possible formats are:
+   * * `jsonl`
+   * The JSON Lines format, where each instance is a single line. Uses
+   * [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source].
+   * * `csv`
+   * The CSV format, where each instance is a single comma-separated line.
+   * The first line in the file is the header, containing comma-separated field
+   * names. Uses [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source].
+   * * `tf-record`
+   * The TFRecord format, where each instance is a single record in tfrecord
+   * syntax. Uses [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source].
+   * * `tf-record-gzip`
+   * Similar to `tf-record`, but the file is gzipped. Uses
+   * [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source].
+   * * `bigquery`
+   * Each instance is a single row in BigQuery. Uses
+   * [BigQuerySource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.bigquery_source].
+   * * `file-list`
+   * Each line of the file is the location of an instance to process, uses
+   * `gcs_source` field of the
+   * [InputConfig][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig] object.
+   * If this Model doesn't support any of these formats it means it cannot be
+   * used with a [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob]. However, if it has
+   * [supported_deployment_resources_types][google.cloud.aiplatform.v1.Model.supported_deployment_resources_types], it could serve online
+   * predictions by using [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] or
+   * [PredictionService.Explain][].
+   * 
+ * + * + * repeated string supported_input_storage_formats = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the supportedInputStorageFormats. + */ + public com.google.protobuf.ProtocolStringList getSupportedInputStorageFormatsList() { + return supportedInputStorageFormats_; + } + /** + * + * + *
+   * Output only. The formats this Model supports in
+   * [BatchPredictionJob.input_config][google.cloud.aiplatform.v1.BatchPredictionJob.input_config]. If
+   * [PredictSchemata.instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri] exists, the instances
+   * should be given as per that schema.
+   * The possible formats are:
+   * * `jsonl`
+   * The JSON Lines format, where each instance is a single line. Uses
+   * [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source].
+   * * `csv`
+   * The CSV format, where each instance is a single comma-separated line.
+   * The first line in the file is the header, containing comma-separated field
+   * names. Uses [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source].
+   * * `tf-record`
+   * The TFRecord format, where each instance is a single record in tfrecord
+   * syntax. Uses [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source].
+   * * `tf-record-gzip`
+   * Similar to `tf-record`, but the file is gzipped. Uses
+   * [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source].
+   * * `bigquery`
+   * Each instance is a single row in BigQuery. Uses
+   * [BigQuerySource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.bigquery_source].
+   * * `file-list`
+   * Each line of the file is the location of an instance to process, uses
+   * `gcs_source` field of the
+   * [InputConfig][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig] object.
+   * If this Model doesn't support any of these formats it means it cannot be
+   * used with a [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob]. However, if it has
+   * [supported_deployment_resources_types][google.cloud.aiplatform.v1.Model.supported_deployment_resources_types], it could serve online
+   * predictions by using [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] or
+   * [PredictionService.Explain][].
+   * 
+ * + * + * repeated string supported_input_storage_formats = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of supportedInputStorageFormats. + */ + public int getSupportedInputStorageFormatsCount() { + return supportedInputStorageFormats_.size(); + } + /** + * + * + *
+   * Output only. The formats this Model supports in
+   * [BatchPredictionJob.input_config][google.cloud.aiplatform.v1.BatchPredictionJob.input_config]. If
+   * [PredictSchemata.instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri] exists, the instances
+   * should be given as per that schema.
+   * The possible formats are:
+   * * `jsonl`
+   * The JSON Lines format, where each instance is a single line. Uses
+   * [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source].
+   * * `csv`
+   * The CSV format, where each instance is a single comma-separated line.
+   * The first line in the file is the header, containing comma-separated field
+   * names. Uses [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source].
+   * * `tf-record`
+   * The TFRecord format, where each instance is a single record in tfrecord
+   * syntax. Uses [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source].
+   * * `tf-record-gzip`
+   * Similar to `tf-record`, but the file is gzipped. Uses
+   * [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source].
+   * * `bigquery`
+   * Each instance is a single row in BigQuery. Uses
+   * [BigQuerySource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.bigquery_source].
+   * * `file-list`
+   * Each line of the file is the location of an instance to process, uses
+   * `gcs_source` field of the
+   * [InputConfig][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig] object.
+   * If this Model doesn't support any of these formats it means it cannot be
+   * used with a [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob]. However, if it has
+   * [supported_deployment_resources_types][google.cloud.aiplatform.v1.Model.supported_deployment_resources_types], it could serve online
+   * predictions by using [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] or
+   * [PredictionService.Explain][].
+   * 
+ * + * + * repeated string supported_input_storage_formats = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The supportedInputStorageFormats at the given index. + */ + public java.lang.String getSupportedInputStorageFormats(int index) { + return supportedInputStorageFormats_.get(index); + } + /** + * + * + *
+   * Output only. The formats this Model supports in
+   * [BatchPredictionJob.input_config][google.cloud.aiplatform.v1.BatchPredictionJob.input_config]. If
+   * [PredictSchemata.instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri] exists, the instances
+   * should be given as per that schema.
+   * The possible formats are:
+   * * `jsonl`
+   * The JSON Lines format, where each instance is a single line. Uses
+   * [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source].
+   * * `csv`
+   * The CSV format, where each instance is a single comma-separated line.
+   * The first line in the file is the header, containing comma-separated field
+   * names. Uses [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source].
+   * * `tf-record`
+   * The TFRecord format, where each instance is a single record in tfrecord
+   * syntax. Uses [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source].
+   * * `tf-record-gzip`
+   * Similar to `tf-record`, but the file is gzipped. Uses
+   * [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source].
+   * * `bigquery`
+   * Each instance is a single row in BigQuery. Uses
+   * [BigQuerySource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.bigquery_source].
+   * * `file-list`
+   * Each line of the file is the location of an instance to process, uses
+   * `gcs_source` field of the
+   * [InputConfig][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig] object.
+   * If this Model doesn't support any of these formats it means it cannot be
+   * used with a [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob]. However, if it has
+   * [supported_deployment_resources_types][google.cloud.aiplatform.v1.Model.supported_deployment_resources_types], it could serve online
+   * predictions by using [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] or
+   * [PredictionService.Explain][].
+   * 
+ * + * + * repeated string supported_input_storage_formats = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The bytes of the supportedInputStorageFormats at the given index. + */ + public com.google.protobuf.ByteString getSupportedInputStorageFormatsBytes(int index) { + return supportedInputStorageFormats_.getByteString(index); + } + + public static final int SUPPORTED_OUTPUT_STORAGE_FORMATS_FIELD_NUMBER = 12; + private com.google.protobuf.LazyStringList supportedOutputStorageFormats_; + /** + * + * + *
+   * Output only. The formats this Model supports in
+   * [BatchPredictionJob.output_config][google.cloud.aiplatform.v1.BatchPredictionJob.output_config]. If both
+   * [PredictSchemata.instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri] and
+   * [PredictSchemata.prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri] exist, the predictions
+   * are returned together with their instances. In other words, the
+   * prediction has the original instance data first, followed
+   * by the actual prediction content (as per the schema).
+   * The possible formats are:
+   * * `jsonl`
+   * The JSON Lines format, where each prediction is a single line. Uses
+   * [GcsDestination][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.gcs_destination].
+   * * `csv`
+   * The CSV format, where each prediction is a single comma-separated line.
+   * The first line in the file is the header, containing comma-separated field
+   * names. Uses
+   * [GcsDestination][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.gcs_destination].
+   * * `bigquery`
+   * Each prediction is a single row in a BigQuery table, uses
+   * [BigQueryDestination][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.bigquery_destination]
+   * .
+   * If this Model doesn't support any of these formats it means it cannot be
+   * used with a [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob]. However, if it has
+   * [supported_deployment_resources_types][google.cloud.aiplatform.v1.Model.supported_deployment_resources_types], it could serve online
+   * predictions by using [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] or
+   * [PredictionService.Explain][].
+   * 
+ * + * + * repeated string supported_output_storage_formats = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the supportedOutputStorageFormats. + */ + public com.google.protobuf.ProtocolStringList getSupportedOutputStorageFormatsList() { + return supportedOutputStorageFormats_; + } + /** + * + * + *
+   * Output only. The formats this Model supports in
+   * [BatchPredictionJob.output_config][google.cloud.aiplatform.v1.BatchPredictionJob.output_config]. If both
+   * [PredictSchemata.instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri] and
+   * [PredictSchemata.prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri] exist, the predictions
+   * are returned together with their instances. In other words, the
+   * prediction has the original instance data first, followed
+   * by the actual prediction content (as per the schema).
+   * The possible formats are:
+   * * `jsonl`
+   * The JSON Lines format, where each prediction is a single line. Uses
+   * [GcsDestination][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.gcs_destination].
+   * * `csv`
+   * The CSV format, where each prediction is a single comma-separated line.
+   * The first line in the file is the header, containing comma-separated field
+   * names. Uses
+   * [GcsDestination][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.gcs_destination].
+   * * `bigquery`
+   * Each prediction is a single row in a BigQuery table, uses
+   * [BigQueryDestination][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.bigquery_destination]
+   * .
+   * If this Model doesn't support any of these formats it means it cannot be
+   * used with a [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob]. However, if it has
+   * [supported_deployment_resources_types][google.cloud.aiplatform.v1.Model.supported_deployment_resources_types], it could serve online
+   * predictions by using [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] or
+   * [PredictionService.Explain][].
+   * 
+ * + * + * repeated string supported_output_storage_formats = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of supportedOutputStorageFormats. + */ + public int getSupportedOutputStorageFormatsCount() { + return supportedOutputStorageFormats_.size(); + } + /** + * + * + *
+   * Output only. The formats this Model supports in
+   * [BatchPredictionJob.output_config][google.cloud.aiplatform.v1.BatchPredictionJob.output_config]. If both
+   * [PredictSchemata.instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri] and
+   * [PredictSchemata.prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri] exist, the predictions
+   * are returned together with their instances. In other words, the
+   * prediction has the original instance data first, followed
+   * by the actual prediction content (as per the schema).
+   * The possible formats are:
+   * * `jsonl`
+   * The JSON Lines format, where each prediction is a single line. Uses
+   * [GcsDestination][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.gcs_destination].
+   * * `csv`
+   * The CSV format, where each prediction is a single comma-separated line.
+   * The first line in the file is the header, containing comma-separated field
+   * names. Uses
+   * [GcsDestination][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.gcs_destination].
+   * * `bigquery`
+   * Each prediction is a single row in a BigQuery table, uses
+   * [BigQueryDestination][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.bigquery_destination]
+   * .
+   * If this Model doesn't support any of these formats it means it cannot be
+   * used with a [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob]. However, if it has
+   * [supported_deployment_resources_types][google.cloud.aiplatform.v1.Model.supported_deployment_resources_types], it could serve online
+   * predictions by using [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] or
+   * [PredictionService.Explain][].
+   * 
+ * + * + * repeated string supported_output_storage_formats = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The supportedOutputStorageFormats at the given index. + */ + public java.lang.String getSupportedOutputStorageFormats(int index) { + return supportedOutputStorageFormats_.get(index); + } + /** + * + * + *
+   * Output only. The formats this Model supports in
+   * [BatchPredictionJob.output_config][google.cloud.aiplatform.v1.BatchPredictionJob.output_config]. If both
+   * [PredictSchemata.instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri] and
+   * [PredictSchemata.prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri] exist, the predictions
+   * are returned together with their instances. In other words, the
+   * prediction has the original instance data first, followed
+   * by the actual prediction content (as per the schema).
+   * The possible formats are:
+   * * `jsonl`
+   * The JSON Lines format, where each prediction is a single line. Uses
+   * [GcsDestination][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.gcs_destination].
+   * * `csv`
+   * The CSV format, where each prediction is a single comma-separated line.
+   * The first line in the file is the header, containing comma-separated field
+   * names. Uses
+   * [GcsDestination][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.gcs_destination].
+   * * `bigquery`
+   * Each prediction is a single row in a BigQuery table, uses
+   * [BigQueryDestination][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.bigquery_destination]
+   * .
+   * If this Model doesn't support any of these formats it means it cannot be
+   * used with a [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob]. However, if it has
+   * [supported_deployment_resources_types][google.cloud.aiplatform.v1.Model.supported_deployment_resources_types], it could serve online
+   * predictions by using [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] or
+   * [PredictionService.Explain][].
+   * 
+ * + * + * repeated string supported_output_storage_formats = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The bytes of the supportedOutputStorageFormats at the given index. + */ + public com.google.protobuf.ByteString getSupportedOutputStorageFormatsBytes(int index) { + return supportedOutputStorageFormats_.getByteString(index); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 13; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. Timestamp when this Model was uploaded into AI Platform.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. Timestamp when this Model was uploaded into AI Platform.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. Timestamp when this Model was uploaded into AI Platform.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 14; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. Timestamp when this Model was most recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. Timestamp when this Model was most recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. Timestamp when this Model was most recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + public static final int DEPLOYED_MODELS_FIELD_NUMBER = 15; + private java.util.List deployedModels_; + /** + * + * + *
+   * Output only. The pointers to DeployedModels created from this Model. Note that
+   * Model could have been deployed to Endpoints in different Locations.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.DeployedModelRef deployed_models = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List getDeployedModelsList() { + return deployedModels_; + } + /** + * + * + *
+   * Output only. The pointers to DeployedModels created from this Model. Note that
+   * Model could have been deployed to Endpoints in different Locations.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.DeployedModelRef deployed_models = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getDeployedModelsOrBuilderList() { + return deployedModels_; + } + /** + * + * + *
+   * Output only. The pointers to DeployedModels created from this Model. Note that
+   * Model could have been deployed to Endpoints in different Locations.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.DeployedModelRef deployed_models = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getDeployedModelsCount() { + return deployedModels_.size(); + } + /** + * + * + *
+   * Output only. The pointers to DeployedModels created from this Model. Note that
+   * Model could have been deployed to Endpoints in different Locations.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.DeployedModelRef deployed_models = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeployedModelRef getDeployedModels(int index) { + return deployedModels_.get(index); + } + /** + * + * + *
+   * Output only. The pointers to DeployedModels created from this Model. Note that
+   * Model could have been deployed to Endpoints in different Locations.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.DeployedModelRef deployed_models = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeployedModelRefOrBuilder getDeployedModelsOrBuilder( + int index) { + return deployedModels_.get(index); + } + + public static final int ETAG_FIELD_NUMBER = 16; + private volatile java.lang.Object etag_; + /** + * + * + *
+   * Used to perform consistent read-modify-write updates. If not set, a blind
+   * "overwrite" update happens.
+   * 
+ * + * string etag = 16; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } + } + /** + * + * + *
+   * Used to perform consistent read-modify-write updates. If not set, a blind
+   * "overwrite" update happens.
+   * 
+ * + * string etag = 16; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LABELS_FIELD_NUMBER = 17; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.aiplatform.v1.ModelProto + .internal_static_google_cloud_aiplatform_v1_Model_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * The labels with user-defined metadata to organize your Models.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 17; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * The labels with user-defined metadata to organize your Models.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 17; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * The labels with user-defined metadata to organize your Models.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 17; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * The labels with user-defined metadata to organize your Models.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 17; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int ENCRYPTION_SPEC_FIELD_NUMBER = 24; + private com.google.cloud.aiplatform.v1.EncryptionSpec encryptionSpec_; + /** + * + * + *
+   * Customer-managed encryption key spec for a Model. If set, this
+   * Model and all sub-resources of this Model will be secured by this key.
+   * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 24; + * + * @return Whether the encryptionSpec field is set. + */ + @java.lang.Override + public boolean hasEncryptionSpec() { + return encryptionSpec_ != null; + } + /** + * + * + *
+   * Customer-managed encryption key spec for a Model. If set, this
+   * Model and all sub-resources of this Model will be secured by this key.
+   * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 24; + * + * @return The encryptionSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.EncryptionSpec getEncryptionSpec() { + return encryptionSpec_ == null + ? com.google.cloud.aiplatform.v1.EncryptionSpec.getDefaultInstance() + : encryptionSpec_; + } + /** + * + * + *
+   * Customer-managed encryption key spec for a Model. If set, this
+   * Model and all sub-resources of this Model will be secured by this key.
+   * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 24; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.EncryptionSpecOrBuilder getEncryptionSpecOrBuilder() { + return getEncryptionSpec(); + } + + 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 (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + if (predictSchemata_ != null) { + output.writeMessage(4, getPredictSchemata()); + } + if (!getMetadataSchemaUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, metadataSchemaUri_); + } + if (metadata_ != null) { + output.writeMessage(6, getMetadata()); + } + if (!getTrainingPipelineBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, trainingPipeline_); + } + if (containerSpec_ != null) { + output.writeMessage(9, getContainerSpec()); + } + if (getSupportedDeploymentResourcesTypesList().size() > 0) { + output.writeUInt32NoTag(82); + output.writeUInt32NoTag(supportedDeploymentResourcesTypesMemoizedSerializedSize); + } + for (int i = 0; i < supportedDeploymentResourcesTypes_.size(); i++) { + output.writeEnumNoTag(supportedDeploymentResourcesTypes_.get(i)); + } + for (int i = 0; i < supportedInputStorageFormats_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 11, supportedInputStorageFormats_.getRaw(i)); + } + for (int i = 0; i < supportedOutputStorageFormats_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 12, supportedOutputStorageFormats_.getRaw(i)); + } + if (createTime_ != null) { + output.writeMessage(13, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(14, getUpdateTime()); + } + for (int i = 0; i < deployedModels_.size(); i++) { + output.writeMessage(15, deployedModels_.get(i)); + } + if (!getEtagBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 16, etag_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 17); + for (int i = 0; i < supportedExportFormats_.size(); i++) { + output.writeMessage(20, supportedExportFormats_.get(i)); + } + if (encryptionSpec_ != null) { + output.writeMessage(24, getEncryptionSpec()); + } + if (!getArtifactUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 26, artifactUri_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + if (predictSchemata_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getPredictSchemata()); + } + if (!getMetadataSchemaUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, metadataSchemaUri_); + } + if (metadata_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getMetadata()); + } + if (!getTrainingPipelineBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, trainingPipeline_); + } + if (containerSpec_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getContainerSpec()); + } + { + int dataSize = 0; + for (int i = 0; i < supportedDeploymentResourcesTypes_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag( + supportedDeploymentResourcesTypes_.get(i)); + } + size += dataSize; + if (!getSupportedDeploymentResourcesTypesList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + supportedDeploymentResourcesTypesMemoizedSerializedSize = dataSize; + } + { + int dataSize = 0; + for (int i = 0; i < supportedInputStorageFormats_.size(); i++) { + dataSize += computeStringSizeNoTag(supportedInputStorageFormats_.getRaw(i)); + } + size += dataSize; + size += 1 * getSupportedInputStorageFormatsList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < supportedOutputStorageFormats_.size(); i++) { + dataSize += computeStringSizeNoTag(supportedOutputStorageFormats_.getRaw(i)); + } + size += dataSize; + size += 1 * getSupportedOutputStorageFormatsList().size(); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, getUpdateTime()); + } + for (int i = 0; i < deployedModels_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(15, deployedModels_.get(i)); + } + if (!getEtagBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(16, etag_); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(17, labels__); + } + for (int i = 0; i < supportedExportFormats_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 20, supportedExportFormats_.get(i)); + } + if (encryptionSpec_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(24, getEncryptionSpec()); + } + if (!getArtifactUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(26, artifactUri_); + } + 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.v1.Model)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.Model other = (com.google.cloud.aiplatform.v1.Model) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (hasPredictSchemata() != other.hasPredictSchemata()) return false; + if (hasPredictSchemata()) { + if (!getPredictSchemata().equals(other.getPredictSchemata())) return false; + } + if (!getMetadataSchemaUri().equals(other.getMetadataSchemaUri())) return false; + if (hasMetadata() != other.hasMetadata()) return false; + if (hasMetadata()) { + if (!getMetadata().equals(other.getMetadata())) return false; + } + if (!getSupportedExportFormatsList().equals(other.getSupportedExportFormatsList())) + return false; + if (!getTrainingPipeline().equals(other.getTrainingPipeline())) return false; + if (hasContainerSpec() != other.hasContainerSpec()) return false; + if (hasContainerSpec()) { + if (!getContainerSpec().equals(other.getContainerSpec())) return false; + } + if (!getArtifactUri().equals(other.getArtifactUri())) return false; + if (!supportedDeploymentResourcesTypes_.equals(other.supportedDeploymentResourcesTypes_)) + return false; + if (!getSupportedInputStorageFormatsList().equals(other.getSupportedInputStorageFormatsList())) + return false; + if (!getSupportedOutputStorageFormatsList() + .equals(other.getSupportedOutputStorageFormatsList())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!getDeployedModelsList().equals(other.getDeployedModelsList())) return false; + if (!getEtag().equals(other.getEtag())) return false; + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (hasEncryptionSpec() != other.hasEncryptionSpec()) return false; + if (hasEncryptionSpec()) { + if (!getEncryptionSpec().equals(other.getEncryptionSpec())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (hasPredictSchemata()) { + hash = (37 * hash) + PREDICT_SCHEMATA_FIELD_NUMBER; + hash = (53 * hash) + getPredictSchemata().hashCode(); + } + hash = (37 * hash) + METADATA_SCHEMA_URI_FIELD_NUMBER; + hash = (53 * hash) + getMetadataSchemaUri().hashCode(); + if (hasMetadata()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + } + if (getSupportedExportFormatsCount() > 0) { + hash = (37 * hash) + SUPPORTED_EXPORT_FORMATS_FIELD_NUMBER; + hash = (53 * hash) + getSupportedExportFormatsList().hashCode(); + } + hash = (37 * hash) + TRAINING_PIPELINE_FIELD_NUMBER; + hash = (53 * hash) + getTrainingPipeline().hashCode(); + if (hasContainerSpec()) { + hash = (37 * hash) + CONTAINER_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getContainerSpec().hashCode(); + } + hash = (37 * hash) + ARTIFACT_URI_FIELD_NUMBER; + hash = (53 * hash) + getArtifactUri().hashCode(); + if (getSupportedDeploymentResourcesTypesCount() > 0) { + hash = (37 * hash) + SUPPORTED_DEPLOYMENT_RESOURCES_TYPES_FIELD_NUMBER; + hash = (53 * hash) + supportedDeploymentResourcesTypes_.hashCode(); + } + if (getSupportedInputStorageFormatsCount() > 0) { + hash = (37 * hash) + SUPPORTED_INPUT_STORAGE_FORMATS_FIELD_NUMBER; + hash = (53 * hash) + getSupportedInputStorageFormatsList().hashCode(); + } + if (getSupportedOutputStorageFormatsCount() > 0) { + hash = (37 * hash) + SUPPORTED_OUTPUT_STORAGE_FORMATS_FIELD_NUMBER; + hash = (53 * hash) + getSupportedOutputStorageFormatsList().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (getDeployedModelsCount() > 0) { + hash = (37 * hash) + DEPLOYED_MODELS_FIELD_NUMBER; + hash = (53 * hash) + getDeployedModelsList().hashCode(); + } + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + if (hasEncryptionSpec()) { + hash = (37 * hash) + ENCRYPTION_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getEncryptionSpec().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.Model parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.Model parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.Model parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.Model parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.Model parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.Model parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.Model parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.Model parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.Model parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.Model parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.Model parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.Model parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1.Model prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A trained machine learning Model.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.Model} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.Model) + com.google.cloud.aiplatform.v1.ModelOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.ModelProto + .internal_static_google_cloud_aiplatform_v1_Model_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 17: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 17: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ModelProto + .internal_static_google_cloud_aiplatform_v1_Model_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.Model.class, + com.google.cloud.aiplatform.v1.Model.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.Model.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getSupportedExportFormatsFieldBuilder(); + getDeployedModelsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + displayName_ = ""; + + description_ = ""; + + if (predictSchemataBuilder_ == null) { + predictSchemata_ = null; + } else { + predictSchemata_ = null; + predictSchemataBuilder_ = null; + } + metadataSchemaUri_ = ""; + + if (metadataBuilder_ == null) { + metadata_ = null; + } else { + metadata_ = null; + metadataBuilder_ = null; + } + if (supportedExportFormatsBuilder_ == null) { + supportedExportFormats_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + supportedExportFormatsBuilder_.clear(); + } + trainingPipeline_ = ""; + + if (containerSpecBuilder_ == null) { + containerSpec_ = null; + } else { + containerSpec_ = null; + containerSpecBuilder_ = null; + } + artifactUri_ = ""; + + supportedDeploymentResourcesTypes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + supportedInputStorageFormats_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + supportedOutputStorageFormats_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000008); + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + if (deployedModelsBuilder_ == null) { + deployedModels_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + } else { + deployedModelsBuilder_.clear(); + } + etag_ = ""; + + internalGetMutableLabels().clear(); + if (encryptionSpecBuilder_ == null) { + encryptionSpec_ = null; + } else { + encryptionSpec_ = null; + encryptionSpecBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.ModelProto + .internal_static_google_cloud_aiplatform_v1_Model_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.Model getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.Model.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.Model build() { + com.google.cloud.aiplatform.v1.Model result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.Model buildPartial() { + com.google.cloud.aiplatform.v1.Model result = new com.google.cloud.aiplatform.v1.Model(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.displayName_ = displayName_; + result.description_ = description_; + if (predictSchemataBuilder_ == null) { + result.predictSchemata_ = predictSchemata_; + } else { + result.predictSchemata_ = predictSchemataBuilder_.build(); + } + result.metadataSchemaUri_ = metadataSchemaUri_; + if (metadataBuilder_ == null) { + result.metadata_ = metadata_; + } else { + result.metadata_ = metadataBuilder_.build(); + } + if (supportedExportFormatsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + supportedExportFormats_ = java.util.Collections.unmodifiableList(supportedExportFormats_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.supportedExportFormats_ = supportedExportFormats_; + } else { + result.supportedExportFormats_ = supportedExportFormatsBuilder_.build(); + } + result.trainingPipeline_ = trainingPipeline_; + if (containerSpecBuilder_ == null) { + result.containerSpec_ = containerSpec_; + } else { + result.containerSpec_ = containerSpecBuilder_.build(); + } + result.artifactUri_ = artifactUri_; + if (((bitField0_ & 0x00000002) != 0)) { + supportedDeploymentResourcesTypes_ = + java.util.Collections.unmodifiableList(supportedDeploymentResourcesTypes_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.supportedDeploymentResourcesTypes_ = supportedDeploymentResourcesTypes_; + if (((bitField0_ & 0x00000004) != 0)) { + supportedInputStorageFormats_ = supportedInputStorageFormats_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.supportedInputStorageFormats_ = supportedInputStorageFormats_; + if (((bitField0_ & 0x00000008) != 0)) { + supportedOutputStorageFormats_ = supportedOutputStorageFormats_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.supportedOutputStorageFormats_ = supportedOutputStorageFormats_; + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + if (deployedModelsBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + deployedModels_ = java.util.Collections.unmodifiableList(deployedModels_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.deployedModels_ = deployedModels_; + } else { + result.deployedModels_ = deployedModelsBuilder_.build(); + } + result.etag_ = etag_; + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + if (encryptionSpecBuilder_ == null) { + result.encryptionSpec_ = encryptionSpec_; + } else { + result.encryptionSpec_ = encryptionSpecBuilder_.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.v1.Model) { + return mergeFrom((com.google.cloud.aiplatform.v1.Model) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.Model other) { + if (other == com.google.cloud.aiplatform.v1.Model.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (other.hasPredictSchemata()) { + mergePredictSchemata(other.getPredictSchemata()); + } + if (!other.getMetadataSchemaUri().isEmpty()) { + metadataSchemaUri_ = other.metadataSchemaUri_; + onChanged(); + } + if (other.hasMetadata()) { + mergeMetadata(other.getMetadata()); + } + if (supportedExportFormatsBuilder_ == null) { + if (!other.supportedExportFormats_.isEmpty()) { + if (supportedExportFormats_.isEmpty()) { + supportedExportFormats_ = other.supportedExportFormats_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSupportedExportFormatsIsMutable(); + supportedExportFormats_.addAll(other.supportedExportFormats_); + } + onChanged(); + } + } else { + if (!other.supportedExportFormats_.isEmpty()) { + if (supportedExportFormatsBuilder_.isEmpty()) { + supportedExportFormatsBuilder_.dispose(); + supportedExportFormatsBuilder_ = null; + supportedExportFormats_ = other.supportedExportFormats_; + bitField0_ = (bitField0_ & ~0x00000001); + supportedExportFormatsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getSupportedExportFormatsFieldBuilder() + : null; + } else { + supportedExportFormatsBuilder_.addAllMessages(other.supportedExportFormats_); + } + } + } + if (!other.getTrainingPipeline().isEmpty()) { + trainingPipeline_ = other.trainingPipeline_; + onChanged(); + } + if (other.hasContainerSpec()) { + mergeContainerSpec(other.getContainerSpec()); + } + if (!other.getArtifactUri().isEmpty()) { + artifactUri_ = other.artifactUri_; + onChanged(); + } + if (!other.supportedDeploymentResourcesTypes_.isEmpty()) { + if (supportedDeploymentResourcesTypes_.isEmpty()) { + supportedDeploymentResourcesTypes_ = other.supportedDeploymentResourcesTypes_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureSupportedDeploymentResourcesTypesIsMutable(); + supportedDeploymentResourcesTypes_.addAll(other.supportedDeploymentResourcesTypes_); + } + onChanged(); + } + if (!other.supportedInputStorageFormats_.isEmpty()) { + if (supportedInputStorageFormats_.isEmpty()) { + supportedInputStorageFormats_ = other.supportedInputStorageFormats_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureSupportedInputStorageFormatsIsMutable(); + supportedInputStorageFormats_.addAll(other.supportedInputStorageFormats_); + } + onChanged(); + } + if (!other.supportedOutputStorageFormats_.isEmpty()) { + if (supportedOutputStorageFormats_.isEmpty()) { + supportedOutputStorageFormats_ = other.supportedOutputStorageFormats_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureSupportedOutputStorageFormatsIsMutable(); + supportedOutputStorageFormats_.addAll(other.supportedOutputStorageFormats_); + } + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (deployedModelsBuilder_ == null) { + if (!other.deployedModels_.isEmpty()) { + if (deployedModels_.isEmpty()) { + deployedModels_ = other.deployedModels_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureDeployedModelsIsMutable(); + deployedModels_.addAll(other.deployedModels_); + } + onChanged(); + } + } else { + if (!other.deployedModels_.isEmpty()) { + if (deployedModelsBuilder_.isEmpty()) { + deployedModelsBuilder_.dispose(); + deployedModelsBuilder_ = null; + deployedModels_ = other.deployedModels_; + bitField0_ = (bitField0_ & ~0x00000010); + deployedModelsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDeployedModelsFieldBuilder() + : null; + } else { + deployedModelsBuilder_.addAllMessages(other.deployedModels_); + } + } + } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + onChanged(); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + if (other.hasEncryptionSpec()) { + mergeEncryptionSpec(other.getEncryptionSpec()); + } + 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.v1.Model parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.aiplatform.v1.Model) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * The resource name of the Model.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The resource name of the Model.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The resource name of the Model.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name of the Model.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name of the Model.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Required. The display name of the Model.
+     * The name can be up to 128 characters long and can be consist of any UTF-8
+     * characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+     * Required. The display name of the Model.
+     * The name can be up to 128 characters long and can be consist of any UTF-8
+     * characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+     * Required. The display name of the Model.
+     * The name can be up to 128 characters long and can be consist of any UTF-8
+     * characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + /** + * + * + *
+     * Required. The display name of the Model.
+     * The name can be up to 128 characters long and can be consist of any UTF-8
+     * characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The display name of the Model.
+     * The name can be up to 128 characters long and can be consist of any UTF-8
+     * characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 description_ = ""; + /** + * + * + *
+     * The description of the Model.
+     * 
+ * + * string description = 3; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The description of the Model.
+     * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The description of the Model.
+     * 
+ * + * string description = 3; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The description of the Model.
+     * 
+ * + * string description = 3; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
+     * The description of the Model.
+     * 
+ * + * string description = 3; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private com.google.cloud.aiplatform.v1.PredictSchemata predictSchemata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.PredictSchemata, + com.google.cloud.aiplatform.v1.PredictSchemata.Builder, + com.google.cloud.aiplatform.v1.PredictSchemataOrBuilder> + predictSchemataBuilder_; + /** + * + * + *
+     * The schemata that describe formats of the Model's predictions and
+     * explanations as given and returned via
+     * [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] and [PredictionService.Explain][].
+     * 
+ * + * .google.cloud.aiplatform.v1.PredictSchemata predict_schemata = 4; + * + * @return Whether the predictSchemata field is set. + */ + public boolean hasPredictSchemata() { + return predictSchemataBuilder_ != null || predictSchemata_ != null; + } + /** + * + * + *
+     * The schemata that describe formats of the Model's predictions and
+     * explanations as given and returned via
+     * [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] and [PredictionService.Explain][].
+     * 
+ * + * .google.cloud.aiplatform.v1.PredictSchemata predict_schemata = 4; + * + * @return The predictSchemata. + */ + public com.google.cloud.aiplatform.v1.PredictSchemata getPredictSchemata() { + if (predictSchemataBuilder_ == null) { + return predictSchemata_ == null + ? com.google.cloud.aiplatform.v1.PredictSchemata.getDefaultInstance() + : predictSchemata_; + } else { + return predictSchemataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The schemata that describe formats of the Model's predictions and
+     * explanations as given and returned via
+     * [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] and [PredictionService.Explain][].
+     * 
+ * + * .google.cloud.aiplatform.v1.PredictSchemata predict_schemata = 4; + */ + public Builder setPredictSchemata(com.google.cloud.aiplatform.v1.PredictSchemata value) { + if (predictSchemataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + predictSchemata_ = value; + onChanged(); + } else { + predictSchemataBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The schemata that describe formats of the Model's predictions and
+     * explanations as given and returned via
+     * [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] and [PredictionService.Explain][].
+     * 
+ * + * .google.cloud.aiplatform.v1.PredictSchemata predict_schemata = 4; + */ + public Builder setPredictSchemata( + com.google.cloud.aiplatform.v1.PredictSchemata.Builder builderForValue) { + if (predictSchemataBuilder_ == null) { + predictSchemata_ = builderForValue.build(); + onChanged(); + } else { + predictSchemataBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The schemata that describe formats of the Model's predictions and
+     * explanations as given and returned via
+     * [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] and [PredictionService.Explain][].
+     * 
+ * + * .google.cloud.aiplatform.v1.PredictSchemata predict_schemata = 4; + */ + public Builder mergePredictSchemata(com.google.cloud.aiplatform.v1.PredictSchemata value) { + if (predictSchemataBuilder_ == null) { + if (predictSchemata_ != null) { + predictSchemata_ = + com.google.cloud.aiplatform.v1.PredictSchemata.newBuilder(predictSchemata_) + .mergeFrom(value) + .buildPartial(); + } else { + predictSchemata_ = value; + } + onChanged(); + } else { + predictSchemataBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The schemata that describe formats of the Model's predictions and
+     * explanations as given and returned via
+     * [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] and [PredictionService.Explain][].
+     * 
+ * + * .google.cloud.aiplatform.v1.PredictSchemata predict_schemata = 4; + */ + public Builder clearPredictSchemata() { + if (predictSchemataBuilder_ == null) { + predictSchemata_ = null; + onChanged(); + } else { + predictSchemata_ = null; + predictSchemataBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The schemata that describe formats of the Model's predictions and
+     * explanations as given and returned via
+     * [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] and [PredictionService.Explain][].
+     * 
+ * + * .google.cloud.aiplatform.v1.PredictSchemata predict_schemata = 4; + */ + public com.google.cloud.aiplatform.v1.PredictSchemata.Builder getPredictSchemataBuilder() { + + onChanged(); + return getPredictSchemataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The schemata that describe formats of the Model's predictions and
+     * explanations as given and returned via
+     * [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] and [PredictionService.Explain][].
+     * 
+ * + * .google.cloud.aiplatform.v1.PredictSchemata predict_schemata = 4; + */ + public com.google.cloud.aiplatform.v1.PredictSchemataOrBuilder getPredictSchemataOrBuilder() { + if (predictSchemataBuilder_ != null) { + return predictSchemataBuilder_.getMessageOrBuilder(); + } else { + return predictSchemata_ == null + ? com.google.cloud.aiplatform.v1.PredictSchemata.getDefaultInstance() + : predictSchemata_; + } + } + /** + * + * + *
+     * The schemata that describe formats of the Model's predictions and
+     * explanations as given and returned via
+     * [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] and [PredictionService.Explain][].
+     * 
+ * + * .google.cloud.aiplatform.v1.PredictSchemata predict_schemata = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.PredictSchemata, + com.google.cloud.aiplatform.v1.PredictSchemata.Builder, + com.google.cloud.aiplatform.v1.PredictSchemataOrBuilder> + getPredictSchemataFieldBuilder() { + if (predictSchemataBuilder_ == null) { + predictSchemataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.PredictSchemata, + com.google.cloud.aiplatform.v1.PredictSchemata.Builder, + com.google.cloud.aiplatform.v1.PredictSchemataOrBuilder>( + getPredictSchemata(), getParentForChildren(), isClean()); + predictSchemata_ = null; + } + return predictSchemataBuilder_; + } + + private java.lang.Object metadataSchemaUri_ = ""; + /** + * + * + *
+     * Immutable. Points to a YAML file stored on Google Cloud Storage describing additional
+     * information about the Model, that is specific to it. Unset if the Model
+     * does not have any additional information.
+     * The schema is defined as an OpenAPI 3.0.2
+     * [Schema Object](https://tinyurl.com/y538mdwt#schema-object).
+     * AutoML Models always have this field populated by AI Platform, if no
+     * additional metadata is needed, this field is set to an empty string.
+     * Note: The URI given on output will be immutable and probably different,
+     * including the URI scheme, than the one given on input. The output URI will
+     * point to a location where the user only has a read access.
+     * 
+ * + * string metadata_schema_uri = 5 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The metadataSchemaUri. + */ + public java.lang.String getMetadataSchemaUri() { + java.lang.Object ref = metadataSchemaUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + metadataSchemaUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Immutable. Points to a YAML file stored on Google Cloud Storage describing additional
+     * information about the Model, that is specific to it. Unset if the Model
+     * does not have any additional information.
+     * The schema is defined as an OpenAPI 3.0.2
+     * [Schema Object](https://tinyurl.com/y538mdwt#schema-object).
+     * AutoML Models always have this field populated by AI Platform, if no
+     * additional metadata is needed, this field is set to an empty string.
+     * Note: The URI given on output will be immutable and probably different,
+     * including the URI scheme, than the one given on input. The output URI will
+     * point to a location where the user only has a read access.
+     * 
+ * + * string metadata_schema_uri = 5 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for metadataSchemaUri. + */ + public com.google.protobuf.ByteString getMetadataSchemaUriBytes() { + java.lang.Object ref = metadataSchemaUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + metadataSchemaUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Immutable. Points to a YAML file stored on Google Cloud Storage describing additional
+     * information about the Model, that is specific to it. Unset if the Model
+     * does not have any additional information.
+     * The schema is defined as an OpenAPI 3.0.2
+     * [Schema Object](https://tinyurl.com/y538mdwt#schema-object).
+     * AutoML Models always have this field populated by AI Platform, if no
+     * additional metadata is needed, this field is set to an empty string.
+     * Note: The URI given on output will be immutable and probably different,
+     * including the URI scheme, than the one given on input. The output URI will
+     * point to a location where the user only has a read access.
+     * 
+ * + * string metadata_schema_uri = 5 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The metadataSchemaUri to set. + * @return This builder for chaining. + */ + public Builder setMetadataSchemaUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + metadataSchemaUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. Points to a YAML file stored on Google Cloud Storage describing additional
+     * information about the Model, that is specific to it. Unset if the Model
+     * does not have any additional information.
+     * The schema is defined as an OpenAPI 3.0.2
+     * [Schema Object](https://tinyurl.com/y538mdwt#schema-object).
+     * AutoML Models always have this field populated by AI Platform, if no
+     * additional metadata is needed, this field is set to an empty string.
+     * Note: The URI given on output will be immutable and probably different,
+     * including the URI scheme, than the one given on input. The output URI will
+     * point to a location where the user only has a read access.
+     * 
+ * + * string metadata_schema_uri = 5 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearMetadataSchemaUri() { + + metadataSchemaUri_ = getDefaultInstance().getMetadataSchemaUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. Points to a YAML file stored on Google Cloud Storage describing additional
+     * information about the Model, that is specific to it. Unset if the Model
+     * does not have any additional information.
+     * The schema is defined as an OpenAPI 3.0.2
+     * [Schema Object](https://tinyurl.com/y538mdwt#schema-object).
+     * AutoML Models always have this field populated by AI Platform, if no
+     * additional metadata is needed, this field is set to an empty string.
+     * Note: The URI given on output will be immutable and probably different,
+     * including the URI scheme, than the one given on input. The output URI will
+     * point to a location where the user only has a read access.
+     * 
+ * + * string metadata_schema_uri = 5 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The bytes for metadataSchemaUri to set. + * @return This builder for chaining. + */ + public Builder setMetadataSchemaUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + metadataSchemaUri_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Value metadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Value, + com.google.protobuf.Value.Builder, + com.google.protobuf.ValueOrBuilder> + metadataBuilder_; + /** + * + * + *
+     * Immutable. An additional information about the Model; the schema of the metadata can
+     * be found in [metadata_schema][google.cloud.aiplatform.v1.Model.metadata_schema_uri].
+     * Unset if the Model does not have any additional information.
+     * 
+ * + * .google.protobuf.Value metadata = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return Whether the metadata field is set. + */ + public boolean hasMetadata() { + return metadataBuilder_ != null || metadata_ != null; + } + /** + * + * + *
+     * Immutable. An additional information about the Model; the schema of the metadata can
+     * be found in [metadata_schema][google.cloud.aiplatform.v1.Model.metadata_schema_uri].
+     * Unset if the Model does not have any additional information.
+     * 
+ * + * .google.protobuf.Value metadata = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The metadata. + */ + public com.google.protobuf.Value getMetadata() { + if (metadataBuilder_ == null) { + return metadata_ == null ? com.google.protobuf.Value.getDefaultInstance() : metadata_; + } else { + return metadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Immutable. An additional information about the Model; the schema of the metadata can
+     * be found in [metadata_schema][google.cloud.aiplatform.v1.Model.metadata_schema_uri].
+     * Unset if the Model does not have any additional information.
+     * 
+ * + * .google.protobuf.Value metadata = 6 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public Builder setMetadata(com.google.protobuf.Value value) { + if (metadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadata_ = value; + onChanged(); + } else { + metadataBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Immutable. An additional information about the Model; the schema of the metadata can
+     * be found in [metadata_schema][google.cloud.aiplatform.v1.Model.metadata_schema_uri].
+     * Unset if the Model does not have any additional information.
+     * 
+ * + * .google.protobuf.Value metadata = 6 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public Builder setMetadata(com.google.protobuf.Value.Builder builderForValue) { + if (metadataBuilder_ == null) { + metadata_ = builderForValue.build(); + onChanged(); + } else { + metadataBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Immutable. An additional information about the Model; the schema of the metadata can
+     * be found in [metadata_schema][google.cloud.aiplatform.v1.Model.metadata_schema_uri].
+     * Unset if the Model does not have any additional information.
+     * 
+ * + * .google.protobuf.Value metadata = 6 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public Builder mergeMetadata(com.google.protobuf.Value value) { + if (metadataBuilder_ == null) { + if (metadata_ != null) { + metadata_ = + com.google.protobuf.Value.newBuilder(metadata_).mergeFrom(value).buildPartial(); + } else { + metadata_ = value; + } + onChanged(); + } else { + metadataBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Immutable. An additional information about the Model; the schema of the metadata can
+     * be found in [metadata_schema][google.cloud.aiplatform.v1.Model.metadata_schema_uri].
+     * Unset if the Model does not have any additional information.
+     * 
+ * + * .google.protobuf.Value metadata = 6 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public Builder clearMetadata() { + if (metadataBuilder_ == null) { + metadata_ = null; + onChanged(); + } else { + metadata_ = null; + metadataBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Immutable. An additional information about the Model; the schema of the metadata can
+     * be found in [metadata_schema][google.cloud.aiplatform.v1.Model.metadata_schema_uri].
+     * Unset if the Model does not have any additional information.
+     * 
+ * + * .google.protobuf.Value metadata = 6 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public com.google.protobuf.Value.Builder getMetadataBuilder() { + + onChanged(); + return getMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Immutable. An additional information about the Model; the schema of the metadata can
+     * be found in [metadata_schema][google.cloud.aiplatform.v1.Model.metadata_schema_uri].
+     * Unset if the Model does not have any additional information.
+     * 
+ * + * .google.protobuf.Value metadata = 6 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public com.google.protobuf.ValueOrBuilder getMetadataOrBuilder() { + if (metadataBuilder_ != null) { + return metadataBuilder_.getMessageOrBuilder(); + } else { + return metadata_ == null ? com.google.protobuf.Value.getDefaultInstance() : metadata_; + } + } + /** + * + * + *
+     * Immutable. An additional information about the Model; the schema of the metadata can
+     * be found in [metadata_schema][google.cloud.aiplatform.v1.Model.metadata_schema_uri].
+     * Unset if the Model does not have any additional information.
+     * 
+ * + * .google.protobuf.Value metadata = 6 [(.google.api.field_behavior) = IMMUTABLE]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Value, + com.google.protobuf.Value.Builder, + com.google.protobuf.ValueOrBuilder> + getMetadataFieldBuilder() { + if (metadataBuilder_ == null) { + metadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Value, + com.google.protobuf.Value.Builder, + com.google.protobuf.ValueOrBuilder>( + getMetadata(), getParentForChildren(), isClean()); + metadata_ = null; + } + return metadataBuilder_; + } + + private java.util.List + supportedExportFormats_ = java.util.Collections.emptyList(); + + private void ensureSupportedExportFormatsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + supportedExportFormats_ = + new java.util.ArrayList( + supportedExportFormats_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.Model.ExportFormat, + com.google.cloud.aiplatform.v1.Model.ExportFormat.Builder, + com.google.cloud.aiplatform.v1.Model.ExportFormatOrBuilder> + supportedExportFormatsBuilder_; + + /** + * + * + *
+     * Output only. The formats in which this Model may be exported. If empty, this Model is
+     * not available for export.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Model.ExportFormat supported_export_formats = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getSupportedExportFormatsList() { + if (supportedExportFormatsBuilder_ == null) { + return java.util.Collections.unmodifiableList(supportedExportFormats_); + } else { + return supportedExportFormatsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Output only. The formats in which this Model may be exported. If empty, this Model is
+     * not available for export.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Model.ExportFormat supported_export_formats = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getSupportedExportFormatsCount() { + if (supportedExportFormatsBuilder_ == null) { + return supportedExportFormats_.size(); + } else { + return supportedExportFormatsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Output only. The formats in which this Model may be exported. If empty, this Model is
+     * not available for export.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Model.ExportFormat supported_export_formats = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.Model.ExportFormat getSupportedExportFormats(int index) { + if (supportedExportFormatsBuilder_ == null) { + return supportedExportFormats_.get(index); + } else { + return supportedExportFormatsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Output only. The formats in which this Model may be exported. If empty, this Model is
+     * not available for export.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Model.ExportFormat supported_export_formats = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setSupportedExportFormats( + int index, com.google.cloud.aiplatform.v1.Model.ExportFormat value) { + if (supportedExportFormatsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSupportedExportFormatsIsMutable(); + supportedExportFormats_.set(index, value); + onChanged(); + } else { + supportedExportFormatsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. The formats in which this Model may be exported. If empty, this Model is
+     * not available for export.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Model.ExportFormat supported_export_formats = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setSupportedExportFormats( + int index, com.google.cloud.aiplatform.v1.Model.ExportFormat.Builder builderForValue) { + if (supportedExportFormatsBuilder_ == null) { + ensureSupportedExportFormatsIsMutable(); + supportedExportFormats_.set(index, builderForValue.build()); + onChanged(); + } else { + supportedExportFormatsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. The formats in which this Model may be exported. If empty, this Model is
+     * not available for export.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Model.ExportFormat supported_export_formats = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addSupportedExportFormats( + com.google.cloud.aiplatform.v1.Model.ExportFormat value) { + if (supportedExportFormatsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSupportedExportFormatsIsMutable(); + supportedExportFormats_.add(value); + onChanged(); + } else { + supportedExportFormatsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Output only. The formats in which this Model may be exported. If empty, this Model is
+     * not available for export.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Model.ExportFormat supported_export_formats = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addSupportedExportFormats( + int index, com.google.cloud.aiplatform.v1.Model.ExportFormat value) { + if (supportedExportFormatsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSupportedExportFormatsIsMutable(); + supportedExportFormats_.add(index, value); + onChanged(); + } else { + supportedExportFormatsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. The formats in which this Model may be exported. If empty, this Model is
+     * not available for export.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Model.ExportFormat supported_export_formats = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addSupportedExportFormats( + com.google.cloud.aiplatform.v1.Model.ExportFormat.Builder builderForValue) { + if (supportedExportFormatsBuilder_ == null) { + ensureSupportedExportFormatsIsMutable(); + supportedExportFormats_.add(builderForValue.build()); + onChanged(); + } else { + supportedExportFormatsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. The formats in which this Model may be exported. If empty, this Model is
+     * not available for export.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Model.ExportFormat supported_export_formats = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addSupportedExportFormats( + int index, com.google.cloud.aiplatform.v1.Model.ExportFormat.Builder builderForValue) { + if (supportedExportFormatsBuilder_ == null) { + ensureSupportedExportFormatsIsMutable(); + supportedExportFormats_.add(index, builderForValue.build()); + onChanged(); + } else { + supportedExportFormatsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. The formats in which this Model may be exported. If empty, this Model is
+     * not available for export.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Model.ExportFormat supported_export_formats = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllSupportedExportFormats( + java.lang.Iterable values) { + if (supportedExportFormatsBuilder_ == null) { + ensureSupportedExportFormatsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, supportedExportFormats_); + onChanged(); + } else { + supportedExportFormatsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Output only. The formats in which this Model may be exported. If empty, this Model is
+     * not available for export.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Model.ExportFormat supported_export_formats = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearSupportedExportFormats() { + if (supportedExportFormatsBuilder_ == null) { + supportedExportFormats_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + supportedExportFormatsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. The formats in which this Model may be exported. If empty, this Model is
+     * not available for export.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Model.ExportFormat supported_export_formats = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeSupportedExportFormats(int index) { + if (supportedExportFormatsBuilder_ == null) { + ensureSupportedExportFormatsIsMutable(); + supportedExportFormats_.remove(index); + onChanged(); + } else { + supportedExportFormatsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Output only. The formats in which this Model may be exported. If empty, this Model is
+     * not available for export.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Model.ExportFormat supported_export_formats = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.Model.ExportFormat.Builder + getSupportedExportFormatsBuilder(int index) { + return getSupportedExportFormatsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Output only. The formats in which this Model may be exported. If empty, this Model is
+     * not available for export.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Model.ExportFormat supported_export_formats = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.Model.ExportFormatOrBuilder + getSupportedExportFormatsOrBuilder(int index) { + if (supportedExportFormatsBuilder_ == null) { + return supportedExportFormats_.get(index); + } else { + return supportedExportFormatsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Output only. The formats in which this Model may be exported. If empty, this Model is
+     * not available for export.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Model.ExportFormat supported_export_formats = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getSupportedExportFormatsOrBuilderList() { + if (supportedExportFormatsBuilder_ != null) { + return supportedExportFormatsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(supportedExportFormats_); + } + } + /** + * + * + *
+     * Output only. The formats in which this Model may be exported. If empty, this Model is
+     * not available for export.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Model.ExportFormat supported_export_formats = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.Model.ExportFormat.Builder + addSupportedExportFormatsBuilder() { + return getSupportedExportFormatsFieldBuilder() + .addBuilder(com.google.cloud.aiplatform.v1.Model.ExportFormat.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. The formats in which this Model may be exported. If empty, this Model is
+     * not available for export.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Model.ExportFormat supported_export_formats = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.Model.ExportFormat.Builder + addSupportedExportFormatsBuilder(int index) { + return getSupportedExportFormatsFieldBuilder() + .addBuilder( + index, com.google.cloud.aiplatform.v1.Model.ExportFormat.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. The formats in which this Model may be exported. If empty, this Model is
+     * not available for export.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Model.ExportFormat supported_export_formats = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getSupportedExportFormatsBuilderList() { + return getSupportedExportFormatsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.Model.ExportFormat, + com.google.cloud.aiplatform.v1.Model.ExportFormat.Builder, + com.google.cloud.aiplatform.v1.Model.ExportFormatOrBuilder> + getSupportedExportFormatsFieldBuilder() { + if (supportedExportFormatsBuilder_ == null) { + supportedExportFormatsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.Model.ExportFormat, + com.google.cloud.aiplatform.v1.Model.ExportFormat.Builder, + com.google.cloud.aiplatform.v1.Model.ExportFormatOrBuilder>( + supportedExportFormats_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + supportedExportFormats_ = null; + } + return supportedExportFormatsBuilder_; + } + + private java.lang.Object trainingPipeline_ = ""; + /** + * + * + *
+     * Output only. The resource name of the TrainingPipeline that uploaded this Model, if any.
+     * 
+ * + * + * string training_pipeline = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The trainingPipeline. + */ + public java.lang.String getTrainingPipeline() { + java.lang.Object ref = trainingPipeline_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + trainingPipeline_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The resource name of the TrainingPipeline that uploaded this Model, if any.
+     * 
+ * + * + * string training_pipeline = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for trainingPipeline. + */ + public com.google.protobuf.ByteString getTrainingPipelineBytes() { + java.lang.Object ref = trainingPipeline_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + trainingPipeline_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The resource name of the TrainingPipeline that uploaded this Model, if any.
+     * 
+ * + * + * string training_pipeline = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The trainingPipeline to set. + * @return This builder for chaining. + */ + public Builder setTrainingPipeline(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + trainingPipeline_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource name of the TrainingPipeline that uploaded this Model, if any.
+     * 
+ * + * + * string training_pipeline = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearTrainingPipeline() { + + trainingPipeline_ = getDefaultInstance().getTrainingPipeline(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource name of the TrainingPipeline that uploaded this Model, if any.
+     * 
+ * + * + * string training_pipeline = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for trainingPipeline to set. + * @return This builder for chaining. + */ + public Builder setTrainingPipelineBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + trainingPipeline_ = value; + onChanged(); + return this; + } + + private com.google.cloud.aiplatform.v1.ModelContainerSpec containerSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.ModelContainerSpec, + com.google.cloud.aiplatform.v1.ModelContainerSpec.Builder, + com.google.cloud.aiplatform.v1.ModelContainerSpecOrBuilder> + containerSpecBuilder_; + /** + * + * + *
+     * Input only. The specification of the container that is to be used when deploying
+     * this Model. The specification is ingested upon
+     * [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel], and all binaries it contains are copied
+     * and stored internally by AI Platform.
+     * Not present for AutoML Models.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ModelContainerSpec container_spec = 9 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return Whether the containerSpec field is set. + */ + public boolean hasContainerSpec() { + return containerSpecBuilder_ != null || containerSpec_ != null; + } + /** + * + * + *
+     * Input only. The specification of the container that is to be used when deploying
+     * this Model. The specification is ingested upon
+     * [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel], and all binaries it contains are copied
+     * and stored internally by AI Platform.
+     * Not present for AutoML Models.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ModelContainerSpec container_spec = 9 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The containerSpec. + */ + public com.google.cloud.aiplatform.v1.ModelContainerSpec getContainerSpec() { + if (containerSpecBuilder_ == null) { + return containerSpec_ == null + ? com.google.cloud.aiplatform.v1.ModelContainerSpec.getDefaultInstance() + : containerSpec_; + } else { + return containerSpecBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Input only. The specification of the container that is to be used when deploying
+     * this Model. The specification is ingested upon
+     * [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel], and all binaries it contains are copied
+     * and stored internally by AI Platform.
+     * Not present for AutoML Models.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ModelContainerSpec container_spec = 9 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder setContainerSpec(com.google.cloud.aiplatform.v1.ModelContainerSpec value) { + if (containerSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + containerSpec_ = value; + onChanged(); + } else { + containerSpecBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Input only. The specification of the container that is to be used when deploying
+     * this Model. The specification is ingested upon
+     * [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel], and all binaries it contains are copied
+     * and stored internally by AI Platform.
+     * Not present for AutoML Models.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ModelContainerSpec container_spec = 9 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder setContainerSpec( + com.google.cloud.aiplatform.v1.ModelContainerSpec.Builder builderForValue) { + if (containerSpecBuilder_ == null) { + containerSpec_ = builderForValue.build(); + onChanged(); + } else { + containerSpecBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Input only. The specification of the container that is to be used when deploying
+     * this Model. The specification is ingested upon
+     * [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel], and all binaries it contains are copied
+     * and stored internally by AI Platform.
+     * Not present for AutoML Models.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ModelContainerSpec container_spec = 9 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder mergeContainerSpec(com.google.cloud.aiplatform.v1.ModelContainerSpec value) { + if (containerSpecBuilder_ == null) { + if (containerSpec_ != null) { + containerSpec_ = + com.google.cloud.aiplatform.v1.ModelContainerSpec.newBuilder(containerSpec_) + .mergeFrom(value) + .buildPartial(); + } else { + containerSpec_ = value; + } + onChanged(); + } else { + containerSpecBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Input only. The specification of the container that is to be used when deploying
+     * this Model. The specification is ingested upon
+     * [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel], and all binaries it contains are copied
+     * and stored internally by AI Platform.
+     * Not present for AutoML Models.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ModelContainerSpec container_spec = 9 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder clearContainerSpec() { + if (containerSpecBuilder_ == null) { + containerSpec_ = null; + onChanged(); + } else { + containerSpec_ = null; + containerSpecBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Input only. The specification of the container that is to be used when deploying
+     * this Model. The specification is ingested upon
+     * [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel], and all binaries it contains are copied
+     * and stored internally by AI Platform.
+     * Not present for AutoML Models.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ModelContainerSpec container_spec = 9 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.ModelContainerSpec.Builder getContainerSpecBuilder() { + + onChanged(); + return getContainerSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Input only. The specification of the container that is to be used when deploying
+     * this Model. The specification is ingested upon
+     * [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel], and all binaries it contains are copied
+     * and stored internally by AI Platform.
+     * Not present for AutoML Models.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ModelContainerSpec container_spec = 9 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.ModelContainerSpecOrBuilder getContainerSpecOrBuilder() { + if (containerSpecBuilder_ != null) { + return containerSpecBuilder_.getMessageOrBuilder(); + } else { + return containerSpec_ == null + ? com.google.cloud.aiplatform.v1.ModelContainerSpec.getDefaultInstance() + : containerSpec_; + } + } + /** + * + * + *
+     * Input only. The specification of the container that is to be used when deploying
+     * this Model. The specification is ingested upon
+     * [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel], and all binaries it contains are copied
+     * and stored internally by AI Platform.
+     * Not present for AutoML Models.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ModelContainerSpec container_spec = 9 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.ModelContainerSpec, + com.google.cloud.aiplatform.v1.ModelContainerSpec.Builder, + com.google.cloud.aiplatform.v1.ModelContainerSpecOrBuilder> + getContainerSpecFieldBuilder() { + if (containerSpecBuilder_ == null) { + containerSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.ModelContainerSpec, + com.google.cloud.aiplatform.v1.ModelContainerSpec.Builder, + com.google.cloud.aiplatform.v1.ModelContainerSpecOrBuilder>( + getContainerSpec(), getParentForChildren(), isClean()); + containerSpec_ = null; + } + return containerSpecBuilder_; + } + + private java.lang.Object artifactUri_ = ""; + /** + * + * + *
+     * Immutable. The path to the directory containing the Model artifact and any of its
+     * supporting files.
+     * Not present for AutoML Models.
+     * 
+ * + * string artifact_uri = 26 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The artifactUri. + */ + public java.lang.String getArtifactUri() { + java.lang.Object ref = artifactUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + artifactUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Immutable. The path to the directory containing the Model artifact and any of its
+     * supporting files.
+     * Not present for AutoML Models.
+     * 
+ * + * string artifact_uri = 26 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for artifactUri. + */ + public com.google.protobuf.ByteString getArtifactUriBytes() { + java.lang.Object ref = artifactUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + artifactUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Immutable. The path to the directory containing the Model artifact and any of its
+     * supporting files.
+     * Not present for AutoML Models.
+     * 
+ * + * string artifact_uri = 26 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The artifactUri to set. + * @return This builder for chaining. + */ + public Builder setArtifactUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + artifactUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The path to the directory containing the Model artifact and any of its
+     * supporting files.
+     * Not present for AutoML Models.
+     * 
+ * + * string artifact_uri = 26 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearArtifactUri() { + + artifactUri_ = getDefaultInstance().getArtifactUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The path to the directory containing the Model artifact and any of its
+     * supporting files.
+     * Not present for AutoML Models.
+     * 
+ * + * string artifact_uri = 26 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The bytes for artifactUri to set. + * @return This builder for chaining. + */ + public Builder setArtifactUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + artifactUri_ = value; + onChanged(); + return this; + } + + private java.util.List supportedDeploymentResourcesTypes_ = + java.util.Collections.emptyList(); + + private void ensureSupportedDeploymentResourcesTypesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + supportedDeploymentResourcesTypes_ = + new java.util.ArrayList(supportedDeploymentResourcesTypes_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+     * Output only. When this Model is deployed, its prediction resources are described by the
+     * `prediction_resources` field of the [Endpoint.deployed_models][google.cloud.aiplatform.v1.Endpoint.deployed_models] object.
+     * Because not all Models support all resource configuration types, the
+     * configuration types this Model supports are listed here. If no
+     * configuration types are listed, the Model cannot be deployed to an
+     * [Endpoint][google.cloud.aiplatform.v1.Endpoint] and does not support
+     * online predictions ([PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] or
+     * [PredictionService.Explain][]). Such a Model can serve predictions by
+     * using a [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob], if it has at least one entry each in
+     * [supported_input_storage_formats][google.cloud.aiplatform.v1.Model.supported_input_storage_formats] and
+     * [supported_output_storage_formats][google.cloud.aiplatform.v1.Model.supported_output_storage_formats].
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Model.DeploymentResourcesType supported_deployment_resources_types = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the supportedDeploymentResourcesTypes. + */ + public java.util.List + getSupportedDeploymentResourcesTypesList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.cloud.aiplatform.v1.Model.DeploymentResourcesType>( + supportedDeploymentResourcesTypes_, supportedDeploymentResourcesTypes_converter_); + } + /** + * + * + *
+     * Output only. When this Model is deployed, its prediction resources are described by the
+     * `prediction_resources` field of the [Endpoint.deployed_models][google.cloud.aiplatform.v1.Endpoint.deployed_models] object.
+     * Because not all Models support all resource configuration types, the
+     * configuration types this Model supports are listed here. If no
+     * configuration types are listed, the Model cannot be deployed to an
+     * [Endpoint][google.cloud.aiplatform.v1.Endpoint] and does not support
+     * online predictions ([PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] or
+     * [PredictionService.Explain][]). Such a Model can serve predictions by
+     * using a [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob], if it has at least one entry each in
+     * [supported_input_storage_formats][google.cloud.aiplatform.v1.Model.supported_input_storage_formats] and
+     * [supported_output_storage_formats][google.cloud.aiplatform.v1.Model.supported_output_storage_formats].
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Model.DeploymentResourcesType supported_deployment_resources_types = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of supportedDeploymentResourcesTypes. + */ + public int getSupportedDeploymentResourcesTypesCount() { + return supportedDeploymentResourcesTypes_.size(); + } + /** + * + * + *
+     * Output only. When this Model is deployed, its prediction resources are described by the
+     * `prediction_resources` field of the [Endpoint.deployed_models][google.cloud.aiplatform.v1.Endpoint.deployed_models] object.
+     * Because not all Models support all resource configuration types, the
+     * configuration types this Model supports are listed here. If no
+     * configuration types are listed, the Model cannot be deployed to an
+     * [Endpoint][google.cloud.aiplatform.v1.Endpoint] and does not support
+     * online predictions ([PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] or
+     * [PredictionService.Explain][]). Such a Model can serve predictions by
+     * using a [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob], if it has at least one entry each in
+     * [supported_input_storage_formats][google.cloud.aiplatform.v1.Model.supported_input_storage_formats] and
+     * [supported_output_storage_formats][google.cloud.aiplatform.v1.Model.supported_output_storage_formats].
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Model.DeploymentResourcesType supported_deployment_resources_types = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The supportedDeploymentResourcesTypes at the given index. + */ + public com.google.cloud.aiplatform.v1.Model.DeploymentResourcesType + getSupportedDeploymentResourcesTypes(int index) { + return supportedDeploymentResourcesTypes_converter_.convert( + supportedDeploymentResourcesTypes_.get(index)); + } + /** + * + * + *
+     * Output only. When this Model is deployed, its prediction resources are described by the
+     * `prediction_resources` field of the [Endpoint.deployed_models][google.cloud.aiplatform.v1.Endpoint.deployed_models] object.
+     * Because not all Models support all resource configuration types, the
+     * configuration types this Model supports are listed here. If no
+     * configuration types are listed, the Model cannot be deployed to an
+     * [Endpoint][google.cloud.aiplatform.v1.Endpoint] and does not support
+     * online predictions ([PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] or
+     * [PredictionService.Explain][]). Such a Model can serve predictions by
+     * using a [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob], if it has at least one entry each in
+     * [supported_input_storage_formats][google.cloud.aiplatform.v1.Model.supported_input_storage_formats] and
+     * [supported_output_storage_formats][google.cloud.aiplatform.v1.Model.supported_output_storage_formats].
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Model.DeploymentResourcesType supported_deployment_resources_types = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index to set the value at. + * @param value The supportedDeploymentResourcesTypes to set. + * @return This builder for chaining. + */ + public Builder setSupportedDeploymentResourcesTypes( + int index, com.google.cloud.aiplatform.v1.Model.DeploymentResourcesType value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSupportedDeploymentResourcesTypesIsMutable(); + supportedDeploymentResourcesTypes_.set(index, value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. When this Model is deployed, its prediction resources are described by the
+     * `prediction_resources` field of the [Endpoint.deployed_models][google.cloud.aiplatform.v1.Endpoint.deployed_models] object.
+     * Because not all Models support all resource configuration types, the
+     * configuration types this Model supports are listed here. If no
+     * configuration types are listed, the Model cannot be deployed to an
+     * [Endpoint][google.cloud.aiplatform.v1.Endpoint] and does not support
+     * online predictions ([PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] or
+     * [PredictionService.Explain][]). Such a Model can serve predictions by
+     * using a [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob], if it has at least one entry each in
+     * [supported_input_storage_formats][google.cloud.aiplatform.v1.Model.supported_input_storage_formats] and
+     * [supported_output_storage_formats][google.cloud.aiplatform.v1.Model.supported_output_storage_formats].
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Model.DeploymentResourcesType supported_deployment_resources_types = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The supportedDeploymentResourcesTypes to add. + * @return This builder for chaining. + */ + public Builder addSupportedDeploymentResourcesTypes( + com.google.cloud.aiplatform.v1.Model.DeploymentResourcesType value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSupportedDeploymentResourcesTypesIsMutable(); + supportedDeploymentResourcesTypes_.add(value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. When this Model is deployed, its prediction resources are described by the
+     * `prediction_resources` field of the [Endpoint.deployed_models][google.cloud.aiplatform.v1.Endpoint.deployed_models] object.
+     * Because not all Models support all resource configuration types, the
+     * configuration types this Model supports are listed here. If no
+     * configuration types are listed, the Model cannot be deployed to an
+     * [Endpoint][google.cloud.aiplatform.v1.Endpoint] and does not support
+     * online predictions ([PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] or
+     * [PredictionService.Explain][]). Such a Model can serve predictions by
+     * using a [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob], if it has at least one entry each in
+     * [supported_input_storage_formats][google.cloud.aiplatform.v1.Model.supported_input_storage_formats] and
+     * [supported_output_storage_formats][google.cloud.aiplatform.v1.Model.supported_output_storage_formats].
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Model.DeploymentResourcesType supported_deployment_resources_types = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param values The supportedDeploymentResourcesTypes to add. + * @return This builder for chaining. + */ + public Builder addAllSupportedDeploymentResourcesTypes( + java.lang.Iterable + values) { + ensureSupportedDeploymentResourcesTypesIsMutable(); + for (com.google.cloud.aiplatform.v1.Model.DeploymentResourcesType value : values) { + supportedDeploymentResourcesTypes_.add(value.getNumber()); + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. When this Model is deployed, its prediction resources are described by the
+     * `prediction_resources` field of the [Endpoint.deployed_models][google.cloud.aiplatform.v1.Endpoint.deployed_models] object.
+     * Because not all Models support all resource configuration types, the
+     * configuration types this Model supports are listed here. If no
+     * configuration types are listed, the Model cannot be deployed to an
+     * [Endpoint][google.cloud.aiplatform.v1.Endpoint] and does not support
+     * online predictions ([PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] or
+     * [PredictionService.Explain][]). Such a Model can serve predictions by
+     * using a [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob], if it has at least one entry each in
+     * [supported_input_storage_formats][google.cloud.aiplatform.v1.Model.supported_input_storage_formats] and
+     * [supported_output_storage_formats][google.cloud.aiplatform.v1.Model.supported_output_storage_formats].
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Model.DeploymentResourcesType supported_deployment_resources_types = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearSupportedDeploymentResourcesTypes() { + supportedDeploymentResourcesTypes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. When this Model is deployed, its prediction resources are described by the
+     * `prediction_resources` field of the [Endpoint.deployed_models][google.cloud.aiplatform.v1.Endpoint.deployed_models] object.
+     * Because not all Models support all resource configuration types, the
+     * configuration types this Model supports are listed here. If no
+     * configuration types are listed, the Model cannot be deployed to an
+     * [Endpoint][google.cloud.aiplatform.v1.Endpoint] and does not support
+     * online predictions ([PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] or
+     * [PredictionService.Explain][]). Such a Model can serve predictions by
+     * using a [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob], if it has at least one entry each in
+     * [supported_input_storage_formats][google.cloud.aiplatform.v1.Model.supported_input_storage_formats] and
+     * [supported_output_storage_formats][google.cloud.aiplatform.v1.Model.supported_output_storage_formats].
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Model.DeploymentResourcesType supported_deployment_resources_types = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the enum numeric values on the wire for + * supportedDeploymentResourcesTypes. + */ + public java.util.List getSupportedDeploymentResourcesTypesValueList() { + return java.util.Collections.unmodifiableList(supportedDeploymentResourcesTypes_); + } + /** + * + * + *
+     * Output only. When this Model is deployed, its prediction resources are described by the
+     * `prediction_resources` field of the [Endpoint.deployed_models][google.cloud.aiplatform.v1.Endpoint.deployed_models] object.
+     * Because not all Models support all resource configuration types, the
+     * configuration types this Model supports are listed here. If no
+     * configuration types are listed, the Model cannot be deployed to an
+     * [Endpoint][google.cloud.aiplatform.v1.Endpoint] and does not support
+     * online predictions ([PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] or
+     * [PredictionService.Explain][]). Such a Model can serve predictions by
+     * using a [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob], if it has at least one entry each in
+     * [supported_input_storage_formats][google.cloud.aiplatform.v1.Model.supported_input_storage_formats] and
+     * [supported_output_storage_formats][google.cloud.aiplatform.v1.Model.supported_output_storage_formats].
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Model.DeploymentResourcesType supported_deployment_resources_types = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of supportedDeploymentResourcesTypes at the given + * index. + */ + public int getSupportedDeploymentResourcesTypesValue(int index) { + return supportedDeploymentResourcesTypes_.get(index); + } + /** + * + * + *
+     * Output only. When this Model is deployed, its prediction resources are described by the
+     * `prediction_resources` field of the [Endpoint.deployed_models][google.cloud.aiplatform.v1.Endpoint.deployed_models] object.
+     * Because not all Models support all resource configuration types, the
+     * configuration types this Model supports are listed here. If no
+     * configuration types are listed, the Model cannot be deployed to an
+     * [Endpoint][google.cloud.aiplatform.v1.Endpoint] and does not support
+     * online predictions ([PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] or
+     * [PredictionService.Explain][]). Such a Model can serve predictions by
+     * using a [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob], if it has at least one entry each in
+     * [supported_input_storage_formats][google.cloud.aiplatform.v1.Model.supported_input_storage_formats] and
+     * [supported_output_storage_formats][google.cloud.aiplatform.v1.Model.supported_output_storage_formats].
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Model.DeploymentResourcesType supported_deployment_resources_types = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of supportedDeploymentResourcesTypes at the given + * index. + * @return This builder for chaining. + */ + public Builder setSupportedDeploymentResourcesTypesValue(int index, int value) { + ensureSupportedDeploymentResourcesTypesIsMutable(); + supportedDeploymentResourcesTypes_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. When this Model is deployed, its prediction resources are described by the
+     * `prediction_resources` field of the [Endpoint.deployed_models][google.cloud.aiplatform.v1.Endpoint.deployed_models] object.
+     * Because not all Models support all resource configuration types, the
+     * configuration types this Model supports are listed here. If no
+     * configuration types are listed, the Model cannot be deployed to an
+     * [Endpoint][google.cloud.aiplatform.v1.Endpoint] and does not support
+     * online predictions ([PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] or
+     * [PredictionService.Explain][]). Such a Model can serve predictions by
+     * using a [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob], if it has at least one entry each in
+     * [supported_input_storage_formats][google.cloud.aiplatform.v1.Model.supported_input_storage_formats] and
+     * [supported_output_storage_formats][google.cloud.aiplatform.v1.Model.supported_output_storage_formats].
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Model.DeploymentResourcesType supported_deployment_resources_types = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for supportedDeploymentResourcesTypes to add. + * @return This builder for chaining. + */ + public Builder addSupportedDeploymentResourcesTypesValue(int value) { + ensureSupportedDeploymentResourcesTypesIsMutable(); + supportedDeploymentResourcesTypes_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. When this Model is deployed, its prediction resources are described by the
+     * `prediction_resources` field of the [Endpoint.deployed_models][google.cloud.aiplatform.v1.Endpoint.deployed_models] object.
+     * Because not all Models support all resource configuration types, the
+     * configuration types this Model supports are listed here. If no
+     * configuration types are listed, the Model cannot be deployed to an
+     * [Endpoint][google.cloud.aiplatform.v1.Endpoint] and does not support
+     * online predictions ([PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] or
+     * [PredictionService.Explain][]). Such a Model can serve predictions by
+     * using a [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob], if it has at least one entry each in
+     * [supported_input_storage_formats][google.cloud.aiplatform.v1.Model.supported_input_storage_formats] and
+     * [supported_output_storage_formats][google.cloud.aiplatform.v1.Model.supported_output_storage_formats].
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Model.DeploymentResourcesType supported_deployment_resources_types = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param values The enum numeric values on the wire for supportedDeploymentResourcesTypes to + * add. + * @return This builder for chaining. + */ + public Builder addAllSupportedDeploymentResourcesTypesValue( + java.lang.Iterable values) { + ensureSupportedDeploymentResourcesTypesIsMutable(); + for (int value : values) { + supportedDeploymentResourcesTypes_.add(value); + } + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList supportedInputStorageFormats_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureSupportedInputStorageFormatsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + supportedInputStorageFormats_ = + new com.google.protobuf.LazyStringArrayList(supportedInputStorageFormats_); + bitField0_ |= 0x00000004; + } + } + /** + * + * + *
+     * Output only. The formats this Model supports in
+     * [BatchPredictionJob.input_config][google.cloud.aiplatform.v1.BatchPredictionJob.input_config]. If
+     * [PredictSchemata.instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri] exists, the instances
+     * should be given as per that schema.
+     * The possible formats are:
+     * * `jsonl`
+     * The JSON Lines format, where each instance is a single line. Uses
+     * [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source].
+     * * `csv`
+     * The CSV format, where each instance is a single comma-separated line.
+     * The first line in the file is the header, containing comma-separated field
+     * names. Uses [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source].
+     * * `tf-record`
+     * The TFRecord format, where each instance is a single record in tfrecord
+     * syntax. Uses [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source].
+     * * `tf-record-gzip`
+     * Similar to `tf-record`, but the file is gzipped. Uses
+     * [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source].
+     * * `bigquery`
+     * Each instance is a single row in BigQuery. Uses
+     * [BigQuerySource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.bigquery_source].
+     * * `file-list`
+     * Each line of the file is the location of an instance to process, uses
+     * `gcs_source` field of the
+     * [InputConfig][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig] object.
+     * If this Model doesn't support any of these formats it means it cannot be
+     * used with a [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob]. However, if it has
+     * [supported_deployment_resources_types][google.cloud.aiplatform.v1.Model.supported_deployment_resources_types], it could serve online
+     * predictions by using [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] or
+     * [PredictionService.Explain][].
+     * 
+ * + * + * repeated string supported_input_storage_formats = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the supportedInputStorageFormats. + */ + public com.google.protobuf.ProtocolStringList getSupportedInputStorageFormatsList() { + return supportedInputStorageFormats_.getUnmodifiableView(); + } + /** + * + * + *
+     * Output only. The formats this Model supports in
+     * [BatchPredictionJob.input_config][google.cloud.aiplatform.v1.BatchPredictionJob.input_config]. If
+     * [PredictSchemata.instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri] exists, the instances
+     * should be given as per that schema.
+     * The possible formats are:
+     * * `jsonl`
+     * The JSON Lines format, where each instance is a single line. Uses
+     * [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source].
+     * * `csv`
+     * The CSV format, where each instance is a single comma-separated line.
+     * The first line in the file is the header, containing comma-separated field
+     * names. Uses [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source].
+     * * `tf-record`
+     * The TFRecord format, where each instance is a single record in tfrecord
+     * syntax. Uses [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source].
+     * * `tf-record-gzip`
+     * Similar to `tf-record`, but the file is gzipped. Uses
+     * [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source].
+     * * `bigquery`
+     * Each instance is a single row in BigQuery. Uses
+     * [BigQuerySource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.bigquery_source].
+     * * `file-list`
+     * Each line of the file is the location of an instance to process, uses
+     * `gcs_source` field of the
+     * [InputConfig][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig] object.
+     * If this Model doesn't support any of these formats it means it cannot be
+     * used with a [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob]. However, if it has
+     * [supported_deployment_resources_types][google.cloud.aiplatform.v1.Model.supported_deployment_resources_types], it could serve online
+     * predictions by using [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] or
+     * [PredictionService.Explain][].
+     * 
+ * + * + * repeated string supported_input_storage_formats = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of supportedInputStorageFormats. + */ + public int getSupportedInputStorageFormatsCount() { + return supportedInputStorageFormats_.size(); + } + /** + * + * + *
+     * Output only. The formats this Model supports in
+     * [BatchPredictionJob.input_config][google.cloud.aiplatform.v1.BatchPredictionJob.input_config]. If
+     * [PredictSchemata.instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri] exists, the instances
+     * should be given as per that schema.
+     * The possible formats are:
+     * * `jsonl`
+     * The JSON Lines format, where each instance is a single line. Uses
+     * [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source].
+     * * `csv`
+     * The CSV format, where each instance is a single comma-separated line.
+     * The first line in the file is the header, containing comma-separated field
+     * names. Uses [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source].
+     * * `tf-record`
+     * The TFRecord format, where each instance is a single record in tfrecord
+     * syntax. Uses [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source].
+     * * `tf-record-gzip`
+     * Similar to `tf-record`, but the file is gzipped. Uses
+     * [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source].
+     * * `bigquery`
+     * Each instance is a single row in BigQuery. Uses
+     * [BigQuerySource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.bigquery_source].
+     * * `file-list`
+     * Each line of the file is the location of an instance to process, uses
+     * `gcs_source` field of the
+     * [InputConfig][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig] object.
+     * If this Model doesn't support any of these formats it means it cannot be
+     * used with a [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob]. However, if it has
+     * [supported_deployment_resources_types][google.cloud.aiplatform.v1.Model.supported_deployment_resources_types], it could serve online
+     * predictions by using [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] or
+     * [PredictionService.Explain][].
+     * 
+ * + * + * repeated string supported_input_storage_formats = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The supportedInputStorageFormats at the given index. + */ + public java.lang.String getSupportedInputStorageFormats(int index) { + return supportedInputStorageFormats_.get(index); + } + /** + * + * + *
+     * Output only. The formats this Model supports in
+     * [BatchPredictionJob.input_config][google.cloud.aiplatform.v1.BatchPredictionJob.input_config]. If
+     * [PredictSchemata.instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri] exists, the instances
+     * should be given as per that schema.
+     * The possible formats are:
+     * * `jsonl`
+     * The JSON Lines format, where each instance is a single line. Uses
+     * [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source].
+     * * `csv`
+     * The CSV format, where each instance is a single comma-separated line.
+     * The first line in the file is the header, containing comma-separated field
+     * names. Uses [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source].
+     * * `tf-record`
+     * The TFRecord format, where each instance is a single record in tfrecord
+     * syntax. Uses [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source].
+     * * `tf-record-gzip`
+     * Similar to `tf-record`, but the file is gzipped. Uses
+     * [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source].
+     * * `bigquery`
+     * Each instance is a single row in BigQuery. Uses
+     * [BigQuerySource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.bigquery_source].
+     * * `file-list`
+     * Each line of the file is the location of an instance to process, uses
+     * `gcs_source` field of the
+     * [InputConfig][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig] object.
+     * If this Model doesn't support any of these formats it means it cannot be
+     * used with a [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob]. However, if it has
+     * [supported_deployment_resources_types][google.cloud.aiplatform.v1.Model.supported_deployment_resources_types], it could serve online
+     * predictions by using [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] or
+     * [PredictionService.Explain][].
+     * 
+ * + * + * repeated string supported_input_storage_formats = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The bytes of the supportedInputStorageFormats at the given index. + */ + public com.google.protobuf.ByteString getSupportedInputStorageFormatsBytes(int index) { + return supportedInputStorageFormats_.getByteString(index); + } + /** + * + * + *
+     * Output only. The formats this Model supports in
+     * [BatchPredictionJob.input_config][google.cloud.aiplatform.v1.BatchPredictionJob.input_config]. If
+     * [PredictSchemata.instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri] exists, the instances
+     * should be given as per that schema.
+     * The possible formats are:
+     * * `jsonl`
+     * The JSON Lines format, where each instance is a single line. Uses
+     * [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source].
+     * * `csv`
+     * The CSV format, where each instance is a single comma-separated line.
+     * The first line in the file is the header, containing comma-separated field
+     * names. Uses [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source].
+     * * `tf-record`
+     * The TFRecord format, where each instance is a single record in tfrecord
+     * syntax. Uses [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source].
+     * * `tf-record-gzip`
+     * Similar to `tf-record`, but the file is gzipped. Uses
+     * [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source].
+     * * `bigquery`
+     * Each instance is a single row in BigQuery. Uses
+     * [BigQuerySource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.bigquery_source].
+     * * `file-list`
+     * Each line of the file is the location of an instance to process, uses
+     * `gcs_source` field of the
+     * [InputConfig][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig] object.
+     * If this Model doesn't support any of these formats it means it cannot be
+     * used with a [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob]. However, if it has
+     * [supported_deployment_resources_types][google.cloud.aiplatform.v1.Model.supported_deployment_resources_types], it could serve online
+     * predictions by using [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] or
+     * [PredictionService.Explain][].
+     * 
+ * + * + * repeated string supported_input_storage_formats = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index to set the value at. + * @param value The supportedInputStorageFormats to set. + * @return This builder for chaining. + */ + public Builder setSupportedInputStorageFormats(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSupportedInputStorageFormatsIsMutable(); + supportedInputStorageFormats_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The formats this Model supports in
+     * [BatchPredictionJob.input_config][google.cloud.aiplatform.v1.BatchPredictionJob.input_config]. If
+     * [PredictSchemata.instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri] exists, the instances
+     * should be given as per that schema.
+     * The possible formats are:
+     * * `jsonl`
+     * The JSON Lines format, where each instance is a single line. Uses
+     * [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source].
+     * * `csv`
+     * The CSV format, where each instance is a single comma-separated line.
+     * The first line in the file is the header, containing comma-separated field
+     * names. Uses [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source].
+     * * `tf-record`
+     * The TFRecord format, where each instance is a single record in tfrecord
+     * syntax. Uses [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source].
+     * * `tf-record-gzip`
+     * Similar to `tf-record`, but the file is gzipped. Uses
+     * [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source].
+     * * `bigquery`
+     * Each instance is a single row in BigQuery. Uses
+     * [BigQuerySource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.bigquery_source].
+     * * `file-list`
+     * Each line of the file is the location of an instance to process, uses
+     * `gcs_source` field of the
+     * [InputConfig][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig] object.
+     * If this Model doesn't support any of these formats it means it cannot be
+     * used with a [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob]. However, if it has
+     * [supported_deployment_resources_types][google.cloud.aiplatform.v1.Model.supported_deployment_resources_types], it could serve online
+     * predictions by using [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] or
+     * [PredictionService.Explain][].
+     * 
+ * + * + * repeated string supported_input_storage_formats = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The supportedInputStorageFormats to add. + * @return This builder for chaining. + */ + public Builder addSupportedInputStorageFormats(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSupportedInputStorageFormatsIsMutable(); + supportedInputStorageFormats_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The formats this Model supports in
+     * [BatchPredictionJob.input_config][google.cloud.aiplatform.v1.BatchPredictionJob.input_config]. If
+     * [PredictSchemata.instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri] exists, the instances
+     * should be given as per that schema.
+     * The possible formats are:
+     * * `jsonl`
+     * The JSON Lines format, where each instance is a single line. Uses
+     * [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source].
+     * * `csv`
+     * The CSV format, where each instance is a single comma-separated line.
+     * The first line in the file is the header, containing comma-separated field
+     * names. Uses [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source].
+     * * `tf-record`
+     * The TFRecord format, where each instance is a single record in tfrecord
+     * syntax. Uses [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source].
+     * * `tf-record-gzip`
+     * Similar to `tf-record`, but the file is gzipped. Uses
+     * [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source].
+     * * `bigquery`
+     * Each instance is a single row in BigQuery. Uses
+     * [BigQuerySource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.bigquery_source].
+     * * `file-list`
+     * Each line of the file is the location of an instance to process, uses
+     * `gcs_source` field of the
+     * [InputConfig][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig] object.
+     * If this Model doesn't support any of these formats it means it cannot be
+     * used with a [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob]. However, if it has
+     * [supported_deployment_resources_types][google.cloud.aiplatform.v1.Model.supported_deployment_resources_types], it could serve online
+     * predictions by using [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] or
+     * [PredictionService.Explain][].
+     * 
+ * + * + * repeated string supported_input_storage_formats = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param values The supportedInputStorageFormats to add. + * @return This builder for chaining. + */ + public Builder addAllSupportedInputStorageFormats(java.lang.Iterable values) { + ensureSupportedInputStorageFormatsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, supportedInputStorageFormats_); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The formats this Model supports in
+     * [BatchPredictionJob.input_config][google.cloud.aiplatform.v1.BatchPredictionJob.input_config]. If
+     * [PredictSchemata.instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri] exists, the instances
+     * should be given as per that schema.
+     * The possible formats are:
+     * * `jsonl`
+     * The JSON Lines format, where each instance is a single line. Uses
+     * [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source].
+     * * `csv`
+     * The CSV format, where each instance is a single comma-separated line.
+     * The first line in the file is the header, containing comma-separated field
+     * names. Uses [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source].
+     * * `tf-record`
+     * The TFRecord format, where each instance is a single record in tfrecord
+     * syntax. Uses [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source].
+     * * `tf-record-gzip`
+     * Similar to `tf-record`, but the file is gzipped. Uses
+     * [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source].
+     * * `bigquery`
+     * Each instance is a single row in BigQuery. Uses
+     * [BigQuerySource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.bigquery_source].
+     * * `file-list`
+     * Each line of the file is the location of an instance to process, uses
+     * `gcs_source` field of the
+     * [InputConfig][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig] object.
+     * If this Model doesn't support any of these formats it means it cannot be
+     * used with a [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob]. However, if it has
+     * [supported_deployment_resources_types][google.cloud.aiplatform.v1.Model.supported_deployment_resources_types], it could serve online
+     * predictions by using [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] or
+     * [PredictionService.Explain][].
+     * 
+ * + * + * repeated string supported_input_storage_formats = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearSupportedInputStorageFormats() { + supportedInputStorageFormats_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The formats this Model supports in
+     * [BatchPredictionJob.input_config][google.cloud.aiplatform.v1.BatchPredictionJob.input_config]. If
+     * [PredictSchemata.instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri] exists, the instances
+     * should be given as per that schema.
+     * The possible formats are:
+     * * `jsonl`
+     * The JSON Lines format, where each instance is a single line. Uses
+     * [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source].
+     * * `csv`
+     * The CSV format, where each instance is a single comma-separated line.
+     * The first line in the file is the header, containing comma-separated field
+     * names. Uses [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source].
+     * * `tf-record`
+     * The TFRecord format, where each instance is a single record in tfrecord
+     * syntax. Uses [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source].
+     * * `tf-record-gzip`
+     * Similar to `tf-record`, but the file is gzipped. Uses
+     * [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source].
+     * * `bigquery`
+     * Each instance is a single row in BigQuery. Uses
+     * [BigQuerySource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.bigquery_source].
+     * * `file-list`
+     * Each line of the file is the location of an instance to process, uses
+     * `gcs_source` field of the
+     * [InputConfig][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig] object.
+     * If this Model doesn't support any of these formats it means it cannot be
+     * used with a [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob]. However, if it has
+     * [supported_deployment_resources_types][google.cloud.aiplatform.v1.Model.supported_deployment_resources_types], it could serve online
+     * predictions by using [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] or
+     * [PredictionService.Explain][].
+     * 
+ * + * + * repeated string supported_input_storage_formats = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The bytes of the supportedInputStorageFormats to add. + * @return This builder for chaining. + */ + public Builder addSupportedInputStorageFormatsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureSupportedInputStorageFormatsIsMutable(); + supportedInputStorageFormats_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList supportedOutputStorageFormats_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureSupportedOutputStorageFormatsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + supportedOutputStorageFormats_ = + new com.google.protobuf.LazyStringArrayList(supportedOutputStorageFormats_); + bitField0_ |= 0x00000008; + } + } + /** + * + * + *
+     * Output only. The formats this Model supports in
+     * [BatchPredictionJob.output_config][google.cloud.aiplatform.v1.BatchPredictionJob.output_config]. If both
+     * [PredictSchemata.instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri] and
+     * [PredictSchemata.prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri] exist, the predictions
+     * are returned together with their instances. In other words, the
+     * prediction has the original instance data first, followed
+     * by the actual prediction content (as per the schema).
+     * The possible formats are:
+     * * `jsonl`
+     * The JSON Lines format, where each prediction is a single line. Uses
+     * [GcsDestination][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.gcs_destination].
+     * * `csv`
+     * The CSV format, where each prediction is a single comma-separated line.
+     * The first line in the file is the header, containing comma-separated field
+     * names. Uses
+     * [GcsDestination][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.gcs_destination].
+     * * `bigquery`
+     * Each prediction is a single row in a BigQuery table, uses
+     * [BigQueryDestination][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.bigquery_destination]
+     * .
+     * If this Model doesn't support any of these formats it means it cannot be
+     * used with a [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob]. However, if it has
+     * [supported_deployment_resources_types][google.cloud.aiplatform.v1.Model.supported_deployment_resources_types], it could serve online
+     * predictions by using [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] or
+     * [PredictionService.Explain][].
+     * 
+ * + * + * repeated string supported_output_storage_formats = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the supportedOutputStorageFormats. + */ + public com.google.protobuf.ProtocolStringList getSupportedOutputStorageFormatsList() { + return supportedOutputStorageFormats_.getUnmodifiableView(); + } + /** + * + * + *
+     * Output only. The formats this Model supports in
+     * [BatchPredictionJob.output_config][google.cloud.aiplatform.v1.BatchPredictionJob.output_config]. If both
+     * [PredictSchemata.instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri] and
+     * [PredictSchemata.prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri] exist, the predictions
+     * are returned together with their instances. In other words, the
+     * prediction has the original instance data first, followed
+     * by the actual prediction content (as per the schema).
+     * The possible formats are:
+     * * `jsonl`
+     * The JSON Lines format, where each prediction is a single line. Uses
+     * [GcsDestination][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.gcs_destination].
+     * * `csv`
+     * The CSV format, where each prediction is a single comma-separated line.
+     * The first line in the file is the header, containing comma-separated field
+     * names. Uses
+     * [GcsDestination][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.gcs_destination].
+     * * `bigquery`
+     * Each prediction is a single row in a BigQuery table, uses
+     * [BigQueryDestination][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.bigquery_destination]
+     * .
+     * If this Model doesn't support any of these formats it means it cannot be
+     * used with a [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob]. However, if it has
+     * [supported_deployment_resources_types][google.cloud.aiplatform.v1.Model.supported_deployment_resources_types], it could serve online
+     * predictions by using [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] or
+     * [PredictionService.Explain][].
+     * 
+ * + * + * repeated string supported_output_storage_formats = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of supportedOutputStorageFormats. + */ + public int getSupportedOutputStorageFormatsCount() { + return supportedOutputStorageFormats_.size(); + } + /** + * + * + *
+     * Output only. The formats this Model supports in
+     * [BatchPredictionJob.output_config][google.cloud.aiplatform.v1.BatchPredictionJob.output_config]. If both
+     * [PredictSchemata.instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri] and
+     * [PredictSchemata.prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri] exist, the predictions
+     * are returned together with their instances. In other words, the
+     * prediction has the original instance data first, followed
+     * by the actual prediction content (as per the schema).
+     * The possible formats are:
+     * * `jsonl`
+     * The JSON Lines format, where each prediction is a single line. Uses
+     * [GcsDestination][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.gcs_destination].
+     * * `csv`
+     * The CSV format, where each prediction is a single comma-separated line.
+     * The first line in the file is the header, containing comma-separated field
+     * names. Uses
+     * [GcsDestination][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.gcs_destination].
+     * * `bigquery`
+     * Each prediction is a single row in a BigQuery table, uses
+     * [BigQueryDestination][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.bigquery_destination]
+     * .
+     * If this Model doesn't support any of these formats it means it cannot be
+     * used with a [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob]. However, if it has
+     * [supported_deployment_resources_types][google.cloud.aiplatform.v1.Model.supported_deployment_resources_types], it could serve online
+     * predictions by using [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] or
+     * [PredictionService.Explain][].
+     * 
+ * + * + * repeated string supported_output_storage_formats = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The supportedOutputStorageFormats at the given index. + */ + public java.lang.String getSupportedOutputStorageFormats(int index) { + return supportedOutputStorageFormats_.get(index); + } + /** + * + * + *
+     * Output only. The formats this Model supports in
+     * [BatchPredictionJob.output_config][google.cloud.aiplatform.v1.BatchPredictionJob.output_config]. If both
+     * [PredictSchemata.instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri] and
+     * [PredictSchemata.prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri] exist, the predictions
+     * are returned together with their instances. In other words, the
+     * prediction has the original instance data first, followed
+     * by the actual prediction content (as per the schema).
+     * The possible formats are:
+     * * `jsonl`
+     * The JSON Lines format, where each prediction is a single line. Uses
+     * [GcsDestination][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.gcs_destination].
+     * * `csv`
+     * The CSV format, where each prediction is a single comma-separated line.
+     * The first line in the file is the header, containing comma-separated field
+     * names. Uses
+     * [GcsDestination][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.gcs_destination].
+     * * `bigquery`
+     * Each prediction is a single row in a BigQuery table, uses
+     * [BigQueryDestination][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.bigquery_destination]
+     * .
+     * If this Model doesn't support any of these formats it means it cannot be
+     * used with a [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob]. However, if it has
+     * [supported_deployment_resources_types][google.cloud.aiplatform.v1.Model.supported_deployment_resources_types], it could serve online
+     * predictions by using [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] or
+     * [PredictionService.Explain][].
+     * 
+ * + * + * repeated string supported_output_storage_formats = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The bytes of the supportedOutputStorageFormats at the given index. + */ + public com.google.protobuf.ByteString getSupportedOutputStorageFormatsBytes(int index) { + return supportedOutputStorageFormats_.getByteString(index); + } + /** + * + * + *
+     * Output only. The formats this Model supports in
+     * [BatchPredictionJob.output_config][google.cloud.aiplatform.v1.BatchPredictionJob.output_config]. If both
+     * [PredictSchemata.instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri] and
+     * [PredictSchemata.prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri] exist, the predictions
+     * are returned together with their instances. In other words, the
+     * prediction has the original instance data first, followed
+     * by the actual prediction content (as per the schema).
+     * The possible formats are:
+     * * `jsonl`
+     * The JSON Lines format, where each prediction is a single line. Uses
+     * [GcsDestination][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.gcs_destination].
+     * * `csv`
+     * The CSV format, where each prediction is a single comma-separated line.
+     * The first line in the file is the header, containing comma-separated field
+     * names. Uses
+     * [GcsDestination][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.gcs_destination].
+     * * `bigquery`
+     * Each prediction is a single row in a BigQuery table, uses
+     * [BigQueryDestination][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.bigquery_destination]
+     * .
+     * If this Model doesn't support any of these formats it means it cannot be
+     * used with a [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob]. However, if it has
+     * [supported_deployment_resources_types][google.cloud.aiplatform.v1.Model.supported_deployment_resources_types], it could serve online
+     * predictions by using [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] or
+     * [PredictionService.Explain][].
+     * 
+ * + * + * repeated string supported_output_storage_formats = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index to set the value at. + * @param value The supportedOutputStorageFormats to set. + * @return This builder for chaining. + */ + public Builder setSupportedOutputStorageFormats(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSupportedOutputStorageFormatsIsMutable(); + supportedOutputStorageFormats_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The formats this Model supports in
+     * [BatchPredictionJob.output_config][google.cloud.aiplatform.v1.BatchPredictionJob.output_config]. If both
+     * [PredictSchemata.instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri] and
+     * [PredictSchemata.prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri] exist, the predictions
+     * are returned together with their instances. In other words, the
+     * prediction has the original instance data first, followed
+     * by the actual prediction content (as per the schema).
+     * The possible formats are:
+     * * `jsonl`
+     * The JSON Lines format, where each prediction is a single line. Uses
+     * [GcsDestination][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.gcs_destination].
+     * * `csv`
+     * The CSV format, where each prediction is a single comma-separated line.
+     * The first line in the file is the header, containing comma-separated field
+     * names. Uses
+     * [GcsDestination][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.gcs_destination].
+     * * `bigquery`
+     * Each prediction is a single row in a BigQuery table, uses
+     * [BigQueryDestination][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.bigquery_destination]
+     * .
+     * If this Model doesn't support any of these formats it means it cannot be
+     * used with a [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob]. However, if it has
+     * [supported_deployment_resources_types][google.cloud.aiplatform.v1.Model.supported_deployment_resources_types], it could serve online
+     * predictions by using [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] or
+     * [PredictionService.Explain][].
+     * 
+ * + * + * repeated string supported_output_storage_formats = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The supportedOutputStorageFormats to add. + * @return This builder for chaining. + */ + public Builder addSupportedOutputStorageFormats(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSupportedOutputStorageFormatsIsMutable(); + supportedOutputStorageFormats_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The formats this Model supports in
+     * [BatchPredictionJob.output_config][google.cloud.aiplatform.v1.BatchPredictionJob.output_config]. If both
+     * [PredictSchemata.instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri] and
+     * [PredictSchemata.prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri] exist, the predictions
+     * are returned together with their instances. In other words, the
+     * prediction has the original instance data first, followed
+     * by the actual prediction content (as per the schema).
+     * The possible formats are:
+     * * `jsonl`
+     * The JSON Lines format, where each prediction is a single line. Uses
+     * [GcsDestination][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.gcs_destination].
+     * * `csv`
+     * The CSV format, where each prediction is a single comma-separated line.
+     * The first line in the file is the header, containing comma-separated field
+     * names. Uses
+     * [GcsDestination][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.gcs_destination].
+     * * `bigquery`
+     * Each prediction is a single row in a BigQuery table, uses
+     * [BigQueryDestination][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.bigquery_destination]
+     * .
+     * If this Model doesn't support any of these formats it means it cannot be
+     * used with a [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob]. However, if it has
+     * [supported_deployment_resources_types][google.cloud.aiplatform.v1.Model.supported_deployment_resources_types], it could serve online
+     * predictions by using [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] or
+     * [PredictionService.Explain][].
+     * 
+ * + * + * repeated string supported_output_storage_formats = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param values The supportedOutputStorageFormats to add. + * @return This builder for chaining. + */ + public Builder addAllSupportedOutputStorageFormats( + java.lang.Iterable values) { + ensureSupportedOutputStorageFormatsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, supportedOutputStorageFormats_); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The formats this Model supports in
+     * [BatchPredictionJob.output_config][google.cloud.aiplatform.v1.BatchPredictionJob.output_config]. If both
+     * [PredictSchemata.instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri] and
+     * [PredictSchemata.prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri] exist, the predictions
+     * are returned together with their instances. In other words, the
+     * prediction has the original instance data first, followed
+     * by the actual prediction content (as per the schema).
+     * The possible formats are:
+     * * `jsonl`
+     * The JSON Lines format, where each prediction is a single line. Uses
+     * [GcsDestination][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.gcs_destination].
+     * * `csv`
+     * The CSV format, where each prediction is a single comma-separated line.
+     * The first line in the file is the header, containing comma-separated field
+     * names. Uses
+     * [GcsDestination][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.gcs_destination].
+     * * `bigquery`
+     * Each prediction is a single row in a BigQuery table, uses
+     * [BigQueryDestination][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.bigquery_destination]
+     * .
+     * If this Model doesn't support any of these formats it means it cannot be
+     * used with a [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob]. However, if it has
+     * [supported_deployment_resources_types][google.cloud.aiplatform.v1.Model.supported_deployment_resources_types], it could serve online
+     * predictions by using [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] or
+     * [PredictionService.Explain][].
+     * 
+ * + * + * repeated string supported_output_storage_formats = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearSupportedOutputStorageFormats() { + supportedOutputStorageFormats_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The formats this Model supports in
+     * [BatchPredictionJob.output_config][google.cloud.aiplatform.v1.BatchPredictionJob.output_config]. If both
+     * [PredictSchemata.instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri] and
+     * [PredictSchemata.prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri] exist, the predictions
+     * are returned together with their instances. In other words, the
+     * prediction has the original instance data first, followed
+     * by the actual prediction content (as per the schema).
+     * The possible formats are:
+     * * `jsonl`
+     * The JSON Lines format, where each prediction is a single line. Uses
+     * [GcsDestination][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.gcs_destination].
+     * * `csv`
+     * The CSV format, where each prediction is a single comma-separated line.
+     * The first line in the file is the header, containing comma-separated field
+     * names. Uses
+     * [GcsDestination][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.gcs_destination].
+     * * `bigquery`
+     * Each prediction is a single row in a BigQuery table, uses
+     * [BigQueryDestination][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.bigquery_destination]
+     * .
+     * If this Model doesn't support any of these formats it means it cannot be
+     * used with a [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob]. However, if it has
+     * [supported_deployment_resources_types][google.cloud.aiplatform.v1.Model.supported_deployment_resources_types], it could serve online
+     * predictions by using [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] or
+     * [PredictionService.Explain][].
+     * 
+ * + * + * repeated string supported_output_storage_formats = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The bytes of the supportedOutputStorageFormats to add. + * @return This builder for chaining. + */ + public Builder addSupportedOutputStorageFormatsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureSupportedOutputStorageFormatsIsMutable(); + supportedOutputStorageFormats_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. Timestamp when this Model was uploaded into AI Platform.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * Output only. Timestamp when this Model was uploaded into AI Platform.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Timestamp when this Model was uploaded into AI Platform.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this Model was uploaded into AI Platform.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this Model was uploaded into AI Platform.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this Model was uploaded into AI Platform.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this Model was uploaded into AI Platform.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Timestamp when this Model was uploaded into AI Platform.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. Timestamp when this Model was uploaded into AI Platform.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. Timestamp when this Model was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + * + * + *
+     * Output only. Timestamp when this Model was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Timestamp when this Model was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this Model was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this Model was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this Model was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this Model was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Timestamp when this Model was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. Timestamp when this Model was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private java.util.List deployedModels_ = + java.util.Collections.emptyList(); + + private void ensureDeployedModelsIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + deployedModels_ = + new java.util.ArrayList( + deployedModels_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.DeployedModelRef, + com.google.cloud.aiplatform.v1.DeployedModelRef.Builder, + com.google.cloud.aiplatform.v1.DeployedModelRefOrBuilder> + deployedModelsBuilder_; + + /** + * + * + *
+     * Output only. The pointers to DeployedModels created from this Model. Note that
+     * Model could have been deployed to Endpoints in different Locations.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.DeployedModelRef deployed_models = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List getDeployedModelsList() { + if (deployedModelsBuilder_ == null) { + return java.util.Collections.unmodifiableList(deployedModels_); + } else { + return deployedModelsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Output only. The pointers to DeployedModels created from this Model. Note that
+     * Model could have been deployed to Endpoints in different Locations.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.DeployedModelRef deployed_models = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getDeployedModelsCount() { + if (deployedModelsBuilder_ == null) { + return deployedModels_.size(); + } else { + return deployedModelsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Output only. The pointers to DeployedModels created from this Model. Note that
+     * Model could have been deployed to Endpoints in different Locations.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.DeployedModelRef deployed_models = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.DeployedModelRef getDeployedModels(int index) { + if (deployedModelsBuilder_ == null) { + return deployedModels_.get(index); + } else { + return deployedModelsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Output only. The pointers to DeployedModels created from this Model. Note that
+     * Model could have been deployed to Endpoints in different Locations.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.DeployedModelRef deployed_models = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDeployedModels( + int index, com.google.cloud.aiplatform.v1.DeployedModelRef value) { + if (deployedModelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeployedModelsIsMutable(); + deployedModels_.set(index, value); + onChanged(); + } else { + deployedModelsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. The pointers to DeployedModels created from this Model. Note that
+     * Model could have been deployed to Endpoints in different Locations.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.DeployedModelRef deployed_models = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDeployedModels( + int index, com.google.cloud.aiplatform.v1.DeployedModelRef.Builder builderForValue) { + if (deployedModelsBuilder_ == null) { + ensureDeployedModelsIsMutable(); + deployedModels_.set(index, builderForValue.build()); + onChanged(); + } else { + deployedModelsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. The pointers to DeployedModels created from this Model. Note that
+     * Model could have been deployed to Endpoints in different Locations.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.DeployedModelRef deployed_models = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addDeployedModels(com.google.cloud.aiplatform.v1.DeployedModelRef value) { + if (deployedModelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeployedModelsIsMutable(); + deployedModels_.add(value); + onChanged(); + } else { + deployedModelsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Output only. The pointers to DeployedModels created from this Model. Note that
+     * Model could have been deployed to Endpoints in different Locations.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.DeployedModelRef deployed_models = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addDeployedModels( + int index, com.google.cloud.aiplatform.v1.DeployedModelRef value) { + if (deployedModelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeployedModelsIsMutable(); + deployedModels_.add(index, value); + onChanged(); + } else { + deployedModelsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. The pointers to DeployedModels created from this Model. Note that
+     * Model could have been deployed to Endpoints in different Locations.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.DeployedModelRef deployed_models = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addDeployedModels( + com.google.cloud.aiplatform.v1.DeployedModelRef.Builder builderForValue) { + if (deployedModelsBuilder_ == null) { + ensureDeployedModelsIsMutable(); + deployedModels_.add(builderForValue.build()); + onChanged(); + } else { + deployedModelsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. The pointers to DeployedModels created from this Model. Note that
+     * Model could have been deployed to Endpoints in different Locations.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.DeployedModelRef deployed_models = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addDeployedModels( + int index, com.google.cloud.aiplatform.v1.DeployedModelRef.Builder builderForValue) { + if (deployedModelsBuilder_ == null) { + ensureDeployedModelsIsMutable(); + deployedModels_.add(index, builderForValue.build()); + onChanged(); + } else { + deployedModelsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. The pointers to DeployedModels created from this Model. Note that
+     * Model could have been deployed to Endpoints in different Locations.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.DeployedModelRef deployed_models = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllDeployedModels( + java.lang.Iterable values) { + if (deployedModelsBuilder_ == null) { + ensureDeployedModelsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, deployedModels_); + onChanged(); + } else { + deployedModelsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Output only. The pointers to DeployedModels created from this Model. Note that
+     * Model could have been deployed to Endpoints in different Locations.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.DeployedModelRef deployed_models = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearDeployedModels() { + if (deployedModelsBuilder_ == null) { + deployedModels_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + deployedModelsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. The pointers to DeployedModels created from this Model. Note that
+     * Model could have been deployed to Endpoints in different Locations.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.DeployedModelRef deployed_models = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeDeployedModels(int index) { + if (deployedModelsBuilder_ == null) { + ensureDeployedModelsIsMutable(); + deployedModels_.remove(index); + onChanged(); + } else { + deployedModelsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Output only. The pointers to DeployedModels created from this Model. Note that
+     * Model could have been deployed to Endpoints in different Locations.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.DeployedModelRef deployed_models = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.DeployedModelRef.Builder getDeployedModelsBuilder( + int index) { + return getDeployedModelsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Output only. The pointers to DeployedModels created from this Model. Note that
+     * Model could have been deployed to Endpoints in different Locations.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.DeployedModelRef deployed_models = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.DeployedModelRefOrBuilder getDeployedModelsOrBuilder( + int index) { + if (deployedModelsBuilder_ == null) { + return deployedModels_.get(index); + } else { + return deployedModelsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Output only. The pointers to DeployedModels created from this Model. Note that
+     * Model could have been deployed to Endpoints in different Locations.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.DeployedModelRef deployed_models = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getDeployedModelsOrBuilderList() { + if (deployedModelsBuilder_ != null) { + return deployedModelsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(deployedModels_); + } + } + /** + * + * + *
+     * Output only. The pointers to DeployedModels created from this Model. Note that
+     * Model could have been deployed to Endpoints in different Locations.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.DeployedModelRef deployed_models = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.DeployedModelRef.Builder addDeployedModelsBuilder() { + return getDeployedModelsFieldBuilder() + .addBuilder(com.google.cloud.aiplatform.v1.DeployedModelRef.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. The pointers to DeployedModels created from this Model. Note that
+     * Model could have been deployed to Endpoints in different Locations.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.DeployedModelRef deployed_models = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.DeployedModelRef.Builder addDeployedModelsBuilder( + int index) { + return getDeployedModelsFieldBuilder() + .addBuilder(index, com.google.cloud.aiplatform.v1.DeployedModelRef.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. The pointers to DeployedModels created from this Model. Note that
+     * Model could have been deployed to Endpoints in different Locations.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.DeployedModelRef deployed_models = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getDeployedModelsBuilderList() { + return getDeployedModelsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.DeployedModelRef, + com.google.cloud.aiplatform.v1.DeployedModelRef.Builder, + com.google.cloud.aiplatform.v1.DeployedModelRefOrBuilder> + getDeployedModelsFieldBuilder() { + if (deployedModelsBuilder_ == null) { + deployedModelsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.DeployedModelRef, + com.google.cloud.aiplatform.v1.DeployedModelRef.Builder, + com.google.cloud.aiplatform.v1.DeployedModelRefOrBuilder>( + deployedModels_, + ((bitField0_ & 0x00000010) != 0), + getParentForChildren(), + isClean()); + deployedModels_ = null; + } + return deployedModelsBuilder_; + } + + private java.lang.Object etag_ = ""; + /** + * + * + *
+     * Used to perform consistent read-modify-write updates. If not set, a blind
+     * "overwrite" update happens.
+     * 
+ * + * string etag = 16; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Used to perform consistent read-modify-write updates. If not set, a blind
+     * "overwrite" update happens.
+     * 
+ * + * string etag = 16; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Used to perform consistent read-modify-write updates. If not set, a blind
+     * "overwrite" update happens.
+     * 
+ * + * string etag = 16; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + etag_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Used to perform consistent read-modify-write updates. If not set, a blind
+     * "overwrite" update happens.
+     * 
+ * + * string etag = 16; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + + etag_ = getDefaultInstance().getEtag(); + onChanged(); + return this; + } + /** + * + * + *
+     * Used to perform consistent read-modify-write updates. If not set, a blind
+     * "overwrite" update happens.
+     * 
+ * + * string etag = 16; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + etag_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + onChanged(); + ; + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * The labels with user-defined metadata to organize your Models.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 17; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * The labels with user-defined metadata to organize your Models.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 17; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * The labels with user-defined metadata to organize your Models.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 17; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * The labels with user-defined metadata to organize your Models.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 17; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * The labels with user-defined metadata to organize your Models.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 17; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * The labels with user-defined metadata to organize your Models.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 17; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * The labels with user-defined metadata to organize your Models.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 17; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + return this; + } + + private com.google.cloud.aiplatform.v1.EncryptionSpec encryptionSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.EncryptionSpec, + com.google.cloud.aiplatform.v1.EncryptionSpec.Builder, + com.google.cloud.aiplatform.v1.EncryptionSpecOrBuilder> + encryptionSpecBuilder_; + /** + * + * + *
+     * Customer-managed encryption key spec for a Model. If set, this
+     * Model and all sub-resources of this Model will be secured by this key.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 24; + * + * @return Whether the encryptionSpec field is set. + */ + public boolean hasEncryptionSpec() { + return encryptionSpecBuilder_ != null || encryptionSpec_ != null; + } + /** + * + * + *
+     * Customer-managed encryption key spec for a Model. If set, this
+     * Model and all sub-resources of this Model will be secured by this key.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 24; + * + * @return The encryptionSpec. + */ + public com.google.cloud.aiplatform.v1.EncryptionSpec getEncryptionSpec() { + if (encryptionSpecBuilder_ == null) { + return encryptionSpec_ == null + ? com.google.cloud.aiplatform.v1.EncryptionSpec.getDefaultInstance() + : encryptionSpec_; + } else { + return encryptionSpecBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Customer-managed encryption key spec for a Model. If set, this
+     * Model and all sub-resources of this Model will be secured by this key.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 24; + */ + public Builder setEncryptionSpec(com.google.cloud.aiplatform.v1.EncryptionSpec value) { + if (encryptionSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + encryptionSpec_ = value; + onChanged(); + } else { + encryptionSpecBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Customer-managed encryption key spec for a Model. If set, this
+     * Model and all sub-resources of this Model will be secured by this key.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 24; + */ + public Builder setEncryptionSpec( + com.google.cloud.aiplatform.v1.EncryptionSpec.Builder builderForValue) { + if (encryptionSpecBuilder_ == null) { + encryptionSpec_ = builderForValue.build(); + onChanged(); + } else { + encryptionSpecBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Customer-managed encryption key spec for a Model. If set, this
+     * Model and all sub-resources of this Model will be secured by this key.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 24; + */ + public Builder mergeEncryptionSpec(com.google.cloud.aiplatform.v1.EncryptionSpec value) { + if (encryptionSpecBuilder_ == null) { + if (encryptionSpec_ != null) { + encryptionSpec_ = + com.google.cloud.aiplatform.v1.EncryptionSpec.newBuilder(encryptionSpec_) + .mergeFrom(value) + .buildPartial(); + } else { + encryptionSpec_ = value; + } + onChanged(); + } else { + encryptionSpecBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Customer-managed encryption key spec for a Model. If set, this
+     * Model and all sub-resources of this Model will be secured by this key.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 24; + */ + public Builder clearEncryptionSpec() { + if (encryptionSpecBuilder_ == null) { + encryptionSpec_ = null; + onChanged(); + } else { + encryptionSpec_ = null; + encryptionSpecBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Customer-managed encryption key spec for a Model. If set, this
+     * Model and all sub-resources of this Model will be secured by this key.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 24; + */ + public com.google.cloud.aiplatform.v1.EncryptionSpec.Builder getEncryptionSpecBuilder() { + + onChanged(); + return getEncryptionSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Customer-managed encryption key spec for a Model. If set, this
+     * Model and all sub-resources of this Model will be secured by this key.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 24; + */ + public com.google.cloud.aiplatform.v1.EncryptionSpecOrBuilder getEncryptionSpecOrBuilder() { + if (encryptionSpecBuilder_ != null) { + return encryptionSpecBuilder_.getMessageOrBuilder(); + } else { + return encryptionSpec_ == null + ? com.google.cloud.aiplatform.v1.EncryptionSpec.getDefaultInstance() + : encryptionSpec_; + } + } + /** + * + * + *
+     * Customer-managed encryption key spec for a Model. If set, this
+     * Model and all sub-resources of this Model will be secured by this key.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 24; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.EncryptionSpec, + com.google.cloud.aiplatform.v1.EncryptionSpec.Builder, + com.google.cloud.aiplatform.v1.EncryptionSpecOrBuilder> + getEncryptionSpecFieldBuilder() { + if (encryptionSpecBuilder_ == null) { + encryptionSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.EncryptionSpec, + com.google.cloud.aiplatform.v1.EncryptionSpec.Builder, + com.google.cloud.aiplatform.v1.EncryptionSpecOrBuilder>( + getEncryptionSpec(), getParentForChildren(), isClean()); + encryptionSpec_ = null; + } + return encryptionSpecBuilder_; + } + + @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.v1.Model) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.Model) + private static final com.google.cloud.aiplatform.v1.Model DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.Model(); + } + + public static com.google.cloud.aiplatform.v1.Model getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Model parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Model(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.Model getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelContainerSpec.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelContainerSpec.java new file mode 100644 index 000000000..1a9929444 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelContainerSpec.java @@ -0,0 +1,4655 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/model.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Specification of a container for serving predictions. This message is a
+ * subset of the Kubernetes Container v1 core
+ * [specification](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ModelContainerSpec} + */ +public final class ModelContainerSpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ModelContainerSpec) + ModelContainerSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use ModelContainerSpec.newBuilder() to construct. + private ModelContainerSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ModelContainerSpec() { + imageUri_ = ""; + command_ = com.google.protobuf.LazyStringArrayList.EMPTY; + args_ = com.google.protobuf.LazyStringArrayList.EMPTY; + env_ = java.util.Collections.emptyList(); + ports_ = java.util.Collections.emptyList(); + predictRoute_ = ""; + healthRoute_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ModelContainerSpec(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ModelContainerSpec( + 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(); + + imageUri_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + command_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + command_.add(s); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + args_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + args_.add(s); + break; + } + case 34: + { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + env_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + env_.add( + input.readMessage( + com.google.cloud.aiplatform.v1.EnvVar.parser(), extensionRegistry)); + break; + } + case 42: + { + if (!((mutable_bitField0_ & 0x00000008) != 0)) { + ports_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000008; + } + ports_.add( + input.readMessage( + com.google.cloud.aiplatform.v1.Port.parser(), extensionRegistry)); + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + predictRoute_ = s; + break; + } + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + + healthRoute_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + command_ = command_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + args_ = args_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + env_ = java.util.Collections.unmodifiableList(env_); + } + if (((mutable_bitField0_ & 0x00000008) != 0)) { + ports_ = java.util.Collections.unmodifiableList(ports_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.ModelProto + .internal_static_google_cloud_aiplatform_v1_ModelContainerSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ModelProto + .internal_static_google_cloud_aiplatform_v1_ModelContainerSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ModelContainerSpec.class, + com.google.cloud.aiplatform.v1.ModelContainerSpec.Builder.class); + } + + public static final int IMAGE_URI_FIELD_NUMBER = 1; + private volatile java.lang.Object imageUri_; + /** + * + * + *
+   * Required. Immutable. URI of the Docker image to be used as the custom container for serving
+   * predictions. This URI must identify an image in Artifact Registry or
+   * Container Registry. Learn more about the container publishing
+   * requirements, including permissions requirements for the AI Platform
+   * Service Agent,
+   * [here](https://tinyurl.com/cust-cont-reqs#publishing).
+   * The container image is ingested upon [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel], stored
+   * internally, and this original path is afterwards not used.
+   * To learn about the requirements for the Docker image itself, see
+   * [Custom container requirements](https://tinyurl.com/cust-cont-reqs).
+   * 
+ * + * + * string image_uri = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The imageUri. + */ + @java.lang.Override + public java.lang.String getImageUri() { + java.lang.Object ref = imageUri_; + 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(); + imageUri_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Immutable. URI of the Docker image to be used as the custom container for serving
+   * predictions. This URI must identify an image in Artifact Registry or
+   * Container Registry. Learn more about the container publishing
+   * requirements, including permissions requirements for the AI Platform
+   * Service Agent,
+   * [here](https://tinyurl.com/cust-cont-reqs#publishing).
+   * The container image is ingested upon [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel], stored
+   * internally, and this original path is afterwards not used.
+   * To learn about the requirements for the Docker image itself, see
+   * [Custom container requirements](https://tinyurl.com/cust-cont-reqs).
+   * 
+ * + * + * string image_uri = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The bytes for imageUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getImageUriBytes() { + java.lang.Object ref = imageUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + imageUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int COMMAND_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList command_; + /** + * + * + *
+   * Immutable. Specifies the command that runs when the container starts. This overrides
+   * the container's
+   * [ENTRYPOINT](https://docs.docker.com/engine/reference/builder/#entrypoint).
+   * Specify this field as an array of executable and arguments, similar to a
+   * Docker `ENTRYPOINT`'s "exec" form, not its "shell" form.
+   * If you do not specify this field, then the container's `ENTRYPOINT` runs,
+   * in conjunction with the [args][google.cloud.aiplatform.v1.ModelContainerSpec.args] field or the
+   * container's [`CMD`](https://docs.docker.com/engine/reference/builder/#cmd),
+   * if either exists. If this field is not specified and the container does not
+   * have an `ENTRYPOINT`, then refer to the Docker documentation about how
+   * `CMD` and `ENTRYPOINT`
+   * [interact](https://tinyurl.com/h3kdcgs).
+   * If you specify this field, then you can also specify the `args` field to
+   * provide additional arguments for this command. However, if you specify this
+   * field, then the container's `CMD` is ignored. See the
+   * [Kubernetes documentation](https://tinyurl.com/y8bvllf4) about how the
+   * `command` and `args` fields interact with a container's `ENTRYPOINT` and
+   * `CMD`.
+   * In this field, you can reference environment variables
+   * [set by AI Platform](https://tinyurl.com/cust-cont-reqs#aip-variables)
+   * and environment variables set in the [env][google.cloud.aiplatform.v1.ModelContainerSpec.env] field.
+   * You cannot reference environment variables set in the Docker image. In
+   * order for environment variables to be expanded, reference them by using the
+   * following syntax:
+   * <code>$(<var>VARIABLE_NAME</var>)</code>
+   * Note that this differs from Bash variable expansion, which does not use
+   * parentheses. If a variable cannot be resolved, the reference in the input
+   * string is used unchanged. To avoid variable expansion, you can escape this
+   * syntax with `$$`; for example:
+   * <code>$$(<var>VARIABLE_NAME</var>)</code>
+   * This field corresponds to the `command` field of the Kubernetes Containers
+   * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+   * 
+ * + * repeated string command = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return A list containing the command. + */ + public com.google.protobuf.ProtocolStringList getCommandList() { + return command_; + } + /** + * + * + *
+   * Immutable. Specifies the command that runs when the container starts. This overrides
+   * the container's
+   * [ENTRYPOINT](https://docs.docker.com/engine/reference/builder/#entrypoint).
+   * Specify this field as an array of executable and arguments, similar to a
+   * Docker `ENTRYPOINT`'s "exec" form, not its "shell" form.
+   * If you do not specify this field, then the container's `ENTRYPOINT` runs,
+   * in conjunction with the [args][google.cloud.aiplatform.v1.ModelContainerSpec.args] field or the
+   * container's [`CMD`](https://docs.docker.com/engine/reference/builder/#cmd),
+   * if either exists. If this field is not specified and the container does not
+   * have an `ENTRYPOINT`, then refer to the Docker documentation about how
+   * `CMD` and `ENTRYPOINT`
+   * [interact](https://tinyurl.com/h3kdcgs).
+   * If you specify this field, then you can also specify the `args` field to
+   * provide additional arguments for this command. However, if you specify this
+   * field, then the container's `CMD` is ignored. See the
+   * [Kubernetes documentation](https://tinyurl.com/y8bvllf4) about how the
+   * `command` and `args` fields interact with a container's `ENTRYPOINT` and
+   * `CMD`.
+   * In this field, you can reference environment variables
+   * [set by AI Platform](https://tinyurl.com/cust-cont-reqs#aip-variables)
+   * and environment variables set in the [env][google.cloud.aiplatform.v1.ModelContainerSpec.env] field.
+   * You cannot reference environment variables set in the Docker image. In
+   * order for environment variables to be expanded, reference them by using the
+   * following syntax:
+   * <code>$(<var>VARIABLE_NAME</var>)</code>
+   * Note that this differs from Bash variable expansion, which does not use
+   * parentheses. If a variable cannot be resolved, the reference in the input
+   * string is used unchanged. To avoid variable expansion, you can escape this
+   * syntax with `$$`; for example:
+   * <code>$$(<var>VARIABLE_NAME</var>)</code>
+   * This field corresponds to the `command` field of the Kubernetes Containers
+   * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+   * 
+ * + * repeated string command = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The count of command. + */ + public int getCommandCount() { + return command_.size(); + } + /** + * + * + *
+   * Immutable. Specifies the command that runs when the container starts. This overrides
+   * the container's
+   * [ENTRYPOINT](https://docs.docker.com/engine/reference/builder/#entrypoint).
+   * Specify this field as an array of executable and arguments, similar to a
+   * Docker `ENTRYPOINT`'s "exec" form, not its "shell" form.
+   * If you do not specify this field, then the container's `ENTRYPOINT` runs,
+   * in conjunction with the [args][google.cloud.aiplatform.v1.ModelContainerSpec.args] field or the
+   * container's [`CMD`](https://docs.docker.com/engine/reference/builder/#cmd),
+   * if either exists. If this field is not specified and the container does not
+   * have an `ENTRYPOINT`, then refer to the Docker documentation about how
+   * `CMD` and `ENTRYPOINT`
+   * [interact](https://tinyurl.com/h3kdcgs).
+   * If you specify this field, then you can also specify the `args` field to
+   * provide additional arguments for this command. However, if you specify this
+   * field, then the container's `CMD` is ignored. See the
+   * [Kubernetes documentation](https://tinyurl.com/y8bvllf4) about how the
+   * `command` and `args` fields interact with a container's `ENTRYPOINT` and
+   * `CMD`.
+   * In this field, you can reference environment variables
+   * [set by AI Platform](https://tinyurl.com/cust-cont-reqs#aip-variables)
+   * and environment variables set in the [env][google.cloud.aiplatform.v1.ModelContainerSpec.env] field.
+   * You cannot reference environment variables set in the Docker image. In
+   * order for environment variables to be expanded, reference them by using the
+   * following syntax:
+   * <code>$(<var>VARIABLE_NAME</var>)</code>
+   * Note that this differs from Bash variable expansion, which does not use
+   * parentheses. If a variable cannot be resolved, the reference in the input
+   * string is used unchanged. To avoid variable expansion, you can escape this
+   * syntax with `$$`; for example:
+   * <code>$$(<var>VARIABLE_NAME</var>)</code>
+   * This field corresponds to the `command` field of the Kubernetes Containers
+   * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+   * 
+ * + * repeated string command = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param index The index of the element to return. + * @return The command at the given index. + */ + public java.lang.String getCommand(int index) { + return command_.get(index); + } + /** + * + * + *
+   * Immutable. Specifies the command that runs when the container starts. This overrides
+   * the container's
+   * [ENTRYPOINT](https://docs.docker.com/engine/reference/builder/#entrypoint).
+   * Specify this field as an array of executable and arguments, similar to a
+   * Docker `ENTRYPOINT`'s "exec" form, not its "shell" form.
+   * If you do not specify this field, then the container's `ENTRYPOINT` runs,
+   * in conjunction with the [args][google.cloud.aiplatform.v1.ModelContainerSpec.args] field or the
+   * container's [`CMD`](https://docs.docker.com/engine/reference/builder/#cmd),
+   * if either exists. If this field is not specified and the container does not
+   * have an `ENTRYPOINT`, then refer to the Docker documentation about how
+   * `CMD` and `ENTRYPOINT`
+   * [interact](https://tinyurl.com/h3kdcgs).
+   * If you specify this field, then you can also specify the `args` field to
+   * provide additional arguments for this command. However, if you specify this
+   * field, then the container's `CMD` is ignored. See the
+   * [Kubernetes documentation](https://tinyurl.com/y8bvllf4) about how the
+   * `command` and `args` fields interact with a container's `ENTRYPOINT` and
+   * `CMD`.
+   * In this field, you can reference environment variables
+   * [set by AI Platform](https://tinyurl.com/cust-cont-reqs#aip-variables)
+   * and environment variables set in the [env][google.cloud.aiplatform.v1.ModelContainerSpec.env] field.
+   * You cannot reference environment variables set in the Docker image. In
+   * order for environment variables to be expanded, reference them by using the
+   * following syntax:
+   * <code>$(<var>VARIABLE_NAME</var>)</code>
+   * Note that this differs from Bash variable expansion, which does not use
+   * parentheses. If a variable cannot be resolved, the reference in the input
+   * string is used unchanged. To avoid variable expansion, you can escape this
+   * syntax with `$$`; for example:
+   * <code>$$(<var>VARIABLE_NAME</var>)</code>
+   * This field corresponds to the `command` field of the Kubernetes Containers
+   * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+   * 
+ * + * repeated string command = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param index The index of the value to return. + * @return The bytes of the command at the given index. + */ + public com.google.protobuf.ByteString getCommandBytes(int index) { + return command_.getByteString(index); + } + + public static final int ARGS_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList args_; + /** + * + * + *
+   * Immutable. Specifies arguments for the command that runs when the container starts.
+   * This overrides the container's
+   * [`CMD`](https://docs.docker.com/engine/reference/builder/#cmd). Specify
+   * this field as an array of executable and arguments, similar to a Docker
+   * `CMD`'s "default parameters" form.
+   * If you don't specify this field but do specify the
+   * [command][google.cloud.aiplatform.v1.ModelContainerSpec.command] field, then the command from the
+   * `command` field runs without any additional arguments. See the
+   * [Kubernetes documentation](https://tinyurl.com/y8bvllf4) about how the
+   * `command` and `args` fields interact with a container's `ENTRYPOINT` and
+   * `CMD`.
+   * If you don't specify this field and don't specify the `command` field,
+   * then the container's
+   * [`ENTRYPOINT`](https://docs.docker.com/engine/reference/builder/#cmd) and
+   * `CMD` determine what runs based on their default behavior. See the Docker
+   * documentation about how `CMD` and `ENTRYPOINT`
+   * [interact](https://tinyurl.com/h3kdcgs).
+   * In this field, you can reference environment variables
+   * [set by AI Platform](https://tinyurl.com/cust-cont-reqs#aip-variables)
+   * and environment variables set in the [env][google.cloud.aiplatform.v1.ModelContainerSpec.env] field.
+   * You cannot reference environment variables set in the Docker image. In
+   * order for environment variables to be expanded, reference them by using the
+   * following syntax:
+   * <code>$(<var>VARIABLE_NAME</var>)</code>
+   * Note that this differs from Bash variable expansion, which does not use
+   * parentheses. If a variable cannot be resolved, the reference in the input
+   * string is used unchanged. To avoid variable expansion, you can escape this
+   * syntax with `$$`; for example:
+   * <code>$$(<var>VARIABLE_NAME</var>)</code>
+   * This field corresponds to the `args` field of the Kubernetes Containers
+   * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+   * 
+ * + * repeated string args = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return A list containing the args. + */ + public com.google.protobuf.ProtocolStringList getArgsList() { + return args_; + } + /** + * + * + *
+   * Immutable. Specifies arguments for the command that runs when the container starts.
+   * This overrides the container's
+   * [`CMD`](https://docs.docker.com/engine/reference/builder/#cmd). Specify
+   * this field as an array of executable and arguments, similar to a Docker
+   * `CMD`'s "default parameters" form.
+   * If you don't specify this field but do specify the
+   * [command][google.cloud.aiplatform.v1.ModelContainerSpec.command] field, then the command from the
+   * `command` field runs without any additional arguments. See the
+   * [Kubernetes documentation](https://tinyurl.com/y8bvllf4) about how the
+   * `command` and `args` fields interact with a container's `ENTRYPOINT` and
+   * `CMD`.
+   * If you don't specify this field and don't specify the `command` field,
+   * then the container's
+   * [`ENTRYPOINT`](https://docs.docker.com/engine/reference/builder/#cmd) and
+   * `CMD` determine what runs based on their default behavior. See the Docker
+   * documentation about how `CMD` and `ENTRYPOINT`
+   * [interact](https://tinyurl.com/h3kdcgs).
+   * In this field, you can reference environment variables
+   * [set by AI Platform](https://tinyurl.com/cust-cont-reqs#aip-variables)
+   * and environment variables set in the [env][google.cloud.aiplatform.v1.ModelContainerSpec.env] field.
+   * You cannot reference environment variables set in the Docker image. In
+   * order for environment variables to be expanded, reference them by using the
+   * following syntax:
+   * <code>$(<var>VARIABLE_NAME</var>)</code>
+   * Note that this differs from Bash variable expansion, which does not use
+   * parentheses. If a variable cannot be resolved, the reference in the input
+   * string is used unchanged. To avoid variable expansion, you can escape this
+   * syntax with `$$`; for example:
+   * <code>$$(<var>VARIABLE_NAME</var>)</code>
+   * This field corresponds to the `args` field of the Kubernetes Containers
+   * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+   * 
+ * + * repeated string args = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The count of args. + */ + public int getArgsCount() { + return args_.size(); + } + /** + * + * + *
+   * Immutable. Specifies arguments for the command that runs when the container starts.
+   * This overrides the container's
+   * [`CMD`](https://docs.docker.com/engine/reference/builder/#cmd). Specify
+   * this field as an array of executable and arguments, similar to a Docker
+   * `CMD`'s "default parameters" form.
+   * If you don't specify this field but do specify the
+   * [command][google.cloud.aiplatform.v1.ModelContainerSpec.command] field, then the command from the
+   * `command` field runs without any additional arguments. See the
+   * [Kubernetes documentation](https://tinyurl.com/y8bvllf4) about how the
+   * `command` and `args` fields interact with a container's `ENTRYPOINT` and
+   * `CMD`.
+   * If you don't specify this field and don't specify the `command` field,
+   * then the container's
+   * [`ENTRYPOINT`](https://docs.docker.com/engine/reference/builder/#cmd) and
+   * `CMD` determine what runs based on their default behavior. See the Docker
+   * documentation about how `CMD` and `ENTRYPOINT`
+   * [interact](https://tinyurl.com/h3kdcgs).
+   * In this field, you can reference environment variables
+   * [set by AI Platform](https://tinyurl.com/cust-cont-reqs#aip-variables)
+   * and environment variables set in the [env][google.cloud.aiplatform.v1.ModelContainerSpec.env] field.
+   * You cannot reference environment variables set in the Docker image. In
+   * order for environment variables to be expanded, reference them by using the
+   * following syntax:
+   * <code>$(<var>VARIABLE_NAME</var>)</code>
+   * Note that this differs from Bash variable expansion, which does not use
+   * parentheses. If a variable cannot be resolved, the reference in the input
+   * string is used unchanged. To avoid variable expansion, you can escape this
+   * syntax with `$$`; for example:
+   * <code>$$(<var>VARIABLE_NAME</var>)</code>
+   * This field corresponds to the `args` field of the Kubernetes Containers
+   * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+   * 
+ * + * repeated string args = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param index The index of the element to return. + * @return The args at the given index. + */ + public java.lang.String getArgs(int index) { + return args_.get(index); + } + /** + * + * + *
+   * Immutable. Specifies arguments for the command that runs when the container starts.
+   * This overrides the container's
+   * [`CMD`](https://docs.docker.com/engine/reference/builder/#cmd). Specify
+   * this field as an array of executable and arguments, similar to a Docker
+   * `CMD`'s "default parameters" form.
+   * If you don't specify this field but do specify the
+   * [command][google.cloud.aiplatform.v1.ModelContainerSpec.command] field, then the command from the
+   * `command` field runs without any additional arguments. See the
+   * [Kubernetes documentation](https://tinyurl.com/y8bvllf4) about how the
+   * `command` and `args` fields interact with a container's `ENTRYPOINT` and
+   * `CMD`.
+   * If you don't specify this field and don't specify the `command` field,
+   * then the container's
+   * [`ENTRYPOINT`](https://docs.docker.com/engine/reference/builder/#cmd) and
+   * `CMD` determine what runs based on their default behavior. See the Docker
+   * documentation about how `CMD` and `ENTRYPOINT`
+   * [interact](https://tinyurl.com/h3kdcgs).
+   * In this field, you can reference environment variables
+   * [set by AI Platform](https://tinyurl.com/cust-cont-reqs#aip-variables)
+   * and environment variables set in the [env][google.cloud.aiplatform.v1.ModelContainerSpec.env] field.
+   * You cannot reference environment variables set in the Docker image. In
+   * order for environment variables to be expanded, reference them by using the
+   * following syntax:
+   * <code>$(<var>VARIABLE_NAME</var>)</code>
+   * Note that this differs from Bash variable expansion, which does not use
+   * parentheses. If a variable cannot be resolved, the reference in the input
+   * string is used unchanged. To avoid variable expansion, you can escape this
+   * syntax with `$$`; for example:
+   * <code>$$(<var>VARIABLE_NAME</var>)</code>
+   * This field corresponds to the `args` field of the Kubernetes Containers
+   * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+   * 
+ * + * repeated string args = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param index The index of the value to return. + * @return The bytes of the args at the given index. + */ + public com.google.protobuf.ByteString getArgsBytes(int index) { + return args_.getByteString(index); + } + + public static final int ENV_FIELD_NUMBER = 4; + private java.util.List env_; + /** + * + * + *
+   * Immutable. List of environment variables to set in the container. After the container
+   * starts running, code running in the container can read these environment
+   * variables.
+   * Additionally, the [command][google.cloud.aiplatform.v1.ModelContainerSpec.command] and
+   * [args][google.cloud.aiplatform.v1.ModelContainerSpec.args] fields can reference these variables. Later
+   * entries in this list can also reference earlier entries. For example, the
+   * following example sets the variable `VAR_2` to have the value `foo bar`:
+   * ```json
+   * [
+   *   {
+   *     "name": "VAR_1",
+   *     "value": "foo"
+   *   },
+   *   {
+   *     "name": "VAR_2",
+   *     "value": "$(VAR_1) bar"
+   *   }
+   * ]
+   * ```
+   * If you switch the order of the variables in the example, then the expansion
+   * does not occur.
+   * This field corresponds to the `env` field of the Kubernetes Containers
+   * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + @java.lang.Override + public java.util.List getEnvList() { + return env_; + } + /** + * + * + *
+   * Immutable. List of environment variables to set in the container. After the container
+   * starts running, code running in the container can read these environment
+   * variables.
+   * Additionally, the [command][google.cloud.aiplatform.v1.ModelContainerSpec.command] and
+   * [args][google.cloud.aiplatform.v1.ModelContainerSpec.args] fields can reference these variables. Later
+   * entries in this list can also reference earlier entries. For example, the
+   * following example sets the variable `VAR_2` to have the value `foo bar`:
+   * ```json
+   * [
+   *   {
+   *     "name": "VAR_1",
+   *     "value": "foo"
+   *   },
+   *   {
+   *     "name": "VAR_2",
+   *     "value": "$(VAR_1) bar"
+   *   }
+   * ]
+   * ```
+   * If you switch the order of the variables in the example, then the expansion
+   * does not occur.
+   * This field corresponds to the `env` field of the Kubernetes Containers
+   * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + @java.lang.Override + public java.util.List + getEnvOrBuilderList() { + return env_; + } + /** + * + * + *
+   * Immutable. List of environment variables to set in the container. After the container
+   * starts running, code running in the container can read these environment
+   * variables.
+   * Additionally, the [command][google.cloud.aiplatform.v1.ModelContainerSpec.command] and
+   * [args][google.cloud.aiplatform.v1.ModelContainerSpec.args] fields can reference these variables. Later
+   * entries in this list can also reference earlier entries. For example, the
+   * following example sets the variable `VAR_2` to have the value `foo bar`:
+   * ```json
+   * [
+   *   {
+   *     "name": "VAR_1",
+   *     "value": "foo"
+   *   },
+   *   {
+   *     "name": "VAR_2",
+   *     "value": "$(VAR_1) bar"
+   *   }
+   * ]
+   * ```
+   * If you switch the order of the variables in the example, then the expansion
+   * does not occur.
+   * This field corresponds to the `env` field of the Kubernetes Containers
+   * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + @java.lang.Override + public int getEnvCount() { + return env_.size(); + } + /** + * + * + *
+   * Immutable. List of environment variables to set in the container. After the container
+   * starts running, code running in the container can read these environment
+   * variables.
+   * Additionally, the [command][google.cloud.aiplatform.v1.ModelContainerSpec.command] and
+   * [args][google.cloud.aiplatform.v1.ModelContainerSpec.args] fields can reference these variables. Later
+   * entries in this list can also reference earlier entries. For example, the
+   * following example sets the variable `VAR_2` to have the value `foo bar`:
+   * ```json
+   * [
+   *   {
+   *     "name": "VAR_1",
+   *     "value": "foo"
+   *   },
+   *   {
+   *     "name": "VAR_2",
+   *     "value": "$(VAR_1) bar"
+   *   }
+   * ]
+   * ```
+   * If you switch the order of the variables in the example, then the expansion
+   * does not occur.
+   * This field corresponds to the `env` field of the Kubernetes Containers
+   * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.EnvVar getEnv(int index) { + return env_.get(index); + } + /** + * + * + *
+   * Immutable. List of environment variables to set in the container. After the container
+   * starts running, code running in the container can read these environment
+   * variables.
+   * Additionally, the [command][google.cloud.aiplatform.v1.ModelContainerSpec.command] and
+   * [args][google.cloud.aiplatform.v1.ModelContainerSpec.args] fields can reference these variables. Later
+   * entries in this list can also reference earlier entries. For example, the
+   * following example sets the variable `VAR_2` to have the value `foo bar`:
+   * ```json
+   * [
+   *   {
+   *     "name": "VAR_1",
+   *     "value": "foo"
+   *   },
+   *   {
+   *     "name": "VAR_2",
+   *     "value": "$(VAR_1) bar"
+   *   }
+   * ]
+   * ```
+   * If you switch the order of the variables in the example, then the expansion
+   * does not occur.
+   * This field corresponds to the `env` field of the Kubernetes Containers
+   * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.EnvVarOrBuilder getEnvOrBuilder(int index) { + return env_.get(index); + } + + public static final int PORTS_FIELD_NUMBER = 5; + private java.util.List ports_; + /** + * + * + *
+   * Immutable. List of ports to expose from the container. AI Platform sends any
+   * prediction requests that it receives to the first port on this list. AI
+   * Platform also sends
+   * [liveness and health checks](https://tinyurl.com/cust-cont-reqs#health)
+   * to this port.
+   * If you do not specify this field, it defaults to following value:
+   * ```json
+   * [
+   *   {
+   *     "containerPort": 8080
+   *   }
+   * ]
+   * ```
+   * AI Platform does not use ports other than the first one listed. This field
+   * corresponds to the `ports` field of the Kubernetes Containers
+   * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Port ports = 5 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + @java.lang.Override + public java.util.List getPortsList() { + return ports_; + } + /** + * + * + *
+   * Immutable. List of ports to expose from the container. AI Platform sends any
+   * prediction requests that it receives to the first port on this list. AI
+   * Platform also sends
+   * [liveness and health checks](https://tinyurl.com/cust-cont-reqs#health)
+   * to this port.
+   * If you do not specify this field, it defaults to following value:
+   * ```json
+   * [
+   *   {
+   *     "containerPort": 8080
+   *   }
+   * ]
+   * ```
+   * AI Platform does not use ports other than the first one listed. This field
+   * corresponds to the `ports` field of the Kubernetes Containers
+   * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Port ports = 5 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + @java.lang.Override + public java.util.List + getPortsOrBuilderList() { + return ports_; + } + /** + * + * + *
+   * Immutable. List of ports to expose from the container. AI Platform sends any
+   * prediction requests that it receives to the first port on this list. AI
+   * Platform also sends
+   * [liveness and health checks](https://tinyurl.com/cust-cont-reqs#health)
+   * to this port.
+   * If you do not specify this field, it defaults to following value:
+   * ```json
+   * [
+   *   {
+   *     "containerPort": 8080
+   *   }
+   * ]
+   * ```
+   * AI Platform does not use ports other than the first one listed. This field
+   * corresponds to the `ports` field of the Kubernetes Containers
+   * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Port ports = 5 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + @java.lang.Override + public int getPortsCount() { + return ports_.size(); + } + /** + * + * + *
+   * Immutable. List of ports to expose from the container. AI Platform sends any
+   * prediction requests that it receives to the first port on this list. AI
+   * Platform also sends
+   * [liveness and health checks](https://tinyurl.com/cust-cont-reqs#health)
+   * to this port.
+   * If you do not specify this field, it defaults to following value:
+   * ```json
+   * [
+   *   {
+   *     "containerPort": 8080
+   *   }
+   * ]
+   * ```
+   * AI Platform does not use ports other than the first one listed. This field
+   * corresponds to the `ports` field of the Kubernetes Containers
+   * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Port ports = 5 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.Port getPorts(int index) { + return ports_.get(index); + } + /** + * + * + *
+   * Immutable. List of ports to expose from the container. AI Platform sends any
+   * prediction requests that it receives to the first port on this list. AI
+   * Platform also sends
+   * [liveness and health checks](https://tinyurl.com/cust-cont-reqs#health)
+   * to this port.
+   * If you do not specify this field, it defaults to following value:
+   * ```json
+   * [
+   *   {
+   *     "containerPort": 8080
+   *   }
+   * ]
+   * ```
+   * AI Platform does not use ports other than the first one listed. This field
+   * corresponds to the `ports` field of the Kubernetes Containers
+   * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Port ports = 5 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.PortOrBuilder getPortsOrBuilder(int index) { + return ports_.get(index); + } + + public static final int PREDICT_ROUTE_FIELD_NUMBER = 6; + private volatile java.lang.Object predictRoute_; + /** + * + * + *
+   * Immutable. HTTP path on the container to send prediction requests to. AI Platform
+   * forwards requests sent using
+   * [projects.locations.endpoints.predict][google.cloud.aiplatform.v1.PredictionService.Predict] to this
+   * path on the container's IP address and port. AI Platform then returns the
+   * container's response in the API response.
+   * For example, if you set this field to `/foo`, then when AI Platform
+   * receives a prediction request, it forwards the request body in a POST
+   * request to the `/foo` path on the port of your container specified by the
+   * first value of this `ModelContainerSpec`'s
+   * [ports][google.cloud.aiplatform.v1.ModelContainerSpec.ports] field.
+   * If you don't specify this field, it defaults to the following value when
+   * you [deploy this Model to an Endpoint][google.cloud.aiplatform.v1.EndpointService.DeployModel]:
+   * <code>/v1/endpoints/<var>ENDPOINT</var>/deployedModels/<var>DEPLOYED_MODEL</var>:predict</code>
+   * The placeholders in this value are replaced as follows:
+   * * <var>ENDPOINT</var>: The last segment (following `endpoints/`)of the
+   *   Endpoint.name][] field of the Endpoint where this Model has been
+   *   deployed. (AI Platform makes this value available to your container code
+   *   as the
+   *  [`AIP_ENDPOINT_ID`](https://tinyurl.com/cust-cont-reqs#aip-variables)
+   *  environment variable.)
+   * * <var>DEPLOYED_MODEL</var>: [DeployedModel.id][google.cloud.aiplatform.v1.DeployedModel.id] of the `DeployedModel`.
+   *   (AI Platform makes this value available to your container code
+   *   as the [`AIP_DEPLOYED_MODEL_ID` environment
+   *   variable](https://tinyurl.com/cust-cont-reqs#aip-variables).)
+   * 
+ * + * string predict_route = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The predictRoute. + */ + @java.lang.Override + public java.lang.String getPredictRoute() { + java.lang.Object ref = predictRoute_; + 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(); + predictRoute_ = s; + return s; + } + } + /** + * + * + *
+   * Immutable. HTTP path on the container to send prediction requests to. AI Platform
+   * forwards requests sent using
+   * [projects.locations.endpoints.predict][google.cloud.aiplatform.v1.PredictionService.Predict] to this
+   * path on the container's IP address and port. AI Platform then returns the
+   * container's response in the API response.
+   * For example, if you set this field to `/foo`, then when AI Platform
+   * receives a prediction request, it forwards the request body in a POST
+   * request to the `/foo` path on the port of your container specified by the
+   * first value of this `ModelContainerSpec`'s
+   * [ports][google.cloud.aiplatform.v1.ModelContainerSpec.ports] field.
+   * If you don't specify this field, it defaults to the following value when
+   * you [deploy this Model to an Endpoint][google.cloud.aiplatform.v1.EndpointService.DeployModel]:
+   * <code>/v1/endpoints/<var>ENDPOINT</var>/deployedModels/<var>DEPLOYED_MODEL</var>:predict</code>
+   * The placeholders in this value are replaced as follows:
+   * * <var>ENDPOINT</var>: The last segment (following `endpoints/`)of the
+   *   Endpoint.name][] field of the Endpoint where this Model has been
+   *   deployed. (AI Platform makes this value available to your container code
+   *   as the
+   *  [`AIP_ENDPOINT_ID`](https://tinyurl.com/cust-cont-reqs#aip-variables)
+   *  environment variable.)
+   * * <var>DEPLOYED_MODEL</var>: [DeployedModel.id][google.cloud.aiplatform.v1.DeployedModel.id] of the `DeployedModel`.
+   *   (AI Platform makes this value available to your container code
+   *   as the [`AIP_DEPLOYED_MODEL_ID` environment
+   *   variable](https://tinyurl.com/cust-cont-reqs#aip-variables).)
+   * 
+ * + * string predict_route = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for predictRoute. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPredictRouteBytes() { + java.lang.Object ref = predictRoute_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + predictRoute_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int HEALTH_ROUTE_FIELD_NUMBER = 7; + private volatile java.lang.Object healthRoute_; + /** + * + * + *
+   * Immutable. HTTP path on the container to send health checks to. AI Platform
+   * intermittently sends GET requests to this path on the container's IP
+   * address and port to check that the container is healthy. Read more about
+   * [health
+   * checks](https://tinyurl.com/cust-cont-reqs#checks).
+   * For example, if you set this field to `/bar`, then AI Platform
+   * intermittently sends a GET request to the `/bar` path on the port of your
+   * container specified by the first value of this `ModelContainerSpec`'s
+   * [ports][google.cloud.aiplatform.v1.ModelContainerSpec.ports] field.
+   * If you don't specify this field, it defaults to the following value when
+   * you [deploy this Model to an Endpoint][google.cloud.aiplatform.v1.EndpointService.DeployModel]:
+   * <code>/v1/endpoints/<var>ENDPOINT</var>/deployedModels/<var>DEPLOYED_MODEL</var>:predict</code>
+   * The placeholders in this value are replaced as follows:
+   * * <var>ENDPOINT</var>: The last segment (following `endpoints/`)of the
+   *   Endpoint.name][] field of the Endpoint where this Model has been
+   *   deployed. (AI Platform makes this value available to your container code
+   *   as the
+   *   [`AIP_ENDPOINT_ID`](https://tinyurl.com/cust-cont-reqs#aip-variables)
+   *   environment variable.)
+   * * <var>DEPLOYED_MODEL</var>: [DeployedModel.id][google.cloud.aiplatform.v1.DeployedModel.id] of the `DeployedModel`.
+   *   (AI Platform makes this value available to your container code as the
+   * [`AIP_DEPLOYED_MODEL_ID`](https://tinyurl.com/cust-cont-reqs#aip-variables)
+   *   environment variable.)
+   * 
+ * + * string health_route = 7 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The healthRoute. + */ + @java.lang.Override + public java.lang.String getHealthRoute() { + java.lang.Object ref = healthRoute_; + 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(); + healthRoute_ = s; + return s; + } + } + /** + * + * + *
+   * Immutable. HTTP path on the container to send health checks to. AI Platform
+   * intermittently sends GET requests to this path on the container's IP
+   * address and port to check that the container is healthy. Read more about
+   * [health
+   * checks](https://tinyurl.com/cust-cont-reqs#checks).
+   * For example, if you set this field to `/bar`, then AI Platform
+   * intermittently sends a GET request to the `/bar` path on the port of your
+   * container specified by the first value of this `ModelContainerSpec`'s
+   * [ports][google.cloud.aiplatform.v1.ModelContainerSpec.ports] field.
+   * If you don't specify this field, it defaults to the following value when
+   * you [deploy this Model to an Endpoint][google.cloud.aiplatform.v1.EndpointService.DeployModel]:
+   * <code>/v1/endpoints/<var>ENDPOINT</var>/deployedModels/<var>DEPLOYED_MODEL</var>:predict</code>
+   * The placeholders in this value are replaced as follows:
+   * * <var>ENDPOINT</var>: The last segment (following `endpoints/`)of the
+   *   Endpoint.name][] field of the Endpoint where this Model has been
+   *   deployed. (AI Platform makes this value available to your container code
+   *   as the
+   *   [`AIP_ENDPOINT_ID`](https://tinyurl.com/cust-cont-reqs#aip-variables)
+   *   environment variable.)
+   * * <var>DEPLOYED_MODEL</var>: [DeployedModel.id][google.cloud.aiplatform.v1.DeployedModel.id] of the `DeployedModel`.
+   *   (AI Platform makes this value available to your container code as the
+   * [`AIP_DEPLOYED_MODEL_ID`](https://tinyurl.com/cust-cont-reqs#aip-variables)
+   *   environment variable.)
+   * 
+ * + * string health_route = 7 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for healthRoute. + */ + @java.lang.Override + public com.google.protobuf.ByteString getHealthRouteBytes() { + java.lang.Object ref = healthRoute_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + healthRoute_ = 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 (!getImageUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, imageUri_); + } + for (int i = 0; i < command_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, command_.getRaw(i)); + } + for (int i = 0; i < args_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, args_.getRaw(i)); + } + for (int i = 0; i < env_.size(); i++) { + output.writeMessage(4, env_.get(i)); + } + for (int i = 0; i < ports_.size(); i++) { + output.writeMessage(5, ports_.get(i)); + } + if (!getPredictRouteBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, predictRoute_); + } + if (!getHealthRouteBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, healthRoute_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getImageUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, imageUri_); + } + { + int dataSize = 0; + for (int i = 0; i < command_.size(); i++) { + dataSize += computeStringSizeNoTag(command_.getRaw(i)); + } + size += dataSize; + size += 1 * getCommandList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < args_.size(); i++) { + dataSize += computeStringSizeNoTag(args_.getRaw(i)); + } + size += dataSize; + size += 1 * getArgsList().size(); + } + for (int i = 0; i < env_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, env_.get(i)); + } + for (int i = 0; i < ports_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, ports_.get(i)); + } + if (!getPredictRouteBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, predictRoute_); + } + if (!getHealthRouteBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, healthRoute_); + } + 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.v1.ModelContainerSpec)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ModelContainerSpec other = + (com.google.cloud.aiplatform.v1.ModelContainerSpec) obj; + + if (!getImageUri().equals(other.getImageUri())) return false; + if (!getCommandList().equals(other.getCommandList())) return false; + if (!getArgsList().equals(other.getArgsList())) return false; + if (!getEnvList().equals(other.getEnvList())) return false; + if (!getPortsList().equals(other.getPortsList())) return false; + if (!getPredictRoute().equals(other.getPredictRoute())) return false; + if (!getHealthRoute().equals(other.getHealthRoute())) 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) + IMAGE_URI_FIELD_NUMBER; + hash = (53 * hash) + getImageUri().hashCode(); + if (getCommandCount() > 0) { + hash = (37 * hash) + COMMAND_FIELD_NUMBER; + hash = (53 * hash) + getCommandList().hashCode(); + } + if (getArgsCount() > 0) { + hash = (37 * hash) + ARGS_FIELD_NUMBER; + hash = (53 * hash) + getArgsList().hashCode(); + } + if (getEnvCount() > 0) { + hash = (37 * hash) + ENV_FIELD_NUMBER; + hash = (53 * hash) + getEnvList().hashCode(); + } + if (getPortsCount() > 0) { + hash = (37 * hash) + PORTS_FIELD_NUMBER; + hash = (53 * hash) + getPortsList().hashCode(); + } + hash = (37 * hash) + PREDICT_ROUTE_FIELD_NUMBER; + hash = (53 * hash) + getPredictRoute().hashCode(); + hash = (37 * hash) + HEALTH_ROUTE_FIELD_NUMBER; + hash = (53 * hash) + getHealthRoute().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.ModelContainerSpec parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ModelContainerSpec 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.v1.ModelContainerSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ModelContainerSpec 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.v1.ModelContainerSpec parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ModelContainerSpec parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ModelContainerSpec parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ModelContainerSpec 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.v1.ModelContainerSpec parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ModelContainerSpec 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.v1.ModelContainerSpec parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ModelContainerSpec 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.v1.ModelContainerSpec 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; + } + /** + * + * + *
+   * Specification of a container for serving predictions. This message is a
+   * subset of the Kubernetes Container v1 core
+   * [specification](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ModelContainerSpec} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ModelContainerSpec) + com.google.cloud.aiplatform.v1.ModelContainerSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.ModelProto + .internal_static_google_cloud_aiplatform_v1_ModelContainerSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ModelProto + .internal_static_google_cloud_aiplatform_v1_ModelContainerSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ModelContainerSpec.class, + com.google.cloud.aiplatform.v1.ModelContainerSpec.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ModelContainerSpec.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getEnvFieldBuilder(); + getPortsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + imageUri_ = ""; + + command_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + args_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + if (envBuilder_ == null) { + env_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + envBuilder_.clear(); + } + if (portsBuilder_ == null) { + ports_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + } else { + portsBuilder_.clear(); + } + predictRoute_ = ""; + + healthRoute_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.ModelProto + .internal_static_google_cloud_aiplatform_v1_ModelContainerSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ModelContainerSpec getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ModelContainerSpec.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ModelContainerSpec build() { + com.google.cloud.aiplatform.v1.ModelContainerSpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ModelContainerSpec buildPartial() { + com.google.cloud.aiplatform.v1.ModelContainerSpec result = + new com.google.cloud.aiplatform.v1.ModelContainerSpec(this); + int from_bitField0_ = bitField0_; + result.imageUri_ = imageUri_; + if (((bitField0_ & 0x00000001) != 0)) { + command_ = command_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.command_ = command_; + if (((bitField0_ & 0x00000002) != 0)) { + args_ = args_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.args_ = args_; + if (envBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + env_ = java.util.Collections.unmodifiableList(env_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.env_ = env_; + } else { + result.env_ = envBuilder_.build(); + } + if (portsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + ports_ = java.util.Collections.unmodifiableList(ports_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.ports_ = ports_; + } else { + result.ports_ = portsBuilder_.build(); + } + result.predictRoute_ = predictRoute_; + result.healthRoute_ = healthRoute_; + 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.v1.ModelContainerSpec) { + return mergeFrom((com.google.cloud.aiplatform.v1.ModelContainerSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.ModelContainerSpec other) { + if (other == com.google.cloud.aiplatform.v1.ModelContainerSpec.getDefaultInstance()) + return this; + if (!other.getImageUri().isEmpty()) { + imageUri_ = other.imageUri_; + onChanged(); + } + if (!other.command_.isEmpty()) { + if (command_.isEmpty()) { + command_ = other.command_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureCommandIsMutable(); + command_.addAll(other.command_); + } + onChanged(); + } + if (!other.args_.isEmpty()) { + if (args_.isEmpty()) { + args_ = other.args_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureArgsIsMutable(); + args_.addAll(other.args_); + } + onChanged(); + } + if (envBuilder_ == null) { + if (!other.env_.isEmpty()) { + if (env_.isEmpty()) { + env_ = other.env_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureEnvIsMutable(); + env_.addAll(other.env_); + } + onChanged(); + } + } else { + if (!other.env_.isEmpty()) { + if (envBuilder_.isEmpty()) { + envBuilder_.dispose(); + envBuilder_ = null; + env_ = other.env_; + bitField0_ = (bitField0_ & ~0x00000004); + envBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getEnvFieldBuilder() + : null; + } else { + envBuilder_.addAllMessages(other.env_); + } + } + } + if (portsBuilder_ == null) { + if (!other.ports_.isEmpty()) { + if (ports_.isEmpty()) { + ports_ = other.ports_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensurePortsIsMutable(); + ports_.addAll(other.ports_); + } + onChanged(); + } + } else { + if (!other.ports_.isEmpty()) { + if (portsBuilder_.isEmpty()) { + portsBuilder_.dispose(); + portsBuilder_ = null; + ports_ = other.ports_; + bitField0_ = (bitField0_ & ~0x00000008); + portsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPortsFieldBuilder() + : null; + } else { + portsBuilder_.addAllMessages(other.ports_); + } + } + } + if (!other.getPredictRoute().isEmpty()) { + predictRoute_ = other.predictRoute_; + onChanged(); + } + if (!other.getHealthRoute().isEmpty()) { + healthRoute_ = other.healthRoute_; + 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.v1.ModelContainerSpec parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.ModelContainerSpec) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object imageUri_ = ""; + /** + * + * + *
+     * Required. Immutable. URI of the Docker image to be used as the custom container for serving
+     * predictions. This URI must identify an image in Artifact Registry or
+     * Container Registry. Learn more about the container publishing
+     * requirements, including permissions requirements for the AI Platform
+     * Service Agent,
+     * [here](https://tinyurl.com/cust-cont-reqs#publishing).
+     * The container image is ingested upon [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel], stored
+     * internally, and this original path is afterwards not used.
+     * To learn about the requirements for the Docker image itself, see
+     * [Custom container requirements](https://tinyurl.com/cust-cont-reqs).
+     * 
+ * + * + * string image_uri = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The imageUri. + */ + public java.lang.String getImageUri() { + java.lang.Object ref = imageUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + imageUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Immutable. URI of the Docker image to be used as the custom container for serving
+     * predictions. This URI must identify an image in Artifact Registry or
+     * Container Registry. Learn more about the container publishing
+     * requirements, including permissions requirements for the AI Platform
+     * Service Agent,
+     * [here](https://tinyurl.com/cust-cont-reqs#publishing).
+     * The container image is ingested upon [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel], stored
+     * internally, and this original path is afterwards not used.
+     * To learn about the requirements for the Docker image itself, see
+     * [Custom container requirements](https://tinyurl.com/cust-cont-reqs).
+     * 
+ * + * + * string image_uri = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The bytes for imageUri. + */ + public com.google.protobuf.ByteString getImageUriBytes() { + java.lang.Object ref = imageUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + imageUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Immutable. URI of the Docker image to be used as the custom container for serving
+     * predictions. This URI must identify an image in Artifact Registry or
+     * Container Registry. Learn more about the container publishing
+     * requirements, including permissions requirements for the AI Platform
+     * Service Agent,
+     * [here](https://tinyurl.com/cust-cont-reqs#publishing).
+     * The container image is ingested upon [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel], stored
+     * internally, and this original path is afterwards not used.
+     * To learn about the requirements for the Docker image itself, see
+     * [Custom container requirements](https://tinyurl.com/cust-cont-reqs).
+     * 
+ * + * + * string image_uri = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The imageUri to set. + * @return This builder for chaining. + */ + public Builder setImageUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + imageUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Immutable. URI of the Docker image to be used as the custom container for serving
+     * predictions. This URI must identify an image in Artifact Registry or
+     * Container Registry. Learn more about the container publishing
+     * requirements, including permissions requirements for the AI Platform
+     * Service Agent,
+     * [here](https://tinyurl.com/cust-cont-reqs#publishing).
+     * The container image is ingested upon [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel], stored
+     * internally, and this original path is afterwards not used.
+     * To learn about the requirements for the Docker image itself, see
+     * [Custom container requirements](https://tinyurl.com/cust-cont-reqs).
+     * 
+ * + * + * string image_uri = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return This builder for chaining. + */ + public Builder clearImageUri() { + + imageUri_ = getDefaultInstance().getImageUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Immutable. URI of the Docker image to be used as the custom container for serving
+     * predictions. This URI must identify an image in Artifact Registry or
+     * Container Registry. Learn more about the container publishing
+     * requirements, including permissions requirements for the AI Platform
+     * Service Agent,
+     * [here](https://tinyurl.com/cust-cont-reqs#publishing).
+     * The container image is ingested upon [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel], stored
+     * internally, and this original path is afterwards not used.
+     * To learn about the requirements for the Docker image itself, see
+     * [Custom container requirements](https://tinyurl.com/cust-cont-reqs).
+     * 
+ * + * + * string image_uri = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The bytes for imageUri to set. + * @return This builder for chaining. + */ + public Builder setImageUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + imageUri_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList command_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureCommandIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + command_ = new com.google.protobuf.LazyStringArrayList(command_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * Immutable. Specifies the command that runs when the container starts. This overrides
+     * the container's
+     * [ENTRYPOINT](https://docs.docker.com/engine/reference/builder/#entrypoint).
+     * Specify this field as an array of executable and arguments, similar to a
+     * Docker `ENTRYPOINT`'s "exec" form, not its "shell" form.
+     * If you do not specify this field, then the container's `ENTRYPOINT` runs,
+     * in conjunction with the [args][google.cloud.aiplatform.v1.ModelContainerSpec.args] field or the
+     * container's [`CMD`](https://docs.docker.com/engine/reference/builder/#cmd),
+     * if either exists. If this field is not specified and the container does not
+     * have an `ENTRYPOINT`, then refer to the Docker documentation about how
+     * `CMD` and `ENTRYPOINT`
+     * [interact](https://tinyurl.com/h3kdcgs).
+     * If you specify this field, then you can also specify the `args` field to
+     * provide additional arguments for this command. However, if you specify this
+     * field, then the container's `CMD` is ignored. See the
+     * [Kubernetes documentation](https://tinyurl.com/y8bvllf4) about how the
+     * `command` and `args` fields interact with a container's `ENTRYPOINT` and
+     * `CMD`.
+     * In this field, you can reference environment variables
+     * [set by AI Platform](https://tinyurl.com/cust-cont-reqs#aip-variables)
+     * and environment variables set in the [env][google.cloud.aiplatform.v1.ModelContainerSpec.env] field.
+     * You cannot reference environment variables set in the Docker image. In
+     * order for environment variables to be expanded, reference them by using the
+     * following syntax:
+     * <code>$(<var>VARIABLE_NAME</var>)</code>
+     * Note that this differs from Bash variable expansion, which does not use
+     * parentheses. If a variable cannot be resolved, the reference in the input
+     * string is used unchanged. To avoid variable expansion, you can escape this
+     * syntax with `$$`; for example:
+     * <code>$$(<var>VARIABLE_NAME</var>)</code>
+     * This field corresponds to the `command` field of the Kubernetes Containers
+     * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+     * 
+ * + * repeated string command = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return A list containing the command. + */ + public com.google.protobuf.ProtocolStringList getCommandList() { + return command_.getUnmodifiableView(); + } + /** + * + * + *
+     * Immutable. Specifies the command that runs when the container starts. This overrides
+     * the container's
+     * [ENTRYPOINT](https://docs.docker.com/engine/reference/builder/#entrypoint).
+     * Specify this field as an array of executable and arguments, similar to a
+     * Docker `ENTRYPOINT`'s "exec" form, not its "shell" form.
+     * If you do not specify this field, then the container's `ENTRYPOINT` runs,
+     * in conjunction with the [args][google.cloud.aiplatform.v1.ModelContainerSpec.args] field or the
+     * container's [`CMD`](https://docs.docker.com/engine/reference/builder/#cmd),
+     * if either exists. If this field is not specified and the container does not
+     * have an `ENTRYPOINT`, then refer to the Docker documentation about how
+     * `CMD` and `ENTRYPOINT`
+     * [interact](https://tinyurl.com/h3kdcgs).
+     * If you specify this field, then you can also specify the `args` field to
+     * provide additional arguments for this command. However, if you specify this
+     * field, then the container's `CMD` is ignored. See the
+     * [Kubernetes documentation](https://tinyurl.com/y8bvllf4) about how the
+     * `command` and `args` fields interact with a container's `ENTRYPOINT` and
+     * `CMD`.
+     * In this field, you can reference environment variables
+     * [set by AI Platform](https://tinyurl.com/cust-cont-reqs#aip-variables)
+     * and environment variables set in the [env][google.cloud.aiplatform.v1.ModelContainerSpec.env] field.
+     * You cannot reference environment variables set in the Docker image. In
+     * order for environment variables to be expanded, reference them by using the
+     * following syntax:
+     * <code>$(<var>VARIABLE_NAME</var>)</code>
+     * Note that this differs from Bash variable expansion, which does not use
+     * parentheses. If a variable cannot be resolved, the reference in the input
+     * string is used unchanged. To avoid variable expansion, you can escape this
+     * syntax with `$$`; for example:
+     * <code>$$(<var>VARIABLE_NAME</var>)</code>
+     * This field corresponds to the `command` field of the Kubernetes Containers
+     * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+     * 
+ * + * repeated string command = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The count of command. + */ + public int getCommandCount() { + return command_.size(); + } + /** + * + * + *
+     * Immutable. Specifies the command that runs when the container starts. This overrides
+     * the container's
+     * [ENTRYPOINT](https://docs.docker.com/engine/reference/builder/#entrypoint).
+     * Specify this field as an array of executable and arguments, similar to a
+     * Docker `ENTRYPOINT`'s "exec" form, not its "shell" form.
+     * If you do not specify this field, then the container's `ENTRYPOINT` runs,
+     * in conjunction with the [args][google.cloud.aiplatform.v1.ModelContainerSpec.args] field or the
+     * container's [`CMD`](https://docs.docker.com/engine/reference/builder/#cmd),
+     * if either exists. If this field is not specified and the container does not
+     * have an `ENTRYPOINT`, then refer to the Docker documentation about how
+     * `CMD` and `ENTRYPOINT`
+     * [interact](https://tinyurl.com/h3kdcgs).
+     * If you specify this field, then you can also specify the `args` field to
+     * provide additional arguments for this command. However, if you specify this
+     * field, then the container's `CMD` is ignored. See the
+     * [Kubernetes documentation](https://tinyurl.com/y8bvllf4) about how the
+     * `command` and `args` fields interact with a container's `ENTRYPOINT` and
+     * `CMD`.
+     * In this field, you can reference environment variables
+     * [set by AI Platform](https://tinyurl.com/cust-cont-reqs#aip-variables)
+     * and environment variables set in the [env][google.cloud.aiplatform.v1.ModelContainerSpec.env] field.
+     * You cannot reference environment variables set in the Docker image. In
+     * order for environment variables to be expanded, reference them by using the
+     * following syntax:
+     * <code>$(<var>VARIABLE_NAME</var>)</code>
+     * Note that this differs from Bash variable expansion, which does not use
+     * parentheses. If a variable cannot be resolved, the reference in the input
+     * string is used unchanged. To avoid variable expansion, you can escape this
+     * syntax with `$$`; for example:
+     * <code>$$(<var>VARIABLE_NAME</var>)</code>
+     * This field corresponds to the `command` field of the Kubernetes Containers
+     * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+     * 
+ * + * repeated string command = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param index The index of the element to return. + * @return The command at the given index. + */ + public java.lang.String getCommand(int index) { + return command_.get(index); + } + /** + * + * + *
+     * Immutable. Specifies the command that runs when the container starts. This overrides
+     * the container's
+     * [ENTRYPOINT](https://docs.docker.com/engine/reference/builder/#entrypoint).
+     * Specify this field as an array of executable and arguments, similar to a
+     * Docker `ENTRYPOINT`'s "exec" form, not its "shell" form.
+     * If you do not specify this field, then the container's `ENTRYPOINT` runs,
+     * in conjunction with the [args][google.cloud.aiplatform.v1.ModelContainerSpec.args] field or the
+     * container's [`CMD`](https://docs.docker.com/engine/reference/builder/#cmd),
+     * if either exists. If this field is not specified and the container does not
+     * have an `ENTRYPOINT`, then refer to the Docker documentation about how
+     * `CMD` and `ENTRYPOINT`
+     * [interact](https://tinyurl.com/h3kdcgs).
+     * If you specify this field, then you can also specify the `args` field to
+     * provide additional arguments for this command. However, if you specify this
+     * field, then the container's `CMD` is ignored. See the
+     * [Kubernetes documentation](https://tinyurl.com/y8bvllf4) about how the
+     * `command` and `args` fields interact with a container's `ENTRYPOINT` and
+     * `CMD`.
+     * In this field, you can reference environment variables
+     * [set by AI Platform](https://tinyurl.com/cust-cont-reqs#aip-variables)
+     * and environment variables set in the [env][google.cloud.aiplatform.v1.ModelContainerSpec.env] field.
+     * You cannot reference environment variables set in the Docker image. In
+     * order for environment variables to be expanded, reference them by using the
+     * following syntax:
+     * <code>$(<var>VARIABLE_NAME</var>)</code>
+     * Note that this differs from Bash variable expansion, which does not use
+     * parentheses. If a variable cannot be resolved, the reference in the input
+     * string is used unchanged. To avoid variable expansion, you can escape this
+     * syntax with `$$`; for example:
+     * <code>$$(<var>VARIABLE_NAME</var>)</code>
+     * This field corresponds to the `command` field of the Kubernetes Containers
+     * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+     * 
+ * + * repeated string command = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param index The index of the value to return. + * @return The bytes of the command at the given index. + */ + public com.google.protobuf.ByteString getCommandBytes(int index) { + return command_.getByteString(index); + } + /** + * + * + *
+     * Immutable. Specifies the command that runs when the container starts. This overrides
+     * the container's
+     * [ENTRYPOINT](https://docs.docker.com/engine/reference/builder/#entrypoint).
+     * Specify this field as an array of executable and arguments, similar to a
+     * Docker `ENTRYPOINT`'s "exec" form, not its "shell" form.
+     * If you do not specify this field, then the container's `ENTRYPOINT` runs,
+     * in conjunction with the [args][google.cloud.aiplatform.v1.ModelContainerSpec.args] field or the
+     * container's [`CMD`](https://docs.docker.com/engine/reference/builder/#cmd),
+     * if either exists. If this field is not specified and the container does not
+     * have an `ENTRYPOINT`, then refer to the Docker documentation about how
+     * `CMD` and `ENTRYPOINT`
+     * [interact](https://tinyurl.com/h3kdcgs).
+     * If you specify this field, then you can also specify the `args` field to
+     * provide additional arguments for this command. However, if you specify this
+     * field, then the container's `CMD` is ignored. See the
+     * [Kubernetes documentation](https://tinyurl.com/y8bvllf4) about how the
+     * `command` and `args` fields interact with a container's `ENTRYPOINT` and
+     * `CMD`.
+     * In this field, you can reference environment variables
+     * [set by AI Platform](https://tinyurl.com/cust-cont-reqs#aip-variables)
+     * and environment variables set in the [env][google.cloud.aiplatform.v1.ModelContainerSpec.env] field.
+     * You cannot reference environment variables set in the Docker image. In
+     * order for environment variables to be expanded, reference them by using the
+     * following syntax:
+     * <code>$(<var>VARIABLE_NAME</var>)</code>
+     * Note that this differs from Bash variable expansion, which does not use
+     * parentheses. If a variable cannot be resolved, the reference in the input
+     * string is used unchanged. To avoid variable expansion, you can escape this
+     * syntax with `$$`; for example:
+     * <code>$$(<var>VARIABLE_NAME</var>)</code>
+     * This field corresponds to the `command` field of the Kubernetes Containers
+     * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+     * 
+ * + * repeated string command = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param index The index to set the value at. + * @param value The command to set. + * @return This builder for chaining. + */ + public Builder setCommand(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureCommandIsMutable(); + command_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. Specifies the command that runs when the container starts. This overrides
+     * the container's
+     * [ENTRYPOINT](https://docs.docker.com/engine/reference/builder/#entrypoint).
+     * Specify this field as an array of executable and arguments, similar to a
+     * Docker `ENTRYPOINT`'s "exec" form, not its "shell" form.
+     * If you do not specify this field, then the container's `ENTRYPOINT` runs,
+     * in conjunction with the [args][google.cloud.aiplatform.v1.ModelContainerSpec.args] field or the
+     * container's [`CMD`](https://docs.docker.com/engine/reference/builder/#cmd),
+     * if either exists. If this field is not specified and the container does not
+     * have an `ENTRYPOINT`, then refer to the Docker documentation about how
+     * `CMD` and `ENTRYPOINT`
+     * [interact](https://tinyurl.com/h3kdcgs).
+     * If you specify this field, then you can also specify the `args` field to
+     * provide additional arguments for this command. However, if you specify this
+     * field, then the container's `CMD` is ignored. See the
+     * [Kubernetes documentation](https://tinyurl.com/y8bvllf4) about how the
+     * `command` and `args` fields interact with a container's `ENTRYPOINT` and
+     * `CMD`.
+     * In this field, you can reference environment variables
+     * [set by AI Platform](https://tinyurl.com/cust-cont-reqs#aip-variables)
+     * and environment variables set in the [env][google.cloud.aiplatform.v1.ModelContainerSpec.env] field.
+     * You cannot reference environment variables set in the Docker image. In
+     * order for environment variables to be expanded, reference them by using the
+     * following syntax:
+     * <code>$(<var>VARIABLE_NAME</var>)</code>
+     * Note that this differs from Bash variable expansion, which does not use
+     * parentheses. If a variable cannot be resolved, the reference in the input
+     * string is used unchanged. To avoid variable expansion, you can escape this
+     * syntax with `$$`; for example:
+     * <code>$$(<var>VARIABLE_NAME</var>)</code>
+     * This field corresponds to the `command` field of the Kubernetes Containers
+     * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+     * 
+ * + * repeated string command = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The command to add. + * @return This builder for chaining. + */ + public Builder addCommand(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureCommandIsMutable(); + command_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. Specifies the command that runs when the container starts. This overrides
+     * the container's
+     * [ENTRYPOINT](https://docs.docker.com/engine/reference/builder/#entrypoint).
+     * Specify this field as an array of executable and arguments, similar to a
+     * Docker `ENTRYPOINT`'s "exec" form, not its "shell" form.
+     * If you do not specify this field, then the container's `ENTRYPOINT` runs,
+     * in conjunction with the [args][google.cloud.aiplatform.v1.ModelContainerSpec.args] field or the
+     * container's [`CMD`](https://docs.docker.com/engine/reference/builder/#cmd),
+     * if either exists. If this field is not specified and the container does not
+     * have an `ENTRYPOINT`, then refer to the Docker documentation about how
+     * `CMD` and `ENTRYPOINT`
+     * [interact](https://tinyurl.com/h3kdcgs).
+     * If you specify this field, then you can also specify the `args` field to
+     * provide additional arguments for this command. However, if you specify this
+     * field, then the container's `CMD` is ignored. See the
+     * [Kubernetes documentation](https://tinyurl.com/y8bvllf4) about how the
+     * `command` and `args` fields interact with a container's `ENTRYPOINT` and
+     * `CMD`.
+     * In this field, you can reference environment variables
+     * [set by AI Platform](https://tinyurl.com/cust-cont-reqs#aip-variables)
+     * and environment variables set in the [env][google.cloud.aiplatform.v1.ModelContainerSpec.env] field.
+     * You cannot reference environment variables set in the Docker image. In
+     * order for environment variables to be expanded, reference them by using the
+     * following syntax:
+     * <code>$(<var>VARIABLE_NAME</var>)</code>
+     * Note that this differs from Bash variable expansion, which does not use
+     * parentheses. If a variable cannot be resolved, the reference in the input
+     * string is used unchanged. To avoid variable expansion, you can escape this
+     * syntax with `$$`; for example:
+     * <code>$$(<var>VARIABLE_NAME</var>)</code>
+     * This field corresponds to the `command` field of the Kubernetes Containers
+     * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+     * 
+ * + * repeated string command = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param values The command to add. + * @return This builder for chaining. + */ + public Builder addAllCommand(java.lang.Iterable values) { + ensureCommandIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, command_); + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. Specifies the command that runs when the container starts. This overrides
+     * the container's
+     * [ENTRYPOINT](https://docs.docker.com/engine/reference/builder/#entrypoint).
+     * Specify this field as an array of executable and arguments, similar to a
+     * Docker `ENTRYPOINT`'s "exec" form, not its "shell" form.
+     * If you do not specify this field, then the container's `ENTRYPOINT` runs,
+     * in conjunction with the [args][google.cloud.aiplatform.v1.ModelContainerSpec.args] field or the
+     * container's [`CMD`](https://docs.docker.com/engine/reference/builder/#cmd),
+     * if either exists. If this field is not specified and the container does not
+     * have an `ENTRYPOINT`, then refer to the Docker documentation about how
+     * `CMD` and `ENTRYPOINT`
+     * [interact](https://tinyurl.com/h3kdcgs).
+     * If you specify this field, then you can also specify the `args` field to
+     * provide additional arguments for this command. However, if you specify this
+     * field, then the container's `CMD` is ignored. See the
+     * [Kubernetes documentation](https://tinyurl.com/y8bvllf4) about how the
+     * `command` and `args` fields interact with a container's `ENTRYPOINT` and
+     * `CMD`.
+     * In this field, you can reference environment variables
+     * [set by AI Platform](https://tinyurl.com/cust-cont-reqs#aip-variables)
+     * and environment variables set in the [env][google.cloud.aiplatform.v1.ModelContainerSpec.env] field.
+     * You cannot reference environment variables set in the Docker image. In
+     * order for environment variables to be expanded, reference them by using the
+     * following syntax:
+     * <code>$(<var>VARIABLE_NAME</var>)</code>
+     * Note that this differs from Bash variable expansion, which does not use
+     * parentheses. If a variable cannot be resolved, the reference in the input
+     * string is used unchanged. To avoid variable expansion, you can escape this
+     * syntax with `$$`; for example:
+     * <code>$$(<var>VARIABLE_NAME</var>)</code>
+     * This field corresponds to the `command` field of the Kubernetes Containers
+     * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+     * 
+ * + * repeated string command = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearCommand() { + command_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. Specifies the command that runs when the container starts. This overrides
+     * the container's
+     * [ENTRYPOINT](https://docs.docker.com/engine/reference/builder/#entrypoint).
+     * Specify this field as an array of executable and arguments, similar to a
+     * Docker `ENTRYPOINT`'s "exec" form, not its "shell" form.
+     * If you do not specify this field, then the container's `ENTRYPOINT` runs,
+     * in conjunction with the [args][google.cloud.aiplatform.v1.ModelContainerSpec.args] field or the
+     * container's [`CMD`](https://docs.docker.com/engine/reference/builder/#cmd),
+     * if either exists. If this field is not specified and the container does not
+     * have an `ENTRYPOINT`, then refer to the Docker documentation about how
+     * `CMD` and `ENTRYPOINT`
+     * [interact](https://tinyurl.com/h3kdcgs).
+     * If you specify this field, then you can also specify the `args` field to
+     * provide additional arguments for this command. However, if you specify this
+     * field, then the container's `CMD` is ignored. See the
+     * [Kubernetes documentation](https://tinyurl.com/y8bvllf4) about how the
+     * `command` and `args` fields interact with a container's `ENTRYPOINT` and
+     * `CMD`.
+     * In this field, you can reference environment variables
+     * [set by AI Platform](https://tinyurl.com/cust-cont-reqs#aip-variables)
+     * and environment variables set in the [env][google.cloud.aiplatform.v1.ModelContainerSpec.env] field.
+     * You cannot reference environment variables set in the Docker image. In
+     * order for environment variables to be expanded, reference them by using the
+     * following syntax:
+     * <code>$(<var>VARIABLE_NAME</var>)</code>
+     * Note that this differs from Bash variable expansion, which does not use
+     * parentheses. If a variable cannot be resolved, the reference in the input
+     * string is used unchanged. To avoid variable expansion, you can escape this
+     * syntax with `$$`; for example:
+     * <code>$$(<var>VARIABLE_NAME</var>)</code>
+     * This field corresponds to the `command` field of the Kubernetes Containers
+     * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+     * 
+ * + * repeated string command = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The bytes of the command to add. + * @return This builder for chaining. + */ + public Builder addCommandBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureCommandIsMutable(); + command_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList args_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureArgsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + args_ = new com.google.protobuf.LazyStringArrayList(args_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+     * Immutable. Specifies arguments for the command that runs when the container starts.
+     * This overrides the container's
+     * [`CMD`](https://docs.docker.com/engine/reference/builder/#cmd). Specify
+     * this field as an array of executable and arguments, similar to a Docker
+     * `CMD`'s "default parameters" form.
+     * If you don't specify this field but do specify the
+     * [command][google.cloud.aiplatform.v1.ModelContainerSpec.command] field, then the command from the
+     * `command` field runs without any additional arguments. See the
+     * [Kubernetes documentation](https://tinyurl.com/y8bvllf4) about how the
+     * `command` and `args` fields interact with a container's `ENTRYPOINT` and
+     * `CMD`.
+     * If you don't specify this field and don't specify the `command` field,
+     * then the container's
+     * [`ENTRYPOINT`](https://docs.docker.com/engine/reference/builder/#cmd) and
+     * `CMD` determine what runs based on their default behavior. See the Docker
+     * documentation about how `CMD` and `ENTRYPOINT`
+     * [interact](https://tinyurl.com/h3kdcgs).
+     * In this field, you can reference environment variables
+     * [set by AI Platform](https://tinyurl.com/cust-cont-reqs#aip-variables)
+     * and environment variables set in the [env][google.cloud.aiplatform.v1.ModelContainerSpec.env] field.
+     * You cannot reference environment variables set in the Docker image. In
+     * order for environment variables to be expanded, reference them by using the
+     * following syntax:
+     * <code>$(<var>VARIABLE_NAME</var>)</code>
+     * Note that this differs from Bash variable expansion, which does not use
+     * parentheses. If a variable cannot be resolved, the reference in the input
+     * string is used unchanged. To avoid variable expansion, you can escape this
+     * syntax with `$$`; for example:
+     * <code>$$(<var>VARIABLE_NAME</var>)</code>
+     * This field corresponds to the `args` field of the Kubernetes Containers
+     * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+     * 
+ * + * repeated string args = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return A list containing the args. + */ + public com.google.protobuf.ProtocolStringList getArgsList() { + return args_.getUnmodifiableView(); + } + /** + * + * + *
+     * Immutable. Specifies arguments for the command that runs when the container starts.
+     * This overrides the container's
+     * [`CMD`](https://docs.docker.com/engine/reference/builder/#cmd). Specify
+     * this field as an array of executable and arguments, similar to a Docker
+     * `CMD`'s "default parameters" form.
+     * If you don't specify this field but do specify the
+     * [command][google.cloud.aiplatform.v1.ModelContainerSpec.command] field, then the command from the
+     * `command` field runs without any additional arguments. See the
+     * [Kubernetes documentation](https://tinyurl.com/y8bvllf4) about how the
+     * `command` and `args` fields interact with a container's `ENTRYPOINT` and
+     * `CMD`.
+     * If you don't specify this field and don't specify the `command` field,
+     * then the container's
+     * [`ENTRYPOINT`](https://docs.docker.com/engine/reference/builder/#cmd) and
+     * `CMD` determine what runs based on their default behavior. See the Docker
+     * documentation about how `CMD` and `ENTRYPOINT`
+     * [interact](https://tinyurl.com/h3kdcgs).
+     * In this field, you can reference environment variables
+     * [set by AI Platform](https://tinyurl.com/cust-cont-reqs#aip-variables)
+     * and environment variables set in the [env][google.cloud.aiplatform.v1.ModelContainerSpec.env] field.
+     * You cannot reference environment variables set in the Docker image. In
+     * order for environment variables to be expanded, reference them by using the
+     * following syntax:
+     * <code>$(<var>VARIABLE_NAME</var>)</code>
+     * Note that this differs from Bash variable expansion, which does not use
+     * parentheses. If a variable cannot be resolved, the reference in the input
+     * string is used unchanged. To avoid variable expansion, you can escape this
+     * syntax with `$$`; for example:
+     * <code>$$(<var>VARIABLE_NAME</var>)</code>
+     * This field corresponds to the `args` field of the Kubernetes Containers
+     * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+     * 
+ * + * repeated string args = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The count of args. + */ + public int getArgsCount() { + return args_.size(); + } + /** + * + * + *
+     * Immutable. Specifies arguments for the command that runs when the container starts.
+     * This overrides the container's
+     * [`CMD`](https://docs.docker.com/engine/reference/builder/#cmd). Specify
+     * this field as an array of executable and arguments, similar to a Docker
+     * `CMD`'s "default parameters" form.
+     * If you don't specify this field but do specify the
+     * [command][google.cloud.aiplatform.v1.ModelContainerSpec.command] field, then the command from the
+     * `command` field runs without any additional arguments. See the
+     * [Kubernetes documentation](https://tinyurl.com/y8bvllf4) about how the
+     * `command` and `args` fields interact with a container's `ENTRYPOINT` and
+     * `CMD`.
+     * If you don't specify this field and don't specify the `command` field,
+     * then the container's
+     * [`ENTRYPOINT`](https://docs.docker.com/engine/reference/builder/#cmd) and
+     * `CMD` determine what runs based on their default behavior. See the Docker
+     * documentation about how `CMD` and `ENTRYPOINT`
+     * [interact](https://tinyurl.com/h3kdcgs).
+     * In this field, you can reference environment variables
+     * [set by AI Platform](https://tinyurl.com/cust-cont-reqs#aip-variables)
+     * and environment variables set in the [env][google.cloud.aiplatform.v1.ModelContainerSpec.env] field.
+     * You cannot reference environment variables set in the Docker image. In
+     * order for environment variables to be expanded, reference them by using the
+     * following syntax:
+     * <code>$(<var>VARIABLE_NAME</var>)</code>
+     * Note that this differs from Bash variable expansion, which does not use
+     * parentheses. If a variable cannot be resolved, the reference in the input
+     * string is used unchanged. To avoid variable expansion, you can escape this
+     * syntax with `$$`; for example:
+     * <code>$$(<var>VARIABLE_NAME</var>)</code>
+     * This field corresponds to the `args` field of the Kubernetes Containers
+     * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+     * 
+ * + * repeated string args = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param index The index of the element to return. + * @return The args at the given index. + */ + public java.lang.String getArgs(int index) { + return args_.get(index); + } + /** + * + * + *
+     * Immutable. Specifies arguments for the command that runs when the container starts.
+     * This overrides the container's
+     * [`CMD`](https://docs.docker.com/engine/reference/builder/#cmd). Specify
+     * this field as an array of executable and arguments, similar to a Docker
+     * `CMD`'s "default parameters" form.
+     * If you don't specify this field but do specify the
+     * [command][google.cloud.aiplatform.v1.ModelContainerSpec.command] field, then the command from the
+     * `command` field runs without any additional arguments. See the
+     * [Kubernetes documentation](https://tinyurl.com/y8bvllf4) about how the
+     * `command` and `args` fields interact with a container's `ENTRYPOINT` and
+     * `CMD`.
+     * If you don't specify this field and don't specify the `command` field,
+     * then the container's
+     * [`ENTRYPOINT`](https://docs.docker.com/engine/reference/builder/#cmd) and
+     * `CMD` determine what runs based on their default behavior. See the Docker
+     * documentation about how `CMD` and `ENTRYPOINT`
+     * [interact](https://tinyurl.com/h3kdcgs).
+     * In this field, you can reference environment variables
+     * [set by AI Platform](https://tinyurl.com/cust-cont-reqs#aip-variables)
+     * and environment variables set in the [env][google.cloud.aiplatform.v1.ModelContainerSpec.env] field.
+     * You cannot reference environment variables set in the Docker image. In
+     * order for environment variables to be expanded, reference them by using the
+     * following syntax:
+     * <code>$(<var>VARIABLE_NAME</var>)</code>
+     * Note that this differs from Bash variable expansion, which does not use
+     * parentheses. If a variable cannot be resolved, the reference in the input
+     * string is used unchanged. To avoid variable expansion, you can escape this
+     * syntax with `$$`; for example:
+     * <code>$$(<var>VARIABLE_NAME</var>)</code>
+     * This field corresponds to the `args` field of the Kubernetes Containers
+     * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+     * 
+ * + * repeated string args = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param index The index of the value to return. + * @return The bytes of the args at the given index. + */ + public com.google.protobuf.ByteString getArgsBytes(int index) { + return args_.getByteString(index); + } + /** + * + * + *
+     * Immutable. Specifies arguments for the command that runs when the container starts.
+     * This overrides the container's
+     * [`CMD`](https://docs.docker.com/engine/reference/builder/#cmd). Specify
+     * this field as an array of executable and arguments, similar to a Docker
+     * `CMD`'s "default parameters" form.
+     * If you don't specify this field but do specify the
+     * [command][google.cloud.aiplatform.v1.ModelContainerSpec.command] field, then the command from the
+     * `command` field runs without any additional arguments. See the
+     * [Kubernetes documentation](https://tinyurl.com/y8bvllf4) about how the
+     * `command` and `args` fields interact with a container's `ENTRYPOINT` and
+     * `CMD`.
+     * If you don't specify this field and don't specify the `command` field,
+     * then the container's
+     * [`ENTRYPOINT`](https://docs.docker.com/engine/reference/builder/#cmd) and
+     * `CMD` determine what runs based on their default behavior. See the Docker
+     * documentation about how `CMD` and `ENTRYPOINT`
+     * [interact](https://tinyurl.com/h3kdcgs).
+     * In this field, you can reference environment variables
+     * [set by AI Platform](https://tinyurl.com/cust-cont-reqs#aip-variables)
+     * and environment variables set in the [env][google.cloud.aiplatform.v1.ModelContainerSpec.env] field.
+     * You cannot reference environment variables set in the Docker image. In
+     * order for environment variables to be expanded, reference them by using the
+     * following syntax:
+     * <code>$(<var>VARIABLE_NAME</var>)</code>
+     * Note that this differs from Bash variable expansion, which does not use
+     * parentheses. If a variable cannot be resolved, the reference in the input
+     * string is used unchanged. To avoid variable expansion, you can escape this
+     * syntax with `$$`; for example:
+     * <code>$$(<var>VARIABLE_NAME</var>)</code>
+     * This field corresponds to the `args` field of the Kubernetes Containers
+     * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+     * 
+ * + * repeated string args = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param index The index to set the value at. + * @param value The args to set. + * @return This builder for chaining. + */ + public Builder setArgs(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureArgsIsMutable(); + args_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. Specifies arguments for the command that runs when the container starts.
+     * This overrides the container's
+     * [`CMD`](https://docs.docker.com/engine/reference/builder/#cmd). Specify
+     * this field as an array of executable and arguments, similar to a Docker
+     * `CMD`'s "default parameters" form.
+     * If you don't specify this field but do specify the
+     * [command][google.cloud.aiplatform.v1.ModelContainerSpec.command] field, then the command from the
+     * `command` field runs without any additional arguments. See the
+     * [Kubernetes documentation](https://tinyurl.com/y8bvllf4) about how the
+     * `command` and `args` fields interact with a container's `ENTRYPOINT` and
+     * `CMD`.
+     * If you don't specify this field and don't specify the `command` field,
+     * then the container's
+     * [`ENTRYPOINT`](https://docs.docker.com/engine/reference/builder/#cmd) and
+     * `CMD` determine what runs based on their default behavior. See the Docker
+     * documentation about how `CMD` and `ENTRYPOINT`
+     * [interact](https://tinyurl.com/h3kdcgs).
+     * In this field, you can reference environment variables
+     * [set by AI Platform](https://tinyurl.com/cust-cont-reqs#aip-variables)
+     * and environment variables set in the [env][google.cloud.aiplatform.v1.ModelContainerSpec.env] field.
+     * You cannot reference environment variables set in the Docker image. In
+     * order for environment variables to be expanded, reference them by using the
+     * following syntax:
+     * <code>$(<var>VARIABLE_NAME</var>)</code>
+     * Note that this differs from Bash variable expansion, which does not use
+     * parentheses. If a variable cannot be resolved, the reference in the input
+     * string is used unchanged. To avoid variable expansion, you can escape this
+     * syntax with `$$`; for example:
+     * <code>$$(<var>VARIABLE_NAME</var>)</code>
+     * This field corresponds to the `args` field of the Kubernetes Containers
+     * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+     * 
+ * + * repeated string args = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The args to add. + * @return This builder for chaining. + */ + public Builder addArgs(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureArgsIsMutable(); + args_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. Specifies arguments for the command that runs when the container starts.
+     * This overrides the container's
+     * [`CMD`](https://docs.docker.com/engine/reference/builder/#cmd). Specify
+     * this field as an array of executable and arguments, similar to a Docker
+     * `CMD`'s "default parameters" form.
+     * If you don't specify this field but do specify the
+     * [command][google.cloud.aiplatform.v1.ModelContainerSpec.command] field, then the command from the
+     * `command` field runs without any additional arguments. See the
+     * [Kubernetes documentation](https://tinyurl.com/y8bvllf4) about how the
+     * `command` and `args` fields interact with a container's `ENTRYPOINT` and
+     * `CMD`.
+     * If you don't specify this field and don't specify the `command` field,
+     * then the container's
+     * [`ENTRYPOINT`](https://docs.docker.com/engine/reference/builder/#cmd) and
+     * `CMD` determine what runs based on their default behavior. See the Docker
+     * documentation about how `CMD` and `ENTRYPOINT`
+     * [interact](https://tinyurl.com/h3kdcgs).
+     * In this field, you can reference environment variables
+     * [set by AI Platform](https://tinyurl.com/cust-cont-reqs#aip-variables)
+     * and environment variables set in the [env][google.cloud.aiplatform.v1.ModelContainerSpec.env] field.
+     * You cannot reference environment variables set in the Docker image. In
+     * order for environment variables to be expanded, reference them by using the
+     * following syntax:
+     * <code>$(<var>VARIABLE_NAME</var>)</code>
+     * Note that this differs from Bash variable expansion, which does not use
+     * parentheses. If a variable cannot be resolved, the reference in the input
+     * string is used unchanged. To avoid variable expansion, you can escape this
+     * syntax with `$$`; for example:
+     * <code>$$(<var>VARIABLE_NAME</var>)</code>
+     * This field corresponds to the `args` field of the Kubernetes Containers
+     * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+     * 
+ * + * repeated string args = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param values The args to add. + * @return This builder for chaining. + */ + public Builder addAllArgs(java.lang.Iterable values) { + ensureArgsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, args_); + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. Specifies arguments for the command that runs when the container starts.
+     * This overrides the container's
+     * [`CMD`](https://docs.docker.com/engine/reference/builder/#cmd). Specify
+     * this field as an array of executable and arguments, similar to a Docker
+     * `CMD`'s "default parameters" form.
+     * If you don't specify this field but do specify the
+     * [command][google.cloud.aiplatform.v1.ModelContainerSpec.command] field, then the command from the
+     * `command` field runs without any additional arguments. See the
+     * [Kubernetes documentation](https://tinyurl.com/y8bvllf4) about how the
+     * `command` and `args` fields interact with a container's `ENTRYPOINT` and
+     * `CMD`.
+     * If you don't specify this field and don't specify the `command` field,
+     * then the container's
+     * [`ENTRYPOINT`](https://docs.docker.com/engine/reference/builder/#cmd) and
+     * `CMD` determine what runs based on their default behavior. See the Docker
+     * documentation about how `CMD` and `ENTRYPOINT`
+     * [interact](https://tinyurl.com/h3kdcgs).
+     * In this field, you can reference environment variables
+     * [set by AI Platform](https://tinyurl.com/cust-cont-reqs#aip-variables)
+     * and environment variables set in the [env][google.cloud.aiplatform.v1.ModelContainerSpec.env] field.
+     * You cannot reference environment variables set in the Docker image. In
+     * order for environment variables to be expanded, reference them by using the
+     * following syntax:
+     * <code>$(<var>VARIABLE_NAME</var>)</code>
+     * Note that this differs from Bash variable expansion, which does not use
+     * parentheses. If a variable cannot be resolved, the reference in the input
+     * string is used unchanged. To avoid variable expansion, you can escape this
+     * syntax with `$$`; for example:
+     * <code>$$(<var>VARIABLE_NAME</var>)</code>
+     * This field corresponds to the `args` field of the Kubernetes Containers
+     * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+     * 
+ * + * repeated string args = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearArgs() { + args_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. Specifies arguments for the command that runs when the container starts.
+     * This overrides the container's
+     * [`CMD`](https://docs.docker.com/engine/reference/builder/#cmd). Specify
+     * this field as an array of executable and arguments, similar to a Docker
+     * `CMD`'s "default parameters" form.
+     * If you don't specify this field but do specify the
+     * [command][google.cloud.aiplatform.v1.ModelContainerSpec.command] field, then the command from the
+     * `command` field runs without any additional arguments. See the
+     * [Kubernetes documentation](https://tinyurl.com/y8bvllf4) about how the
+     * `command` and `args` fields interact with a container's `ENTRYPOINT` and
+     * `CMD`.
+     * If you don't specify this field and don't specify the `command` field,
+     * then the container's
+     * [`ENTRYPOINT`](https://docs.docker.com/engine/reference/builder/#cmd) and
+     * `CMD` determine what runs based on their default behavior. See the Docker
+     * documentation about how `CMD` and `ENTRYPOINT`
+     * [interact](https://tinyurl.com/h3kdcgs).
+     * In this field, you can reference environment variables
+     * [set by AI Platform](https://tinyurl.com/cust-cont-reqs#aip-variables)
+     * and environment variables set in the [env][google.cloud.aiplatform.v1.ModelContainerSpec.env] field.
+     * You cannot reference environment variables set in the Docker image. In
+     * order for environment variables to be expanded, reference them by using the
+     * following syntax:
+     * <code>$(<var>VARIABLE_NAME</var>)</code>
+     * Note that this differs from Bash variable expansion, which does not use
+     * parentheses. If a variable cannot be resolved, the reference in the input
+     * string is used unchanged. To avoid variable expansion, you can escape this
+     * syntax with `$$`; for example:
+     * <code>$$(<var>VARIABLE_NAME</var>)</code>
+     * This field corresponds to the `args` field of the Kubernetes Containers
+     * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+     * 
+ * + * repeated string args = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The bytes of the args to add. + * @return This builder for chaining. + */ + public Builder addArgsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureArgsIsMutable(); + args_.add(value); + onChanged(); + return this; + } + + private java.util.List env_ = + java.util.Collections.emptyList(); + + private void ensureEnvIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + env_ = new java.util.ArrayList(env_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.EnvVar, + com.google.cloud.aiplatform.v1.EnvVar.Builder, + com.google.cloud.aiplatform.v1.EnvVarOrBuilder> + envBuilder_; + + /** + * + * + *
+     * Immutable. List of environment variables to set in the container. After the container
+     * starts running, code running in the container can read these environment
+     * variables.
+     * Additionally, the [command][google.cloud.aiplatform.v1.ModelContainerSpec.command] and
+     * [args][google.cloud.aiplatform.v1.ModelContainerSpec.args] fields can reference these variables. Later
+     * entries in this list can also reference earlier entries. For example, the
+     * following example sets the variable `VAR_2` to have the value `foo bar`:
+     * ```json
+     * [
+     *   {
+     *     "name": "VAR_1",
+     *     "value": "foo"
+     *   },
+     *   {
+     *     "name": "VAR_2",
+     *     "value": "$(VAR_1) bar"
+     *   }
+     * ]
+     * ```
+     * If you switch the order of the variables in the example, then the expansion
+     * does not occur.
+     * This field corresponds to the `env` field of the Kubernetes Containers
+     * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public java.util.List getEnvList() { + if (envBuilder_ == null) { + return java.util.Collections.unmodifiableList(env_); + } else { + return envBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Immutable. List of environment variables to set in the container. After the container
+     * starts running, code running in the container can read these environment
+     * variables.
+     * Additionally, the [command][google.cloud.aiplatform.v1.ModelContainerSpec.command] and
+     * [args][google.cloud.aiplatform.v1.ModelContainerSpec.args] fields can reference these variables. Later
+     * entries in this list can also reference earlier entries. For example, the
+     * following example sets the variable `VAR_2` to have the value `foo bar`:
+     * ```json
+     * [
+     *   {
+     *     "name": "VAR_1",
+     *     "value": "foo"
+     *   },
+     *   {
+     *     "name": "VAR_2",
+     *     "value": "$(VAR_1) bar"
+     *   }
+     * ]
+     * ```
+     * If you switch the order of the variables in the example, then the expansion
+     * does not occur.
+     * This field corresponds to the `env` field of the Kubernetes Containers
+     * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public int getEnvCount() { + if (envBuilder_ == null) { + return env_.size(); + } else { + return envBuilder_.getCount(); + } + } + /** + * + * + *
+     * Immutable. List of environment variables to set in the container. After the container
+     * starts running, code running in the container can read these environment
+     * variables.
+     * Additionally, the [command][google.cloud.aiplatform.v1.ModelContainerSpec.command] and
+     * [args][google.cloud.aiplatform.v1.ModelContainerSpec.args] fields can reference these variables. Later
+     * entries in this list can also reference earlier entries. For example, the
+     * following example sets the variable `VAR_2` to have the value `foo bar`:
+     * ```json
+     * [
+     *   {
+     *     "name": "VAR_1",
+     *     "value": "foo"
+     *   },
+     *   {
+     *     "name": "VAR_2",
+     *     "value": "$(VAR_1) bar"
+     *   }
+     * ]
+     * ```
+     * If you switch the order of the variables in the example, then the expansion
+     * does not occur.
+     * This field corresponds to the `env` field of the Kubernetes Containers
+     * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public com.google.cloud.aiplatform.v1.EnvVar getEnv(int index) { + if (envBuilder_ == null) { + return env_.get(index); + } else { + return envBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Immutable. List of environment variables to set in the container. After the container
+     * starts running, code running in the container can read these environment
+     * variables.
+     * Additionally, the [command][google.cloud.aiplatform.v1.ModelContainerSpec.command] and
+     * [args][google.cloud.aiplatform.v1.ModelContainerSpec.args] fields can reference these variables. Later
+     * entries in this list can also reference earlier entries. For example, the
+     * following example sets the variable `VAR_2` to have the value `foo bar`:
+     * ```json
+     * [
+     *   {
+     *     "name": "VAR_1",
+     *     "value": "foo"
+     *   },
+     *   {
+     *     "name": "VAR_2",
+     *     "value": "$(VAR_1) bar"
+     *   }
+     * ]
+     * ```
+     * If you switch the order of the variables in the example, then the expansion
+     * does not occur.
+     * This field corresponds to the `env` field of the Kubernetes Containers
+     * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder setEnv(int index, com.google.cloud.aiplatform.v1.EnvVar value) { + if (envBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEnvIsMutable(); + env_.set(index, value); + onChanged(); + } else { + envBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Immutable. List of environment variables to set in the container. After the container
+     * starts running, code running in the container can read these environment
+     * variables.
+     * Additionally, the [command][google.cloud.aiplatform.v1.ModelContainerSpec.command] and
+     * [args][google.cloud.aiplatform.v1.ModelContainerSpec.args] fields can reference these variables. Later
+     * entries in this list can also reference earlier entries. For example, the
+     * following example sets the variable `VAR_2` to have the value `foo bar`:
+     * ```json
+     * [
+     *   {
+     *     "name": "VAR_1",
+     *     "value": "foo"
+     *   },
+     *   {
+     *     "name": "VAR_2",
+     *     "value": "$(VAR_1) bar"
+     *   }
+     * ]
+     * ```
+     * If you switch the order of the variables in the example, then the expansion
+     * does not occur.
+     * This field corresponds to the `env` field of the Kubernetes Containers
+     * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder setEnv( + int index, com.google.cloud.aiplatform.v1.EnvVar.Builder builderForValue) { + if (envBuilder_ == null) { + ensureEnvIsMutable(); + env_.set(index, builderForValue.build()); + onChanged(); + } else { + envBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Immutable. List of environment variables to set in the container. After the container
+     * starts running, code running in the container can read these environment
+     * variables.
+     * Additionally, the [command][google.cloud.aiplatform.v1.ModelContainerSpec.command] and
+     * [args][google.cloud.aiplatform.v1.ModelContainerSpec.args] fields can reference these variables. Later
+     * entries in this list can also reference earlier entries. For example, the
+     * following example sets the variable `VAR_2` to have the value `foo bar`:
+     * ```json
+     * [
+     *   {
+     *     "name": "VAR_1",
+     *     "value": "foo"
+     *   },
+     *   {
+     *     "name": "VAR_2",
+     *     "value": "$(VAR_1) bar"
+     *   }
+     * ]
+     * ```
+     * If you switch the order of the variables in the example, then the expansion
+     * does not occur.
+     * This field corresponds to the `env` field of the Kubernetes Containers
+     * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder addEnv(com.google.cloud.aiplatform.v1.EnvVar value) { + if (envBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEnvIsMutable(); + env_.add(value); + onChanged(); + } else { + envBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Immutable. List of environment variables to set in the container. After the container
+     * starts running, code running in the container can read these environment
+     * variables.
+     * Additionally, the [command][google.cloud.aiplatform.v1.ModelContainerSpec.command] and
+     * [args][google.cloud.aiplatform.v1.ModelContainerSpec.args] fields can reference these variables. Later
+     * entries in this list can also reference earlier entries. For example, the
+     * following example sets the variable `VAR_2` to have the value `foo bar`:
+     * ```json
+     * [
+     *   {
+     *     "name": "VAR_1",
+     *     "value": "foo"
+     *   },
+     *   {
+     *     "name": "VAR_2",
+     *     "value": "$(VAR_1) bar"
+     *   }
+     * ]
+     * ```
+     * If you switch the order of the variables in the example, then the expansion
+     * does not occur.
+     * This field corresponds to the `env` field of the Kubernetes Containers
+     * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder addEnv(int index, com.google.cloud.aiplatform.v1.EnvVar value) { + if (envBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEnvIsMutable(); + env_.add(index, value); + onChanged(); + } else { + envBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Immutable. List of environment variables to set in the container. After the container
+     * starts running, code running in the container can read these environment
+     * variables.
+     * Additionally, the [command][google.cloud.aiplatform.v1.ModelContainerSpec.command] and
+     * [args][google.cloud.aiplatform.v1.ModelContainerSpec.args] fields can reference these variables. Later
+     * entries in this list can also reference earlier entries. For example, the
+     * following example sets the variable `VAR_2` to have the value `foo bar`:
+     * ```json
+     * [
+     *   {
+     *     "name": "VAR_1",
+     *     "value": "foo"
+     *   },
+     *   {
+     *     "name": "VAR_2",
+     *     "value": "$(VAR_1) bar"
+     *   }
+     * ]
+     * ```
+     * If you switch the order of the variables in the example, then the expansion
+     * does not occur.
+     * This field corresponds to the `env` field of the Kubernetes Containers
+     * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder addEnv(com.google.cloud.aiplatform.v1.EnvVar.Builder builderForValue) { + if (envBuilder_ == null) { + ensureEnvIsMutable(); + env_.add(builderForValue.build()); + onChanged(); + } else { + envBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Immutable. List of environment variables to set in the container. After the container
+     * starts running, code running in the container can read these environment
+     * variables.
+     * Additionally, the [command][google.cloud.aiplatform.v1.ModelContainerSpec.command] and
+     * [args][google.cloud.aiplatform.v1.ModelContainerSpec.args] fields can reference these variables. Later
+     * entries in this list can also reference earlier entries. For example, the
+     * following example sets the variable `VAR_2` to have the value `foo bar`:
+     * ```json
+     * [
+     *   {
+     *     "name": "VAR_1",
+     *     "value": "foo"
+     *   },
+     *   {
+     *     "name": "VAR_2",
+     *     "value": "$(VAR_1) bar"
+     *   }
+     * ]
+     * ```
+     * If you switch the order of the variables in the example, then the expansion
+     * does not occur.
+     * This field corresponds to the `env` field of the Kubernetes Containers
+     * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder addEnv( + int index, com.google.cloud.aiplatform.v1.EnvVar.Builder builderForValue) { + if (envBuilder_ == null) { + ensureEnvIsMutable(); + env_.add(index, builderForValue.build()); + onChanged(); + } else { + envBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Immutable. List of environment variables to set in the container. After the container
+     * starts running, code running in the container can read these environment
+     * variables.
+     * Additionally, the [command][google.cloud.aiplatform.v1.ModelContainerSpec.command] and
+     * [args][google.cloud.aiplatform.v1.ModelContainerSpec.args] fields can reference these variables. Later
+     * entries in this list can also reference earlier entries. For example, the
+     * following example sets the variable `VAR_2` to have the value `foo bar`:
+     * ```json
+     * [
+     *   {
+     *     "name": "VAR_1",
+     *     "value": "foo"
+     *   },
+     *   {
+     *     "name": "VAR_2",
+     *     "value": "$(VAR_1) bar"
+     *   }
+     * ]
+     * ```
+     * If you switch the order of the variables in the example, then the expansion
+     * does not occur.
+     * This field corresponds to the `env` field of the Kubernetes Containers
+     * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder addAllEnv( + java.lang.Iterable values) { + if (envBuilder_ == null) { + ensureEnvIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, env_); + onChanged(); + } else { + envBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Immutable. List of environment variables to set in the container. After the container
+     * starts running, code running in the container can read these environment
+     * variables.
+     * Additionally, the [command][google.cloud.aiplatform.v1.ModelContainerSpec.command] and
+     * [args][google.cloud.aiplatform.v1.ModelContainerSpec.args] fields can reference these variables. Later
+     * entries in this list can also reference earlier entries. For example, the
+     * following example sets the variable `VAR_2` to have the value `foo bar`:
+     * ```json
+     * [
+     *   {
+     *     "name": "VAR_1",
+     *     "value": "foo"
+     *   },
+     *   {
+     *     "name": "VAR_2",
+     *     "value": "$(VAR_1) bar"
+     *   }
+     * ]
+     * ```
+     * If you switch the order of the variables in the example, then the expansion
+     * does not occur.
+     * This field corresponds to the `env` field of the Kubernetes Containers
+     * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder clearEnv() { + if (envBuilder_ == null) { + env_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + envBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Immutable. List of environment variables to set in the container. After the container
+     * starts running, code running in the container can read these environment
+     * variables.
+     * Additionally, the [command][google.cloud.aiplatform.v1.ModelContainerSpec.command] and
+     * [args][google.cloud.aiplatform.v1.ModelContainerSpec.args] fields can reference these variables. Later
+     * entries in this list can also reference earlier entries. For example, the
+     * following example sets the variable `VAR_2` to have the value `foo bar`:
+     * ```json
+     * [
+     *   {
+     *     "name": "VAR_1",
+     *     "value": "foo"
+     *   },
+     *   {
+     *     "name": "VAR_2",
+     *     "value": "$(VAR_1) bar"
+     *   }
+     * ]
+     * ```
+     * If you switch the order of the variables in the example, then the expansion
+     * does not occur.
+     * This field corresponds to the `env` field of the Kubernetes Containers
+     * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder removeEnv(int index) { + if (envBuilder_ == null) { + ensureEnvIsMutable(); + env_.remove(index); + onChanged(); + } else { + envBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Immutable. List of environment variables to set in the container. After the container
+     * starts running, code running in the container can read these environment
+     * variables.
+     * Additionally, the [command][google.cloud.aiplatform.v1.ModelContainerSpec.command] and
+     * [args][google.cloud.aiplatform.v1.ModelContainerSpec.args] fields can reference these variables. Later
+     * entries in this list can also reference earlier entries. For example, the
+     * following example sets the variable `VAR_2` to have the value `foo bar`:
+     * ```json
+     * [
+     *   {
+     *     "name": "VAR_1",
+     *     "value": "foo"
+     *   },
+     *   {
+     *     "name": "VAR_2",
+     *     "value": "$(VAR_1) bar"
+     *   }
+     * ]
+     * ```
+     * If you switch the order of the variables in the example, then the expansion
+     * does not occur.
+     * This field corresponds to the `env` field of the Kubernetes Containers
+     * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public com.google.cloud.aiplatform.v1.EnvVar.Builder getEnvBuilder(int index) { + return getEnvFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Immutable. List of environment variables to set in the container. After the container
+     * starts running, code running in the container can read these environment
+     * variables.
+     * Additionally, the [command][google.cloud.aiplatform.v1.ModelContainerSpec.command] and
+     * [args][google.cloud.aiplatform.v1.ModelContainerSpec.args] fields can reference these variables. Later
+     * entries in this list can also reference earlier entries. For example, the
+     * following example sets the variable `VAR_2` to have the value `foo bar`:
+     * ```json
+     * [
+     *   {
+     *     "name": "VAR_1",
+     *     "value": "foo"
+     *   },
+     *   {
+     *     "name": "VAR_2",
+     *     "value": "$(VAR_1) bar"
+     *   }
+     * ]
+     * ```
+     * If you switch the order of the variables in the example, then the expansion
+     * does not occur.
+     * This field corresponds to the `env` field of the Kubernetes Containers
+     * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public com.google.cloud.aiplatform.v1.EnvVarOrBuilder getEnvOrBuilder(int index) { + if (envBuilder_ == null) { + return env_.get(index); + } else { + return envBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Immutable. List of environment variables to set in the container. After the container
+     * starts running, code running in the container can read these environment
+     * variables.
+     * Additionally, the [command][google.cloud.aiplatform.v1.ModelContainerSpec.command] and
+     * [args][google.cloud.aiplatform.v1.ModelContainerSpec.args] fields can reference these variables. Later
+     * entries in this list can also reference earlier entries. For example, the
+     * following example sets the variable `VAR_2` to have the value `foo bar`:
+     * ```json
+     * [
+     *   {
+     *     "name": "VAR_1",
+     *     "value": "foo"
+     *   },
+     *   {
+     *     "name": "VAR_2",
+     *     "value": "$(VAR_1) bar"
+     *   }
+     * ]
+     * ```
+     * If you switch the order of the variables in the example, then the expansion
+     * does not occur.
+     * This field corresponds to the `env` field of the Kubernetes Containers
+     * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public java.util.List + getEnvOrBuilderList() { + if (envBuilder_ != null) { + return envBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(env_); + } + } + /** + * + * + *
+     * Immutable. List of environment variables to set in the container. After the container
+     * starts running, code running in the container can read these environment
+     * variables.
+     * Additionally, the [command][google.cloud.aiplatform.v1.ModelContainerSpec.command] and
+     * [args][google.cloud.aiplatform.v1.ModelContainerSpec.args] fields can reference these variables. Later
+     * entries in this list can also reference earlier entries. For example, the
+     * following example sets the variable `VAR_2` to have the value `foo bar`:
+     * ```json
+     * [
+     *   {
+     *     "name": "VAR_1",
+     *     "value": "foo"
+     *   },
+     *   {
+     *     "name": "VAR_2",
+     *     "value": "$(VAR_1) bar"
+     *   }
+     * ]
+     * ```
+     * If you switch the order of the variables in the example, then the expansion
+     * does not occur.
+     * This field corresponds to the `env` field of the Kubernetes Containers
+     * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public com.google.cloud.aiplatform.v1.EnvVar.Builder addEnvBuilder() { + return getEnvFieldBuilder() + .addBuilder(com.google.cloud.aiplatform.v1.EnvVar.getDefaultInstance()); + } + /** + * + * + *
+     * Immutable. List of environment variables to set in the container. After the container
+     * starts running, code running in the container can read these environment
+     * variables.
+     * Additionally, the [command][google.cloud.aiplatform.v1.ModelContainerSpec.command] and
+     * [args][google.cloud.aiplatform.v1.ModelContainerSpec.args] fields can reference these variables. Later
+     * entries in this list can also reference earlier entries. For example, the
+     * following example sets the variable `VAR_2` to have the value `foo bar`:
+     * ```json
+     * [
+     *   {
+     *     "name": "VAR_1",
+     *     "value": "foo"
+     *   },
+     *   {
+     *     "name": "VAR_2",
+     *     "value": "$(VAR_1) bar"
+     *   }
+     * ]
+     * ```
+     * If you switch the order of the variables in the example, then the expansion
+     * does not occur.
+     * This field corresponds to the `env` field of the Kubernetes Containers
+     * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public com.google.cloud.aiplatform.v1.EnvVar.Builder addEnvBuilder(int index) { + return getEnvFieldBuilder() + .addBuilder(index, com.google.cloud.aiplatform.v1.EnvVar.getDefaultInstance()); + } + /** + * + * + *
+     * Immutable. List of environment variables to set in the container. After the container
+     * starts running, code running in the container can read these environment
+     * variables.
+     * Additionally, the [command][google.cloud.aiplatform.v1.ModelContainerSpec.command] and
+     * [args][google.cloud.aiplatform.v1.ModelContainerSpec.args] fields can reference these variables. Later
+     * entries in this list can also reference earlier entries. For example, the
+     * following example sets the variable `VAR_2` to have the value `foo bar`:
+     * ```json
+     * [
+     *   {
+     *     "name": "VAR_1",
+     *     "value": "foo"
+     *   },
+     *   {
+     *     "name": "VAR_2",
+     *     "value": "$(VAR_1) bar"
+     *   }
+     * ]
+     * ```
+     * If you switch the order of the variables in the example, then the expansion
+     * does not occur.
+     * This field corresponds to the `env` field of the Kubernetes Containers
+     * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public java.util.List getEnvBuilderList() { + return getEnvFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.EnvVar, + com.google.cloud.aiplatform.v1.EnvVar.Builder, + com.google.cloud.aiplatform.v1.EnvVarOrBuilder> + getEnvFieldBuilder() { + if (envBuilder_ == null) { + envBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.EnvVar, + com.google.cloud.aiplatform.v1.EnvVar.Builder, + com.google.cloud.aiplatform.v1.EnvVarOrBuilder>( + env_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + env_ = null; + } + return envBuilder_; + } + + private java.util.List ports_ = + java.util.Collections.emptyList(); + + private void ensurePortsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + ports_ = new java.util.ArrayList(ports_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.Port, + com.google.cloud.aiplatform.v1.Port.Builder, + com.google.cloud.aiplatform.v1.PortOrBuilder> + portsBuilder_; + + /** + * + * + *
+     * Immutable. List of ports to expose from the container. AI Platform sends any
+     * prediction requests that it receives to the first port on this list. AI
+     * Platform also sends
+     * [liveness and health checks](https://tinyurl.com/cust-cont-reqs#health)
+     * to this port.
+     * If you do not specify this field, it defaults to following value:
+     * ```json
+     * [
+     *   {
+     *     "containerPort": 8080
+     *   }
+     * ]
+     * ```
+     * AI Platform does not use ports other than the first one listed. This field
+     * corresponds to the `ports` field of the Kubernetes Containers
+     * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Port ports = 5 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public java.util.List getPortsList() { + if (portsBuilder_ == null) { + return java.util.Collections.unmodifiableList(ports_); + } else { + return portsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Immutable. List of ports to expose from the container. AI Platform sends any
+     * prediction requests that it receives to the first port on this list. AI
+     * Platform also sends
+     * [liveness and health checks](https://tinyurl.com/cust-cont-reqs#health)
+     * to this port.
+     * If you do not specify this field, it defaults to following value:
+     * ```json
+     * [
+     *   {
+     *     "containerPort": 8080
+     *   }
+     * ]
+     * ```
+     * AI Platform does not use ports other than the first one listed. This field
+     * corresponds to the `ports` field of the Kubernetes Containers
+     * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Port ports = 5 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public int getPortsCount() { + if (portsBuilder_ == null) { + return ports_.size(); + } else { + return portsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Immutable. List of ports to expose from the container. AI Platform sends any
+     * prediction requests that it receives to the first port on this list. AI
+     * Platform also sends
+     * [liveness and health checks](https://tinyurl.com/cust-cont-reqs#health)
+     * to this port.
+     * If you do not specify this field, it defaults to following value:
+     * ```json
+     * [
+     *   {
+     *     "containerPort": 8080
+     *   }
+     * ]
+     * ```
+     * AI Platform does not use ports other than the first one listed. This field
+     * corresponds to the `ports` field of the Kubernetes Containers
+     * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Port ports = 5 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public com.google.cloud.aiplatform.v1.Port getPorts(int index) { + if (portsBuilder_ == null) { + return ports_.get(index); + } else { + return portsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Immutable. List of ports to expose from the container. AI Platform sends any
+     * prediction requests that it receives to the first port on this list. AI
+     * Platform also sends
+     * [liveness and health checks](https://tinyurl.com/cust-cont-reqs#health)
+     * to this port.
+     * If you do not specify this field, it defaults to following value:
+     * ```json
+     * [
+     *   {
+     *     "containerPort": 8080
+     *   }
+     * ]
+     * ```
+     * AI Platform does not use ports other than the first one listed. This field
+     * corresponds to the `ports` field of the Kubernetes Containers
+     * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Port ports = 5 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder setPorts(int index, com.google.cloud.aiplatform.v1.Port value) { + if (portsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePortsIsMutable(); + ports_.set(index, value); + onChanged(); + } else { + portsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Immutable. List of ports to expose from the container. AI Platform sends any
+     * prediction requests that it receives to the first port on this list. AI
+     * Platform also sends
+     * [liveness and health checks](https://tinyurl.com/cust-cont-reqs#health)
+     * to this port.
+     * If you do not specify this field, it defaults to following value:
+     * ```json
+     * [
+     *   {
+     *     "containerPort": 8080
+     *   }
+     * ]
+     * ```
+     * AI Platform does not use ports other than the first one listed. This field
+     * corresponds to the `ports` field of the Kubernetes Containers
+     * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Port ports = 5 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder setPorts( + int index, com.google.cloud.aiplatform.v1.Port.Builder builderForValue) { + if (portsBuilder_ == null) { + ensurePortsIsMutable(); + ports_.set(index, builderForValue.build()); + onChanged(); + } else { + portsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Immutable. List of ports to expose from the container. AI Platform sends any
+     * prediction requests that it receives to the first port on this list. AI
+     * Platform also sends
+     * [liveness and health checks](https://tinyurl.com/cust-cont-reqs#health)
+     * to this port.
+     * If you do not specify this field, it defaults to following value:
+     * ```json
+     * [
+     *   {
+     *     "containerPort": 8080
+     *   }
+     * ]
+     * ```
+     * AI Platform does not use ports other than the first one listed. This field
+     * corresponds to the `ports` field of the Kubernetes Containers
+     * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Port ports = 5 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder addPorts(com.google.cloud.aiplatform.v1.Port value) { + if (portsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePortsIsMutable(); + ports_.add(value); + onChanged(); + } else { + portsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Immutable. List of ports to expose from the container. AI Platform sends any
+     * prediction requests that it receives to the first port on this list. AI
+     * Platform also sends
+     * [liveness and health checks](https://tinyurl.com/cust-cont-reqs#health)
+     * to this port.
+     * If you do not specify this field, it defaults to following value:
+     * ```json
+     * [
+     *   {
+     *     "containerPort": 8080
+     *   }
+     * ]
+     * ```
+     * AI Platform does not use ports other than the first one listed. This field
+     * corresponds to the `ports` field of the Kubernetes Containers
+     * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Port ports = 5 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder addPorts(int index, com.google.cloud.aiplatform.v1.Port value) { + if (portsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePortsIsMutable(); + ports_.add(index, value); + onChanged(); + } else { + portsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Immutable. List of ports to expose from the container. AI Platform sends any
+     * prediction requests that it receives to the first port on this list. AI
+     * Platform also sends
+     * [liveness and health checks](https://tinyurl.com/cust-cont-reqs#health)
+     * to this port.
+     * If you do not specify this field, it defaults to following value:
+     * ```json
+     * [
+     *   {
+     *     "containerPort": 8080
+     *   }
+     * ]
+     * ```
+     * AI Platform does not use ports other than the first one listed. This field
+     * corresponds to the `ports` field of the Kubernetes Containers
+     * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Port ports = 5 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder addPorts(com.google.cloud.aiplatform.v1.Port.Builder builderForValue) { + if (portsBuilder_ == null) { + ensurePortsIsMutable(); + ports_.add(builderForValue.build()); + onChanged(); + } else { + portsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Immutable. List of ports to expose from the container. AI Platform sends any
+     * prediction requests that it receives to the first port on this list. AI
+     * Platform also sends
+     * [liveness and health checks](https://tinyurl.com/cust-cont-reqs#health)
+     * to this port.
+     * If you do not specify this field, it defaults to following value:
+     * ```json
+     * [
+     *   {
+     *     "containerPort": 8080
+     *   }
+     * ]
+     * ```
+     * AI Platform does not use ports other than the first one listed. This field
+     * corresponds to the `ports` field of the Kubernetes Containers
+     * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Port ports = 5 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder addPorts( + int index, com.google.cloud.aiplatform.v1.Port.Builder builderForValue) { + if (portsBuilder_ == null) { + ensurePortsIsMutable(); + ports_.add(index, builderForValue.build()); + onChanged(); + } else { + portsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Immutable. List of ports to expose from the container. AI Platform sends any
+     * prediction requests that it receives to the first port on this list. AI
+     * Platform also sends
+     * [liveness and health checks](https://tinyurl.com/cust-cont-reqs#health)
+     * to this port.
+     * If you do not specify this field, it defaults to following value:
+     * ```json
+     * [
+     *   {
+     *     "containerPort": 8080
+     *   }
+     * ]
+     * ```
+     * AI Platform does not use ports other than the first one listed. This field
+     * corresponds to the `ports` field of the Kubernetes Containers
+     * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Port ports = 5 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder addAllPorts( + java.lang.Iterable values) { + if (portsBuilder_ == null) { + ensurePortsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, ports_); + onChanged(); + } else { + portsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Immutable. List of ports to expose from the container. AI Platform sends any
+     * prediction requests that it receives to the first port on this list. AI
+     * Platform also sends
+     * [liveness and health checks](https://tinyurl.com/cust-cont-reqs#health)
+     * to this port.
+     * If you do not specify this field, it defaults to following value:
+     * ```json
+     * [
+     *   {
+     *     "containerPort": 8080
+     *   }
+     * ]
+     * ```
+     * AI Platform does not use ports other than the first one listed. This field
+     * corresponds to the `ports` field of the Kubernetes Containers
+     * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Port ports = 5 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder clearPorts() { + if (portsBuilder_ == null) { + ports_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + portsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Immutable. List of ports to expose from the container. AI Platform sends any
+     * prediction requests that it receives to the first port on this list. AI
+     * Platform also sends
+     * [liveness and health checks](https://tinyurl.com/cust-cont-reqs#health)
+     * to this port.
+     * If you do not specify this field, it defaults to following value:
+     * ```json
+     * [
+     *   {
+     *     "containerPort": 8080
+     *   }
+     * ]
+     * ```
+     * AI Platform does not use ports other than the first one listed. This field
+     * corresponds to the `ports` field of the Kubernetes Containers
+     * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Port ports = 5 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder removePorts(int index) { + if (portsBuilder_ == null) { + ensurePortsIsMutable(); + ports_.remove(index); + onChanged(); + } else { + portsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Immutable. List of ports to expose from the container. AI Platform sends any
+     * prediction requests that it receives to the first port on this list. AI
+     * Platform also sends
+     * [liveness and health checks](https://tinyurl.com/cust-cont-reqs#health)
+     * to this port.
+     * If you do not specify this field, it defaults to following value:
+     * ```json
+     * [
+     *   {
+     *     "containerPort": 8080
+     *   }
+     * ]
+     * ```
+     * AI Platform does not use ports other than the first one listed. This field
+     * corresponds to the `ports` field of the Kubernetes Containers
+     * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Port ports = 5 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public com.google.cloud.aiplatform.v1.Port.Builder getPortsBuilder(int index) { + return getPortsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Immutable. List of ports to expose from the container. AI Platform sends any
+     * prediction requests that it receives to the first port on this list. AI
+     * Platform also sends
+     * [liveness and health checks](https://tinyurl.com/cust-cont-reqs#health)
+     * to this port.
+     * If you do not specify this field, it defaults to following value:
+     * ```json
+     * [
+     *   {
+     *     "containerPort": 8080
+     *   }
+     * ]
+     * ```
+     * AI Platform does not use ports other than the first one listed. This field
+     * corresponds to the `ports` field of the Kubernetes Containers
+     * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Port ports = 5 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public com.google.cloud.aiplatform.v1.PortOrBuilder getPortsOrBuilder(int index) { + if (portsBuilder_ == null) { + return ports_.get(index); + } else { + return portsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Immutable. List of ports to expose from the container. AI Platform sends any
+     * prediction requests that it receives to the first port on this list. AI
+     * Platform also sends
+     * [liveness and health checks](https://tinyurl.com/cust-cont-reqs#health)
+     * to this port.
+     * If you do not specify this field, it defaults to following value:
+     * ```json
+     * [
+     *   {
+     *     "containerPort": 8080
+     *   }
+     * ]
+     * ```
+     * AI Platform does not use ports other than the first one listed. This field
+     * corresponds to the `ports` field of the Kubernetes Containers
+     * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Port ports = 5 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public java.util.List + getPortsOrBuilderList() { + if (portsBuilder_ != null) { + return portsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(ports_); + } + } + /** + * + * + *
+     * Immutable. List of ports to expose from the container. AI Platform sends any
+     * prediction requests that it receives to the first port on this list. AI
+     * Platform also sends
+     * [liveness and health checks](https://tinyurl.com/cust-cont-reqs#health)
+     * to this port.
+     * If you do not specify this field, it defaults to following value:
+     * ```json
+     * [
+     *   {
+     *     "containerPort": 8080
+     *   }
+     * ]
+     * ```
+     * AI Platform does not use ports other than the first one listed. This field
+     * corresponds to the `ports` field of the Kubernetes Containers
+     * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Port ports = 5 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public com.google.cloud.aiplatform.v1.Port.Builder addPortsBuilder() { + return getPortsFieldBuilder() + .addBuilder(com.google.cloud.aiplatform.v1.Port.getDefaultInstance()); + } + /** + * + * + *
+     * Immutable. List of ports to expose from the container. AI Platform sends any
+     * prediction requests that it receives to the first port on this list. AI
+     * Platform also sends
+     * [liveness and health checks](https://tinyurl.com/cust-cont-reqs#health)
+     * to this port.
+     * If you do not specify this field, it defaults to following value:
+     * ```json
+     * [
+     *   {
+     *     "containerPort": 8080
+     *   }
+     * ]
+     * ```
+     * AI Platform does not use ports other than the first one listed. This field
+     * corresponds to the `ports` field of the Kubernetes Containers
+     * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Port ports = 5 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public com.google.cloud.aiplatform.v1.Port.Builder addPortsBuilder(int index) { + return getPortsFieldBuilder() + .addBuilder(index, com.google.cloud.aiplatform.v1.Port.getDefaultInstance()); + } + /** + * + * + *
+     * Immutable. List of ports to expose from the container. AI Platform sends any
+     * prediction requests that it receives to the first port on this list. AI
+     * Platform also sends
+     * [liveness and health checks](https://tinyurl.com/cust-cont-reqs#health)
+     * to this port.
+     * If you do not specify this field, it defaults to following value:
+     * ```json
+     * [
+     *   {
+     *     "containerPort": 8080
+     *   }
+     * ]
+     * ```
+     * AI Platform does not use ports other than the first one listed. This field
+     * corresponds to the `ports` field of the Kubernetes Containers
+     * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Port ports = 5 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public java.util.List getPortsBuilderList() { + return getPortsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.Port, + com.google.cloud.aiplatform.v1.Port.Builder, + com.google.cloud.aiplatform.v1.PortOrBuilder> + getPortsFieldBuilder() { + if (portsBuilder_ == null) { + portsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.Port, + com.google.cloud.aiplatform.v1.Port.Builder, + com.google.cloud.aiplatform.v1.PortOrBuilder>( + ports_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); + ports_ = null; + } + return portsBuilder_; + } + + private java.lang.Object predictRoute_ = ""; + /** + * + * + *
+     * Immutable. HTTP path on the container to send prediction requests to. AI Platform
+     * forwards requests sent using
+     * [projects.locations.endpoints.predict][google.cloud.aiplatform.v1.PredictionService.Predict] to this
+     * path on the container's IP address and port. AI Platform then returns the
+     * container's response in the API response.
+     * For example, if you set this field to `/foo`, then when AI Platform
+     * receives a prediction request, it forwards the request body in a POST
+     * request to the `/foo` path on the port of your container specified by the
+     * first value of this `ModelContainerSpec`'s
+     * [ports][google.cloud.aiplatform.v1.ModelContainerSpec.ports] field.
+     * If you don't specify this field, it defaults to the following value when
+     * you [deploy this Model to an Endpoint][google.cloud.aiplatform.v1.EndpointService.DeployModel]:
+     * <code>/v1/endpoints/<var>ENDPOINT</var>/deployedModels/<var>DEPLOYED_MODEL</var>:predict</code>
+     * The placeholders in this value are replaced as follows:
+     * * <var>ENDPOINT</var>: The last segment (following `endpoints/`)of the
+     *   Endpoint.name][] field of the Endpoint where this Model has been
+     *   deployed. (AI Platform makes this value available to your container code
+     *   as the
+     *  [`AIP_ENDPOINT_ID`](https://tinyurl.com/cust-cont-reqs#aip-variables)
+     *  environment variable.)
+     * * <var>DEPLOYED_MODEL</var>: [DeployedModel.id][google.cloud.aiplatform.v1.DeployedModel.id] of the `DeployedModel`.
+     *   (AI Platform makes this value available to your container code
+     *   as the [`AIP_DEPLOYED_MODEL_ID` environment
+     *   variable](https://tinyurl.com/cust-cont-reqs#aip-variables).)
+     * 
+ * + * string predict_route = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The predictRoute. + */ + public java.lang.String getPredictRoute() { + java.lang.Object ref = predictRoute_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + predictRoute_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Immutable. HTTP path on the container to send prediction requests to. AI Platform
+     * forwards requests sent using
+     * [projects.locations.endpoints.predict][google.cloud.aiplatform.v1.PredictionService.Predict] to this
+     * path on the container's IP address and port. AI Platform then returns the
+     * container's response in the API response.
+     * For example, if you set this field to `/foo`, then when AI Platform
+     * receives a prediction request, it forwards the request body in a POST
+     * request to the `/foo` path on the port of your container specified by the
+     * first value of this `ModelContainerSpec`'s
+     * [ports][google.cloud.aiplatform.v1.ModelContainerSpec.ports] field.
+     * If you don't specify this field, it defaults to the following value when
+     * you [deploy this Model to an Endpoint][google.cloud.aiplatform.v1.EndpointService.DeployModel]:
+     * <code>/v1/endpoints/<var>ENDPOINT</var>/deployedModels/<var>DEPLOYED_MODEL</var>:predict</code>
+     * The placeholders in this value are replaced as follows:
+     * * <var>ENDPOINT</var>: The last segment (following `endpoints/`)of the
+     *   Endpoint.name][] field of the Endpoint where this Model has been
+     *   deployed. (AI Platform makes this value available to your container code
+     *   as the
+     *  [`AIP_ENDPOINT_ID`](https://tinyurl.com/cust-cont-reqs#aip-variables)
+     *  environment variable.)
+     * * <var>DEPLOYED_MODEL</var>: [DeployedModel.id][google.cloud.aiplatform.v1.DeployedModel.id] of the `DeployedModel`.
+     *   (AI Platform makes this value available to your container code
+     *   as the [`AIP_DEPLOYED_MODEL_ID` environment
+     *   variable](https://tinyurl.com/cust-cont-reqs#aip-variables).)
+     * 
+ * + * string predict_route = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for predictRoute. + */ + public com.google.protobuf.ByteString getPredictRouteBytes() { + java.lang.Object ref = predictRoute_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + predictRoute_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Immutable. HTTP path on the container to send prediction requests to. AI Platform
+     * forwards requests sent using
+     * [projects.locations.endpoints.predict][google.cloud.aiplatform.v1.PredictionService.Predict] to this
+     * path on the container's IP address and port. AI Platform then returns the
+     * container's response in the API response.
+     * For example, if you set this field to `/foo`, then when AI Platform
+     * receives a prediction request, it forwards the request body in a POST
+     * request to the `/foo` path on the port of your container specified by the
+     * first value of this `ModelContainerSpec`'s
+     * [ports][google.cloud.aiplatform.v1.ModelContainerSpec.ports] field.
+     * If you don't specify this field, it defaults to the following value when
+     * you [deploy this Model to an Endpoint][google.cloud.aiplatform.v1.EndpointService.DeployModel]:
+     * <code>/v1/endpoints/<var>ENDPOINT</var>/deployedModels/<var>DEPLOYED_MODEL</var>:predict</code>
+     * The placeholders in this value are replaced as follows:
+     * * <var>ENDPOINT</var>: The last segment (following `endpoints/`)of the
+     *   Endpoint.name][] field of the Endpoint where this Model has been
+     *   deployed. (AI Platform makes this value available to your container code
+     *   as the
+     *  [`AIP_ENDPOINT_ID`](https://tinyurl.com/cust-cont-reqs#aip-variables)
+     *  environment variable.)
+     * * <var>DEPLOYED_MODEL</var>: [DeployedModel.id][google.cloud.aiplatform.v1.DeployedModel.id] of the `DeployedModel`.
+     *   (AI Platform makes this value available to your container code
+     *   as the [`AIP_DEPLOYED_MODEL_ID` environment
+     *   variable](https://tinyurl.com/cust-cont-reqs#aip-variables).)
+     * 
+ * + * string predict_route = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The predictRoute to set. + * @return This builder for chaining. + */ + public Builder setPredictRoute(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + predictRoute_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. HTTP path on the container to send prediction requests to. AI Platform
+     * forwards requests sent using
+     * [projects.locations.endpoints.predict][google.cloud.aiplatform.v1.PredictionService.Predict] to this
+     * path on the container's IP address and port. AI Platform then returns the
+     * container's response in the API response.
+     * For example, if you set this field to `/foo`, then when AI Platform
+     * receives a prediction request, it forwards the request body in a POST
+     * request to the `/foo` path on the port of your container specified by the
+     * first value of this `ModelContainerSpec`'s
+     * [ports][google.cloud.aiplatform.v1.ModelContainerSpec.ports] field.
+     * If you don't specify this field, it defaults to the following value when
+     * you [deploy this Model to an Endpoint][google.cloud.aiplatform.v1.EndpointService.DeployModel]:
+     * <code>/v1/endpoints/<var>ENDPOINT</var>/deployedModels/<var>DEPLOYED_MODEL</var>:predict</code>
+     * The placeholders in this value are replaced as follows:
+     * * <var>ENDPOINT</var>: The last segment (following `endpoints/`)of the
+     *   Endpoint.name][] field of the Endpoint where this Model has been
+     *   deployed. (AI Platform makes this value available to your container code
+     *   as the
+     *  [`AIP_ENDPOINT_ID`](https://tinyurl.com/cust-cont-reqs#aip-variables)
+     *  environment variable.)
+     * * <var>DEPLOYED_MODEL</var>: [DeployedModel.id][google.cloud.aiplatform.v1.DeployedModel.id] of the `DeployedModel`.
+     *   (AI Platform makes this value available to your container code
+     *   as the [`AIP_DEPLOYED_MODEL_ID` environment
+     *   variable](https://tinyurl.com/cust-cont-reqs#aip-variables).)
+     * 
+ * + * string predict_route = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearPredictRoute() { + + predictRoute_ = getDefaultInstance().getPredictRoute(); + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. HTTP path on the container to send prediction requests to. AI Platform
+     * forwards requests sent using
+     * [projects.locations.endpoints.predict][google.cloud.aiplatform.v1.PredictionService.Predict] to this
+     * path on the container's IP address and port. AI Platform then returns the
+     * container's response in the API response.
+     * For example, if you set this field to `/foo`, then when AI Platform
+     * receives a prediction request, it forwards the request body in a POST
+     * request to the `/foo` path on the port of your container specified by the
+     * first value of this `ModelContainerSpec`'s
+     * [ports][google.cloud.aiplatform.v1.ModelContainerSpec.ports] field.
+     * If you don't specify this field, it defaults to the following value when
+     * you [deploy this Model to an Endpoint][google.cloud.aiplatform.v1.EndpointService.DeployModel]:
+     * <code>/v1/endpoints/<var>ENDPOINT</var>/deployedModels/<var>DEPLOYED_MODEL</var>:predict</code>
+     * The placeholders in this value are replaced as follows:
+     * * <var>ENDPOINT</var>: The last segment (following `endpoints/`)of the
+     *   Endpoint.name][] field of the Endpoint where this Model has been
+     *   deployed. (AI Platform makes this value available to your container code
+     *   as the
+     *  [`AIP_ENDPOINT_ID`](https://tinyurl.com/cust-cont-reqs#aip-variables)
+     *  environment variable.)
+     * * <var>DEPLOYED_MODEL</var>: [DeployedModel.id][google.cloud.aiplatform.v1.DeployedModel.id] of the `DeployedModel`.
+     *   (AI Platform makes this value available to your container code
+     *   as the [`AIP_DEPLOYED_MODEL_ID` environment
+     *   variable](https://tinyurl.com/cust-cont-reqs#aip-variables).)
+     * 
+ * + * string predict_route = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The bytes for predictRoute to set. + * @return This builder for chaining. + */ + public Builder setPredictRouteBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + predictRoute_ = value; + onChanged(); + return this; + } + + private java.lang.Object healthRoute_ = ""; + /** + * + * + *
+     * Immutable. HTTP path on the container to send health checks to. AI Platform
+     * intermittently sends GET requests to this path on the container's IP
+     * address and port to check that the container is healthy. Read more about
+     * [health
+     * checks](https://tinyurl.com/cust-cont-reqs#checks).
+     * For example, if you set this field to `/bar`, then AI Platform
+     * intermittently sends a GET request to the `/bar` path on the port of your
+     * container specified by the first value of this `ModelContainerSpec`'s
+     * [ports][google.cloud.aiplatform.v1.ModelContainerSpec.ports] field.
+     * If you don't specify this field, it defaults to the following value when
+     * you [deploy this Model to an Endpoint][google.cloud.aiplatform.v1.EndpointService.DeployModel]:
+     * <code>/v1/endpoints/<var>ENDPOINT</var>/deployedModels/<var>DEPLOYED_MODEL</var>:predict</code>
+     * The placeholders in this value are replaced as follows:
+     * * <var>ENDPOINT</var>: The last segment (following `endpoints/`)of the
+     *   Endpoint.name][] field of the Endpoint where this Model has been
+     *   deployed. (AI Platform makes this value available to your container code
+     *   as the
+     *   [`AIP_ENDPOINT_ID`](https://tinyurl.com/cust-cont-reqs#aip-variables)
+     *   environment variable.)
+     * * <var>DEPLOYED_MODEL</var>: [DeployedModel.id][google.cloud.aiplatform.v1.DeployedModel.id] of the `DeployedModel`.
+     *   (AI Platform makes this value available to your container code as the
+     * [`AIP_DEPLOYED_MODEL_ID`](https://tinyurl.com/cust-cont-reqs#aip-variables)
+     *   environment variable.)
+     * 
+ * + * string health_route = 7 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The healthRoute. + */ + public java.lang.String getHealthRoute() { + java.lang.Object ref = healthRoute_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + healthRoute_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Immutable. HTTP path on the container to send health checks to. AI Platform
+     * intermittently sends GET requests to this path on the container's IP
+     * address and port to check that the container is healthy. Read more about
+     * [health
+     * checks](https://tinyurl.com/cust-cont-reqs#checks).
+     * For example, if you set this field to `/bar`, then AI Platform
+     * intermittently sends a GET request to the `/bar` path on the port of your
+     * container specified by the first value of this `ModelContainerSpec`'s
+     * [ports][google.cloud.aiplatform.v1.ModelContainerSpec.ports] field.
+     * If you don't specify this field, it defaults to the following value when
+     * you [deploy this Model to an Endpoint][google.cloud.aiplatform.v1.EndpointService.DeployModel]:
+     * <code>/v1/endpoints/<var>ENDPOINT</var>/deployedModels/<var>DEPLOYED_MODEL</var>:predict</code>
+     * The placeholders in this value are replaced as follows:
+     * * <var>ENDPOINT</var>: The last segment (following `endpoints/`)of the
+     *   Endpoint.name][] field of the Endpoint where this Model has been
+     *   deployed. (AI Platform makes this value available to your container code
+     *   as the
+     *   [`AIP_ENDPOINT_ID`](https://tinyurl.com/cust-cont-reqs#aip-variables)
+     *   environment variable.)
+     * * <var>DEPLOYED_MODEL</var>: [DeployedModel.id][google.cloud.aiplatform.v1.DeployedModel.id] of the `DeployedModel`.
+     *   (AI Platform makes this value available to your container code as the
+     * [`AIP_DEPLOYED_MODEL_ID`](https://tinyurl.com/cust-cont-reqs#aip-variables)
+     *   environment variable.)
+     * 
+ * + * string health_route = 7 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for healthRoute. + */ + public com.google.protobuf.ByteString getHealthRouteBytes() { + java.lang.Object ref = healthRoute_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + healthRoute_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Immutable. HTTP path on the container to send health checks to. AI Platform
+     * intermittently sends GET requests to this path on the container's IP
+     * address and port to check that the container is healthy. Read more about
+     * [health
+     * checks](https://tinyurl.com/cust-cont-reqs#checks).
+     * For example, if you set this field to `/bar`, then AI Platform
+     * intermittently sends a GET request to the `/bar` path on the port of your
+     * container specified by the first value of this `ModelContainerSpec`'s
+     * [ports][google.cloud.aiplatform.v1.ModelContainerSpec.ports] field.
+     * If you don't specify this field, it defaults to the following value when
+     * you [deploy this Model to an Endpoint][google.cloud.aiplatform.v1.EndpointService.DeployModel]:
+     * <code>/v1/endpoints/<var>ENDPOINT</var>/deployedModels/<var>DEPLOYED_MODEL</var>:predict</code>
+     * The placeholders in this value are replaced as follows:
+     * * <var>ENDPOINT</var>: The last segment (following `endpoints/`)of the
+     *   Endpoint.name][] field of the Endpoint where this Model has been
+     *   deployed. (AI Platform makes this value available to your container code
+     *   as the
+     *   [`AIP_ENDPOINT_ID`](https://tinyurl.com/cust-cont-reqs#aip-variables)
+     *   environment variable.)
+     * * <var>DEPLOYED_MODEL</var>: [DeployedModel.id][google.cloud.aiplatform.v1.DeployedModel.id] of the `DeployedModel`.
+     *   (AI Platform makes this value available to your container code as the
+     * [`AIP_DEPLOYED_MODEL_ID`](https://tinyurl.com/cust-cont-reqs#aip-variables)
+     *   environment variable.)
+     * 
+ * + * string health_route = 7 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The healthRoute to set. + * @return This builder for chaining. + */ + public Builder setHealthRoute(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + healthRoute_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. HTTP path on the container to send health checks to. AI Platform
+     * intermittently sends GET requests to this path on the container's IP
+     * address and port to check that the container is healthy. Read more about
+     * [health
+     * checks](https://tinyurl.com/cust-cont-reqs#checks).
+     * For example, if you set this field to `/bar`, then AI Platform
+     * intermittently sends a GET request to the `/bar` path on the port of your
+     * container specified by the first value of this `ModelContainerSpec`'s
+     * [ports][google.cloud.aiplatform.v1.ModelContainerSpec.ports] field.
+     * If you don't specify this field, it defaults to the following value when
+     * you [deploy this Model to an Endpoint][google.cloud.aiplatform.v1.EndpointService.DeployModel]:
+     * <code>/v1/endpoints/<var>ENDPOINT</var>/deployedModels/<var>DEPLOYED_MODEL</var>:predict</code>
+     * The placeholders in this value are replaced as follows:
+     * * <var>ENDPOINT</var>: The last segment (following `endpoints/`)of the
+     *   Endpoint.name][] field of the Endpoint where this Model has been
+     *   deployed. (AI Platform makes this value available to your container code
+     *   as the
+     *   [`AIP_ENDPOINT_ID`](https://tinyurl.com/cust-cont-reqs#aip-variables)
+     *   environment variable.)
+     * * <var>DEPLOYED_MODEL</var>: [DeployedModel.id][google.cloud.aiplatform.v1.DeployedModel.id] of the `DeployedModel`.
+     *   (AI Platform makes this value available to your container code as the
+     * [`AIP_DEPLOYED_MODEL_ID`](https://tinyurl.com/cust-cont-reqs#aip-variables)
+     *   environment variable.)
+     * 
+ * + * string health_route = 7 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearHealthRoute() { + + healthRoute_ = getDefaultInstance().getHealthRoute(); + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. HTTP path on the container to send health checks to. AI Platform
+     * intermittently sends GET requests to this path on the container's IP
+     * address and port to check that the container is healthy. Read more about
+     * [health
+     * checks](https://tinyurl.com/cust-cont-reqs#checks).
+     * For example, if you set this field to `/bar`, then AI Platform
+     * intermittently sends a GET request to the `/bar` path on the port of your
+     * container specified by the first value of this `ModelContainerSpec`'s
+     * [ports][google.cloud.aiplatform.v1.ModelContainerSpec.ports] field.
+     * If you don't specify this field, it defaults to the following value when
+     * you [deploy this Model to an Endpoint][google.cloud.aiplatform.v1.EndpointService.DeployModel]:
+     * <code>/v1/endpoints/<var>ENDPOINT</var>/deployedModels/<var>DEPLOYED_MODEL</var>:predict</code>
+     * The placeholders in this value are replaced as follows:
+     * * <var>ENDPOINT</var>: The last segment (following `endpoints/`)of the
+     *   Endpoint.name][] field of the Endpoint where this Model has been
+     *   deployed. (AI Platform makes this value available to your container code
+     *   as the
+     *   [`AIP_ENDPOINT_ID`](https://tinyurl.com/cust-cont-reqs#aip-variables)
+     *   environment variable.)
+     * * <var>DEPLOYED_MODEL</var>: [DeployedModel.id][google.cloud.aiplatform.v1.DeployedModel.id] of the `DeployedModel`.
+     *   (AI Platform makes this value available to your container code as the
+     * [`AIP_DEPLOYED_MODEL_ID`](https://tinyurl.com/cust-cont-reqs#aip-variables)
+     *   environment variable.)
+     * 
+ * + * string health_route = 7 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The bytes for healthRoute to set. + * @return This builder for chaining. + */ + public Builder setHealthRouteBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + healthRoute_ = 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.v1.ModelContainerSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ModelContainerSpec) + private static final com.google.cloud.aiplatform.v1.ModelContainerSpec DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ModelContainerSpec(); + } + + public static com.google.cloud.aiplatform.v1.ModelContainerSpec getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ModelContainerSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ModelContainerSpec(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.v1.ModelContainerSpec getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelContainerSpecOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelContainerSpecOrBuilder.java new file mode 100644 index 000000000..30795d328 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelContainerSpecOrBuilder.java @@ -0,0 +1,865 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/model.proto + +package com.google.cloud.aiplatform.v1; + +public interface ModelContainerSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ModelContainerSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Immutable. URI of the Docker image to be used as the custom container for serving
+   * predictions. This URI must identify an image in Artifact Registry or
+   * Container Registry. Learn more about the container publishing
+   * requirements, including permissions requirements for the AI Platform
+   * Service Agent,
+   * [here](https://tinyurl.com/cust-cont-reqs#publishing).
+   * The container image is ingested upon [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel], stored
+   * internally, and this original path is afterwards not used.
+   * To learn about the requirements for the Docker image itself, see
+   * [Custom container requirements](https://tinyurl.com/cust-cont-reqs).
+   * 
+ * + * + * string image_uri = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The imageUri. + */ + java.lang.String getImageUri(); + /** + * + * + *
+   * Required. Immutable. URI of the Docker image to be used as the custom container for serving
+   * predictions. This URI must identify an image in Artifact Registry or
+   * Container Registry. Learn more about the container publishing
+   * requirements, including permissions requirements for the AI Platform
+   * Service Agent,
+   * [here](https://tinyurl.com/cust-cont-reqs#publishing).
+   * The container image is ingested upon [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel], stored
+   * internally, and this original path is afterwards not used.
+   * To learn about the requirements for the Docker image itself, see
+   * [Custom container requirements](https://tinyurl.com/cust-cont-reqs).
+   * 
+ * + * + * string image_uri = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The bytes for imageUri. + */ + com.google.protobuf.ByteString getImageUriBytes(); + + /** + * + * + *
+   * Immutable. Specifies the command that runs when the container starts. This overrides
+   * the container's
+   * [ENTRYPOINT](https://docs.docker.com/engine/reference/builder/#entrypoint).
+   * Specify this field as an array of executable and arguments, similar to a
+   * Docker `ENTRYPOINT`'s "exec" form, not its "shell" form.
+   * If you do not specify this field, then the container's `ENTRYPOINT` runs,
+   * in conjunction with the [args][google.cloud.aiplatform.v1.ModelContainerSpec.args] field or the
+   * container's [`CMD`](https://docs.docker.com/engine/reference/builder/#cmd),
+   * if either exists. If this field is not specified and the container does not
+   * have an `ENTRYPOINT`, then refer to the Docker documentation about how
+   * `CMD` and `ENTRYPOINT`
+   * [interact](https://tinyurl.com/h3kdcgs).
+   * If you specify this field, then you can also specify the `args` field to
+   * provide additional arguments for this command. However, if you specify this
+   * field, then the container's `CMD` is ignored. See the
+   * [Kubernetes documentation](https://tinyurl.com/y8bvllf4) about how the
+   * `command` and `args` fields interact with a container's `ENTRYPOINT` and
+   * `CMD`.
+   * In this field, you can reference environment variables
+   * [set by AI Platform](https://tinyurl.com/cust-cont-reqs#aip-variables)
+   * and environment variables set in the [env][google.cloud.aiplatform.v1.ModelContainerSpec.env] field.
+   * You cannot reference environment variables set in the Docker image. In
+   * order for environment variables to be expanded, reference them by using the
+   * following syntax:
+   * <code>$(<var>VARIABLE_NAME</var>)</code>
+   * Note that this differs from Bash variable expansion, which does not use
+   * parentheses. If a variable cannot be resolved, the reference in the input
+   * string is used unchanged. To avoid variable expansion, you can escape this
+   * syntax with `$$`; for example:
+   * <code>$$(<var>VARIABLE_NAME</var>)</code>
+   * This field corresponds to the `command` field of the Kubernetes Containers
+   * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+   * 
+ * + * repeated string command = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return A list containing the command. + */ + java.util.List getCommandList(); + /** + * + * + *
+   * Immutable. Specifies the command that runs when the container starts. This overrides
+   * the container's
+   * [ENTRYPOINT](https://docs.docker.com/engine/reference/builder/#entrypoint).
+   * Specify this field as an array of executable and arguments, similar to a
+   * Docker `ENTRYPOINT`'s "exec" form, not its "shell" form.
+   * If you do not specify this field, then the container's `ENTRYPOINT` runs,
+   * in conjunction with the [args][google.cloud.aiplatform.v1.ModelContainerSpec.args] field or the
+   * container's [`CMD`](https://docs.docker.com/engine/reference/builder/#cmd),
+   * if either exists. If this field is not specified and the container does not
+   * have an `ENTRYPOINT`, then refer to the Docker documentation about how
+   * `CMD` and `ENTRYPOINT`
+   * [interact](https://tinyurl.com/h3kdcgs).
+   * If you specify this field, then you can also specify the `args` field to
+   * provide additional arguments for this command. However, if you specify this
+   * field, then the container's `CMD` is ignored. See the
+   * [Kubernetes documentation](https://tinyurl.com/y8bvllf4) about how the
+   * `command` and `args` fields interact with a container's `ENTRYPOINT` and
+   * `CMD`.
+   * In this field, you can reference environment variables
+   * [set by AI Platform](https://tinyurl.com/cust-cont-reqs#aip-variables)
+   * and environment variables set in the [env][google.cloud.aiplatform.v1.ModelContainerSpec.env] field.
+   * You cannot reference environment variables set in the Docker image. In
+   * order for environment variables to be expanded, reference them by using the
+   * following syntax:
+   * <code>$(<var>VARIABLE_NAME</var>)</code>
+   * Note that this differs from Bash variable expansion, which does not use
+   * parentheses. If a variable cannot be resolved, the reference in the input
+   * string is used unchanged. To avoid variable expansion, you can escape this
+   * syntax with `$$`; for example:
+   * <code>$$(<var>VARIABLE_NAME</var>)</code>
+   * This field corresponds to the `command` field of the Kubernetes Containers
+   * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+   * 
+ * + * repeated string command = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The count of command. + */ + int getCommandCount(); + /** + * + * + *
+   * Immutable. Specifies the command that runs when the container starts. This overrides
+   * the container's
+   * [ENTRYPOINT](https://docs.docker.com/engine/reference/builder/#entrypoint).
+   * Specify this field as an array of executable and arguments, similar to a
+   * Docker `ENTRYPOINT`'s "exec" form, not its "shell" form.
+   * If you do not specify this field, then the container's `ENTRYPOINT` runs,
+   * in conjunction with the [args][google.cloud.aiplatform.v1.ModelContainerSpec.args] field or the
+   * container's [`CMD`](https://docs.docker.com/engine/reference/builder/#cmd),
+   * if either exists. If this field is not specified and the container does not
+   * have an `ENTRYPOINT`, then refer to the Docker documentation about how
+   * `CMD` and `ENTRYPOINT`
+   * [interact](https://tinyurl.com/h3kdcgs).
+   * If you specify this field, then you can also specify the `args` field to
+   * provide additional arguments for this command. However, if you specify this
+   * field, then the container's `CMD` is ignored. See the
+   * [Kubernetes documentation](https://tinyurl.com/y8bvllf4) about how the
+   * `command` and `args` fields interact with a container's `ENTRYPOINT` and
+   * `CMD`.
+   * In this field, you can reference environment variables
+   * [set by AI Platform](https://tinyurl.com/cust-cont-reqs#aip-variables)
+   * and environment variables set in the [env][google.cloud.aiplatform.v1.ModelContainerSpec.env] field.
+   * You cannot reference environment variables set in the Docker image. In
+   * order for environment variables to be expanded, reference them by using the
+   * following syntax:
+   * <code>$(<var>VARIABLE_NAME</var>)</code>
+   * Note that this differs from Bash variable expansion, which does not use
+   * parentheses. If a variable cannot be resolved, the reference in the input
+   * string is used unchanged. To avoid variable expansion, you can escape this
+   * syntax with `$$`; for example:
+   * <code>$$(<var>VARIABLE_NAME</var>)</code>
+   * This field corresponds to the `command` field of the Kubernetes Containers
+   * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+   * 
+ * + * repeated string command = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param index The index of the element to return. + * @return The command at the given index. + */ + java.lang.String getCommand(int index); + /** + * + * + *
+   * Immutable. Specifies the command that runs when the container starts. This overrides
+   * the container's
+   * [ENTRYPOINT](https://docs.docker.com/engine/reference/builder/#entrypoint).
+   * Specify this field as an array of executable and arguments, similar to a
+   * Docker `ENTRYPOINT`'s "exec" form, not its "shell" form.
+   * If you do not specify this field, then the container's `ENTRYPOINT` runs,
+   * in conjunction with the [args][google.cloud.aiplatform.v1.ModelContainerSpec.args] field or the
+   * container's [`CMD`](https://docs.docker.com/engine/reference/builder/#cmd),
+   * if either exists. If this field is not specified and the container does not
+   * have an `ENTRYPOINT`, then refer to the Docker documentation about how
+   * `CMD` and `ENTRYPOINT`
+   * [interact](https://tinyurl.com/h3kdcgs).
+   * If you specify this field, then you can also specify the `args` field to
+   * provide additional arguments for this command. However, if you specify this
+   * field, then the container's `CMD` is ignored. See the
+   * [Kubernetes documentation](https://tinyurl.com/y8bvllf4) about how the
+   * `command` and `args` fields interact with a container's `ENTRYPOINT` and
+   * `CMD`.
+   * In this field, you can reference environment variables
+   * [set by AI Platform](https://tinyurl.com/cust-cont-reqs#aip-variables)
+   * and environment variables set in the [env][google.cloud.aiplatform.v1.ModelContainerSpec.env] field.
+   * You cannot reference environment variables set in the Docker image. In
+   * order for environment variables to be expanded, reference them by using the
+   * following syntax:
+   * <code>$(<var>VARIABLE_NAME</var>)</code>
+   * Note that this differs from Bash variable expansion, which does not use
+   * parentheses. If a variable cannot be resolved, the reference in the input
+   * string is used unchanged. To avoid variable expansion, you can escape this
+   * syntax with `$$`; for example:
+   * <code>$$(<var>VARIABLE_NAME</var>)</code>
+   * This field corresponds to the `command` field of the Kubernetes Containers
+   * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+   * 
+ * + * repeated string command = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param index The index of the value to return. + * @return The bytes of the command at the given index. + */ + com.google.protobuf.ByteString getCommandBytes(int index); + + /** + * + * + *
+   * Immutable. Specifies arguments for the command that runs when the container starts.
+   * This overrides the container's
+   * [`CMD`](https://docs.docker.com/engine/reference/builder/#cmd). Specify
+   * this field as an array of executable and arguments, similar to a Docker
+   * `CMD`'s "default parameters" form.
+   * If you don't specify this field but do specify the
+   * [command][google.cloud.aiplatform.v1.ModelContainerSpec.command] field, then the command from the
+   * `command` field runs without any additional arguments. See the
+   * [Kubernetes documentation](https://tinyurl.com/y8bvllf4) about how the
+   * `command` and `args` fields interact with a container's `ENTRYPOINT` and
+   * `CMD`.
+   * If you don't specify this field and don't specify the `command` field,
+   * then the container's
+   * [`ENTRYPOINT`](https://docs.docker.com/engine/reference/builder/#cmd) and
+   * `CMD` determine what runs based on their default behavior. See the Docker
+   * documentation about how `CMD` and `ENTRYPOINT`
+   * [interact](https://tinyurl.com/h3kdcgs).
+   * In this field, you can reference environment variables
+   * [set by AI Platform](https://tinyurl.com/cust-cont-reqs#aip-variables)
+   * and environment variables set in the [env][google.cloud.aiplatform.v1.ModelContainerSpec.env] field.
+   * You cannot reference environment variables set in the Docker image. In
+   * order for environment variables to be expanded, reference them by using the
+   * following syntax:
+   * <code>$(<var>VARIABLE_NAME</var>)</code>
+   * Note that this differs from Bash variable expansion, which does not use
+   * parentheses. If a variable cannot be resolved, the reference in the input
+   * string is used unchanged. To avoid variable expansion, you can escape this
+   * syntax with `$$`; for example:
+   * <code>$$(<var>VARIABLE_NAME</var>)</code>
+   * This field corresponds to the `args` field of the Kubernetes Containers
+   * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+   * 
+ * + * repeated string args = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return A list containing the args. + */ + java.util.List getArgsList(); + /** + * + * + *
+   * Immutable. Specifies arguments for the command that runs when the container starts.
+   * This overrides the container's
+   * [`CMD`](https://docs.docker.com/engine/reference/builder/#cmd). Specify
+   * this field as an array of executable and arguments, similar to a Docker
+   * `CMD`'s "default parameters" form.
+   * If you don't specify this field but do specify the
+   * [command][google.cloud.aiplatform.v1.ModelContainerSpec.command] field, then the command from the
+   * `command` field runs without any additional arguments. See the
+   * [Kubernetes documentation](https://tinyurl.com/y8bvllf4) about how the
+   * `command` and `args` fields interact with a container's `ENTRYPOINT` and
+   * `CMD`.
+   * If you don't specify this field and don't specify the `command` field,
+   * then the container's
+   * [`ENTRYPOINT`](https://docs.docker.com/engine/reference/builder/#cmd) and
+   * `CMD` determine what runs based on their default behavior. See the Docker
+   * documentation about how `CMD` and `ENTRYPOINT`
+   * [interact](https://tinyurl.com/h3kdcgs).
+   * In this field, you can reference environment variables
+   * [set by AI Platform](https://tinyurl.com/cust-cont-reqs#aip-variables)
+   * and environment variables set in the [env][google.cloud.aiplatform.v1.ModelContainerSpec.env] field.
+   * You cannot reference environment variables set in the Docker image. In
+   * order for environment variables to be expanded, reference them by using the
+   * following syntax:
+   * <code>$(<var>VARIABLE_NAME</var>)</code>
+   * Note that this differs from Bash variable expansion, which does not use
+   * parentheses. If a variable cannot be resolved, the reference in the input
+   * string is used unchanged. To avoid variable expansion, you can escape this
+   * syntax with `$$`; for example:
+   * <code>$$(<var>VARIABLE_NAME</var>)</code>
+   * This field corresponds to the `args` field of the Kubernetes Containers
+   * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+   * 
+ * + * repeated string args = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The count of args. + */ + int getArgsCount(); + /** + * + * + *
+   * Immutable. Specifies arguments for the command that runs when the container starts.
+   * This overrides the container's
+   * [`CMD`](https://docs.docker.com/engine/reference/builder/#cmd). Specify
+   * this field as an array of executable and arguments, similar to a Docker
+   * `CMD`'s "default parameters" form.
+   * If you don't specify this field but do specify the
+   * [command][google.cloud.aiplatform.v1.ModelContainerSpec.command] field, then the command from the
+   * `command` field runs without any additional arguments. See the
+   * [Kubernetes documentation](https://tinyurl.com/y8bvllf4) about how the
+   * `command` and `args` fields interact with a container's `ENTRYPOINT` and
+   * `CMD`.
+   * If you don't specify this field and don't specify the `command` field,
+   * then the container's
+   * [`ENTRYPOINT`](https://docs.docker.com/engine/reference/builder/#cmd) and
+   * `CMD` determine what runs based on their default behavior. See the Docker
+   * documentation about how `CMD` and `ENTRYPOINT`
+   * [interact](https://tinyurl.com/h3kdcgs).
+   * In this field, you can reference environment variables
+   * [set by AI Platform](https://tinyurl.com/cust-cont-reqs#aip-variables)
+   * and environment variables set in the [env][google.cloud.aiplatform.v1.ModelContainerSpec.env] field.
+   * You cannot reference environment variables set in the Docker image. In
+   * order for environment variables to be expanded, reference them by using the
+   * following syntax:
+   * <code>$(<var>VARIABLE_NAME</var>)</code>
+   * Note that this differs from Bash variable expansion, which does not use
+   * parentheses. If a variable cannot be resolved, the reference in the input
+   * string is used unchanged. To avoid variable expansion, you can escape this
+   * syntax with `$$`; for example:
+   * <code>$$(<var>VARIABLE_NAME</var>)</code>
+   * This field corresponds to the `args` field of the Kubernetes Containers
+   * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+   * 
+ * + * repeated string args = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param index The index of the element to return. + * @return The args at the given index. + */ + java.lang.String getArgs(int index); + /** + * + * + *
+   * Immutable. Specifies arguments for the command that runs when the container starts.
+   * This overrides the container's
+   * [`CMD`](https://docs.docker.com/engine/reference/builder/#cmd). Specify
+   * this field as an array of executable and arguments, similar to a Docker
+   * `CMD`'s "default parameters" form.
+   * If you don't specify this field but do specify the
+   * [command][google.cloud.aiplatform.v1.ModelContainerSpec.command] field, then the command from the
+   * `command` field runs without any additional arguments. See the
+   * [Kubernetes documentation](https://tinyurl.com/y8bvllf4) about how the
+   * `command` and `args` fields interact with a container's `ENTRYPOINT` and
+   * `CMD`.
+   * If you don't specify this field and don't specify the `command` field,
+   * then the container's
+   * [`ENTRYPOINT`](https://docs.docker.com/engine/reference/builder/#cmd) and
+   * `CMD` determine what runs based on their default behavior. See the Docker
+   * documentation about how `CMD` and `ENTRYPOINT`
+   * [interact](https://tinyurl.com/h3kdcgs).
+   * In this field, you can reference environment variables
+   * [set by AI Platform](https://tinyurl.com/cust-cont-reqs#aip-variables)
+   * and environment variables set in the [env][google.cloud.aiplatform.v1.ModelContainerSpec.env] field.
+   * You cannot reference environment variables set in the Docker image. In
+   * order for environment variables to be expanded, reference them by using the
+   * following syntax:
+   * <code>$(<var>VARIABLE_NAME</var>)</code>
+   * Note that this differs from Bash variable expansion, which does not use
+   * parentheses. If a variable cannot be resolved, the reference in the input
+   * string is used unchanged. To avoid variable expansion, you can escape this
+   * syntax with `$$`; for example:
+   * <code>$$(<var>VARIABLE_NAME</var>)</code>
+   * This field corresponds to the `args` field of the Kubernetes Containers
+   * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+   * 
+ * + * repeated string args = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param index The index of the value to return. + * @return The bytes of the args at the given index. + */ + com.google.protobuf.ByteString getArgsBytes(int index); + + /** + * + * + *
+   * Immutable. List of environment variables to set in the container. After the container
+   * starts running, code running in the container can read these environment
+   * variables.
+   * Additionally, the [command][google.cloud.aiplatform.v1.ModelContainerSpec.command] and
+   * [args][google.cloud.aiplatform.v1.ModelContainerSpec.args] fields can reference these variables. Later
+   * entries in this list can also reference earlier entries. For example, the
+   * following example sets the variable `VAR_2` to have the value `foo bar`:
+   * ```json
+   * [
+   *   {
+   *     "name": "VAR_1",
+   *     "value": "foo"
+   *   },
+   *   {
+   *     "name": "VAR_2",
+   *     "value": "$(VAR_1) bar"
+   *   }
+   * ]
+   * ```
+   * If you switch the order of the variables in the example, then the expansion
+   * does not occur.
+   * This field corresponds to the `env` field of the Kubernetes Containers
+   * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + java.util.List getEnvList(); + /** + * + * + *
+   * Immutable. List of environment variables to set in the container. After the container
+   * starts running, code running in the container can read these environment
+   * variables.
+   * Additionally, the [command][google.cloud.aiplatform.v1.ModelContainerSpec.command] and
+   * [args][google.cloud.aiplatform.v1.ModelContainerSpec.args] fields can reference these variables. Later
+   * entries in this list can also reference earlier entries. For example, the
+   * following example sets the variable `VAR_2` to have the value `foo bar`:
+   * ```json
+   * [
+   *   {
+   *     "name": "VAR_1",
+   *     "value": "foo"
+   *   },
+   *   {
+   *     "name": "VAR_2",
+   *     "value": "$(VAR_1) bar"
+   *   }
+   * ]
+   * ```
+   * If you switch the order of the variables in the example, then the expansion
+   * does not occur.
+   * This field corresponds to the `env` field of the Kubernetes Containers
+   * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + com.google.cloud.aiplatform.v1.EnvVar getEnv(int index); + /** + * + * + *
+   * Immutable. List of environment variables to set in the container. After the container
+   * starts running, code running in the container can read these environment
+   * variables.
+   * Additionally, the [command][google.cloud.aiplatform.v1.ModelContainerSpec.command] and
+   * [args][google.cloud.aiplatform.v1.ModelContainerSpec.args] fields can reference these variables. Later
+   * entries in this list can also reference earlier entries. For example, the
+   * following example sets the variable `VAR_2` to have the value `foo bar`:
+   * ```json
+   * [
+   *   {
+   *     "name": "VAR_1",
+   *     "value": "foo"
+   *   },
+   *   {
+   *     "name": "VAR_2",
+   *     "value": "$(VAR_1) bar"
+   *   }
+   * ]
+   * ```
+   * If you switch the order of the variables in the example, then the expansion
+   * does not occur.
+   * This field corresponds to the `env` field of the Kubernetes Containers
+   * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + int getEnvCount(); + /** + * + * + *
+   * Immutable. List of environment variables to set in the container. After the container
+   * starts running, code running in the container can read these environment
+   * variables.
+   * Additionally, the [command][google.cloud.aiplatform.v1.ModelContainerSpec.command] and
+   * [args][google.cloud.aiplatform.v1.ModelContainerSpec.args] fields can reference these variables. Later
+   * entries in this list can also reference earlier entries. For example, the
+   * following example sets the variable `VAR_2` to have the value `foo bar`:
+   * ```json
+   * [
+   *   {
+   *     "name": "VAR_1",
+   *     "value": "foo"
+   *   },
+   *   {
+   *     "name": "VAR_2",
+   *     "value": "$(VAR_1) bar"
+   *   }
+   * ]
+   * ```
+   * If you switch the order of the variables in the example, then the expansion
+   * does not occur.
+   * This field corresponds to the `env` field of the Kubernetes Containers
+   * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + java.util.List getEnvOrBuilderList(); + /** + * + * + *
+   * Immutable. List of environment variables to set in the container. After the container
+   * starts running, code running in the container can read these environment
+   * variables.
+   * Additionally, the [command][google.cloud.aiplatform.v1.ModelContainerSpec.command] and
+   * [args][google.cloud.aiplatform.v1.ModelContainerSpec.args] fields can reference these variables. Later
+   * entries in this list can also reference earlier entries. For example, the
+   * following example sets the variable `VAR_2` to have the value `foo bar`:
+   * ```json
+   * [
+   *   {
+   *     "name": "VAR_1",
+   *     "value": "foo"
+   *   },
+   *   {
+   *     "name": "VAR_2",
+   *     "value": "$(VAR_1) bar"
+   *   }
+   * ]
+   * ```
+   * If you switch the order of the variables in the example, then the expansion
+   * does not occur.
+   * This field corresponds to the `env` field of the Kubernetes Containers
+   * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + com.google.cloud.aiplatform.v1.EnvVarOrBuilder getEnvOrBuilder(int index); + + /** + * + * + *
+   * Immutable. List of ports to expose from the container. AI Platform sends any
+   * prediction requests that it receives to the first port on this list. AI
+   * Platform also sends
+   * [liveness and health checks](https://tinyurl.com/cust-cont-reqs#health)
+   * to this port.
+   * If you do not specify this field, it defaults to following value:
+   * ```json
+   * [
+   *   {
+   *     "containerPort": 8080
+   *   }
+   * ]
+   * ```
+   * AI Platform does not use ports other than the first one listed. This field
+   * corresponds to the `ports` field of the Kubernetes Containers
+   * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Port ports = 5 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + java.util.List getPortsList(); + /** + * + * + *
+   * Immutable. List of ports to expose from the container. AI Platform sends any
+   * prediction requests that it receives to the first port on this list. AI
+   * Platform also sends
+   * [liveness and health checks](https://tinyurl.com/cust-cont-reqs#health)
+   * to this port.
+   * If you do not specify this field, it defaults to following value:
+   * ```json
+   * [
+   *   {
+   *     "containerPort": 8080
+   *   }
+   * ]
+   * ```
+   * AI Platform does not use ports other than the first one listed. This field
+   * corresponds to the `ports` field of the Kubernetes Containers
+   * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Port ports = 5 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + com.google.cloud.aiplatform.v1.Port getPorts(int index); + /** + * + * + *
+   * Immutable. List of ports to expose from the container. AI Platform sends any
+   * prediction requests that it receives to the first port on this list. AI
+   * Platform also sends
+   * [liveness and health checks](https://tinyurl.com/cust-cont-reqs#health)
+   * to this port.
+   * If you do not specify this field, it defaults to following value:
+   * ```json
+   * [
+   *   {
+   *     "containerPort": 8080
+   *   }
+   * ]
+   * ```
+   * AI Platform does not use ports other than the first one listed. This field
+   * corresponds to the `ports` field of the Kubernetes Containers
+   * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Port ports = 5 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + int getPortsCount(); + /** + * + * + *
+   * Immutable. List of ports to expose from the container. AI Platform sends any
+   * prediction requests that it receives to the first port on this list. AI
+   * Platform also sends
+   * [liveness and health checks](https://tinyurl.com/cust-cont-reqs#health)
+   * to this port.
+   * If you do not specify this field, it defaults to following value:
+   * ```json
+   * [
+   *   {
+   *     "containerPort": 8080
+   *   }
+   * ]
+   * ```
+   * AI Platform does not use ports other than the first one listed. This field
+   * corresponds to the `ports` field of the Kubernetes Containers
+   * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Port ports = 5 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + java.util.List getPortsOrBuilderList(); + /** + * + * + *
+   * Immutable. List of ports to expose from the container. AI Platform sends any
+   * prediction requests that it receives to the first port on this list. AI
+   * Platform also sends
+   * [liveness and health checks](https://tinyurl.com/cust-cont-reqs#health)
+   * to this port.
+   * If you do not specify this field, it defaults to following value:
+   * ```json
+   * [
+   *   {
+   *     "containerPort": 8080
+   *   }
+   * ]
+   * ```
+   * AI Platform does not use ports other than the first one listed. This field
+   * corresponds to the `ports` field of the Kubernetes Containers
+   * [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core).
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Port ports = 5 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + com.google.cloud.aiplatform.v1.PortOrBuilder getPortsOrBuilder(int index); + + /** + * + * + *
+   * Immutable. HTTP path on the container to send prediction requests to. AI Platform
+   * forwards requests sent using
+   * [projects.locations.endpoints.predict][google.cloud.aiplatform.v1.PredictionService.Predict] to this
+   * path on the container's IP address and port. AI Platform then returns the
+   * container's response in the API response.
+   * For example, if you set this field to `/foo`, then when AI Platform
+   * receives a prediction request, it forwards the request body in a POST
+   * request to the `/foo` path on the port of your container specified by the
+   * first value of this `ModelContainerSpec`'s
+   * [ports][google.cloud.aiplatform.v1.ModelContainerSpec.ports] field.
+   * If you don't specify this field, it defaults to the following value when
+   * you [deploy this Model to an Endpoint][google.cloud.aiplatform.v1.EndpointService.DeployModel]:
+   * <code>/v1/endpoints/<var>ENDPOINT</var>/deployedModels/<var>DEPLOYED_MODEL</var>:predict</code>
+   * The placeholders in this value are replaced as follows:
+   * * <var>ENDPOINT</var>: The last segment (following `endpoints/`)of the
+   *   Endpoint.name][] field of the Endpoint where this Model has been
+   *   deployed. (AI Platform makes this value available to your container code
+   *   as the
+   *  [`AIP_ENDPOINT_ID`](https://tinyurl.com/cust-cont-reqs#aip-variables)
+   *  environment variable.)
+   * * <var>DEPLOYED_MODEL</var>: [DeployedModel.id][google.cloud.aiplatform.v1.DeployedModel.id] of the `DeployedModel`.
+   *   (AI Platform makes this value available to your container code
+   *   as the [`AIP_DEPLOYED_MODEL_ID` environment
+   *   variable](https://tinyurl.com/cust-cont-reqs#aip-variables).)
+   * 
+ * + * string predict_route = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The predictRoute. + */ + java.lang.String getPredictRoute(); + /** + * + * + *
+   * Immutable. HTTP path on the container to send prediction requests to. AI Platform
+   * forwards requests sent using
+   * [projects.locations.endpoints.predict][google.cloud.aiplatform.v1.PredictionService.Predict] to this
+   * path on the container's IP address and port. AI Platform then returns the
+   * container's response in the API response.
+   * For example, if you set this field to `/foo`, then when AI Platform
+   * receives a prediction request, it forwards the request body in a POST
+   * request to the `/foo` path on the port of your container specified by the
+   * first value of this `ModelContainerSpec`'s
+   * [ports][google.cloud.aiplatform.v1.ModelContainerSpec.ports] field.
+   * If you don't specify this field, it defaults to the following value when
+   * you [deploy this Model to an Endpoint][google.cloud.aiplatform.v1.EndpointService.DeployModel]:
+   * <code>/v1/endpoints/<var>ENDPOINT</var>/deployedModels/<var>DEPLOYED_MODEL</var>:predict</code>
+   * The placeholders in this value are replaced as follows:
+   * * <var>ENDPOINT</var>: The last segment (following `endpoints/`)of the
+   *   Endpoint.name][] field of the Endpoint where this Model has been
+   *   deployed. (AI Platform makes this value available to your container code
+   *   as the
+   *  [`AIP_ENDPOINT_ID`](https://tinyurl.com/cust-cont-reqs#aip-variables)
+   *  environment variable.)
+   * * <var>DEPLOYED_MODEL</var>: [DeployedModel.id][google.cloud.aiplatform.v1.DeployedModel.id] of the `DeployedModel`.
+   *   (AI Platform makes this value available to your container code
+   *   as the [`AIP_DEPLOYED_MODEL_ID` environment
+   *   variable](https://tinyurl.com/cust-cont-reqs#aip-variables).)
+   * 
+ * + * string predict_route = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for predictRoute. + */ + com.google.protobuf.ByteString getPredictRouteBytes(); + + /** + * + * + *
+   * Immutable. HTTP path on the container to send health checks to. AI Platform
+   * intermittently sends GET requests to this path on the container's IP
+   * address and port to check that the container is healthy. Read more about
+   * [health
+   * checks](https://tinyurl.com/cust-cont-reqs#checks).
+   * For example, if you set this field to `/bar`, then AI Platform
+   * intermittently sends a GET request to the `/bar` path on the port of your
+   * container specified by the first value of this `ModelContainerSpec`'s
+   * [ports][google.cloud.aiplatform.v1.ModelContainerSpec.ports] field.
+   * If you don't specify this field, it defaults to the following value when
+   * you [deploy this Model to an Endpoint][google.cloud.aiplatform.v1.EndpointService.DeployModel]:
+   * <code>/v1/endpoints/<var>ENDPOINT</var>/deployedModels/<var>DEPLOYED_MODEL</var>:predict</code>
+   * The placeholders in this value are replaced as follows:
+   * * <var>ENDPOINT</var>: The last segment (following `endpoints/`)of the
+   *   Endpoint.name][] field of the Endpoint where this Model has been
+   *   deployed. (AI Platform makes this value available to your container code
+   *   as the
+   *   [`AIP_ENDPOINT_ID`](https://tinyurl.com/cust-cont-reqs#aip-variables)
+   *   environment variable.)
+   * * <var>DEPLOYED_MODEL</var>: [DeployedModel.id][google.cloud.aiplatform.v1.DeployedModel.id] of the `DeployedModel`.
+   *   (AI Platform makes this value available to your container code as the
+   * [`AIP_DEPLOYED_MODEL_ID`](https://tinyurl.com/cust-cont-reqs#aip-variables)
+   *   environment variable.)
+   * 
+ * + * string health_route = 7 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The healthRoute. + */ + java.lang.String getHealthRoute(); + /** + * + * + *
+   * Immutable. HTTP path on the container to send health checks to. AI Platform
+   * intermittently sends GET requests to this path on the container's IP
+   * address and port to check that the container is healthy. Read more about
+   * [health
+   * checks](https://tinyurl.com/cust-cont-reqs#checks).
+   * For example, if you set this field to `/bar`, then AI Platform
+   * intermittently sends a GET request to the `/bar` path on the port of your
+   * container specified by the first value of this `ModelContainerSpec`'s
+   * [ports][google.cloud.aiplatform.v1.ModelContainerSpec.ports] field.
+   * If you don't specify this field, it defaults to the following value when
+   * you [deploy this Model to an Endpoint][google.cloud.aiplatform.v1.EndpointService.DeployModel]:
+   * <code>/v1/endpoints/<var>ENDPOINT</var>/deployedModels/<var>DEPLOYED_MODEL</var>:predict</code>
+   * The placeholders in this value are replaced as follows:
+   * * <var>ENDPOINT</var>: The last segment (following `endpoints/`)of the
+   *   Endpoint.name][] field of the Endpoint where this Model has been
+   *   deployed. (AI Platform makes this value available to your container code
+   *   as the
+   *   [`AIP_ENDPOINT_ID`](https://tinyurl.com/cust-cont-reqs#aip-variables)
+   *   environment variable.)
+   * * <var>DEPLOYED_MODEL</var>: [DeployedModel.id][google.cloud.aiplatform.v1.DeployedModel.id] of the `DeployedModel`.
+   *   (AI Platform makes this value available to your container code as the
+   * [`AIP_DEPLOYED_MODEL_ID`](https://tinyurl.com/cust-cont-reqs#aip-variables)
+   *   environment variable.)
+   * 
+ * + * string health_route = 7 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for healthRoute. + */ + com.google.protobuf.ByteString getHealthRouteBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelEvaluation.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelEvaluation.java new file mode 100644 index 000000000..da604b01a --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelEvaluation.java @@ -0,0 +1,1735 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/model_evaluation.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * A collection of metrics calculated by comparing Model's predictions on all of
+ * the test data against annotations from the test data.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ModelEvaluation} + */ +public final class ModelEvaluation extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ModelEvaluation) + ModelEvaluationOrBuilder { + private static final long serialVersionUID = 0L; + // Use ModelEvaluation.newBuilder() to construct. + private ModelEvaluation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ModelEvaluation() { + name_ = ""; + metricsSchemaUri_ = ""; + sliceDimensions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ModelEvaluation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ModelEvaluation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + metricsSchemaUri_ = s; + break; + } + case 26: + { + com.google.protobuf.Value.Builder subBuilder = null; + if (metrics_ != null) { + subBuilder = metrics_.toBuilder(); + } + metrics_ = input.readMessage(com.google.protobuf.Value.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(metrics_); + metrics_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + sliceDimensions_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + sliceDimensions_.add(s); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + sliceDimensions_ = sliceDimensions_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.ModelEvaluationProto + .internal_static_google_cloud_aiplatform_v1_ModelEvaluation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ModelEvaluationProto + .internal_static_google_cloud_aiplatform_v1_ModelEvaluation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ModelEvaluation.class, + com.google.cloud.aiplatform.v1.ModelEvaluation.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Output only. The resource name of the ModelEvaluation.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The resource name of the ModelEvaluation.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int METRICS_SCHEMA_URI_FIELD_NUMBER = 2; + private volatile java.lang.Object metricsSchemaUri_; + /** + * + * + *
+   * Output only. Points to a YAML file stored on Google Cloud Storage describing the
+   * [metrics][google.cloud.aiplatform.v1.ModelEvaluation.metrics] of this ModelEvaluation. The schema is
+   * defined as an OpenAPI 3.0.2
+   * [Schema Object](https://tinyurl.com/y538mdwt#schema-object).
+   * 
+ * + * string metrics_schema_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The metricsSchemaUri. + */ + @java.lang.Override + public java.lang.String getMetricsSchemaUri() { + java.lang.Object ref = metricsSchemaUri_; + 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(); + metricsSchemaUri_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Points to a YAML file stored on Google Cloud Storage describing the
+   * [metrics][google.cloud.aiplatform.v1.ModelEvaluation.metrics] of this ModelEvaluation. The schema is
+   * defined as an OpenAPI 3.0.2
+   * [Schema Object](https://tinyurl.com/y538mdwt#schema-object).
+   * 
+ * + * string metrics_schema_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for metricsSchemaUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMetricsSchemaUriBytes() { + java.lang.Object ref = metricsSchemaUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + metricsSchemaUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int METRICS_FIELD_NUMBER = 3; + private com.google.protobuf.Value metrics_; + /** + * + * + *
+   * Output only. Evaluation metrics of the Model. The schema of the metrics is stored in
+   * [metrics_schema_uri][google.cloud.aiplatform.v1.ModelEvaluation.metrics_schema_uri]
+   * 
+ * + * .google.protobuf.Value metrics = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the metrics field is set. + */ + @java.lang.Override + public boolean hasMetrics() { + return metrics_ != null; + } + /** + * + * + *
+   * Output only. Evaluation metrics of the Model. The schema of the metrics is stored in
+   * [metrics_schema_uri][google.cloud.aiplatform.v1.ModelEvaluation.metrics_schema_uri]
+   * 
+ * + * .google.protobuf.Value metrics = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The metrics. + */ + @java.lang.Override + public com.google.protobuf.Value getMetrics() { + return metrics_ == null ? com.google.protobuf.Value.getDefaultInstance() : metrics_; + } + /** + * + * + *
+   * Output only. Evaluation metrics of the Model. The schema of the metrics is stored in
+   * [metrics_schema_uri][google.cloud.aiplatform.v1.ModelEvaluation.metrics_schema_uri]
+   * 
+ * + * .google.protobuf.Value metrics = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.ValueOrBuilder getMetricsOrBuilder() { + return getMetrics(); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. Timestamp when this ModelEvaluation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. Timestamp when this ModelEvaluation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. Timestamp when this ModelEvaluation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int SLICE_DIMENSIONS_FIELD_NUMBER = 5; + private com.google.protobuf.LazyStringList sliceDimensions_; + /** + * + * + *
+   * Output only. All possible [dimensions][ModelEvaluationSlice.slice.dimension] of
+   * ModelEvaluationSlices. The dimensions can be used as the filter of the
+   * [ModelService.ListModelEvaluationSlices][google.cloud.aiplatform.v1.ModelService.ListModelEvaluationSlices] request, in the form of
+   * `slice.dimension = <dimension>`.
+   * 
+ * + * repeated string slice_dimensions = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return A list containing the sliceDimensions. + */ + public com.google.protobuf.ProtocolStringList getSliceDimensionsList() { + return sliceDimensions_; + } + /** + * + * + *
+   * Output only. All possible [dimensions][ModelEvaluationSlice.slice.dimension] of
+   * ModelEvaluationSlices. The dimensions can be used as the filter of the
+   * [ModelService.ListModelEvaluationSlices][google.cloud.aiplatform.v1.ModelService.ListModelEvaluationSlices] request, in the form of
+   * `slice.dimension = <dimension>`.
+   * 
+ * + * repeated string slice_dimensions = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count of sliceDimensions. + */ + public int getSliceDimensionsCount() { + return sliceDimensions_.size(); + } + /** + * + * + *
+   * Output only. All possible [dimensions][ModelEvaluationSlice.slice.dimension] of
+   * ModelEvaluationSlices. The dimensions can be used as the filter of the
+   * [ModelService.ListModelEvaluationSlices][google.cloud.aiplatform.v1.ModelService.ListModelEvaluationSlices] request, in the form of
+   * `slice.dimension = <dimension>`.
+   * 
+ * + * repeated string slice_dimensions = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the element to return. + * @return The sliceDimensions at the given index. + */ + public java.lang.String getSliceDimensions(int index) { + return sliceDimensions_.get(index); + } + /** + * + * + *
+   * Output only. All possible [dimensions][ModelEvaluationSlice.slice.dimension] of
+   * ModelEvaluationSlices. The dimensions can be used as the filter of the
+   * [ModelService.ListModelEvaluationSlices][google.cloud.aiplatform.v1.ModelService.ListModelEvaluationSlices] request, in the form of
+   * `slice.dimension = <dimension>`.
+   * 
+ * + * repeated string slice_dimensions = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the value to return. + * @return The bytes of the sliceDimensions at the given index. + */ + public com.google.protobuf.ByteString getSliceDimensionsBytes(int index) { + return sliceDimensions_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getMetricsSchemaUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, metricsSchemaUri_); + } + if (metrics_ != null) { + output.writeMessage(3, getMetrics()); + } + if (createTime_ != null) { + output.writeMessage(4, getCreateTime()); + } + for (int i = 0; i < sliceDimensions_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, sliceDimensions_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getMetricsSchemaUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, metricsSchemaUri_); + } + if (metrics_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getMetrics()); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getCreateTime()); + } + { + int dataSize = 0; + for (int i = 0; i < sliceDimensions_.size(); i++) { + dataSize += computeStringSizeNoTag(sliceDimensions_.getRaw(i)); + } + size += dataSize; + size += 1 * getSliceDimensionsList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.ModelEvaluation)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ModelEvaluation other = + (com.google.cloud.aiplatform.v1.ModelEvaluation) obj; + + if (!getName().equals(other.getName())) return false; + if (!getMetricsSchemaUri().equals(other.getMetricsSchemaUri())) return false; + if (hasMetrics() != other.hasMetrics()) return false; + if (hasMetrics()) { + if (!getMetrics().equals(other.getMetrics())) return false; + } + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (!getSliceDimensionsList().equals(other.getSliceDimensionsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + METRICS_SCHEMA_URI_FIELD_NUMBER; + hash = (53 * hash) + getMetricsSchemaUri().hashCode(); + if (hasMetrics()) { + hash = (37 * hash) + METRICS_FIELD_NUMBER; + hash = (53 * hash) + getMetrics().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (getSliceDimensionsCount() > 0) { + hash = (37 * hash) + SLICE_DIMENSIONS_FIELD_NUMBER; + hash = (53 * hash) + getSliceDimensionsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.ModelEvaluation parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ModelEvaluation parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ModelEvaluation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ModelEvaluation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ModelEvaluation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ModelEvaluation parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ModelEvaluation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ModelEvaluation parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ModelEvaluation parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ModelEvaluation parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ModelEvaluation parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ModelEvaluation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1.ModelEvaluation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A collection of metrics calculated by comparing Model's predictions on all of
+   * the test data against annotations from the test data.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ModelEvaluation} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ModelEvaluation) + com.google.cloud.aiplatform.v1.ModelEvaluationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.ModelEvaluationProto + .internal_static_google_cloud_aiplatform_v1_ModelEvaluation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ModelEvaluationProto + .internal_static_google_cloud_aiplatform_v1_ModelEvaluation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ModelEvaluation.class, + com.google.cloud.aiplatform.v1.ModelEvaluation.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ModelEvaluation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + metricsSchemaUri_ = ""; + + if (metricsBuilder_ == null) { + metrics_ = null; + } else { + metrics_ = null; + metricsBuilder_ = null; + } + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + sliceDimensions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.ModelEvaluationProto + .internal_static_google_cloud_aiplatform_v1_ModelEvaluation_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ModelEvaluation getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ModelEvaluation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ModelEvaluation build() { + com.google.cloud.aiplatform.v1.ModelEvaluation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ModelEvaluation buildPartial() { + com.google.cloud.aiplatform.v1.ModelEvaluation result = + new com.google.cloud.aiplatform.v1.ModelEvaluation(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.metricsSchemaUri_ = metricsSchemaUri_; + if (metricsBuilder_ == null) { + result.metrics_ = metrics_; + } else { + result.metrics_ = metricsBuilder_.build(); + } + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (((bitField0_ & 0x00000001) != 0)) { + sliceDimensions_ = sliceDimensions_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.sliceDimensions_ = sliceDimensions_; + 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.v1.ModelEvaluation) { + return mergeFrom((com.google.cloud.aiplatform.v1.ModelEvaluation) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.ModelEvaluation other) { + if (other == com.google.cloud.aiplatform.v1.ModelEvaluation.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getMetricsSchemaUri().isEmpty()) { + metricsSchemaUri_ = other.metricsSchemaUri_; + onChanged(); + } + if (other.hasMetrics()) { + mergeMetrics(other.getMetrics()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (!other.sliceDimensions_.isEmpty()) { + if (sliceDimensions_.isEmpty()) { + sliceDimensions_ = other.sliceDimensions_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSliceDimensionsIsMutable(); + sliceDimensions_.addAll(other.sliceDimensions_); + } + 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.v1.ModelEvaluation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.aiplatform.v1.ModelEvaluation) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. The resource name of the ModelEvaluation.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The resource name of the ModelEvaluation.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The resource name of the ModelEvaluation.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource name of the ModelEvaluation.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource name of the ModelEvaluation.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object metricsSchemaUri_ = ""; + /** + * + * + *
+     * Output only. Points to a YAML file stored on Google Cloud Storage describing the
+     * [metrics][google.cloud.aiplatform.v1.ModelEvaluation.metrics] of this ModelEvaluation. The schema is
+     * defined as an OpenAPI 3.0.2
+     * [Schema Object](https://tinyurl.com/y538mdwt#schema-object).
+     * 
+ * + * string metrics_schema_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The metricsSchemaUri. + */ + public java.lang.String getMetricsSchemaUri() { + java.lang.Object ref = metricsSchemaUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + metricsSchemaUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Points to a YAML file stored on Google Cloud Storage describing the
+     * [metrics][google.cloud.aiplatform.v1.ModelEvaluation.metrics] of this ModelEvaluation. The schema is
+     * defined as an OpenAPI 3.0.2
+     * [Schema Object](https://tinyurl.com/y538mdwt#schema-object).
+     * 
+ * + * string metrics_schema_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for metricsSchemaUri. + */ + public com.google.protobuf.ByteString getMetricsSchemaUriBytes() { + java.lang.Object ref = metricsSchemaUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + metricsSchemaUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Points to a YAML file stored on Google Cloud Storage describing the
+     * [metrics][google.cloud.aiplatform.v1.ModelEvaluation.metrics] of this ModelEvaluation. The schema is
+     * defined as an OpenAPI 3.0.2
+     * [Schema Object](https://tinyurl.com/y538mdwt#schema-object).
+     * 
+ * + * string metrics_schema_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The metricsSchemaUri to set. + * @return This builder for chaining. + */ + public Builder setMetricsSchemaUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + metricsSchemaUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Points to a YAML file stored on Google Cloud Storage describing the
+     * [metrics][google.cloud.aiplatform.v1.ModelEvaluation.metrics] of this ModelEvaluation. The schema is
+     * defined as an OpenAPI 3.0.2
+     * [Schema Object](https://tinyurl.com/y538mdwt#schema-object).
+     * 
+ * + * string metrics_schema_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearMetricsSchemaUri() { + + metricsSchemaUri_ = getDefaultInstance().getMetricsSchemaUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Points to a YAML file stored on Google Cloud Storage describing the
+     * [metrics][google.cloud.aiplatform.v1.ModelEvaluation.metrics] of this ModelEvaluation. The schema is
+     * defined as an OpenAPI 3.0.2
+     * [Schema Object](https://tinyurl.com/y538mdwt#schema-object).
+     * 
+ * + * string metrics_schema_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for metricsSchemaUri to set. + * @return This builder for chaining. + */ + public Builder setMetricsSchemaUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + metricsSchemaUri_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Value metrics_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Value, + com.google.protobuf.Value.Builder, + com.google.protobuf.ValueOrBuilder> + metricsBuilder_; + /** + * + * + *
+     * Output only. Evaluation metrics of the Model. The schema of the metrics is stored in
+     * [metrics_schema_uri][google.cloud.aiplatform.v1.ModelEvaluation.metrics_schema_uri]
+     * 
+ * + * .google.protobuf.Value metrics = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the metrics field is set. + */ + public boolean hasMetrics() { + return metricsBuilder_ != null || metrics_ != null; + } + /** + * + * + *
+     * Output only. Evaluation metrics of the Model. The schema of the metrics is stored in
+     * [metrics_schema_uri][google.cloud.aiplatform.v1.ModelEvaluation.metrics_schema_uri]
+     * 
+ * + * .google.protobuf.Value metrics = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The metrics. + */ + public com.google.protobuf.Value getMetrics() { + if (metricsBuilder_ == null) { + return metrics_ == null ? com.google.protobuf.Value.getDefaultInstance() : metrics_; + } else { + return metricsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Evaluation metrics of the Model. The schema of the metrics is stored in
+     * [metrics_schema_uri][google.cloud.aiplatform.v1.ModelEvaluation.metrics_schema_uri]
+     * 
+ * + * .google.protobuf.Value metrics = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setMetrics(com.google.protobuf.Value value) { + if (metricsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metrics_ = value; + onChanged(); + } else { + metricsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Evaluation metrics of the Model. The schema of the metrics is stored in
+     * [metrics_schema_uri][google.cloud.aiplatform.v1.ModelEvaluation.metrics_schema_uri]
+     * 
+ * + * .google.protobuf.Value metrics = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setMetrics(com.google.protobuf.Value.Builder builderForValue) { + if (metricsBuilder_ == null) { + metrics_ = builderForValue.build(); + onChanged(); + } else { + metricsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Evaluation metrics of the Model. The schema of the metrics is stored in
+     * [metrics_schema_uri][google.cloud.aiplatform.v1.ModelEvaluation.metrics_schema_uri]
+     * 
+ * + * .google.protobuf.Value metrics = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeMetrics(com.google.protobuf.Value value) { + if (metricsBuilder_ == null) { + if (metrics_ != null) { + metrics_ = com.google.protobuf.Value.newBuilder(metrics_).mergeFrom(value).buildPartial(); + } else { + metrics_ = value; + } + onChanged(); + } else { + metricsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Evaluation metrics of the Model. The schema of the metrics is stored in
+     * [metrics_schema_uri][google.cloud.aiplatform.v1.ModelEvaluation.metrics_schema_uri]
+     * 
+ * + * .google.protobuf.Value metrics = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearMetrics() { + if (metricsBuilder_ == null) { + metrics_ = null; + onChanged(); + } else { + metrics_ = null; + metricsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Evaluation metrics of the Model. The schema of the metrics is stored in
+     * [metrics_schema_uri][google.cloud.aiplatform.v1.ModelEvaluation.metrics_schema_uri]
+     * 
+ * + * .google.protobuf.Value metrics = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Value.Builder getMetricsBuilder() { + + onChanged(); + return getMetricsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Evaluation metrics of the Model. The schema of the metrics is stored in
+     * [metrics_schema_uri][google.cloud.aiplatform.v1.ModelEvaluation.metrics_schema_uri]
+     * 
+ * + * .google.protobuf.Value metrics = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.ValueOrBuilder getMetricsOrBuilder() { + if (metricsBuilder_ != null) { + return metricsBuilder_.getMessageOrBuilder(); + } else { + return metrics_ == null ? com.google.protobuf.Value.getDefaultInstance() : metrics_; + } + } + /** + * + * + *
+     * Output only. Evaluation metrics of the Model. The schema of the metrics is stored in
+     * [metrics_schema_uri][google.cloud.aiplatform.v1.ModelEvaluation.metrics_schema_uri]
+     * 
+ * + * .google.protobuf.Value metrics = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Value, + com.google.protobuf.Value.Builder, + com.google.protobuf.ValueOrBuilder> + getMetricsFieldBuilder() { + if (metricsBuilder_ == null) { + metricsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Value, + com.google.protobuf.Value.Builder, + com.google.protobuf.ValueOrBuilder>( + getMetrics(), getParentForChildren(), isClean()); + metrics_ = null; + } + return metricsBuilder_; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. Timestamp when this ModelEvaluation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * Output only. Timestamp when this ModelEvaluation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Timestamp when this ModelEvaluation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this ModelEvaluation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this ModelEvaluation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this ModelEvaluation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this ModelEvaluation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Timestamp when this ModelEvaluation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. Timestamp when this ModelEvaluation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.LazyStringList sliceDimensions_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureSliceDimensionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + sliceDimensions_ = new com.google.protobuf.LazyStringArrayList(sliceDimensions_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * Output only. All possible [dimensions][ModelEvaluationSlice.slice.dimension] of
+     * ModelEvaluationSlices. The dimensions can be used as the filter of the
+     * [ModelService.ListModelEvaluationSlices][google.cloud.aiplatform.v1.ModelService.ListModelEvaluationSlices] request, in the form of
+     * `slice.dimension = <dimension>`.
+     * 
+ * + * repeated string slice_dimensions = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the sliceDimensions. + */ + public com.google.protobuf.ProtocolStringList getSliceDimensionsList() { + return sliceDimensions_.getUnmodifiableView(); + } + /** + * + * + *
+     * Output only. All possible [dimensions][ModelEvaluationSlice.slice.dimension] of
+     * ModelEvaluationSlices. The dimensions can be used as the filter of the
+     * [ModelService.ListModelEvaluationSlices][google.cloud.aiplatform.v1.ModelService.ListModelEvaluationSlices] request, in the form of
+     * `slice.dimension = <dimension>`.
+     * 
+ * + * repeated string slice_dimensions = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of sliceDimensions. + */ + public int getSliceDimensionsCount() { + return sliceDimensions_.size(); + } + /** + * + * + *
+     * Output only. All possible [dimensions][ModelEvaluationSlice.slice.dimension] of
+     * ModelEvaluationSlices. The dimensions can be used as the filter of the
+     * [ModelService.ListModelEvaluationSlices][google.cloud.aiplatform.v1.ModelService.ListModelEvaluationSlices] request, in the form of
+     * `slice.dimension = <dimension>`.
+     * 
+ * + * repeated string slice_dimensions = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The sliceDimensions at the given index. + */ + public java.lang.String getSliceDimensions(int index) { + return sliceDimensions_.get(index); + } + /** + * + * + *
+     * Output only. All possible [dimensions][ModelEvaluationSlice.slice.dimension] of
+     * ModelEvaluationSlices. The dimensions can be used as the filter of the
+     * [ModelService.ListModelEvaluationSlices][google.cloud.aiplatform.v1.ModelService.ListModelEvaluationSlices] request, in the form of
+     * `slice.dimension = <dimension>`.
+     * 
+ * + * repeated string slice_dimensions = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The bytes of the sliceDimensions at the given index. + */ + public com.google.protobuf.ByteString getSliceDimensionsBytes(int index) { + return sliceDimensions_.getByteString(index); + } + /** + * + * + *
+     * Output only. All possible [dimensions][ModelEvaluationSlice.slice.dimension] of
+     * ModelEvaluationSlices. The dimensions can be used as the filter of the
+     * [ModelService.ListModelEvaluationSlices][google.cloud.aiplatform.v1.ModelService.ListModelEvaluationSlices] request, in the form of
+     * `slice.dimension = <dimension>`.
+     * 
+ * + * repeated string slice_dimensions = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index to set the value at. + * @param value The sliceDimensions to set. + * @return This builder for chaining. + */ + public Builder setSliceDimensions(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSliceDimensionsIsMutable(); + sliceDimensions_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. All possible [dimensions][ModelEvaluationSlice.slice.dimension] of
+     * ModelEvaluationSlices. The dimensions can be used as the filter of the
+     * [ModelService.ListModelEvaluationSlices][google.cloud.aiplatform.v1.ModelService.ListModelEvaluationSlices] request, in the form of
+     * `slice.dimension = <dimension>`.
+     * 
+ * + * repeated string slice_dimensions = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The sliceDimensions to add. + * @return This builder for chaining. + */ + public Builder addSliceDimensions(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSliceDimensionsIsMutable(); + sliceDimensions_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. All possible [dimensions][ModelEvaluationSlice.slice.dimension] of
+     * ModelEvaluationSlices. The dimensions can be used as the filter of the
+     * [ModelService.ListModelEvaluationSlices][google.cloud.aiplatform.v1.ModelService.ListModelEvaluationSlices] request, in the form of
+     * `slice.dimension = <dimension>`.
+     * 
+ * + * repeated string slice_dimensions = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param values The sliceDimensions to add. + * @return This builder for chaining. + */ + public Builder addAllSliceDimensions(java.lang.Iterable values) { + ensureSliceDimensionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, sliceDimensions_); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. All possible [dimensions][ModelEvaluationSlice.slice.dimension] of
+     * ModelEvaluationSlices. The dimensions can be used as the filter of the
+     * [ModelService.ListModelEvaluationSlices][google.cloud.aiplatform.v1.ModelService.ListModelEvaluationSlices] request, in the form of
+     * `slice.dimension = <dimension>`.
+     * 
+ * + * repeated string slice_dimensions = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearSliceDimensions() { + sliceDimensions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. All possible [dimensions][ModelEvaluationSlice.slice.dimension] of
+     * ModelEvaluationSlices. The dimensions can be used as the filter of the
+     * [ModelService.ListModelEvaluationSlices][google.cloud.aiplatform.v1.ModelService.ListModelEvaluationSlices] request, in the form of
+     * `slice.dimension = <dimension>`.
+     * 
+ * + * repeated string slice_dimensions = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The bytes of the sliceDimensions to add. + * @return This builder for chaining. + */ + public Builder addSliceDimensionsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureSliceDimensionsIsMutable(); + sliceDimensions_.add(value); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.ModelEvaluation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ModelEvaluation) + private static final com.google.cloud.aiplatform.v1.ModelEvaluation DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ModelEvaluation(); + } + + public static com.google.cloud.aiplatform.v1.ModelEvaluation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ModelEvaluation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ModelEvaluation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ModelEvaluation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelEvaluationName.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelEvaluationName.java new file mode 100644 index 000000000..a7a796c8a --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelEvaluationName.java @@ -0,0 +1,260 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class ModelEvaluationName implements ResourceName { + 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; + } + + public String getLocation() { + return location; + } + + public String getModel() { + return model; + } + + public String getEvaluation() { + return evaluation; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static ModelEvaluationName of( + String project, String location, String model, String evaluation) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setModel(model) + .setEvaluation(evaluation) + .build(); + } + + public static String format(String project, String location, String model, String evaluation) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setModel(model) + .setEvaluation(evaluation) + .build() + .toString(); + } + + public static ModelEvaluationName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_MODEL_EVALUATION.validatedMatch( + formattedString, "ModelEvaluationName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("model"), + matchMap.get("evaluation")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (ModelEvaluationName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_MODEL_EVALUATION.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 (location != null) { + fieldMapBuilder.put("location", location); + } + if (model != null) { + fieldMapBuilder.put("model", model); + } + if (evaluation != null) { + fieldMapBuilder.put("evaluation", evaluation); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_MODEL_EVALUATION.instantiate( + "project", project, "location", location, "model", model, "evaluation", evaluation); + } + + @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; + } + + public String getLocation() { + return location; + } + + public String getModel() { + return model; + } + + public String getEvaluation() { + return evaluation; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setModel(String model) { + this.model = model; + return this; + } + + public Builder setEvaluation(String evaluation) { + this.evaluation = evaluation; + return this; + } + + private Builder(ModelEvaluationName modelEvaluationName) { + project = modelEvaluationName.project; + location = modelEvaluationName.location; + model = modelEvaluationName.model; + evaluation = modelEvaluationName.evaluation; + } + + public ModelEvaluationName build() { + return new ModelEvaluationName(this); + } + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelEvaluationOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelEvaluationOrBuilder.java new file mode 100644 index 000000000..7bf6bcb84 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelEvaluationOrBuilder.java @@ -0,0 +1,220 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/model_evaluation.proto + +package com.google.cloud.aiplatform.v1; + +public interface ModelEvaluationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ModelEvaluation) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The resource name of the ModelEvaluation.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. The resource name of the ModelEvaluation.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. Points to a YAML file stored on Google Cloud Storage describing the
+   * [metrics][google.cloud.aiplatform.v1.ModelEvaluation.metrics] of this ModelEvaluation. The schema is
+   * defined as an OpenAPI 3.0.2
+   * [Schema Object](https://tinyurl.com/y538mdwt#schema-object).
+   * 
+ * + * string metrics_schema_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The metricsSchemaUri. + */ + java.lang.String getMetricsSchemaUri(); + /** + * + * + *
+   * Output only. Points to a YAML file stored on Google Cloud Storage describing the
+   * [metrics][google.cloud.aiplatform.v1.ModelEvaluation.metrics] of this ModelEvaluation. The schema is
+   * defined as an OpenAPI 3.0.2
+   * [Schema Object](https://tinyurl.com/y538mdwt#schema-object).
+   * 
+ * + * string metrics_schema_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for metricsSchemaUri. + */ + com.google.protobuf.ByteString getMetricsSchemaUriBytes(); + + /** + * + * + *
+   * Output only. Evaluation metrics of the Model. The schema of the metrics is stored in
+   * [metrics_schema_uri][google.cloud.aiplatform.v1.ModelEvaluation.metrics_schema_uri]
+   * 
+ * + * .google.protobuf.Value metrics = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the metrics field is set. + */ + boolean hasMetrics(); + /** + * + * + *
+   * Output only. Evaluation metrics of the Model. The schema of the metrics is stored in
+   * [metrics_schema_uri][google.cloud.aiplatform.v1.ModelEvaluation.metrics_schema_uri]
+   * 
+ * + * .google.protobuf.Value metrics = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The metrics. + */ + com.google.protobuf.Value getMetrics(); + /** + * + * + *
+   * Output only. Evaluation metrics of the Model. The schema of the metrics is stored in
+   * [metrics_schema_uri][google.cloud.aiplatform.v1.ModelEvaluation.metrics_schema_uri]
+   * 
+ * + * .google.protobuf.Value metrics = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.ValueOrBuilder getMetricsOrBuilder(); + + /** + * + * + *
+   * Output only. Timestamp when this ModelEvaluation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Timestamp when this ModelEvaluation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Timestamp when this ModelEvaluation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. All possible [dimensions][ModelEvaluationSlice.slice.dimension] of
+   * ModelEvaluationSlices. The dimensions can be used as the filter of the
+   * [ModelService.ListModelEvaluationSlices][google.cloud.aiplatform.v1.ModelService.ListModelEvaluationSlices] request, in the form of
+   * `slice.dimension = <dimension>`.
+   * 
+ * + * repeated string slice_dimensions = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return A list containing the sliceDimensions. + */ + java.util.List getSliceDimensionsList(); + /** + * + * + *
+   * Output only. All possible [dimensions][ModelEvaluationSlice.slice.dimension] of
+   * ModelEvaluationSlices. The dimensions can be used as the filter of the
+   * [ModelService.ListModelEvaluationSlices][google.cloud.aiplatform.v1.ModelService.ListModelEvaluationSlices] request, in the form of
+   * `slice.dimension = <dimension>`.
+   * 
+ * + * repeated string slice_dimensions = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count of sliceDimensions. + */ + int getSliceDimensionsCount(); + /** + * + * + *
+   * Output only. All possible [dimensions][ModelEvaluationSlice.slice.dimension] of
+   * ModelEvaluationSlices. The dimensions can be used as the filter of the
+   * [ModelService.ListModelEvaluationSlices][google.cloud.aiplatform.v1.ModelService.ListModelEvaluationSlices] request, in the form of
+   * `slice.dimension = <dimension>`.
+   * 
+ * + * repeated string slice_dimensions = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the element to return. + * @return The sliceDimensions at the given index. + */ + java.lang.String getSliceDimensions(int index); + /** + * + * + *
+   * Output only. All possible [dimensions][ModelEvaluationSlice.slice.dimension] of
+   * ModelEvaluationSlices. The dimensions can be used as the filter of the
+   * [ModelService.ListModelEvaluationSlices][google.cloud.aiplatform.v1.ModelService.ListModelEvaluationSlices] request, in the form of
+   * `slice.dimension = <dimension>`.
+   * 
+ * + * repeated string slice_dimensions = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the value to return. + * @return The bytes of the sliceDimensions at the given index. + */ + com.google.protobuf.ByteString getSliceDimensionsBytes(int index); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelEvaluationProto.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelEvaluationProto.java new file mode 100644 index 000000000..25688003d --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelEvaluationProto.java @@ -0,0 +1,94 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/model_evaluation.proto + +package com.google.cloud.aiplatform.v1; + +public final class ModelEvaluationProto { + private ModelEvaluationProto() {} + + 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_v1_ModelEvaluation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ModelEvaluation_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n1google/cloud/aiplatform/v1/model_evalu" + + "ation.proto\022\032google.cloud.aiplatform.v1\032" + + "\037google/api/field_behavior.proto\032\031google" + + "/api/resource.proto\032\034google/protobuf/str" + + "uct.proto\032\037google/protobuf/timestamp.pro" + + "to\032\034google/api/annotations.proto\"\311\002\n\017Mod" + + "elEvaluation\022\021\n\004name\030\001 \001(\tB\003\340A\003\022\037\n\022metri" + + "cs_schema_uri\030\002 \001(\tB\003\340A\003\022,\n\007metrics\030\003 \001(" + + "\0132\026.google.protobuf.ValueB\003\340A\003\0224\n\013create" + + "_time\030\004 \001(\0132\032.google.protobuf.TimestampB" + + "\003\340A\003\022\035\n\020slice_dimensions\030\005 \003(\tB\003\340A\003:\177\352A|" + + "\n)aiplatform.googleapis.com/ModelEvaluat" + + "ion\022Oprojects/{project}/locations/{locat" + + "ion}/models/{model}/evaluations/{evaluat" + + "ion}B~\n\036com.google.cloud.aiplatform.v1B\024" + + "ModelEvaluationProtoP\001ZDgoogle.golang.or" + + "g/genproto/googleapis/cloud/aiplatform/v" + + "1;aiplatformb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.protobuf.StructProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1_ModelEvaluation_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_ModelEvaluation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ModelEvaluation_descriptor, + new java.lang.String[] { + "Name", "MetricsSchemaUri", "Metrics", "CreateTime", "SliceDimensions", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.StructProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelEvaluationSlice.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelEvaluationSlice.java new file mode 100644 index 000000000..c85ea550a --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelEvaluationSlice.java @@ -0,0 +1,2605 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/model_evaluation_slice.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * A collection of metrics calculated by comparing Model's predictions on a
+ * slice of the test data against ground truth annotations.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ModelEvaluationSlice} + */ +public final class ModelEvaluationSlice extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ModelEvaluationSlice) + ModelEvaluationSliceOrBuilder { + private static final long serialVersionUID = 0L; + // Use ModelEvaluationSlice.newBuilder() to construct. + private ModelEvaluationSlice(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ModelEvaluationSlice() { + name_ = ""; + metricsSchemaUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ModelEvaluationSlice(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ModelEvaluationSlice( + 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(); + + name_ = s; + break; + } + case 18: + { + com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.Builder subBuilder = null; + if (slice_ != null) { + subBuilder = slice_.toBuilder(); + } + slice_ = + input.readMessage( + com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(slice_); + slice_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + metricsSchemaUri_ = s; + break; + } + case 34: + { + com.google.protobuf.Value.Builder subBuilder = null; + if (metrics_ != null) { + subBuilder = metrics_.toBuilder(); + } + metrics_ = input.readMessage(com.google.protobuf.Value.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(metrics_); + metrics_ = subBuilder.buildPartial(); + } + + break; + } + case 42: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + 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.v1.ModelEvaluationSliceProto + .internal_static_google_cloud_aiplatform_v1_ModelEvaluationSlice_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ModelEvaluationSliceProto + .internal_static_google_cloud_aiplatform_v1_ModelEvaluationSlice_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ModelEvaluationSlice.class, + com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Builder.class); + } + + public interface SliceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Output only. The dimension of the slice.
+     * Well-known dimensions are:
+     *   * `annotationSpec`: This slice is on the test data that has either
+     *     ground truth or prediction with [AnnotationSpec.display_name][google.cloud.aiplatform.v1.AnnotationSpec.display_name]
+     *     equals to [value][google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.value].
+     * 
+ * + * string dimension = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The dimension. + */ + java.lang.String getDimension(); + /** + * + * + *
+     * Output only. The dimension of the slice.
+     * Well-known dimensions are:
+     *   * `annotationSpec`: This slice is on the test data that has either
+     *     ground truth or prediction with [AnnotationSpec.display_name][google.cloud.aiplatform.v1.AnnotationSpec.display_name]
+     *     equals to [value][google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.value].
+     * 
+ * + * string dimension = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for dimension. + */ + com.google.protobuf.ByteString getDimensionBytes(); + + /** + * + * + *
+     * Output only. The value of the dimension in this slice.
+     * 
+ * + * string value = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The value. + */ + java.lang.String getValue(); + /** + * + * + *
+     * Output only. The value of the dimension in this slice.
+     * 
+ * + * string value = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for value. + */ + com.google.protobuf.ByteString getValueBytes(); + } + /** + * + * + *
+   * Definition of a slice.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice} + */ + public static final class Slice extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice) + SliceOrBuilder { + private static final long serialVersionUID = 0L; + // Use Slice.newBuilder() to construct. + private Slice(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Slice() { + dimension_ = ""; + value_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Slice(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Slice( + 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(); + + dimension_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + value_ = 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.v1.ModelEvaluationSliceProto + .internal_static_google_cloud_aiplatform_v1_ModelEvaluationSlice_Slice_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ModelEvaluationSliceProto + .internal_static_google_cloud_aiplatform_v1_ModelEvaluationSlice_Slice_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.class, + com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.Builder.class); + } + + public static final int DIMENSION_FIELD_NUMBER = 1; + private volatile java.lang.Object dimension_; + /** + * + * + *
+     * Output only. The dimension of the slice.
+     * Well-known dimensions are:
+     *   * `annotationSpec`: This slice is on the test data that has either
+     *     ground truth or prediction with [AnnotationSpec.display_name][google.cloud.aiplatform.v1.AnnotationSpec.display_name]
+     *     equals to [value][google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.value].
+     * 
+ * + * string dimension = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The dimension. + */ + @java.lang.Override + public java.lang.String getDimension() { + java.lang.Object ref = dimension_; + 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(); + dimension_ = s; + return s; + } + } + /** + * + * + *
+     * Output only. The dimension of the slice.
+     * Well-known dimensions are:
+     *   * `annotationSpec`: This slice is on the test data that has either
+     *     ground truth or prediction with [AnnotationSpec.display_name][google.cloud.aiplatform.v1.AnnotationSpec.display_name]
+     *     equals to [value][google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.value].
+     * 
+ * + * string dimension = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for dimension. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDimensionBytes() { + java.lang.Object ref = dimension_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dimension_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALUE_FIELD_NUMBER = 2; + private volatile java.lang.Object value_; + /** + * + * + *
+     * Output only. The value of the dimension in this slice.
+     * 
+ * + * string value = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The value. + */ + @java.lang.Override + public java.lang.String getValue() { + java.lang.Object ref = value_; + 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(); + value_ = s; + return s; + } + } + /** + * + * + *
+     * Output only. The value of the dimension in this slice.
+     * 
+ * + * string value = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for value. + */ + @java.lang.Override + public com.google.protobuf.ByteString getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + value_ = 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 (!getDimensionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, dimension_); + } + if (!getValueBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, value_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getDimensionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, dimension_); + } + if (!getValueBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, value_); + } + 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.v1.ModelEvaluationSlice.Slice)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice other = + (com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice) obj; + + if (!getDimension().equals(other.getDimension())) return false; + if (!getValue().equals(other.getValue())) 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) + DIMENSION_FIELD_NUMBER; + hash = (53 * hash) + getDimension().hashCode(); + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice 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.v1.ModelEvaluationSlice.Slice parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice 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.v1.ModelEvaluationSlice.Slice parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice 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.v1.ModelEvaluationSlice.Slice parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice 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.v1.ModelEvaluationSlice.Slice parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice 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.v1.ModelEvaluationSlice.Slice 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; + } + /** + * + * + *
+     * Definition of a slice.
+     * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice) + com.google.cloud.aiplatform.v1.ModelEvaluationSlice.SliceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.ModelEvaluationSliceProto + .internal_static_google_cloud_aiplatform_v1_ModelEvaluationSlice_Slice_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ModelEvaluationSliceProto + .internal_static_google_cloud_aiplatform_v1_ModelEvaluationSlice_Slice_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.class, + com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.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(); + dimension_ = ""; + + value_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.ModelEvaluationSliceProto + .internal_static_google_cloud_aiplatform_v1_ModelEvaluationSlice_Slice_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice build() { + com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice buildPartial() { + com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice result = + new com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice(this); + result.dimension_ = dimension_; + result.value_ = value_; + 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.v1.ModelEvaluationSlice.Slice) { + return mergeFrom((com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice other) { + if (other == com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.getDefaultInstance()) + return this; + if (!other.getDimension().isEmpty()) { + dimension_ = other.dimension_; + onChanged(); + } + if (!other.getValue().isEmpty()) { + value_ = other.value_; + 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.v1.ModelEvaluationSlice.Slice parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object dimension_ = ""; + /** + * + * + *
+       * Output only. The dimension of the slice.
+       * Well-known dimensions are:
+       *   * `annotationSpec`: This slice is on the test data that has either
+       *     ground truth or prediction with [AnnotationSpec.display_name][google.cloud.aiplatform.v1.AnnotationSpec.display_name]
+       *     equals to [value][google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.value].
+       * 
+ * + * string dimension = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The dimension. + */ + public java.lang.String getDimension() { + java.lang.Object ref = dimension_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dimension_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Output only. The dimension of the slice.
+       * Well-known dimensions are:
+       *   * `annotationSpec`: This slice is on the test data that has either
+       *     ground truth or prediction with [AnnotationSpec.display_name][google.cloud.aiplatform.v1.AnnotationSpec.display_name]
+       *     equals to [value][google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.value].
+       * 
+ * + * string dimension = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for dimension. + */ + public com.google.protobuf.ByteString getDimensionBytes() { + java.lang.Object ref = dimension_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dimension_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Output only. The dimension of the slice.
+       * Well-known dimensions are:
+       *   * `annotationSpec`: This slice is on the test data that has either
+       *     ground truth or prediction with [AnnotationSpec.display_name][google.cloud.aiplatform.v1.AnnotationSpec.display_name]
+       *     equals to [value][google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.value].
+       * 
+ * + * string dimension = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The dimension to set. + * @return This builder for chaining. + */ + public Builder setDimension(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + dimension_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. The dimension of the slice.
+       * Well-known dimensions are:
+       *   * `annotationSpec`: This slice is on the test data that has either
+       *     ground truth or prediction with [AnnotationSpec.display_name][google.cloud.aiplatform.v1.AnnotationSpec.display_name]
+       *     equals to [value][google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.value].
+       * 
+ * + * string dimension = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearDimension() { + + dimension_ = getDefaultInstance().getDimension(); + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. The dimension of the slice.
+       * Well-known dimensions are:
+       *   * `annotationSpec`: This slice is on the test data that has either
+       *     ground truth or prediction with [AnnotationSpec.display_name][google.cloud.aiplatform.v1.AnnotationSpec.display_name]
+       *     equals to [value][google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.value].
+       * 
+ * + * string dimension = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for dimension to set. + * @return This builder for chaining. + */ + public Builder setDimensionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + dimension_ = value; + onChanged(); + return this; + } + + private java.lang.Object value_ = ""; + /** + * + * + *
+       * Output only. The value of the dimension in this slice.
+       * 
+ * + * string value = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The value. + */ + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + value_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Output only. The value of the dimension in this slice.
+       * 
+ * + * string value = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for value. + */ + public com.google.protobuf.ByteString getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Output only. The value of the dimension in this slice.
+       * 
+ * + * string value = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The value to set. + * @return This builder for chaining. + */ + public Builder setValue(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + value_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. The value of the dimension in this slice.
+       * 
+ * + * string value = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearValue() { + + value_ = getDefaultInstance().getValue(); + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. The value of the dimension in this slice.
+       * 
+ * + * string value = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for value to set. + * @return This builder for chaining. + */ + public Builder setValueBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + value_ = 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.v1.ModelEvaluationSlice.Slice) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice) + private static final com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice(); + } + + public static com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Slice parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Slice(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.v1.ModelEvaluationSlice.Slice getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Output only. The resource name of the ModelEvaluationSlice.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The resource name of the ModelEvaluationSlice.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SLICE_FIELD_NUMBER = 2; + private com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice slice_; + /** + * + * + *
+   * Output only. The slice of the test data that is used to evaluate the Model.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice slice = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the slice field is set. + */ + @java.lang.Override + public boolean hasSlice() { + return slice_ != null; + } + /** + * + * + *
+   * Output only. The slice of the test data that is used to evaluate the Model.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice slice = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The slice. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice getSlice() { + return slice_ == null + ? com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.getDefaultInstance() + : slice_; + } + /** + * + * + *
+   * Output only. The slice of the test data that is used to evaluate the Model.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice slice = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ModelEvaluationSlice.SliceOrBuilder getSliceOrBuilder() { + return getSlice(); + } + + public static final int METRICS_SCHEMA_URI_FIELD_NUMBER = 3; + private volatile java.lang.Object metricsSchemaUri_; + /** + * + * + *
+   * Output only. Points to a YAML file stored on Google Cloud Storage describing the
+   * [metrics][google.cloud.aiplatform.v1.ModelEvaluationSlice.metrics] of this ModelEvaluationSlice. The
+   * schema is defined as an OpenAPI 3.0.2
+   * [Schema Object](https://tinyurl.com/y538mdwt#schema-object).
+   * 
+ * + * string metrics_schema_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The metricsSchemaUri. + */ + @java.lang.Override + public java.lang.String getMetricsSchemaUri() { + java.lang.Object ref = metricsSchemaUri_; + 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(); + metricsSchemaUri_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Points to a YAML file stored on Google Cloud Storage describing the
+   * [metrics][google.cloud.aiplatform.v1.ModelEvaluationSlice.metrics] of this ModelEvaluationSlice. The
+   * schema is defined as an OpenAPI 3.0.2
+   * [Schema Object](https://tinyurl.com/y538mdwt#schema-object).
+   * 
+ * + * string metrics_schema_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for metricsSchemaUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMetricsSchemaUriBytes() { + java.lang.Object ref = metricsSchemaUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + metricsSchemaUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int METRICS_FIELD_NUMBER = 4; + private com.google.protobuf.Value metrics_; + /** + * + * + *
+   * Output only. Sliced evaluation metrics of the Model. The schema of the metrics is stored
+   * in [metrics_schema_uri][google.cloud.aiplatform.v1.ModelEvaluationSlice.metrics_schema_uri]
+   * 
+ * + * .google.protobuf.Value metrics = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the metrics field is set. + */ + @java.lang.Override + public boolean hasMetrics() { + return metrics_ != null; + } + /** + * + * + *
+   * Output only. Sliced evaluation metrics of the Model. The schema of the metrics is stored
+   * in [metrics_schema_uri][google.cloud.aiplatform.v1.ModelEvaluationSlice.metrics_schema_uri]
+   * 
+ * + * .google.protobuf.Value metrics = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The metrics. + */ + @java.lang.Override + public com.google.protobuf.Value getMetrics() { + return metrics_ == null ? com.google.protobuf.Value.getDefaultInstance() : metrics_; + } + /** + * + * + *
+   * Output only. Sliced evaluation metrics of the Model. The schema of the metrics is stored
+   * in [metrics_schema_uri][google.cloud.aiplatform.v1.ModelEvaluationSlice.metrics_schema_uri]
+   * 
+ * + * .google.protobuf.Value metrics = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.ValueOrBuilder getMetricsOrBuilder() { + return getMetrics(); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. Timestamp when this ModelEvaluationSlice was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. Timestamp when this ModelEvaluationSlice was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. Timestamp when this ModelEvaluationSlice was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (slice_ != null) { + output.writeMessage(2, getSlice()); + } + if (!getMetricsSchemaUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, metricsSchemaUri_); + } + if (metrics_ != null) { + output.writeMessage(4, getMetrics()); + } + if (createTime_ != null) { + output.writeMessage(5, getCreateTime()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (slice_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getSlice()); + } + if (!getMetricsSchemaUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, metricsSchemaUri_); + } + if (metrics_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getMetrics()); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getCreateTime()); + } + 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.v1.ModelEvaluationSlice)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ModelEvaluationSlice other = + (com.google.cloud.aiplatform.v1.ModelEvaluationSlice) obj; + + if (!getName().equals(other.getName())) return false; + if (hasSlice() != other.hasSlice()) return false; + if (hasSlice()) { + if (!getSlice().equals(other.getSlice())) return false; + } + if (!getMetricsSchemaUri().equals(other.getMetricsSchemaUri())) return false; + if (hasMetrics() != other.hasMetrics()) return false; + if (hasMetrics()) { + if (!getMetrics().equals(other.getMetrics())) return false; + } + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasSlice()) { + hash = (37 * hash) + SLICE_FIELD_NUMBER; + hash = (53 * hash) + getSlice().hashCode(); + } + hash = (37 * hash) + METRICS_SCHEMA_URI_FIELD_NUMBER; + hash = (53 * hash) + getMetricsSchemaUri().hashCode(); + if (hasMetrics()) { + hash = (37 * hash) + METRICS_FIELD_NUMBER; + hash = (53 * hash) + getMetrics().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.ModelEvaluationSlice parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ModelEvaluationSlice 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.v1.ModelEvaluationSlice parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ModelEvaluationSlice 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.v1.ModelEvaluationSlice parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ModelEvaluationSlice parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ModelEvaluationSlice parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ModelEvaluationSlice 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.v1.ModelEvaluationSlice parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ModelEvaluationSlice 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.v1.ModelEvaluationSlice parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ModelEvaluationSlice 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.v1.ModelEvaluationSlice 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 collection of metrics calculated by comparing Model's predictions on a
+   * slice of the test data against ground truth annotations.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ModelEvaluationSlice} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ModelEvaluationSlice) + com.google.cloud.aiplatform.v1.ModelEvaluationSliceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.ModelEvaluationSliceProto + .internal_static_google_cloud_aiplatform_v1_ModelEvaluationSlice_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ModelEvaluationSliceProto + .internal_static_google_cloud_aiplatform_v1_ModelEvaluationSlice_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ModelEvaluationSlice.class, + com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ModelEvaluationSlice.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + if (sliceBuilder_ == null) { + slice_ = null; + } else { + slice_ = null; + sliceBuilder_ = null; + } + metricsSchemaUri_ = ""; + + if (metricsBuilder_ == null) { + metrics_ = null; + } else { + metrics_ = null; + metricsBuilder_ = null; + } + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.ModelEvaluationSliceProto + .internal_static_google_cloud_aiplatform_v1_ModelEvaluationSlice_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ModelEvaluationSlice getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ModelEvaluationSlice.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ModelEvaluationSlice build() { + com.google.cloud.aiplatform.v1.ModelEvaluationSlice result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ModelEvaluationSlice buildPartial() { + com.google.cloud.aiplatform.v1.ModelEvaluationSlice result = + new com.google.cloud.aiplatform.v1.ModelEvaluationSlice(this); + result.name_ = name_; + if (sliceBuilder_ == null) { + result.slice_ = slice_; + } else { + result.slice_ = sliceBuilder_.build(); + } + result.metricsSchemaUri_ = metricsSchemaUri_; + if (metricsBuilder_ == null) { + result.metrics_ = metrics_; + } else { + result.metrics_ = metricsBuilder_.build(); + } + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.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.v1.ModelEvaluationSlice) { + return mergeFrom((com.google.cloud.aiplatform.v1.ModelEvaluationSlice) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.ModelEvaluationSlice other) { + if (other == com.google.cloud.aiplatform.v1.ModelEvaluationSlice.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasSlice()) { + mergeSlice(other.getSlice()); + } + if (!other.getMetricsSchemaUri().isEmpty()) { + metricsSchemaUri_ = other.metricsSchemaUri_; + onChanged(); + } + if (other.hasMetrics()) { + mergeMetrics(other.getMetrics()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + 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.v1.ModelEvaluationSlice parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.ModelEvaluationSlice) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. The resource name of the ModelEvaluationSlice.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The resource name of the ModelEvaluationSlice.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The resource name of the ModelEvaluationSlice.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource name of the ModelEvaluationSlice.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource name of the ModelEvaluationSlice.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice slice_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice, + com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.Builder, + com.google.cloud.aiplatform.v1.ModelEvaluationSlice.SliceOrBuilder> + sliceBuilder_; + /** + * + * + *
+     * Output only. The slice of the test data that is used to evaluate the Model.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice slice = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the slice field is set. + */ + public boolean hasSlice() { + return sliceBuilder_ != null || slice_ != null; + } + /** + * + * + *
+     * Output only. The slice of the test data that is used to evaluate the Model.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice slice = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The slice. + */ + public com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice getSlice() { + if (sliceBuilder_ == null) { + return slice_ == null + ? com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.getDefaultInstance() + : slice_; + } else { + return sliceBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The slice of the test data that is used to evaluate the Model.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice slice = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setSlice(com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice value) { + if (sliceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + slice_ = value; + onChanged(); + } else { + sliceBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The slice of the test data that is used to evaluate the Model.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice slice = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setSlice( + com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.Builder builderForValue) { + if (sliceBuilder_ == null) { + slice_ = builderForValue.build(); + onChanged(); + } else { + sliceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The slice of the test data that is used to evaluate the Model.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice slice = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeSlice(com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice value) { + if (sliceBuilder_ == null) { + if (slice_ != null) { + slice_ = + com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.newBuilder(slice_) + .mergeFrom(value) + .buildPartial(); + } else { + slice_ = value; + } + onChanged(); + } else { + sliceBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The slice of the test data that is used to evaluate the Model.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice slice = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearSlice() { + if (sliceBuilder_ == null) { + slice_ = null; + onChanged(); + } else { + slice_ = null; + sliceBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The slice of the test data that is used to evaluate the Model.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice slice = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.Builder getSliceBuilder() { + + onChanged(); + return getSliceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The slice of the test data that is used to evaluate the Model.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice slice = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.ModelEvaluationSlice.SliceOrBuilder getSliceOrBuilder() { + if (sliceBuilder_ != null) { + return sliceBuilder_.getMessageOrBuilder(); + } else { + return slice_ == null + ? com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.getDefaultInstance() + : slice_; + } + } + /** + * + * + *
+     * Output only. The slice of the test data that is used to evaluate the Model.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice slice = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice, + com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.Builder, + com.google.cloud.aiplatform.v1.ModelEvaluationSlice.SliceOrBuilder> + getSliceFieldBuilder() { + if (sliceBuilder_ == null) { + sliceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice, + com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.Builder, + com.google.cloud.aiplatform.v1.ModelEvaluationSlice.SliceOrBuilder>( + getSlice(), getParentForChildren(), isClean()); + slice_ = null; + } + return sliceBuilder_; + } + + private java.lang.Object metricsSchemaUri_ = ""; + /** + * + * + *
+     * Output only. Points to a YAML file stored on Google Cloud Storage describing the
+     * [metrics][google.cloud.aiplatform.v1.ModelEvaluationSlice.metrics] of this ModelEvaluationSlice. The
+     * schema is defined as an OpenAPI 3.0.2
+     * [Schema Object](https://tinyurl.com/y538mdwt#schema-object).
+     * 
+ * + * string metrics_schema_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The metricsSchemaUri. + */ + public java.lang.String getMetricsSchemaUri() { + java.lang.Object ref = metricsSchemaUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + metricsSchemaUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Points to a YAML file stored on Google Cloud Storage describing the
+     * [metrics][google.cloud.aiplatform.v1.ModelEvaluationSlice.metrics] of this ModelEvaluationSlice. The
+     * schema is defined as an OpenAPI 3.0.2
+     * [Schema Object](https://tinyurl.com/y538mdwt#schema-object).
+     * 
+ * + * string metrics_schema_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for metricsSchemaUri. + */ + public com.google.protobuf.ByteString getMetricsSchemaUriBytes() { + java.lang.Object ref = metricsSchemaUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + metricsSchemaUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Points to a YAML file stored on Google Cloud Storage describing the
+     * [metrics][google.cloud.aiplatform.v1.ModelEvaluationSlice.metrics] of this ModelEvaluationSlice. The
+     * schema is defined as an OpenAPI 3.0.2
+     * [Schema Object](https://tinyurl.com/y538mdwt#schema-object).
+     * 
+ * + * string metrics_schema_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The metricsSchemaUri to set. + * @return This builder for chaining. + */ + public Builder setMetricsSchemaUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + metricsSchemaUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Points to a YAML file stored on Google Cloud Storage describing the
+     * [metrics][google.cloud.aiplatform.v1.ModelEvaluationSlice.metrics] of this ModelEvaluationSlice. The
+     * schema is defined as an OpenAPI 3.0.2
+     * [Schema Object](https://tinyurl.com/y538mdwt#schema-object).
+     * 
+ * + * string metrics_schema_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearMetricsSchemaUri() { + + metricsSchemaUri_ = getDefaultInstance().getMetricsSchemaUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Points to a YAML file stored on Google Cloud Storage describing the
+     * [metrics][google.cloud.aiplatform.v1.ModelEvaluationSlice.metrics] of this ModelEvaluationSlice. The
+     * schema is defined as an OpenAPI 3.0.2
+     * [Schema Object](https://tinyurl.com/y538mdwt#schema-object).
+     * 
+ * + * string metrics_schema_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for metricsSchemaUri to set. + * @return This builder for chaining. + */ + public Builder setMetricsSchemaUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + metricsSchemaUri_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Value metrics_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Value, + com.google.protobuf.Value.Builder, + com.google.protobuf.ValueOrBuilder> + metricsBuilder_; + /** + * + * + *
+     * Output only. Sliced evaluation metrics of the Model. The schema of the metrics is stored
+     * in [metrics_schema_uri][google.cloud.aiplatform.v1.ModelEvaluationSlice.metrics_schema_uri]
+     * 
+ * + * .google.protobuf.Value metrics = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the metrics field is set. + */ + public boolean hasMetrics() { + return metricsBuilder_ != null || metrics_ != null; + } + /** + * + * + *
+     * Output only. Sliced evaluation metrics of the Model. The schema of the metrics is stored
+     * in [metrics_schema_uri][google.cloud.aiplatform.v1.ModelEvaluationSlice.metrics_schema_uri]
+     * 
+ * + * .google.protobuf.Value metrics = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The metrics. + */ + public com.google.protobuf.Value getMetrics() { + if (metricsBuilder_ == null) { + return metrics_ == null ? com.google.protobuf.Value.getDefaultInstance() : metrics_; + } else { + return metricsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Sliced evaluation metrics of the Model. The schema of the metrics is stored
+     * in [metrics_schema_uri][google.cloud.aiplatform.v1.ModelEvaluationSlice.metrics_schema_uri]
+     * 
+ * + * .google.protobuf.Value metrics = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setMetrics(com.google.protobuf.Value value) { + if (metricsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metrics_ = value; + onChanged(); + } else { + metricsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Sliced evaluation metrics of the Model. The schema of the metrics is stored
+     * in [metrics_schema_uri][google.cloud.aiplatform.v1.ModelEvaluationSlice.metrics_schema_uri]
+     * 
+ * + * .google.protobuf.Value metrics = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setMetrics(com.google.protobuf.Value.Builder builderForValue) { + if (metricsBuilder_ == null) { + metrics_ = builderForValue.build(); + onChanged(); + } else { + metricsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Sliced evaluation metrics of the Model. The schema of the metrics is stored
+     * in [metrics_schema_uri][google.cloud.aiplatform.v1.ModelEvaluationSlice.metrics_schema_uri]
+     * 
+ * + * .google.protobuf.Value metrics = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeMetrics(com.google.protobuf.Value value) { + if (metricsBuilder_ == null) { + if (metrics_ != null) { + metrics_ = com.google.protobuf.Value.newBuilder(metrics_).mergeFrom(value).buildPartial(); + } else { + metrics_ = value; + } + onChanged(); + } else { + metricsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Sliced evaluation metrics of the Model. The schema of the metrics is stored
+     * in [metrics_schema_uri][google.cloud.aiplatform.v1.ModelEvaluationSlice.metrics_schema_uri]
+     * 
+ * + * .google.protobuf.Value metrics = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearMetrics() { + if (metricsBuilder_ == null) { + metrics_ = null; + onChanged(); + } else { + metrics_ = null; + metricsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Sliced evaluation metrics of the Model. The schema of the metrics is stored
+     * in [metrics_schema_uri][google.cloud.aiplatform.v1.ModelEvaluationSlice.metrics_schema_uri]
+     * 
+ * + * .google.protobuf.Value metrics = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Value.Builder getMetricsBuilder() { + + onChanged(); + return getMetricsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Sliced evaluation metrics of the Model. The schema of the metrics is stored
+     * in [metrics_schema_uri][google.cloud.aiplatform.v1.ModelEvaluationSlice.metrics_schema_uri]
+     * 
+ * + * .google.protobuf.Value metrics = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.ValueOrBuilder getMetricsOrBuilder() { + if (metricsBuilder_ != null) { + return metricsBuilder_.getMessageOrBuilder(); + } else { + return metrics_ == null ? com.google.protobuf.Value.getDefaultInstance() : metrics_; + } + } + /** + * + * + *
+     * Output only. Sliced evaluation metrics of the Model. The schema of the metrics is stored
+     * in [metrics_schema_uri][google.cloud.aiplatform.v1.ModelEvaluationSlice.metrics_schema_uri]
+     * 
+ * + * .google.protobuf.Value metrics = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Value, + com.google.protobuf.Value.Builder, + com.google.protobuf.ValueOrBuilder> + getMetricsFieldBuilder() { + if (metricsBuilder_ == null) { + metricsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Value, + com.google.protobuf.Value.Builder, + com.google.protobuf.ValueOrBuilder>( + getMetrics(), getParentForChildren(), isClean()); + metrics_ = null; + } + return metricsBuilder_; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. Timestamp when this ModelEvaluationSlice was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * Output only. Timestamp when this ModelEvaluationSlice was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Timestamp when this ModelEvaluationSlice was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this ModelEvaluationSlice was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this ModelEvaluationSlice was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this ModelEvaluationSlice was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this ModelEvaluationSlice was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Timestamp when this ModelEvaluationSlice was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. Timestamp when this ModelEvaluationSlice was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + @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.v1.ModelEvaluationSlice) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ModelEvaluationSlice) + private static final com.google.cloud.aiplatform.v1.ModelEvaluationSlice DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ModelEvaluationSlice(); + } + + public static com.google.cloud.aiplatform.v1.ModelEvaluationSlice getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ModelEvaluationSlice parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ModelEvaluationSlice(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.v1.ModelEvaluationSlice getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelEvaluationSliceName.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelEvaluationSliceName.java new file mode 100644 index 000000000..4e39d306e --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelEvaluationSliceName.java @@ -0,0 +1,298 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class ModelEvaluationSliceName implements ResourceName { + 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; + } + + public String getLocation() { + return location; + } + + public String getModel() { + return model; + } + + public String getEvaluation() { + return evaluation; + } + + public String getSlice() { + return slice; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static ModelEvaluationSliceName of( + String project, String location, String model, String evaluation, String slice) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setModel(model) + .setEvaluation(evaluation) + .setSlice(slice) + .build(); + } + + public static String format( + String project, String location, String model, String evaluation, String slice) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setModel(model) + .setEvaluation(evaluation) + .setSlice(slice) + .build() + .toString(); + } + + public static ModelEvaluationSliceName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_MODEL_EVALUATION_SLICE.validatedMatch( + formattedString, "ModelEvaluationSliceName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("model"), + matchMap.get("evaluation"), + matchMap.get("slice")); + } + + 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 (ModelEvaluationSliceName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String 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(); + 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(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_MODEL_EVALUATION_SLICE.instantiate( + "project", + project, + "location", + location, + "model", + model, + "evaluation", + evaluation, + "slice", + slice); + } + + @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; + } + + public String getLocation() { + return location; + } + + public String getModel() { + return model; + } + + public String getEvaluation() { + return evaluation; + } + + public String getSlice() { + return slice; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setModel(String model) { + this.model = model; + return this; + } + + public Builder setEvaluation(String evaluation) { + this.evaluation = evaluation; + return this; + } + + public Builder setSlice(String slice) { + this.slice = slice; + return this; + } + + private Builder(ModelEvaluationSliceName modelEvaluationSliceName) { + project = modelEvaluationSliceName.project; + location = modelEvaluationSliceName.location; + model = modelEvaluationSliceName.model; + evaluation = modelEvaluationSliceName.evaluation; + slice = modelEvaluationSliceName.slice; + } + + public ModelEvaluationSliceName build() { + return new ModelEvaluationSliceName(this); + } + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelEvaluationSliceOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelEvaluationSliceOrBuilder.java new file mode 100644 index 000000000..2dc3feebb --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelEvaluationSliceOrBuilder.java @@ -0,0 +1,198 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/model_evaluation_slice.proto + +package com.google.cloud.aiplatform.v1; + +public interface ModelEvaluationSliceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ModelEvaluationSlice) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The resource name of the ModelEvaluationSlice.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. The resource name of the ModelEvaluationSlice.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. The slice of the test data that is used to evaluate the Model.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice slice = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the slice field is set. + */ + boolean hasSlice(); + /** + * + * + *
+   * Output only. The slice of the test data that is used to evaluate the Model.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice slice = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The slice. + */ + com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice getSlice(); + /** + * + * + *
+   * Output only. The slice of the test data that is used to evaluate the Model.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice slice = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1.ModelEvaluationSlice.SliceOrBuilder getSliceOrBuilder(); + + /** + * + * + *
+   * Output only. Points to a YAML file stored on Google Cloud Storage describing the
+   * [metrics][google.cloud.aiplatform.v1.ModelEvaluationSlice.metrics] of this ModelEvaluationSlice. The
+   * schema is defined as an OpenAPI 3.0.2
+   * [Schema Object](https://tinyurl.com/y538mdwt#schema-object).
+   * 
+ * + * string metrics_schema_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The metricsSchemaUri. + */ + java.lang.String getMetricsSchemaUri(); + /** + * + * + *
+   * Output only. Points to a YAML file stored on Google Cloud Storage describing the
+   * [metrics][google.cloud.aiplatform.v1.ModelEvaluationSlice.metrics] of this ModelEvaluationSlice. The
+   * schema is defined as an OpenAPI 3.0.2
+   * [Schema Object](https://tinyurl.com/y538mdwt#schema-object).
+   * 
+ * + * string metrics_schema_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for metricsSchemaUri. + */ + com.google.protobuf.ByteString getMetricsSchemaUriBytes(); + + /** + * + * + *
+   * Output only. Sliced evaluation metrics of the Model. The schema of the metrics is stored
+   * in [metrics_schema_uri][google.cloud.aiplatform.v1.ModelEvaluationSlice.metrics_schema_uri]
+   * 
+ * + * .google.protobuf.Value metrics = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the metrics field is set. + */ + boolean hasMetrics(); + /** + * + * + *
+   * Output only. Sliced evaluation metrics of the Model. The schema of the metrics is stored
+   * in [metrics_schema_uri][google.cloud.aiplatform.v1.ModelEvaluationSlice.metrics_schema_uri]
+   * 
+ * + * .google.protobuf.Value metrics = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The metrics. + */ + com.google.protobuf.Value getMetrics(); + /** + * + * + *
+   * Output only. Sliced evaluation metrics of the Model. The schema of the metrics is stored
+   * in [metrics_schema_uri][google.cloud.aiplatform.v1.ModelEvaluationSlice.metrics_schema_uri]
+   * 
+ * + * .google.protobuf.Value metrics = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.ValueOrBuilder getMetricsOrBuilder(); + + /** + * + * + *
+   * Output only. Timestamp when this ModelEvaluationSlice was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Timestamp when this ModelEvaluationSlice was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Timestamp when this ModelEvaluationSlice was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelEvaluationSliceProto.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelEvaluationSliceProto.java new file mode 100644 index 000000000..f946cf783 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelEvaluationSliceProto.java @@ -0,0 +1,111 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/model_evaluation_slice.proto + +package com.google.cloud.aiplatform.v1; + +public final class ModelEvaluationSliceProto { + private ModelEvaluationSliceProto() {} + + 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_v1_ModelEvaluationSlice_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ModelEvaluationSlice_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ModelEvaluationSlice_Slice_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ModelEvaluationSlice_Slice_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n7google/cloud/aiplatform/v1/model_evalu" + + "ation_slice.proto\022\032google.cloud.aiplatfo" + + "rm.v1\032\037google/api/field_behavior.proto\032\031" + + "google/api/resource.proto\032\034google/protob" + + "uf/struct.proto\032\037google/protobuf/timesta" + + "mp.proto\032\034google/api/annotations.proto\"\306" + + "\003\n\024ModelEvaluationSlice\022\021\n\004name\030\001 \001(\tB\003\340" + + "A\003\022J\n\005slice\030\002 \001(\01326.google.cloud.aiplatf" + + "orm.v1.ModelEvaluationSlice.SliceB\003\340A\003\022\037" + + "\n\022metrics_schema_uri\030\003 \001(\tB\003\340A\003\022,\n\007metri" + + "cs\030\004 \001(\0132\026.google.protobuf.ValueB\003\340A\003\0224\n" + + "\013create_time\030\005 \001(\0132\032.google.protobuf.Tim" + + "estampB\003\340A\003\0323\n\005Slice\022\026\n\tdimension\030\001 \001(\tB" + + "\003\340A\003\022\022\n\005value\030\002 \001(\tB\003\340A\003:\224\001\352A\220\001\n.aiplatf" + + "orm.googleapis.com/ModelEvaluationSlice\022" + + "^projects/{project}/locations/{location}" + + "/models/{model}/evaluations/{evaluation}" + + "/slices/{slice}B\203\001\n\036com.google.cloud.aip" + + "latform.v1B\031ModelEvaluationSliceProtoP\001Z" + + "Dgoogle.golang.org/genproto/googleapis/c" + + "loud/aiplatform/v1;aiplatformb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.protobuf.StructProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1_ModelEvaluationSlice_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_ModelEvaluationSlice_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ModelEvaluationSlice_descriptor, + new java.lang.String[] { + "Name", "Slice", "MetricsSchemaUri", "Metrics", "CreateTime", + }); + internal_static_google_cloud_aiplatform_v1_ModelEvaluationSlice_Slice_descriptor = + internal_static_google_cloud_aiplatform_v1_ModelEvaluationSlice_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_aiplatform_v1_ModelEvaluationSlice_Slice_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ModelEvaluationSlice_Slice_descriptor, + new java.lang.String[] { + "Dimension", "Value", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.StructProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelName.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelName.java new file mode 100644 index 000000000..56209629d --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelName.java @@ -0,0 +1,223 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class ModelName implements ResourceName { + 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; + } + + public String getLocation() { + return location; + } + + public String getModel() { + return model; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static ModelName of(String project, String location, String model) { + return newBuilder().setProject(project).setLocation(location).setModel(model).build(); + } + + public static String format(String project, String location, String model) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setModel(model) + .build() + .toString(); + } + + public static ModelName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_MODEL.validatedMatch( + formattedString, "ModelName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("model")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (ModelName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_MODEL.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 (location != null) { + fieldMapBuilder.put("location", location); + } + if (model != null) { + fieldMapBuilder.put("model", model); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_MODEL.instantiate( + "project", project, "location", location, "model", model); + } + + @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; + } + + public String getLocation() { + return location; + } + + public String getModel() { + return model; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setModel(String model) { + this.model = model; + return this; + } + + private Builder(ModelName modelName) { + project = modelName.project; + location = modelName.location; + model = modelName.model; + } + + public ModelName build() { + return new ModelName(this); + } + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelOrBuilder.java new file mode 100644 index 000000000..75b5609bb --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelOrBuilder.java @@ -0,0 +1,1147 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/model.proto + +package com.google.cloud.aiplatform.v1; + +public interface ModelOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.Model) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The resource name of the Model.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The resource name of the Model.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The display name of the Model.
+   * The name can be up to 128 characters long and can be consist of any UTF-8
+   * characters.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Required. The display name of the Model.
+   * The name can be up to 128 characters long and can be consist of any UTF-8
+   * characters.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * The description of the Model.
+   * 
+ * + * string description = 3; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * The description of the Model.
+   * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * The schemata that describe formats of the Model's predictions and
+   * explanations as given and returned via
+   * [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] and [PredictionService.Explain][].
+   * 
+ * + * .google.cloud.aiplatform.v1.PredictSchemata predict_schemata = 4; + * + * @return Whether the predictSchemata field is set. + */ + boolean hasPredictSchemata(); + /** + * + * + *
+   * The schemata that describe formats of the Model's predictions and
+   * explanations as given and returned via
+   * [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] and [PredictionService.Explain][].
+   * 
+ * + * .google.cloud.aiplatform.v1.PredictSchemata predict_schemata = 4; + * + * @return The predictSchemata. + */ + com.google.cloud.aiplatform.v1.PredictSchemata getPredictSchemata(); + /** + * + * + *
+   * The schemata that describe formats of the Model's predictions and
+   * explanations as given and returned via
+   * [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] and [PredictionService.Explain][].
+   * 
+ * + * .google.cloud.aiplatform.v1.PredictSchemata predict_schemata = 4; + */ + com.google.cloud.aiplatform.v1.PredictSchemataOrBuilder getPredictSchemataOrBuilder(); + + /** + * + * + *
+   * Immutable. Points to a YAML file stored on Google Cloud Storage describing additional
+   * information about the Model, that is specific to it. Unset if the Model
+   * does not have any additional information.
+   * The schema is defined as an OpenAPI 3.0.2
+   * [Schema Object](https://tinyurl.com/y538mdwt#schema-object).
+   * AutoML Models always have this field populated by AI Platform, if no
+   * additional metadata is needed, this field is set to an empty string.
+   * Note: The URI given on output will be immutable and probably different,
+   * including the URI scheme, than the one given on input. The output URI will
+   * point to a location where the user only has a read access.
+   * 
+ * + * string metadata_schema_uri = 5 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The metadataSchemaUri. + */ + java.lang.String getMetadataSchemaUri(); + /** + * + * + *
+   * Immutable. Points to a YAML file stored on Google Cloud Storage describing additional
+   * information about the Model, that is specific to it. Unset if the Model
+   * does not have any additional information.
+   * The schema is defined as an OpenAPI 3.0.2
+   * [Schema Object](https://tinyurl.com/y538mdwt#schema-object).
+   * AutoML Models always have this field populated by AI Platform, if no
+   * additional metadata is needed, this field is set to an empty string.
+   * Note: The URI given on output will be immutable and probably different,
+   * including the URI scheme, than the one given on input. The output URI will
+   * point to a location where the user only has a read access.
+   * 
+ * + * string metadata_schema_uri = 5 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for metadataSchemaUri. + */ + com.google.protobuf.ByteString getMetadataSchemaUriBytes(); + + /** + * + * + *
+   * Immutable. An additional information about the Model; the schema of the metadata can
+   * be found in [metadata_schema][google.cloud.aiplatform.v1.Model.metadata_schema_uri].
+   * Unset if the Model does not have any additional information.
+   * 
+ * + * .google.protobuf.Value metadata = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return Whether the metadata field is set. + */ + boolean hasMetadata(); + /** + * + * + *
+   * Immutable. An additional information about the Model; the schema of the metadata can
+   * be found in [metadata_schema][google.cloud.aiplatform.v1.Model.metadata_schema_uri].
+   * Unset if the Model does not have any additional information.
+   * 
+ * + * .google.protobuf.Value metadata = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The metadata. + */ + com.google.protobuf.Value getMetadata(); + /** + * + * + *
+   * Immutable. An additional information about the Model; the schema of the metadata can
+   * be found in [metadata_schema][google.cloud.aiplatform.v1.Model.metadata_schema_uri].
+   * Unset if the Model does not have any additional information.
+   * 
+ * + * .google.protobuf.Value metadata = 6 [(.google.api.field_behavior) = IMMUTABLE]; + */ + com.google.protobuf.ValueOrBuilder getMetadataOrBuilder(); + + /** + * + * + *
+   * Output only. The formats in which this Model may be exported. If empty, this Model is
+   * not available for export.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Model.ExportFormat supported_export_formats = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getSupportedExportFormatsList(); + /** + * + * + *
+   * Output only. The formats in which this Model may be exported. If empty, this Model is
+   * not available for export.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Model.ExportFormat supported_export_formats = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1.Model.ExportFormat getSupportedExportFormats(int index); + /** + * + * + *
+   * Output only. The formats in which this Model may be exported. If empty, this Model is
+   * not available for export.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Model.ExportFormat supported_export_formats = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getSupportedExportFormatsCount(); + /** + * + * + *
+   * Output only. The formats in which this Model may be exported. If empty, this Model is
+   * not available for export.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Model.ExportFormat supported_export_formats = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getSupportedExportFormatsOrBuilderList(); + /** + * + * + *
+   * Output only. The formats in which this Model may be exported. If empty, this Model is
+   * not available for export.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Model.ExportFormat supported_export_formats = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1.Model.ExportFormatOrBuilder getSupportedExportFormatsOrBuilder( + int index); + + /** + * + * + *
+   * Output only. The resource name of the TrainingPipeline that uploaded this Model, if any.
+   * 
+ * + * + * string training_pipeline = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The trainingPipeline. + */ + java.lang.String getTrainingPipeline(); + /** + * + * + *
+   * Output only. The resource name of the TrainingPipeline that uploaded this Model, if any.
+   * 
+ * + * + * string training_pipeline = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for trainingPipeline. + */ + com.google.protobuf.ByteString getTrainingPipelineBytes(); + + /** + * + * + *
+   * Input only. The specification of the container that is to be used when deploying
+   * this Model. The specification is ingested upon
+   * [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel], and all binaries it contains are copied
+   * and stored internally by AI Platform.
+   * Not present for AutoML Models.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ModelContainerSpec container_spec = 9 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return Whether the containerSpec field is set. + */ + boolean hasContainerSpec(); + /** + * + * + *
+   * Input only. The specification of the container that is to be used when deploying
+   * this Model. The specification is ingested upon
+   * [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel], and all binaries it contains are copied
+   * and stored internally by AI Platform.
+   * Not present for AutoML Models.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ModelContainerSpec container_spec = 9 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The containerSpec. + */ + com.google.cloud.aiplatform.v1.ModelContainerSpec getContainerSpec(); + /** + * + * + *
+   * Input only. The specification of the container that is to be used when deploying
+   * this Model. The specification is ingested upon
+   * [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel], and all binaries it contains are copied
+   * and stored internally by AI Platform.
+   * Not present for AutoML Models.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.ModelContainerSpec container_spec = 9 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1.ModelContainerSpecOrBuilder getContainerSpecOrBuilder(); + + /** + * + * + *
+   * Immutable. The path to the directory containing the Model artifact and any of its
+   * supporting files.
+   * Not present for AutoML Models.
+   * 
+ * + * string artifact_uri = 26 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The artifactUri. + */ + java.lang.String getArtifactUri(); + /** + * + * + *
+   * Immutable. The path to the directory containing the Model artifact and any of its
+   * supporting files.
+   * Not present for AutoML Models.
+   * 
+ * + * string artifact_uri = 26 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for artifactUri. + */ + com.google.protobuf.ByteString getArtifactUriBytes(); + + /** + * + * + *
+   * Output only. When this Model is deployed, its prediction resources are described by the
+   * `prediction_resources` field of the [Endpoint.deployed_models][google.cloud.aiplatform.v1.Endpoint.deployed_models] object.
+   * Because not all Models support all resource configuration types, the
+   * configuration types this Model supports are listed here. If no
+   * configuration types are listed, the Model cannot be deployed to an
+   * [Endpoint][google.cloud.aiplatform.v1.Endpoint] and does not support
+   * online predictions ([PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] or
+   * [PredictionService.Explain][]). Such a Model can serve predictions by
+   * using a [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob], if it has at least one entry each in
+   * [supported_input_storage_formats][google.cloud.aiplatform.v1.Model.supported_input_storage_formats] and
+   * [supported_output_storage_formats][google.cloud.aiplatform.v1.Model.supported_output_storage_formats].
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Model.DeploymentResourcesType supported_deployment_resources_types = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the supportedDeploymentResourcesTypes. + */ + java.util.List + getSupportedDeploymentResourcesTypesList(); + /** + * + * + *
+   * Output only. When this Model is deployed, its prediction resources are described by the
+   * `prediction_resources` field of the [Endpoint.deployed_models][google.cloud.aiplatform.v1.Endpoint.deployed_models] object.
+   * Because not all Models support all resource configuration types, the
+   * configuration types this Model supports are listed here. If no
+   * configuration types are listed, the Model cannot be deployed to an
+   * [Endpoint][google.cloud.aiplatform.v1.Endpoint] and does not support
+   * online predictions ([PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] or
+   * [PredictionService.Explain][]). Such a Model can serve predictions by
+   * using a [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob], if it has at least one entry each in
+   * [supported_input_storage_formats][google.cloud.aiplatform.v1.Model.supported_input_storage_formats] and
+   * [supported_output_storage_formats][google.cloud.aiplatform.v1.Model.supported_output_storage_formats].
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Model.DeploymentResourcesType supported_deployment_resources_types = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of supportedDeploymentResourcesTypes. + */ + int getSupportedDeploymentResourcesTypesCount(); + /** + * + * + *
+   * Output only. When this Model is deployed, its prediction resources are described by the
+   * `prediction_resources` field of the [Endpoint.deployed_models][google.cloud.aiplatform.v1.Endpoint.deployed_models] object.
+   * Because not all Models support all resource configuration types, the
+   * configuration types this Model supports are listed here. If no
+   * configuration types are listed, the Model cannot be deployed to an
+   * [Endpoint][google.cloud.aiplatform.v1.Endpoint] and does not support
+   * online predictions ([PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] or
+   * [PredictionService.Explain][]). Such a Model can serve predictions by
+   * using a [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob], if it has at least one entry each in
+   * [supported_input_storage_formats][google.cloud.aiplatform.v1.Model.supported_input_storage_formats] and
+   * [supported_output_storage_formats][google.cloud.aiplatform.v1.Model.supported_output_storage_formats].
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Model.DeploymentResourcesType supported_deployment_resources_types = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The supportedDeploymentResourcesTypes at the given index. + */ + com.google.cloud.aiplatform.v1.Model.DeploymentResourcesType getSupportedDeploymentResourcesTypes( + int index); + /** + * + * + *
+   * Output only. When this Model is deployed, its prediction resources are described by the
+   * `prediction_resources` field of the [Endpoint.deployed_models][google.cloud.aiplatform.v1.Endpoint.deployed_models] object.
+   * Because not all Models support all resource configuration types, the
+   * configuration types this Model supports are listed here. If no
+   * configuration types are listed, the Model cannot be deployed to an
+   * [Endpoint][google.cloud.aiplatform.v1.Endpoint] and does not support
+   * online predictions ([PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] or
+   * [PredictionService.Explain][]). Such a Model can serve predictions by
+   * using a [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob], if it has at least one entry each in
+   * [supported_input_storage_formats][google.cloud.aiplatform.v1.Model.supported_input_storage_formats] and
+   * [supported_output_storage_formats][google.cloud.aiplatform.v1.Model.supported_output_storage_formats].
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Model.DeploymentResourcesType supported_deployment_resources_types = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the enum numeric values on the wire for + * supportedDeploymentResourcesTypes. + */ + java.util.List getSupportedDeploymentResourcesTypesValueList(); + /** + * + * + *
+   * Output only. When this Model is deployed, its prediction resources are described by the
+   * `prediction_resources` field of the [Endpoint.deployed_models][google.cloud.aiplatform.v1.Endpoint.deployed_models] object.
+   * Because not all Models support all resource configuration types, the
+   * configuration types this Model supports are listed here. If no
+   * configuration types are listed, the Model cannot be deployed to an
+   * [Endpoint][google.cloud.aiplatform.v1.Endpoint] and does not support
+   * online predictions ([PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] or
+   * [PredictionService.Explain][]). Such a Model can serve predictions by
+   * using a [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob], if it has at least one entry each in
+   * [supported_input_storage_formats][google.cloud.aiplatform.v1.Model.supported_input_storage_formats] and
+   * [supported_output_storage_formats][google.cloud.aiplatform.v1.Model.supported_output_storage_formats].
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Model.DeploymentResourcesType supported_deployment_resources_types = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of supportedDeploymentResourcesTypes at the given + * index. + */ + int getSupportedDeploymentResourcesTypesValue(int index); + + /** + * + * + *
+   * Output only. The formats this Model supports in
+   * [BatchPredictionJob.input_config][google.cloud.aiplatform.v1.BatchPredictionJob.input_config]. If
+   * [PredictSchemata.instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri] exists, the instances
+   * should be given as per that schema.
+   * The possible formats are:
+   * * `jsonl`
+   * The JSON Lines format, where each instance is a single line. Uses
+   * [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source].
+   * * `csv`
+   * The CSV format, where each instance is a single comma-separated line.
+   * The first line in the file is the header, containing comma-separated field
+   * names. Uses [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source].
+   * * `tf-record`
+   * The TFRecord format, where each instance is a single record in tfrecord
+   * syntax. Uses [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source].
+   * * `tf-record-gzip`
+   * Similar to `tf-record`, but the file is gzipped. Uses
+   * [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source].
+   * * `bigquery`
+   * Each instance is a single row in BigQuery. Uses
+   * [BigQuerySource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.bigquery_source].
+   * * `file-list`
+   * Each line of the file is the location of an instance to process, uses
+   * `gcs_source` field of the
+   * [InputConfig][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig] object.
+   * If this Model doesn't support any of these formats it means it cannot be
+   * used with a [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob]. However, if it has
+   * [supported_deployment_resources_types][google.cloud.aiplatform.v1.Model.supported_deployment_resources_types], it could serve online
+   * predictions by using [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] or
+   * [PredictionService.Explain][].
+   * 
+ * + * + * repeated string supported_input_storage_formats = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the supportedInputStorageFormats. + */ + java.util.List getSupportedInputStorageFormatsList(); + /** + * + * + *
+   * Output only. The formats this Model supports in
+   * [BatchPredictionJob.input_config][google.cloud.aiplatform.v1.BatchPredictionJob.input_config]. If
+   * [PredictSchemata.instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri] exists, the instances
+   * should be given as per that schema.
+   * The possible formats are:
+   * * `jsonl`
+   * The JSON Lines format, where each instance is a single line. Uses
+   * [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source].
+   * * `csv`
+   * The CSV format, where each instance is a single comma-separated line.
+   * The first line in the file is the header, containing comma-separated field
+   * names. Uses [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source].
+   * * `tf-record`
+   * The TFRecord format, where each instance is a single record in tfrecord
+   * syntax. Uses [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source].
+   * * `tf-record-gzip`
+   * Similar to `tf-record`, but the file is gzipped. Uses
+   * [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source].
+   * * `bigquery`
+   * Each instance is a single row in BigQuery. Uses
+   * [BigQuerySource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.bigquery_source].
+   * * `file-list`
+   * Each line of the file is the location of an instance to process, uses
+   * `gcs_source` field of the
+   * [InputConfig][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig] object.
+   * If this Model doesn't support any of these formats it means it cannot be
+   * used with a [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob]. However, if it has
+   * [supported_deployment_resources_types][google.cloud.aiplatform.v1.Model.supported_deployment_resources_types], it could serve online
+   * predictions by using [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] or
+   * [PredictionService.Explain][].
+   * 
+ * + * + * repeated string supported_input_storage_formats = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of supportedInputStorageFormats. + */ + int getSupportedInputStorageFormatsCount(); + /** + * + * + *
+   * Output only. The formats this Model supports in
+   * [BatchPredictionJob.input_config][google.cloud.aiplatform.v1.BatchPredictionJob.input_config]. If
+   * [PredictSchemata.instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri] exists, the instances
+   * should be given as per that schema.
+   * The possible formats are:
+   * * `jsonl`
+   * The JSON Lines format, where each instance is a single line. Uses
+   * [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source].
+   * * `csv`
+   * The CSV format, where each instance is a single comma-separated line.
+   * The first line in the file is the header, containing comma-separated field
+   * names. Uses [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source].
+   * * `tf-record`
+   * The TFRecord format, where each instance is a single record in tfrecord
+   * syntax. Uses [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source].
+   * * `tf-record-gzip`
+   * Similar to `tf-record`, but the file is gzipped. Uses
+   * [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source].
+   * * `bigquery`
+   * Each instance is a single row in BigQuery. Uses
+   * [BigQuerySource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.bigquery_source].
+   * * `file-list`
+   * Each line of the file is the location of an instance to process, uses
+   * `gcs_source` field of the
+   * [InputConfig][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig] object.
+   * If this Model doesn't support any of these formats it means it cannot be
+   * used with a [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob]. However, if it has
+   * [supported_deployment_resources_types][google.cloud.aiplatform.v1.Model.supported_deployment_resources_types], it could serve online
+   * predictions by using [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] or
+   * [PredictionService.Explain][].
+   * 
+ * + * + * repeated string supported_input_storage_formats = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The supportedInputStorageFormats at the given index. + */ + java.lang.String getSupportedInputStorageFormats(int index); + /** + * + * + *
+   * Output only. The formats this Model supports in
+   * [BatchPredictionJob.input_config][google.cloud.aiplatform.v1.BatchPredictionJob.input_config]. If
+   * [PredictSchemata.instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri] exists, the instances
+   * should be given as per that schema.
+   * The possible formats are:
+   * * `jsonl`
+   * The JSON Lines format, where each instance is a single line. Uses
+   * [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source].
+   * * `csv`
+   * The CSV format, where each instance is a single comma-separated line.
+   * The first line in the file is the header, containing comma-separated field
+   * names. Uses [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source].
+   * * `tf-record`
+   * The TFRecord format, where each instance is a single record in tfrecord
+   * syntax. Uses [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source].
+   * * `tf-record-gzip`
+   * Similar to `tf-record`, but the file is gzipped. Uses
+   * [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source].
+   * * `bigquery`
+   * Each instance is a single row in BigQuery. Uses
+   * [BigQuerySource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.bigquery_source].
+   * * `file-list`
+   * Each line of the file is the location of an instance to process, uses
+   * `gcs_source` field of the
+   * [InputConfig][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig] object.
+   * If this Model doesn't support any of these formats it means it cannot be
+   * used with a [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob]. However, if it has
+   * [supported_deployment_resources_types][google.cloud.aiplatform.v1.Model.supported_deployment_resources_types], it could serve online
+   * predictions by using [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] or
+   * [PredictionService.Explain][].
+   * 
+ * + * + * repeated string supported_input_storage_formats = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The bytes of the supportedInputStorageFormats at the given index. + */ + com.google.protobuf.ByteString getSupportedInputStorageFormatsBytes(int index); + + /** + * + * + *
+   * Output only. The formats this Model supports in
+   * [BatchPredictionJob.output_config][google.cloud.aiplatform.v1.BatchPredictionJob.output_config]. If both
+   * [PredictSchemata.instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri] and
+   * [PredictSchemata.prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri] exist, the predictions
+   * are returned together with their instances. In other words, the
+   * prediction has the original instance data first, followed
+   * by the actual prediction content (as per the schema).
+   * The possible formats are:
+   * * `jsonl`
+   * The JSON Lines format, where each prediction is a single line. Uses
+   * [GcsDestination][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.gcs_destination].
+   * * `csv`
+   * The CSV format, where each prediction is a single comma-separated line.
+   * The first line in the file is the header, containing comma-separated field
+   * names. Uses
+   * [GcsDestination][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.gcs_destination].
+   * * `bigquery`
+   * Each prediction is a single row in a BigQuery table, uses
+   * [BigQueryDestination][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.bigquery_destination]
+   * .
+   * If this Model doesn't support any of these formats it means it cannot be
+   * used with a [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob]. However, if it has
+   * [supported_deployment_resources_types][google.cloud.aiplatform.v1.Model.supported_deployment_resources_types], it could serve online
+   * predictions by using [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] or
+   * [PredictionService.Explain][].
+   * 
+ * + * + * repeated string supported_output_storage_formats = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the supportedOutputStorageFormats. + */ + java.util.List getSupportedOutputStorageFormatsList(); + /** + * + * + *
+   * Output only. The formats this Model supports in
+   * [BatchPredictionJob.output_config][google.cloud.aiplatform.v1.BatchPredictionJob.output_config]. If both
+   * [PredictSchemata.instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri] and
+   * [PredictSchemata.prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri] exist, the predictions
+   * are returned together with their instances. In other words, the
+   * prediction has the original instance data first, followed
+   * by the actual prediction content (as per the schema).
+   * The possible formats are:
+   * * `jsonl`
+   * The JSON Lines format, where each prediction is a single line. Uses
+   * [GcsDestination][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.gcs_destination].
+   * * `csv`
+   * The CSV format, where each prediction is a single comma-separated line.
+   * The first line in the file is the header, containing comma-separated field
+   * names. Uses
+   * [GcsDestination][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.gcs_destination].
+   * * `bigquery`
+   * Each prediction is a single row in a BigQuery table, uses
+   * [BigQueryDestination][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.bigquery_destination]
+   * .
+   * If this Model doesn't support any of these formats it means it cannot be
+   * used with a [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob]. However, if it has
+   * [supported_deployment_resources_types][google.cloud.aiplatform.v1.Model.supported_deployment_resources_types], it could serve online
+   * predictions by using [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] or
+   * [PredictionService.Explain][].
+   * 
+ * + * + * repeated string supported_output_storage_formats = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of supportedOutputStorageFormats. + */ + int getSupportedOutputStorageFormatsCount(); + /** + * + * + *
+   * Output only. The formats this Model supports in
+   * [BatchPredictionJob.output_config][google.cloud.aiplatform.v1.BatchPredictionJob.output_config]. If both
+   * [PredictSchemata.instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri] and
+   * [PredictSchemata.prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri] exist, the predictions
+   * are returned together with their instances. In other words, the
+   * prediction has the original instance data first, followed
+   * by the actual prediction content (as per the schema).
+   * The possible formats are:
+   * * `jsonl`
+   * The JSON Lines format, where each prediction is a single line. Uses
+   * [GcsDestination][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.gcs_destination].
+   * * `csv`
+   * The CSV format, where each prediction is a single comma-separated line.
+   * The first line in the file is the header, containing comma-separated field
+   * names. Uses
+   * [GcsDestination][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.gcs_destination].
+   * * `bigquery`
+   * Each prediction is a single row in a BigQuery table, uses
+   * [BigQueryDestination][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.bigquery_destination]
+   * .
+   * If this Model doesn't support any of these formats it means it cannot be
+   * used with a [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob]. However, if it has
+   * [supported_deployment_resources_types][google.cloud.aiplatform.v1.Model.supported_deployment_resources_types], it could serve online
+   * predictions by using [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] or
+   * [PredictionService.Explain][].
+   * 
+ * + * + * repeated string supported_output_storage_formats = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The supportedOutputStorageFormats at the given index. + */ + java.lang.String getSupportedOutputStorageFormats(int index); + /** + * + * + *
+   * Output only. The formats this Model supports in
+   * [BatchPredictionJob.output_config][google.cloud.aiplatform.v1.BatchPredictionJob.output_config]. If both
+   * [PredictSchemata.instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri] and
+   * [PredictSchemata.prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri] exist, the predictions
+   * are returned together with their instances. In other words, the
+   * prediction has the original instance data first, followed
+   * by the actual prediction content (as per the schema).
+   * The possible formats are:
+   * * `jsonl`
+   * The JSON Lines format, where each prediction is a single line. Uses
+   * [GcsDestination][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.gcs_destination].
+   * * `csv`
+   * The CSV format, where each prediction is a single comma-separated line.
+   * The first line in the file is the header, containing comma-separated field
+   * names. Uses
+   * [GcsDestination][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.gcs_destination].
+   * * `bigquery`
+   * Each prediction is a single row in a BigQuery table, uses
+   * [BigQueryDestination][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.bigquery_destination]
+   * .
+   * If this Model doesn't support any of these formats it means it cannot be
+   * used with a [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob]. However, if it has
+   * [supported_deployment_resources_types][google.cloud.aiplatform.v1.Model.supported_deployment_resources_types], it could serve online
+   * predictions by using [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] or
+   * [PredictionService.Explain][].
+   * 
+ * + * + * repeated string supported_output_storage_formats = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The bytes of the supportedOutputStorageFormats at the given index. + */ + com.google.protobuf.ByteString getSupportedOutputStorageFormatsBytes(int index); + + /** + * + * + *
+   * Output only. Timestamp when this Model was uploaded into AI Platform.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Timestamp when this Model was uploaded into AI Platform.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Timestamp when this Model was uploaded into AI Platform.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Timestamp when this Model was most recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. Timestamp when this Model was most recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. Timestamp when this Model was most recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The pointers to DeployedModels created from this Model. Note that
+   * Model could have been deployed to Endpoints in different Locations.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.DeployedModelRef deployed_models = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getDeployedModelsList(); + /** + * + * + *
+   * Output only. The pointers to DeployedModels created from this Model. Note that
+   * Model could have been deployed to Endpoints in different Locations.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.DeployedModelRef deployed_models = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1.DeployedModelRef getDeployedModels(int index); + /** + * + * + *
+   * Output only. The pointers to DeployedModels created from this Model. Note that
+   * Model could have been deployed to Endpoints in different Locations.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.DeployedModelRef deployed_models = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getDeployedModelsCount(); + /** + * + * + *
+   * Output only. The pointers to DeployedModels created from this Model. Note that
+   * Model could have been deployed to Endpoints in different Locations.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.DeployedModelRef deployed_models = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getDeployedModelsOrBuilderList(); + /** + * + * + *
+   * Output only. The pointers to DeployedModels created from this Model. Note that
+   * Model could have been deployed to Endpoints in different Locations.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.DeployedModelRef deployed_models = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1.DeployedModelRefOrBuilder getDeployedModelsOrBuilder(int index); + + /** + * + * + *
+   * Used to perform consistent read-modify-write updates. If not set, a blind
+   * "overwrite" update happens.
+   * 
+ * + * string etag = 16; + * + * @return The etag. + */ + java.lang.String getEtag(); + /** + * + * + *
+   * Used to perform consistent read-modify-write updates. If not set, a blind
+   * "overwrite" update happens.
+   * 
+ * + * string etag = 16; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); + + /** + * + * + *
+   * The labels with user-defined metadata to organize your Models.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 17; + */ + int getLabelsCount(); + /** + * + * + *
+   * The labels with user-defined metadata to organize your Models.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 17; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * The labels with user-defined metadata to organize your Models.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 17; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * The labels with user-defined metadata to organize your Models.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 17; + */ + java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * The labels with user-defined metadata to organize your Models.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 17; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Customer-managed encryption key spec for a Model. If set, this
+   * Model and all sub-resources of this Model will be secured by this key.
+   * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 24; + * + * @return Whether the encryptionSpec field is set. + */ + boolean hasEncryptionSpec(); + /** + * + * + *
+   * Customer-managed encryption key spec for a Model. If set, this
+   * Model and all sub-resources of this Model will be secured by this key.
+   * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 24; + * + * @return The encryptionSpec. + */ + com.google.cloud.aiplatform.v1.EncryptionSpec getEncryptionSpec(); + /** + * + * + *
+   * Customer-managed encryption key spec for a Model. If set, this
+   * Model and all sub-resources of this Model will be secured by this key.
+   * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 24; + */ + com.google.cloud.aiplatform.v1.EncryptionSpecOrBuilder getEncryptionSpecOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelProto.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelProto.java new file mode 100644 index 000000000..04db5dde4 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelProto.java @@ -0,0 +1,225 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/model.proto + +package com.google.cloud.aiplatform.v1; + +public final class ModelProto { + private ModelProto() {} + + 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_v1_Model_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_Model_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_Model_ExportFormat_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_Model_ExportFormat_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_Model_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_Model_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_PredictSchemata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_PredictSchemata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ModelContainerSpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ModelContainerSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_Port_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_Port_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/v1/model.proto" + + "\022\032google.cloud.aiplatform.v1\032\037google/api" + + "/field_behavior.proto\032\031google/api/resour" + + "ce.proto\032(google/cloud/aiplatform/v1/dat" + + "aset.proto\0323google/cloud/aiplatform/v1/d" + + "eployed_model_ref.proto\0320google/cloud/ai" + + "platform/v1/encryption_spec.proto\032(googl" + + "e/cloud/aiplatform/v1/env_var.proto\032\034goo" + + "gle/protobuf/struct.proto\032\037google/protob" + + "uf/timestamp.proto\032\034google/api/annotatio" + + "ns.proto\"\335\013\n\005Model\022\014\n\004name\030\001 \001(\t\022\031\n\014disp" + + "lay_name\030\002 \001(\tB\003\340A\002\022\023\n\013description\030\003 \001(\t" + + "\022E\n\020predict_schemata\030\004 \001(\0132+.google.clou" + + "d.aiplatform.v1.PredictSchemata\022 \n\023metad" + + "ata_schema_uri\030\005 \001(\tB\003\340A\005\022-\n\010metadata\030\006 " + + "\001(\0132\026.google.protobuf.ValueB\003\340A\005\022U\n\030supp" + + "orted_export_formats\030\024 \003(\0132..google.clou" + + "d.aiplatform.v1.Model.ExportFormatB\003\340A\003\022" + + "M\n\021training_pipeline\030\007 \001(\tB2\340A\003\372A,\n*aipl" + + "atform.googleapis.com/TrainingPipeline\022K" + + "\n\016container_spec\030\t \001(\0132..google.cloud.ai" + + "platform.v1.ModelContainerSpecB\003\340A\004\022\031\n\014a" + + "rtifact_uri\030\032 \001(\tB\003\340A\005\022l\n$supported_depl" + + "oyment_resources_types\030\n \003(\01629.google.cl" + + "oud.aiplatform.v1.Model.DeploymentResour" + + "cesTypeB\003\340A\003\022,\n\037supported_input_storage_" + + "formats\030\013 \003(\tB\003\340A\003\022-\n supported_output_s" + + "torage_formats\030\014 \003(\tB\003\340A\003\0224\n\013create_time" + + "\030\r \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022" + + "4\n\013update_time\030\016 \001(\0132\032.google.protobuf.T" + + "imestampB\003\340A\003\022J\n\017deployed_models\030\017 \003(\0132," + + ".google.cloud.aiplatform.v1.DeployedMode" + + "lRefB\003\340A\003\022\014\n\004etag\030\020 \001(\t\022=\n\006labels\030\021 \003(\0132" + + "-.google.cloud.aiplatform.v1.Model.Label" + + "sEntry\022C\n\017encryption_spec\030\030 \001(\0132*.google" + + ".cloud.aiplatform.v1.EncryptionSpec\032\325\001\n\014" + + "ExportFormat\022\017\n\002id\030\001 \001(\tB\003\340A\003\022b\n\023exporta" + + "ble_contents\030\002 \003(\0162@.google.cloud.aiplat" + + "form.v1.Model.ExportFormat.ExportableCon" + + "tentB\003\340A\003\"P\n\021ExportableContent\022\"\n\036EXPORT" + + "ABLE_CONTENT_UNSPECIFIED\020\000\022\014\n\010ARTIFACT\020\001" + + "\022\t\n\005IMAGE\020\002\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022" + + "\r\n\005value\030\002 \001(\t:\0028\001\"v\n\027DeploymentResource" + + "sType\022)\n%DEPLOYMENT_RESOURCES_TYPE_UNSPE" + + "CIFIED\020\000\022\027\n\023DEDICATED_RESOURCES\020\001\022\027\n\023AUT" + + "OMATIC_RESOURCES\020\002:\\\352AY\n\037aiplatform.goog" + + "leapis.com/Model\0226projects/{project}/loc" + + "ations/{location}/models/{model}\"{\n\017Pred" + + "ictSchemata\022 \n\023instance_schema_uri\030\001 \001(\t" + + "B\003\340A\005\022\"\n\025parameters_schema_uri\030\002 \001(\tB\003\340A" + + "\005\022\"\n\025prediction_schema_uri\030\003 \001(\tB\003\340A\005\"\373\001" + + "\n\022ModelContainerSpec\022\031\n\timage_uri\030\001 \001(\tB" + + "\006\340A\002\340A\005\022\024\n\007command\030\002 \003(\tB\003\340A\005\022\021\n\004args\030\003 " + + "\003(\tB\003\340A\005\0224\n\003env\030\004 \003(\0132\".google.cloud.aip" + + "latform.v1.EnvVarB\003\340A\005\0224\n\005ports\030\005 \003(\0132 ." + + "google.cloud.aiplatform.v1.PortB\003\340A\005\022\032\n\r" + + "predict_route\030\006 \001(\tB\003\340A\005\022\031\n\014health_route" + + "\030\007 \001(\tB\003\340A\005\"\036\n\004Port\022\026\n\016container_port\030\003 " + + "\001(\005Bt\n\036com.google.cloud.aiplatform.v1B\nM" + + "odelProtoP\001ZDgoogle.golang.org/genproto/" + + "googleapis/cloud/aiplatform/v1;aiplatfor" + + "mb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.aiplatform.v1.DatasetProto.getDescriptor(), + com.google.cloud.aiplatform.v1.DeployedModelNameProto.getDescriptor(), + com.google.cloud.aiplatform.v1.EncryptionSpecProto.getDescriptor(), + com.google.cloud.aiplatform.v1.EnvVarProto.getDescriptor(), + com.google.protobuf.StructProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1_Model_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_Model_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_Model_descriptor, + new java.lang.String[] { + "Name", + "DisplayName", + "Description", + "PredictSchemata", + "MetadataSchemaUri", + "Metadata", + "SupportedExportFormats", + "TrainingPipeline", + "ContainerSpec", + "ArtifactUri", + "SupportedDeploymentResourcesTypes", + "SupportedInputStorageFormats", + "SupportedOutputStorageFormats", + "CreateTime", + "UpdateTime", + "DeployedModels", + "Etag", + "Labels", + "EncryptionSpec", + }); + internal_static_google_cloud_aiplatform_v1_Model_ExportFormat_descriptor = + internal_static_google_cloud_aiplatform_v1_Model_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_aiplatform_v1_Model_ExportFormat_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_Model_ExportFormat_descriptor, + new java.lang.String[] { + "Id", "ExportableContents", + }); + internal_static_google_cloud_aiplatform_v1_Model_LabelsEntry_descriptor = + internal_static_google_cloud_aiplatform_v1_Model_descriptor.getNestedTypes().get(1); + internal_static_google_cloud_aiplatform_v1_Model_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_Model_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_aiplatform_v1_PredictSchemata_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_aiplatform_v1_PredictSchemata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_PredictSchemata_descriptor, + new java.lang.String[] { + "InstanceSchemaUri", "ParametersSchemaUri", "PredictionSchemaUri", + }); + internal_static_google_cloud_aiplatform_v1_ModelContainerSpec_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_aiplatform_v1_ModelContainerSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ModelContainerSpec_descriptor, + new java.lang.String[] { + "ImageUri", "Command", "Args", "Env", "Ports", "PredictRoute", "HealthRoute", + }); + internal_static_google_cloud_aiplatform_v1_Port_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_aiplatform_v1_Port_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_Port_descriptor, + new java.lang.String[] { + "ContainerPort", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.aiplatform.v1.DatasetProto.getDescriptor(); + com.google.cloud.aiplatform.v1.DeployedModelNameProto.getDescriptor(); + com.google.cloud.aiplatform.v1.EncryptionSpecProto.getDescriptor(); + com.google.cloud.aiplatform.v1.EnvVarProto.getDescriptor(); + com.google.protobuf.StructProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelServiceProto.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelServiceProto.java new file mode 100644 index 000000000..01d27a837 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelServiceProto.java @@ -0,0 +1,442 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/model_service.proto + +package com.google.cloud.aiplatform.v1; + +public final class ModelServiceProto { + private ModelServiceProto() {} + + 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_v1_UploadModelRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_UploadModelRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_UploadModelOperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_UploadModelOperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_UploadModelResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_UploadModelResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_GetModelRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_GetModelRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ListModelsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ListModelsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ListModelsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ListModelsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_UpdateModelRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_UpdateModelRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_DeleteModelRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_DeleteModelRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ExportModelRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ExportModelRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ExportModelRequest_OutputConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ExportModelRequest_OutputConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ExportModelOperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ExportModelOperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ExportModelOperationMetadata_OutputInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ExportModelOperationMetadata_OutputInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ExportModelResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ExportModelResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_GetModelEvaluationRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_GetModelEvaluationRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ListModelEvaluationsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ListModelEvaluationsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ListModelEvaluationsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ListModelEvaluationsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_GetModelEvaluationSliceRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_GetModelEvaluationSliceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ListModelEvaluationSlicesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ListModelEvaluationSlicesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ListModelEvaluationSlicesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ListModelEvaluationSlicesResponse_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/v1/model_servi" + + "ce.proto\022\032google.cloud.aiplatform.v1\032\034go" + + "ogle/api/annotations.proto\032\027google/api/c" + + "lient.proto\032\037google/api/field_behavior.p" + + "roto\032\031google/api/resource.proto\032#google/" + + "cloud/aiplatform/v1/io.proto\032&google/clo" + + "ud/aiplatform/v1/model.proto\0321google/clo" + + "ud/aiplatform/v1/model_evaluation.proto\032" + + "7google/cloud/aiplatform/v1/model_evalua" + + "tion_slice.proto\032*google/cloud/aiplatfor" + + "m/v1/operation.proto\032#google/longrunning" + + "/operations.proto\032 google/protobuf/field" + + "_mask.proto\"\206\001\n\022UploadModelRequest\0229\n\006pa" + + "rent\030\001 \001(\tB)\340A\002\372A#\n!locations.googleapis" + + ".com/Location\0225\n\005model\030\002 \001(\0132!.google.cl" + + "oud.aiplatform.v1.ModelB\003\340A\002\"n\n\034UploadMo" + + "delOperationMetadata\022N\n\020generic_metadata" + + "\030\001 \001(\01324.google.cloud.aiplatform.v1.Gene" + + "ricOperationMetadata\"J\n\023UploadModelRespo" + + "nse\0223\n\005model\030\001 \001(\tB$\372A!\n\037aiplatform.goog" + + "leapis.com/Model\"H\n\017GetModelRequest\0225\n\004n" + + "ame\030\001 \001(\tB\'\340A\002\372A!\n\037aiplatform.googleapis" + + ".com/Model\"\306\001\n\021ListModelsRequest\0229\n\006pare" + + "nt\030\001 \001(\tB)\340A\002\372A#\n!locations.googleapis.c" + + "om/Location\022\016\n\006filter\030\002 \001(\t\022\021\n\tpage_size" + + "\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\022-\n\tread_mask\030" + + "\005 \001(\0132\032.google.protobuf.FieldMask\022\020\n\010ord" + + "er_by\030\006 \001(\t\"`\n\022ListModelsResponse\0221\n\006mod" + + "els\030\001 \003(\0132!.google.cloud.aiplatform.v1.M" + + "odel\022\027\n\017next_page_token\030\002 \001(\t\"\201\001\n\022Update" + + "ModelRequest\0225\n\005model\030\001 \001(\0132!.google.clo" + + "ud.aiplatform.v1.ModelB\003\340A\002\0224\n\013update_ma" + + "sk\030\002 \001(\0132\032.google.protobuf.FieldMaskB\003\340A" + + "\002\"K\n\022DeleteModelRequest\0225\n\004name\030\001 \001(\tB\'\340" + + "A\002\372A!\n\037aiplatform.googleapis.com/Model\"\356" + + "\002\n\022ExportModelRequest\0225\n\004name\030\001 \001(\tB\'\340A\002" + + "\372A!\n\037aiplatform.googleapis.com/Model\022W\n\r" + + "output_config\030\002 \001(\0132;.google.cloud.aipla" + + "tform.v1.ExportModelRequest.OutputConfig" + + "B\003\340A\002\032\307\001\n\014OutputConfig\022\030\n\020export_format_" + + "id\030\001 \001(\t\022H\n\024artifact_destination\030\003 \001(\0132*" + + ".google.cloud.aiplatform.v1.GcsDestinati" + + "on\022S\n\021image_destination\030\004 \001(\01328.google.c" + + "loud.aiplatform.v1.ContainerRegistryDest" + + "ination\"\234\002\n\034ExportModelOperationMetadata" + + "\022N\n\020generic_metadata\030\001 \001(\01324.google.clou" + + "d.aiplatform.v1.GenericOperationMetadata" + + "\022]\n\013output_info\030\002 \001(\0132C.google.cloud.aip" + + "latform.v1.ExportModelOperationMetadata." + + "OutputInfoB\003\340A\003\032M\n\nOutputInfo\022 \n\023artifac" + + "t_output_uri\030\002 \001(\tB\003\340A\003\022\035\n\020image_output_" + + "uri\030\003 \001(\tB\003\340A\003\"\025\n\023ExportModelResponse\"\\\n" + + "\031GetModelEvaluationRequest\022?\n\004name\030\001 \001(\t" + + "B1\340A\002\372A+\n)aiplatform.googleapis.com/Mode" + + "lEvaluation\"\274\001\n\033ListModelEvaluationsRequ" + + "est\0227\n\006parent\030\001 \001(\tB\'\340A\002\372A!\n\037aiplatform." + + "googleapis.com/Model\022\016\n\006filter\030\002 \001(\t\022\021\n\t" + + "page_size\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\022-\n\tr" + + "ead_mask\030\005 \001(\0132\032.google.protobuf.FieldMa" + + "sk\"\177\n\034ListModelEvaluationsResponse\022F\n\021mo" + + "del_evaluations\030\001 \003(\0132+.google.cloud.aip" + + "latform.v1.ModelEvaluation\022\027\n\017next_page_" + + "token\030\002 \001(\t\"f\n\036GetModelEvaluationSliceRe" + + "quest\022D\n\004name\030\001 \001(\tB6\340A\002\372A0\n.aiplatform." + + "googleapis.com/ModelEvaluationSlice\"\313\001\n " + + "ListModelEvaluationSlicesRequest\022A\n\006pare" + + "nt\030\001 \001(\tB1\340A\002\372A+\n)aiplatform.googleapis." + + "com/ModelEvaluation\022\016\n\006filter\030\002 \001(\t\022\021\n\tp" + + "age_size\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\022-\n\tre" + + "ad_mask\030\005 \001(\0132\032.google.protobuf.FieldMas" + + "k\"\217\001\n!ListModelEvaluationSlicesResponse\022" + + "Q\n\027model_evaluation_slices\030\001 \003(\01320.googl" + + "e.cloud.aiplatform.v1.ModelEvaluationSli" + + "ce\022\027\n\017next_page_token\030\002 \001(\t2\327\020\n\014ModelSer" + + "vice\022\340\001\n\013UploadModel\022..google.cloud.aipl" + + "atform.v1.UploadModelRequest\032\035.google.lo" + + "ngrunning.Operation\"\201\001\202\323\344\223\0026\"1/v1/{paren" + + "t=projects/*/locations/*}/models:upload:" + + "\001*\332A\014parent,model\312A3\n\023UploadModelRespons" + + "e\022\034UploadModelOperationMetadata\022\225\001\n\010GetM" + + "odel\022+.google.cloud.aiplatform.v1.GetMod" + + "elRequest\032!.google.cloud.aiplatform.v1.M" + + "odel\"9\202\323\344\223\002,\022*/v1/{name=projects/*/locat" + + "ions/*/models/*}\332A\004name\022\250\001\n\nListModels\022-" + + ".google.cloud.aiplatform.v1.ListModelsRe" + + "quest\032..google.cloud.aiplatform.v1.ListM" + + "odelsResponse\";\202\323\344\223\002,\022*/v1/{parent=proje" + + "cts/*/locations/*}/models\332A\006parent\022\265\001\n\013U" + + "pdateModel\022..google.cloud.aiplatform.v1." + + "UpdateModelRequest\032!.google.cloud.aiplat" + + "form.v1.Model\"S\202\323\344\223\002920/v1/{model.name=p" + + "rojects/*/locations/*/models/*}:\005model\332A" + + "\021model,update_mask\022\312\001\n\013DeleteModel\022..goo" + + "gle.cloud.aiplatform.v1.DeleteModelReque" + + "st\032\035.google.longrunning.Operation\"l\202\323\344\223\002" + + ",**/v1/{name=projects/*/locations/*/mode" + + "ls/*}\332A\004name\312A0\n\025google.protobuf.Empty\022\027" + + "DeleteOperationMetadata\022\346\001\n\013ExportModel\022" + + "..google.cloud.aiplatform.v1.ExportModel" + + "Request\032\035.google.longrunning.Operation\"\207" + + "\001\202\323\344\223\0026\"1/v1/{name=projects/*/locations/" + + "*/models/*}:export:\001*\332A\022name,output_conf" + + "ig\312A3\n\023ExportModelResponse\022\034ExportModelO" + + "perationMetadata\022\301\001\n\022GetModelEvaluation\022" + + "5.google.cloud.aiplatform.v1.GetModelEva" + + "luationRequest\032+.google.cloud.aiplatform" + + ".v1.ModelEvaluation\"G\202\323\344\223\002:\0228/v1/{name=p" + + "rojects/*/locations/*/models/*/evaluatio" + + "ns/*}\332A\004name\022\324\001\n\024ListModelEvaluations\0227." + + "google.cloud.aiplatform.v1.ListModelEval" + + "uationsRequest\0328.google.cloud.aiplatform" + + ".v1.ListModelEvaluationsResponse\"I\202\323\344\223\002:" + + "\0228/v1/{parent=projects/*/locations/*/mod" + + "els/*}/evaluations\332A\006parent\022\331\001\n\027GetModel" + + "EvaluationSlice\022:.google.cloud.aiplatfor" + + "m.v1.GetModelEvaluationSliceRequest\0320.go" + + "ogle.cloud.aiplatform.v1.ModelEvaluation" + + "Slice\"P\202\323\344\223\002C\022A/v1/{name=projects/*/loca" + + "tions/*/models/*/evaluations/*/slices/*}" + + "\332A\004name\022\354\001\n\031ListModelEvaluationSlices\022<." + + "google.cloud.aiplatform.v1.ListModelEval" + + "uationSlicesRequest\032=.google.cloud.aipla" + + "tform.v1.ListModelEvaluationSlicesRespon" + + "se\"R\202\323\344\223\002C\022A/v1/{parent=projects/*/locat" + + "ions/*/models/*/evaluations/*}/slices\332A\006" + + "parent\032M\312A\031aiplatform.googleapis.com\322A.h" + + "ttps://www.googleapis.com/auth/cloud-pla" + + "tformB{\n\036com.google.cloud.aiplatform.v1B" + + "\021ModelServiceProtoP\001ZDgoogle.golang.org/" + + "genproto/googleapis/cloud/aiplatform/v1;" + + "aiplatformb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.aiplatform.v1.IoProto.getDescriptor(), + com.google.cloud.aiplatform.v1.ModelProto.getDescriptor(), + com.google.cloud.aiplatform.v1.ModelEvaluationProto.getDescriptor(), + com.google.cloud.aiplatform.v1.ModelEvaluationSliceProto.getDescriptor(), + com.google.cloud.aiplatform.v1.OperationProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1_UploadModelRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_UploadModelRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_UploadModelRequest_descriptor, + new java.lang.String[] { + "Parent", "Model", + }); + internal_static_google_cloud_aiplatform_v1_UploadModelOperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_aiplatform_v1_UploadModelOperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_UploadModelOperationMetadata_descriptor, + new java.lang.String[] { + "GenericMetadata", + }); + internal_static_google_cloud_aiplatform_v1_UploadModelResponse_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_aiplatform_v1_UploadModelResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_UploadModelResponse_descriptor, + new java.lang.String[] { + "Model", + }); + internal_static_google_cloud_aiplatform_v1_GetModelRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_aiplatform_v1_GetModelRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_GetModelRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_aiplatform_v1_ListModelsRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_aiplatform_v1_ListModelsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ListModelsRequest_descriptor, + new java.lang.String[] { + "Parent", "Filter", "PageSize", "PageToken", "ReadMask", "OrderBy", + }); + internal_static_google_cloud_aiplatform_v1_ListModelsResponse_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_aiplatform_v1_ListModelsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ListModelsResponse_descriptor, + new java.lang.String[] { + "Models", "NextPageToken", + }); + internal_static_google_cloud_aiplatform_v1_UpdateModelRequest_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_aiplatform_v1_UpdateModelRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_UpdateModelRequest_descriptor, + new java.lang.String[] { + "Model", "UpdateMask", + }); + internal_static_google_cloud_aiplatform_v1_DeleteModelRequest_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_aiplatform_v1_DeleteModelRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_DeleteModelRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_aiplatform_v1_ExportModelRequest_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_aiplatform_v1_ExportModelRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ExportModelRequest_descriptor, + new java.lang.String[] { + "Name", "OutputConfig", + }); + internal_static_google_cloud_aiplatform_v1_ExportModelRequest_OutputConfig_descriptor = + internal_static_google_cloud_aiplatform_v1_ExportModelRequest_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_aiplatform_v1_ExportModelRequest_OutputConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ExportModelRequest_OutputConfig_descriptor, + new java.lang.String[] { + "ExportFormatId", "ArtifactDestination", "ImageDestination", + }); + internal_static_google_cloud_aiplatform_v1_ExportModelOperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_aiplatform_v1_ExportModelOperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ExportModelOperationMetadata_descriptor, + new java.lang.String[] { + "GenericMetadata", "OutputInfo", + }); + internal_static_google_cloud_aiplatform_v1_ExportModelOperationMetadata_OutputInfo_descriptor = + internal_static_google_cloud_aiplatform_v1_ExportModelOperationMetadata_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_aiplatform_v1_ExportModelOperationMetadata_OutputInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ExportModelOperationMetadata_OutputInfo_descriptor, + new java.lang.String[] { + "ArtifactOutputUri", "ImageOutputUri", + }); + internal_static_google_cloud_aiplatform_v1_ExportModelResponse_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_aiplatform_v1_ExportModelResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ExportModelResponse_descriptor, + new java.lang.String[] {}); + internal_static_google_cloud_aiplatform_v1_GetModelEvaluationRequest_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_aiplatform_v1_GetModelEvaluationRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_GetModelEvaluationRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_aiplatform_v1_ListModelEvaluationsRequest_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_aiplatform_v1_ListModelEvaluationsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ListModelEvaluationsRequest_descriptor, + new java.lang.String[] { + "Parent", "Filter", "PageSize", "PageToken", "ReadMask", + }); + internal_static_google_cloud_aiplatform_v1_ListModelEvaluationsResponse_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_cloud_aiplatform_v1_ListModelEvaluationsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ListModelEvaluationsResponse_descriptor, + new java.lang.String[] { + "ModelEvaluations", "NextPageToken", + }); + internal_static_google_cloud_aiplatform_v1_GetModelEvaluationSliceRequest_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_cloud_aiplatform_v1_GetModelEvaluationSliceRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_GetModelEvaluationSliceRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_aiplatform_v1_ListModelEvaluationSlicesRequest_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_cloud_aiplatform_v1_ListModelEvaluationSlicesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ListModelEvaluationSlicesRequest_descriptor, + new java.lang.String[] { + "Parent", "Filter", "PageSize", "PageToken", "ReadMask", + }); + internal_static_google_cloud_aiplatform_v1_ListModelEvaluationSlicesResponse_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_cloud_aiplatform_v1_ListModelEvaluationSlicesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ListModelEvaluationSlicesResponse_descriptor, + new java.lang.String[] { + "ModelEvaluationSlices", "NextPageToken", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resourceReference); + registry.add(com.google.longrunning.OperationsProto.operationInfo); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.aiplatform.v1.IoProto.getDescriptor(); + com.google.cloud.aiplatform.v1.ModelProto.getDescriptor(); + com.google.cloud.aiplatform.v1.ModelEvaluationProto.getDescriptor(); + com.google.cloud.aiplatform.v1.ModelEvaluationSliceProto.getDescriptor(); + com.google.cloud.aiplatform.v1.OperationProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/OperationProto.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/OperationProto.java new file mode 100644 index 000000000..ed01380f6 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/OperationProto.java @@ -0,0 +1,101 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/operation.proto + +package com.google.cloud.aiplatform.v1; + +public final class OperationProto { + private OperationProto() {} + + 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_v1_GenericOperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_GenericOperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_DeleteOperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_DeleteOperationMetadata_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/v1/operation.p" + + "roto\022\032google.cloud.aiplatform.v1\032\037google" + + "/api/field_behavior.proto\032\037google/protob" + + "uf/timestamp.proto\032\027google/rpc/status.pr" + + "oto\032\034google/api/annotations.proto\"\271\001\n\030Ge" + + "nericOperationMetadata\0221\n\020partial_failur" + + "es\030\001 \003(\0132\022.google.rpc.StatusB\003\340A\003\0224\n\013cre" + + "ate_time\030\002 \001(\0132\032.google.protobuf.Timesta" + + "mpB\003\340A\003\0224\n\013update_time\030\003 \001(\0132\032.google.pr" + + "otobuf.TimestampB\003\340A\003\"i\n\027DeleteOperation" + + "Metadata\022N\n\020generic_metadata\030\001 \001(\01324.goo" + + "gle.cloud.aiplatform.v1.GenericOperation" + + "MetadataBx\n\036com.google.cloud.aiplatform." + + "v1B\016OperationProtoP\001ZDgoogle.golang.org/" + + "genproto/googleapis/cloud/aiplatform/v1;" + + "aiplatformb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.rpc.StatusProto.getDescriptor(), + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1_GenericOperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_GenericOperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_GenericOperationMetadata_descriptor, + new java.lang.String[] { + "PartialFailures", "CreateTime", "UpdateTime", + }); + internal_static_google_cloud_aiplatform_v1_DeleteOperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_aiplatform_v1_DeleteOperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_DeleteOperationMetadata_descriptor, + new java.lang.String[] { + "GenericMetadata", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.rpc.StatusProto.getDescriptor(); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PipelineServiceProto.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PipelineServiceProto.java new file mode 100644 index 000000000..0c7042e77 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PipelineServiceProto.java @@ -0,0 +1,209 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/pipeline_service.proto + +package com.google.cloud.aiplatform.v1; + +public final class PipelineServiceProto { + private PipelineServiceProto() {} + + 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_v1_CreateTrainingPipelineRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_CreateTrainingPipelineRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_GetTrainingPipelineRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_GetTrainingPipelineRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ListTrainingPipelinesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ListTrainingPipelinesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ListTrainingPipelinesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ListTrainingPipelinesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_DeleteTrainingPipelineRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_DeleteTrainingPipelineRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_CancelTrainingPipelineRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_CancelTrainingPipelineRequest_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n1google/cloud/aiplatform/v1/pipeline_se" + + "rvice.proto\022\032google.cloud.aiplatform.v1\032" + + "\034google/api/annotations.proto\032\027google/ap" + + "i/client.proto\032\037google/api/field_behavio" + + "r.proto\032\031google/api/resource.proto\0322goog" + + "le/cloud/aiplatform/v1/training_pipeline" + + ".proto\032#google/longrunning/operations.pr" + + "oto\032\033google/protobuf/empty.proto\032 google" + + "/protobuf/field_mask.proto\"\250\001\n\035CreateTra" + + "iningPipelineRequest\0229\n\006parent\030\001 \001(\tB)\340A" + + "\002\372A#\n!locations.googleapis.com/Location\022" + + "L\n\021training_pipeline\030\002 \001(\0132,.google.clou" + + "d.aiplatform.v1.TrainingPipelineB\003\340A\002\"^\n" + + "\032GetTrainingPipelineRequest\022@\n\004name\030\001 \001(" + + "\tB2\340A\002\372A,\n*aiplatform.googleapis.com/Tra" + + "iningPipeline\"\277\001\n\034ListTrainingPipelinesR" + + "equest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!location" + + "s.googleapis.com/Location\022\016\n\006filter\030\002 \001(" + + "\t\022\021\n\tpage_size\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t" + + "\022-\n\tread_mask\030\005 \001(\0132\032.google.protobuf.Fi" + + "eldMask\"\202\001\n\035ListTrainingPipelinesRespons" + + "e\022H\n\022training_pipelines\030\001 \003(\0132,.google.c" + + "loud.aiplatform.v1.TrainingPipeline\022\027\n\017n" + + "ext_page_token\030\002 \001(\t\"a\n\035DeleteTrainingPi" + + "pelineRequest\022@\n\004name\030\001 \001(\tB2\340A\002\372A,\n*aip" + + "latform.googleapis.com/TrainingPipeline\"" + + "a\n\035CancelTrainingPipelineRequest\022@\n\004name" + + "\030\001 \001(\tB2\340A\002\372A,\n*aiplatform.googleapis.co" + + "m/TrainingPipeline2\230\t\n\017PipelineService\022\356" + + "\001\n\026CreateTrainingPipeline\0229.google.cloud" + + ".aiplatform.v1.CreateTrainingPipelineReq" + + "uest\032,.google.cloud.aiplatform.v1.Traini" + + "ngPipeline\"k\202\323\344\223\002J\"5/v1/{parent=projects" + + "/*/locations/*}/trainingPipelines:\021train" + + "ing_pipeline\332A\030parent,training_pipeline\022" + + "\301\001\n\023GetTrainingPipeline\0226.google.cloud.a" + + "iplatform.v1.GetTrainingPipelineRequest\032" + + ",.google.cloud.aiplatform.v1.TrainingPip" + + "eline\"D\202\323\344\223\0027\0225/v1/{name=projects/*/loca" + + "tions/*/trainingPipelines/*}\332A\004name\022\324\001\n\025" + + "ListTrainingPipelines\0228.google.cloud.aip" + + "latform.v1.ListTrainingPipelinesRequest\032" + + "9.google.cloud.aiplatform.v1.ListTrainin" + + "gPipelinesResponse\"F\202\323\344\223\0027\0225/v1/{parent=" + + "projects/*/locations/*}/trainingPipeline" + + "s\332A\006parent\022\353\001\n\026DeleteTrainingPipeline\0229." + + "google.cloud.aiplatform.v1.DeleteTrainin" + + "gPipelineRequest\032\035.google.longrunning.Op" + + "eration\"w\202\323\344\223\0027*5/v1/{name=projects/*/lo" + + "cations/*/trainingPipelines/*}\332A\004name\312A0" + + "\n\025google.protobuf.Empty\022\027DeleteOperation" + + "Metadata\022\273\001\n\026CancelTrainingPipeline\0229.go" + + "ogle.cloud.aiplatform.v1.CancelTrainingP" + + "ipelineRequest\032\026.google.protobuf.Empty\"N" + + "\202\323\344\223\002A\" + * Describes the state of a pipeline. + * + * + * Protobuf enum {@code google.cloud.aiplatform.v1.PipelineState} + */ +public enum PipelineState implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * The pipeline state is unspecified.
+   * 
+ * + * PIPELINE_STATE_UNSPECIFIED = 0; + */ + PIPELINE_STATE_UNSPECIFIED(0), + /** + * + * + *
+   * The pipeline has been just created or resumed and processing has not yet
+   * begun.
+   * 
+ * + * PIPELINE_STATE_QUEUED = 1; + */ + PIPELINE_STATE_QUEUED(1), + /** + * + * + *
+   * The service is preparing to run the pipeline.
+   * 
+ * + * PIPELINE_STATE_PENDING = 2; + */ + PIPELINE_STATE_PENDING(2), + /** + * + * + *
+   * The pipeline is in progress.
+   * 
+ * + * PIPELINE_STATE_RUNNING = 3; + */ + PIPELINE_STATE_RUNNING(3), + /** + * + * + *
+   * The pipeline completed successfully.
+   * 
+ * + * PIPELINE_STATE_SUCCEEDED = 4; + */ + PIPELINE_STATE_SUCCEEDED(4), + /** + * + * + *
+   * The pipeline failed.
+   * 
+ * + * PIPELINE_STATE_FAILED = 5; + */ + PIPELINE_STATE_FAILED(5), + /** + * + * + *
+   * The pipeline is being cancelled. From this state the pipeline may only go
+   * to either PIPELINE_STATE_SUCCEEDED, PIPELINE_STATE_FAILED or
+   * PIPELINE_STATE_CANCELLED.
+   * 
+ * + * PIPELINE_STATE_CANCELLING = 6; + */ + PIPELINE_STATE_CANCELLING(6), + /** + * + * + *
+   * The pipeline has been cancelled.
+   * 
+ * + * PIPELINE_STATE_CANCELLED = 7; + */ + PIPELINE_STATE_CANCELLED(7), + /** + * + * + *
+   * The pipeline has been stopped, and can be resumed.
+   * 
+ * + * PIPELINE_STATE_PAUSED = 8; + */ + PIPELINE_STATE_PAUSED(8), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * The pipeline state is unspecified.
+   * 
+ * + * PIPELINE_STATE_UNSPECIFIED = 0; + */ + public static final int PIPELINE_STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * The pipeline has been just created or resumed and processing has not yet
+   * begun.
+   * 
+ * + * PIPELINE_STATE_QUEUED = 1; + */ + public static final int PIPELINE_STATE_QUEUED_VALUE = 1; + /** + * + * + *
+   * The service is preparing to run the pipeline.
+   * 
+ * + * PIPELINE_STATE_PENDING = 2; + */ + public static final int PIPELINE_STATE_PENDING_VALUE = 2; + /** + * + * + *
+   * The pipeline is in progress.
+   * 
+ * + * PIPELINE_STATE_RUNNING = 3; + */ + public static final int PIPELINE_STATE_RUNNING_VALUE = 3; + /** + * + * + *
+   * The pipeline completed successfully.
+   * 
+ * + * PIPELINE_STATE_SUCCEEDED = 4; + */ + public static final int PIPELINE_STATE_SUCCEEDED_VALUE = 4; + /** + * + * + *
+   * The pipeline failed.
+   * 
+ * + * PIPELINE_STATE_FAILED = 5; + */ + public static final int PIPELINE_STATE_FAILED_VALUE = 5; + /** + * + * + *
+   * The pipeline is being cancelled. From this state the pipeline may only go
+   * to either PIPELINE_STATE_SUCCEEDED, PIPELINE_STATE_FAILED or
+   * PIPELINE_STATE_CANCELLED.
+   * 
+ * + * PIPELINE_STATE_CANCELLING = 6; + */ + public static final int PIPELINE_STATE_CANCELLING_VALUE = 6; + /** + * + * + *
+   * The pipeline has been cancelled.
+   * 
+ * + * PIPELINE_STATE_CANCELLED = 7; + */ + public static final int PIPELINE_STATE_CANCELLED_VALUE = 7; + /** + * + * + *
+   * The pipeline has been stopped, and can be resumed.
+   * 
+ * + * PIPELINE_STATE_PAUSED = 8; + */ + public static final int PIPELINE_STATE_PAUSED_VALUE = 8; + + 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 PipelineState 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 PipelineState forNumber(int value) { + switch (value) { + case 0: + return PIPELINE_STATE_UNSPECIFIED; + case 1: + return PIPELINE_STATE_QUEUED; + case 2: + return PIPELINE_STATE_PENDING; + case 3: + return PIPELINE_STATE_RUNNING; + case 4: + return PIPELINE_STATE_SUCCEEDED; + case 5: + return PIPELINE_STATE_FAILED; + case 6: + return PIPELINE_STATE_CANCELLING; + case 7: + return PIPELINE_STATE_CANCELLED; + case 8: + return PIPELINE_STATE_PAUSED; + 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 PipelineState findValueByNumber(int number) { + return PipelineState.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.v1.PipelineStateProto.getDescriptor().getEnumTypes().get(0); + } + + private static final PipelineState[] VALUES = values(); + + public static PipelineState 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 PipelineState(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.aiplatform.v1.PipelineState) +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PipelineStateProto.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PipelineStateProto.java new file mode 100644 index 000000000..eaa5f2fee --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PipelineStateProto.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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/pipeline_state.proto + +package com.google.cloud.aiplatform.v1; + +public final class PipelineStateProto { + private PipelineStateProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + 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/v1/pipeline_st" + + "ate.proto\022\032google.cloud.aiplatform.v1\032\034g" + + "oogle/api/annotations.proto*\223\002\n\rPipeline" + + "State\022\036\n\032PIPELINE_STATE_UNSPECIFIED\020\000\022\031\n" + + "\025PIPELINE_STATE_QUEUED\020\001\022\032\n\026PIPELINE_STA" + + "TE_PENDING\020\002\022\032\n\026PIPELINE_STATE_RUNNING\020\003" + + "\022\034\n\030PIPELINE_STATE_SUCCEEDED\020\004\022\031\n\025PIPELI" + + "NE_STATE_FAILED\020\005\022\035\n\031PIPELINE_STATE_CANC" + + "ELLING\020\006\022\034\n\030PIPELINE_STATE_CANCELLED\020\007\022\031" + + "\n\025PIPELINE_STATE_PAUSED\020\010B|\n\036com.google." + + "cloud.aiplatform.v1B\022PipelineStateProtoP" + + "\001ZDgoogle.golang.org/genproto/googleapis" + + "/cloud/aiplatform/v1;aiplatformb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + }); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/Port.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/Port.java new file mode 100644 index 000000000..f809074c7 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/Port.java @@ -0,0 +1,545 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/model.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Represents a network port in a container.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.Port} + */ +public final class Port extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.Port) + PortOrBuilder { + private static final long serialVersionUID = 0L; + // Use Port.newBuilder() to construct. + private Port(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Port() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Port(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Port( + 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 24: + { + containerPort_ = 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.v1.ModelProto + .internal_static_google_cloud_aiplatform_v1_Port_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ModelProto + .internal_static_google_cloud_aiplatform_v1_Port_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.Port.class, + com.google.cloud.aiplatform.v1.Port.Builder.class); + } + + public static final int CONTAINER_PORT_FIELD_NUMBER = 3; + private int containerPort_; + /** + * + * + *
+   * The number of the port to expose on the pod's IP address.
+   * Must be a valid port number, between 1 and 65535 inclusive.
+   * 
+ * + * int32 container_port = 3; + * + * @return The containerPort. + */ + @java.lang.Override + public int getContainerPort() { + return containerPort_; + } + + 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 (containerPort_ != 0) { + output.writeInt32(3, containerPort_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (containerPort_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, containerPort_); + } + 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.v1.Port)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.Port other = (com.google.cloud.aiplatform.v1.Port) obj; + + if (getContainerPort() != other.getContainerPort()) 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) + CONTAINER_PORT_FIELD_NUMBER; + hash = (53 * hash) + getContainerPort(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.Port parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.Port 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.v1.Port parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.Port 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.v1.Port parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.Port parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.Port parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.Port 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.v1.Port parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.Port 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.v1.Port parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.Port 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.v1.Port 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 network port in a container.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.Port} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.Port) + com.google.cloud.aiplatform.v1.PortOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.ModelProto + .internal_static_google_cloud_aiplatform_v1_Port_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ModelProto + .internal_static_google_cloud_aiplatform_v1_Port_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.Port.class, + com.google.cloud.aiplatform.v1.Port.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.Port.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(); + containerPort_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.ModelProto + .internal_static_google_cloud_aiplatform_v1_Port_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.Port getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.Port.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.Port build() { + com.google.cloud.aiplatform.v1.Port result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.Port buildPartial() { + com.google.cloud.aiplatform.v1.Port result = new com.google.cloud.aiplatform.v1.Port(this); + result.containerPort_ = containerPort_; + 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.v1.Port) { + return mergeFrom((com.google.cloud.aiplatform.v1.Port) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.Port other) { + if (other == com.google.cloud.aiplatform.v1.Port.getDefaultInstance()) return this; + if (other.getContainerPort() != 0) { + setContainerPort(other.getContainerPort()); + } + 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.v1.Port parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.aiplatform.v1.Port) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int containerPort_; + /** + * + * + *
+     * The number of the port to expose on the pod's IP address.
+     * Must be a valid port number, between 1 and 65535 inclusive.
+     * 
+ * + * int32 container_port = 3; + * + * @return The containerPort. + */ + @java.lang.Override + public int getContainerPort() { + return containerPort_; + } + /** + * + * + *
+     * The number of the port to expose on the pod's IP address.
+     * Must be a valid port number, between 1 and 65535 inclusive.
+     * 
+ * + * int32 container_port = 3; + * + * @param value The containerPort to set. + * @return This builder for chaining. + */ + public Builder setContainerPort(int value) { + + containerPort_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The number of the port to expose on the pod's IP address.
+     * Must be a valid port number, between 1 and 65535 inclusive.
+     * 
+ * + * int32 container_port = 3; + * + * @return This builder for chaining. + */ + public Builder clearContainerPort() { + + containerPort_ = 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.v1.Port) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.Port) + private static final com.google.cloud.aiplatform.v1.Port DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.Port(); + } + + public static com.google.cloud.aiplatform.v1.Port getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Port parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Port(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.v1.Port getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PortOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PortOrBuilder.java new file mode 100644 index 000000000..759874a29 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PortOrBuilder.java @@ -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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/model.proto + +package com.google.cloud.aiplatform.v1; + +public interface PortOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.Port) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The number of the port to expose on the pod's IP address.
+   * Must be a valid port number, between 1 and 65535 inclusive.
+   * 
+ * + * int32 container_port = 3; + * + * @return The containerPort. + */ + int getContainerPort(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PredefinedSplit.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PredefinedSplit.java new file mode 100644 index 000000000..3a188a824 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PredefinedSplit.java @@ -0,0 +1,673 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/training_pipeline.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Assigns input data to training, validation, and test sets based on the
+ * value of a provided key.
+ * Supported only for tabular Datasets.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.PredefinedSplit} + */ +public final class PredefinedSplit extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.PredefinedSplit) + PredefinedSplitOrBuilder { + private static final long serialVersionUID = 0L; + // Use PredefinedSplit.newBuilder() to construct. + private PredefinedSplit(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PredefinedSplit() { + key_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PredefinedSplit(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private PredefinedSplit( + 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(); + + 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.v1.TrainingPipelineProto + .internal_static_google_cloud_aiplatform_v1_PredefinedSplit_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.TrainingPipelineProto + .internal_static_google_cloud_aiplatform_v1_PredefinedSplit_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.PredefinedSplit.class, + com.google.cloud.aiplatform.v1.PredefinedSplit.Builder.class); + } + + public static final int KEY_FIELD_NUMBER = 1; + private volatile java.lang.Object key_; + /** + * + * + *
+   * Required. The key is a name of one of the Dataset's data columns.
+   * The value of the key (either the label's value or value in the column)
+   * must be one of {`training`, `validation`, `test`}, and it defines to which
+   * set the given piece of data is assigned. If for a piece of data the key
+   * is not present or has an invalid value, that piece is ignored by the
+   * pipeline.
+   * 
+ * + * string key = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+   * Required. The key is a name of one of the Dataset's data columns.
+   * The value of the key (either the label's value or value in the column)
+   * must be one of {`training`, `validation`, `test`}, and it defines to which
+   * set the given piece of data is assigned. If for a piece of data the key
+   * is not present or has an invalid value, that piece is ignored by the
+   * pipeline.
+   * 
+ * + * string key = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 (!getKeyBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, key_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getKeyBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, 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.v1.PredefinedSplit)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.PredefinedSplit other = + (com.google.cloud.aiplatform.v1.PredefinedSplit) obj; + + 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) + KEY_FIELD_NUMBER; + hash = (53 * hash) + getKey().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.PredefinedSplit parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.PredefinedSplit 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.v1.PredefinedSplit parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.PredefinedSplit 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.v1.PredefinedSplit parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.PredefinedSplit parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.PredefinedSplit parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.PredefinedSplit 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.v1.PredefinedSplit parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.PredefinedSplit 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.v1.PredefinedSplit parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.PredefinedSplit 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.v1.PredefinedSplit 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; + } + /** + * + * + *
+   * Assigns input data to training, validation, and test sets based on the
+   * value of a provided key.
+   * Supported only for tabular Datasets.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.PredefinedSplit} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.PredefinedSplit) + com.google.cloud.aiplatform.v1.PredefinedSplitOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.TrainingPipelineProto + .internal_static_google_cloud_aiplatform_v1_PredefinedSplit_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.TrainingPipelineProto + .internal_static_google_cloud_aiplatform_v1_PredefinedSplit_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.PredefinedSplit.class, + com.google.cloud.aiplatform.v1.PredefinedSplit.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.PredefinedSplit.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(); + key_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.TrainingPipelineProto + .internal_static_google_cloud_aiplatform_v1_PredefinedSplit_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.PredefinedSplit getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.PredefinedSplit.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.PredefinedSplit build() { + com.google.cloud.aiplatform.v1.PredefinedSplit result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.PredefinedSplit buildPartial() { + com.google.cloud.aiplatform.v1.PredefinedSplit result = + new com.google.cloud.aiplatform.v1.PredefinedSplit(this); + 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.v1.PredefinedSplit) { + return mergeFrom((com.google.cloud.aiplatform.v1.PredefinedSplit) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.PredefinedSplit other) { + if (other == com.google.cloud.aiplatform.v1.PredefinedSplit.getDefaultInstance()) return this; + 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.v1.PredefinedSplit parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.aiplatform.v1.PredefinedSplit) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object key_ = ""; + /** + * + * + *
+     * Required. The key is a name of one of the Dataset's data columns.
+     * The value of the key (either the label's value or value in the column)
+     * must be one of {`training`, `validation`, `test`}, and it defines to which
+     * set the given piece of data is assigned. If for a piece of data the key
+     * is not present or has an invalid value, that piece is ignored by the
+     * pipeline.
+     * 
+ * + * string key = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+     * Required. The key is a name of one of the Dataset's data columns.
+     * The value of the key (either the label's value or value in the column)
+     * must be one of {`training`, `validation`, `test`}, and it defines to which
+     * set the given piece of data is assigned. If for a piece of data the key
+     * is not present or has an invalid value, that piece is ignored by the
+     * pipeline.
+     * 
+ * + * string key = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+     * Required. The key is a name of one of the Dataset's data columns.
+     * The value of the key (either the label's value or value in the column)
+     * must be one of {`training`, `validation`, `test`}, and it defines to which
+     * set the given piece of data is assigned. If for a piece of data the key
+     * is not present or has an invalid value, that piece is ignored by the
+     * pipeline.
+     * 
+ * + * string key = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + /** + * + * + *
+     * Required. The key is a name of one of the Dataset's data columns.
+     * The value of the key (either the label's value or value in the column)
+     * must be one of {`training`, `validation`, `test`}, and it defines to which
+     * set the given piece of data is assigned. If for a piece of data the key
+     * is not present or has an invalid value, that piece is ignored by the
+     * pipeline.
+     * 
+ * + * string key = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearKey() { + + key_ = getDefaultInstance().getKey(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The key is a name of one of the Dataset's data columns.
+     * The value of the key (either the label's value or value in the column)
+     * must be one of {`training`, `validation`, `test`}, and it defines to which
+     * set the given piece of data is assigned. If for a piece of data the key
+     * is not present or has an invalid value, that piece is ignored by the
+     * pipeline.
+     * 
+ * + * string key = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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.v1.PredefinedSplit) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.PredefinedSplit) + private static final com.google.cloud.aiplatform.v1.PredefinedSplit DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.PredefinedSplit(); + } + + public static com.google.cloud.aiplatform.v1.PredefinedSplit getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PredefinedSplit parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PredefinedSplit(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.v1.PredefinedSplit getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PredefinedSplitOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PredefinedSplitOrBuilder.java new file mode 100644 index 000000000..3672933f0 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PredefinedSplitOrBuilder.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/v1/training_pipeline.proto + +package com.google.cloud.aiplatform.v1; + +public interface PredefinedSplitOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.PredefinedSplit) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The key is a name of one of the Dataset's data columns.
+   * The value of the key (either the label's value or value in the column)
+   * must be one of {`training`, `validation`, `test`}, and it defines to which
+   * set the given piece of data is assigned. If for a piece of data the key
+   * is not present or has an invalid value, that piece is ignored by the
+   * pipeline.
+   * 
+ * + * string key = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The key. + */ + java.lang.String getKey(); + /** + * + * + *
+   * Required. The key is a name of one of the Dataset's data columns.
+   * The value of the key (either the label's value or value in the column)
+   * must be one of {`training`, `validation`, `test`}, and it defines to which
+   * set the given piece of data is assigned. If for a piece of data the key
+   * is not present or has an invalid value, that piece is ignored by the
+   * pipeline.
+   * 
+ * + * string key = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for key. + */ + com.google.protobuf.ByteString getKeyBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PredictRequest.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PredictRequest.java new file mode 100644 index 000000000..9f403cdfd --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PredictRequest.java @@ -0,0 +1,1676 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/prediction_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.PredictRequest} + */ +public final class PredictRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.PredictRequest) + PredictRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use PredictRequest.newBuilder() to construct. + private PredictRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PredictRequest() { + endpoint_ = ""; + instances_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PredictRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private PredictRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + endpoint_ = s; + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + instances_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + instances_.add( + input.readMessage(com.google.protobuf.Value.parser(), extensionRegistry)); + break; + } + case 26: + { + com.google.protobuf.Value.Builder subBuilder = null; + if (parameters_ != null) { + subBuilder = parameters_.toBuilder(); + } + parameters_ = + input.readMessage(com.google.protobuf.Value.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(parameters_); + parameters_ = 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)) { + instances_ = java.util.Collections.unmodifiableList(instances_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.PredictionServiceProto + .internal_static_google_cloud_aiplatform_v1_PredictRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.PredictionServiceProto + .internal_static_google_cloud_aiplatform_v1_PredictRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.PredictRequest.class, + com.google.cloud.aiplatform.v1.PredictRequest.Builder.class); + } + + public static final int ENDPOINT_FIELD_NUMBER = 1; + private volatile java.lang.Object endpoint_; + /** + * + * + *
+   * Required. The name of the Endpoint requested to serve the prediction.
+   * Format:
+   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+   * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The endpoint. + */ + @java.lang.Override + public java.lang.String getEndpoint() { + java.lang.Object ref = endpoint_; + 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(); + endpoint_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the Endpoint requested to serve the prediction.
+   * Format:
+   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+   * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for endpoint. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEndpointBytes() { + java.lang.Object ref = endpoint_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + endpoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSTANCES_FIELD_NUMBER = 2; + private java.util.List instances_; + /** + * + * + *
+   * Required. The instances that are the input to the prediction call.
+   * A DeployedModel may have an upper limit on the number of instances it
+   * supports per request, and when it is exceeded the prediction call errors
+   * in case of AutoML Models, or, in case of customer created Models, the
+   * behaviour is as documented by that Model.
+   * The schema of any single instance may be specified via Endpoint's
+   * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
+   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+   * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
+   * 
+ * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List getInstancesList() { + return instances_; + } + /** + * + * + *
+   * Required. The instances that are the input to the prediction call.
+   * A DeployedModel may have an upper limit on the number of instances it
+   * supports per request, and when it is exceeded the prediction call errors
+   * in case of AutoML Models, or, in case of customer created Models, the
+   * behaviour is as documented by that Model.
+   * The schema of any single instance may be specified via Endpoint's
+   * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
+   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+   * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
+   * 
+ * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List getInstancesOrBuilderList() { + return instances_; + } + /** + * + * + *
+   * Required. The instances that are the input to the prediction call.
+   * A DeployedModel may have an upper limit on the number of instances it
+   * supports per request, and when it is exceeded the prediction call errors
+   * in case of AutoML Models, or, in case of customer created Models, the
+   * behaviour is as documented by that Model.
+   * The schema of any single instance may be specified via Endpoint's
+   * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
+   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+   * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
+   * 
+ * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getInstancesCount() { + return instances_.size(); + } + /** + * + * + *
+   * Required. The instances that are the input to the prediction call.
+   * A DeployedModel may have an upper limit on the number of instances it
+   * supports per request, and when it is exceeded the prediction call errors
+   * in case of AutoML Models, or, in case of customer created Models, the
+   * behaviour is as documented by that Model.
+   * The schema of any single instance may be specified via Endpoint's
+   * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
+   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+   * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
+   * 
+ * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.Value getInstances(int index) { + return instances_.get(index); + } + /** + * + * + *
+   * Required. The instances that are the input to the prediction call.
+   * A DeployedModel may have an upper limit on the number of instances it
+   * supports per request, and when it is exceeded the prediction call errors
+   * in case of AutoML Models, or, in case of customer created Models, the
+   * behaviour is as documented by that Model.
+   * The schema of any single instance may be specified via Endpoint's
+   * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
+   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+   * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
+   * 
+ * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.ValueOrBuilder getInstancesOrBuilder(int index) { + return instances_.get(index); + } + + public static final int PARAMETERS_FIELD_NUMBER = 3; + private com.google.protobuf.Value parameters_; + /** + * + * + *
+   * The parameters that govern the prediction. The schema of the parameters may
+   * be specified via Endpoint's DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model]
+   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+   * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
+   * 
+ * + * .google.protobuf.Value parameters = 3; + * + * @return Whether the parameters field is set. + */ + @java.lang.Override + public boolean hasParameters() { + return parameters_ != null; + } + /** + * + * + *
+   * The parameters that govern the prediction. The schema of the parameters may
+   * be specified via Endpoint's DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model]
+   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+   * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
+   * 
+ * + * .google.protobuf.Value parameters = 3; + * + * @return The parameters. + */ + @java.lang.Override + public com.google.protobuf.Value getParameters() { + return parameters_ == null ? com.google.protobuf.Value.getDefaultInstance() : parameters_; + } + /** + * + * + *
+   * The parameters that govern the prediction. The schema of the parameters may
+   * be specified via Endpoint's DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model]
+   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+   * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
+   * 
+ * + * .google.protobuf.Value parameters = 3; + */ + @java.lang.Override + public com.google.protobuf.ValueOrBuilder getParametersOrBuilder() { + return getParameters(); + } + + 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 (!getEndpointBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, endpoint_); + } + for (int i = 0; i < instances_.size(); i++) { + output.writeMessage(2, instances_.get(i)); + } + if (parameters_ != null) { + output.writeMessage(3, getParameters()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getEndpointBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, endpoint_); + } + for (int i = 0; i < instances_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, instances_.get(i)); + } + if (parameters_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getParameters()); + } + 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.v1.PredictRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.PredictRequest other = + (com.google.cloud.aiplatform.v1.PredictRequest) obj; + + if (!getEndpoint().equals(other.getEndpoint())) return false; + if (!getInstancesList().equals(other.getInstancesList())) return false; + if (hasParameters() != other.hasParameters()) return false; + if (hasParameters()) { + if (!getParameters().equals(other.getParameters())) 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) + ENDPOINT_FIELD_NUMBER; + hash = (53 * hash) + getEndpoint().hashCode(); + if (getInstancesCount() > 0) { + hash = (37 * hash) + INSTANCES_FIELD_NUMBER; + hash = (53 * hash) + getInstancesList().hashCode(); + } + if (hasParameters()) { + hash = (37 * hash) + PARAMETERS_FIELD_NUMBER; + hash = (53 * hash) + getParameters().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.PredictRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.PredictRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.PredictRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.PredictRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.PredictRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.PredictRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.PredictRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.PredictRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.PredictRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.PredictRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.PredictRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.PredictRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1.PredictRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.PredictRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.PredictRequest) + com.google.cloud.aiplatform.v1.PredictRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.PredictionServiceProto + .internal_static_google_cloud_aiplatform_v1_PredictRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.PredictionServiceProto + .internal_static_google_cloud_aiplatform_v1_PredictRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.PredictRequest.class, + com.google.cloud.aiplatform.v1.PredictRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.PredictRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getInstancesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + endpoint_ = ""; + + if (instancesBuilder_ == null) { + instances_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + instancesBuilder_.clear(); + } + if (parametersBuilder_ == null) { + parameters_ = null; + } else { + parameters_ = null; + parametersBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.PredictionServiceProto + .internal_static_google_cloud_aiplatform_v1_PredictRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.PredictRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.PredictRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.PredictRequest build() { + com.google.cloud.aiplatform.v1.PredictRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.PredictRequest buildPartial() { + com.google.cloud.aiplatform.v1.PredictRequest result = + new com.google.cloud.aiplatform.v1.PredictRequest(this); + int from_bitField0_ = bitField0_; + result.endpoint_ = endpoint_; + if (instancesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + instances_ = java.util.Collections.unmodifiableList(instances_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.instances_ = instances_; + } else { + result.instances_ = instancesBuilder_.build(); + } + if (parametersBuilder_ == null) { + result.parameters_ = parameters_; + } else { + result.parameters_ = parametersBuilder_.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.v1.PredictRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.PredictRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.PredictRequest other) { + if (other == com.google.cloud.aiplatform.v1.PredictRequest.getDefaultInstance()) return this; + if (!other.getEndpoint().isEmpty()) { + endpoint_ = other.endpoint_; + onChanged(); + } + if (instancesBuilder_ == null) { + if (!other.instances_.isEmpty()) { + if (instances_.isEmpty()) { + instances_ = other.instances_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureInstancesIsMutable(); + instances_.addAll(other.instances_); + } + onChanged(); + } + } else { + if (!other.instances_.isEmpty()) { + if (instancesBuilder_.isEmpty()) { + instancesBuilder_.dispose(); + instancesBuilder_ = null; + instances_ = other.instances_; + bitField0_ = (bitField0_ & ~0x00000001); + instancesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getInstancesFieldBuilder() + : null; + } else { + instancesBuilder_.addAllMessages(other.instances_); + } + } + } + if (other.hasParameters()) { + mergeParameters(other.getParameters()); + } + 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.v1.PredictRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.aiplatform.v1.PredictRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object endpoint_ = ""; + /** + * + * + *
+     * Required. The name of the Endpoint requested to serve the prediction.
+     * Format:
+     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+     * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The endpoint. + */ + public java.lang.String getEndpoint() { + java.lang.Object ref = endpoint_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpoint_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the Endpoint requested to serve the prediction.
+     * Format:
+     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+     * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for endpoint. + */ + public com.google.protobuf.ByteString getEndpointBytes() { + java.lang.Object ref = endpoint_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + endpoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the Endpoint requested to serve the prediction.
+     * Format:
+     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+     * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The endpoint to set. + * @return This builder for chaining. + */ + public Builder setEndpoint(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + endpoint_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the Endpoint requested to serve the prediction.
+     * Format:
+     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+     * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearEndpoint() { + + endpoint_ = getDefaultInstance().getEndpoint(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the Endpoint requested to serve the prediction.
+     * Format:
+     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+     * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for endpoint to set. + * @return This builder for chaining. + */ + public Builder setEndpointBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + endpoint_ = value; + onChanged(); + return this; + } + + private java.util.List instances_ = + java.util.Collections.emptyList(); + + private void ensureInstancesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + instances_ = new java.util.ArrayList(instances_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protobuf.Value, + com.google.protobuf.Value.Builder, + com.google.protobuf.ValueOrBuilder> + instancesBuilder_; + + /** + * + * + *
+     * Required. The instances that are the input to the prediction call.
+     * A DeployedModel may have an upper limit on the number of instances it
+     * supports per request, and when it is exceeded the prediction call errors
+     * in case of AutoML Models, or, in case of customer created Models, the
+     * behaviour is as documented by that Model.
+     * The schema of any single instance may be specified via Endpoint's
+     * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
+     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
+     * 
+ * + * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List getInstancesList() { + if (instancesBuilder_ == null) { + return java.util.Collections.unmodifiableList(instances_); + } else { + return instancesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Required. The instances that are the input to the prediction call.
+     * A DeployedModel may have an upper limit on the number of instances it
+     * supports per request, and when it is exceeded the prediction call errors
+     * in case of AutoML Models, or, in case of customer created Models, the
+     * behaviour is as documented by that Model.
+     * The schema of any single instance may be specified via Endpoint's
+     * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
+     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
+     * 
+ * + * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getInstancesCount() { + if (instancesBuilder_ == null) { + return instances_.size(); + } else { + return instancesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Required. The instances that are the input to the prediction call.
+     * A DeployedModel may have an upper limit on the number of instances it
+     * supports per request, and when it is exceeded the prediction call errors
+     * in case of AutoML Models, or, in case of customer created Models, the
+     * behaviour is as documented by that Model.
+     * The schema of any single instance may be specified via Endpoint's
+     * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
+     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
+     * 
+ * + * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.Value getInstances(int index) { + if (instancesBuilder_ == null) { + return instances_.get(index); + } else { + return instancesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Required. The instances that are the input to the prediction call.
+     * A DeployedModel may have an upper limit on the number of instances it
+     * supports per request, and when it is exceeded the prediction call errors
+     * in case of AutoML Models, or, in case of customer created Models, the
+     * behaviour is as documented by that Model.
+     * The schema of any single instance may be specified via Endpoint's
+     * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
+     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
+     * 
+ * + * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setInstances(int index, com.google.protobuf.Value value) { + if (instancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstancesIsMutable(); + instances_.set(index, value); + onChanged(); + } else { + instancesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. The instances that are the input to the prediction call.
+     * A DeployedModel may have an upper limit on the number of instances it
+     * supports per request, and when it is exceeded the prediction call errors
+     * in case of AutoML Models, or, in case of customer created Models, the
+     * behaviour is as documented by that Model.
+     * The schema of any single instance may be specified via Endpoint's
+     * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
+     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
+     * 
+ * + * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setInstances(int index, com.google.protobuf.Value.Builder builderForValue) { + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + instances_.set(index, builderForValue.build()); + onChanged(); + } else { + instancesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The instances that are the input to the prediction call.
+     * A DeployedModel may have an upper limit on the number of instances it
+     * supports per request, and when it is exceeded the prediction call errors
+     * in case of AutoML Models, or, in case of customer created Models, the
+     * behaviour is as documented by that Model.
+     * The schema of any single instance may be specified via Endpoint's
+     * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
+     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
+     * 
+ * + * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addInstances(com.google.protobuf.Value value) { + if (instancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstancesIsMutable(); + instances_.add(value); + onChanged(); + } else { + instancesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Required. The instances that are the input to the prediction call.
+     * A DeployedModel may have an upper limit on the number of instances it
+     * supports per request, and when it is exceeded the prediction call errors
+     * in case of AutoML Models, or, in case of customer created Models, the
+     * behaviour is as documented by that Model.
+     * The schema of any single instance may be specified via Endpoint's
+     * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
+     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
+     * 
+ * + * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addInstances(int index, com.google.protobuf.Value value) { + if (instancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstancesIsMutable(); + instances_.add(index, value); + onChanged(); + } else { + instancesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. The instances that are the input to the prediction call.
+     * A DeployedModel may have an upper limit on the number of instances it
+     * supports per request, and when it is exceeded the prediction call errors
+     * in case of AutoML Models, or, in case of customer created Models, the
+     * behaviour is as documented by that Model.
+     * The schema of any single instance may be specified via Endpoint's
+     * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
+     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
+     * 
+ * + * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addInstances(com.google.protobuf.Value.Builder builderForValue) { + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + instances_.add(builderForValue.build()); + onChanged(); + } else { + instancesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The instances that are the input to the prediction call.
+     * A DeployedModel may have an upper limit on the number of instances it
+     * supports per request, and when it is exceeded the prediction call errors
+     * in case of AutoML Models, or, in case of customer created Models, the
+     * behaviour is as documented by that Model.
+     * The schema of any single instance may be specified via Endpoint's
+     * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
+     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
+     * 
+ * + * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addInstances(int index, com.google.protobuf.Value.Builder builderForValue) { + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + instances_.add(index, builderForValue.build()); + onChanged(); + } else { + instancesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The instances that are the input to the prediction call.
+     * A DeployedModel may have an upper limit on the number of instances it
+     * supports per request, and when it is exceeded the prediction call errors
+     * in case of AutoML Models, or, in case of customer created Models, the
+     * behaviour is as documented by that Model.
+     * The schema of any single instance may be specified via Endpoint's
+     * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
+     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
+     * 
+ * + * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllInstances(java.lang.Iterable values) { + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, instances_); + onChanged(); + } else { + instancesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Required. The instances that are the input to the prediction call.
+     * A DeployedModel may have an upper limit on the number of instances it
+     * supports per request, and when it is exceeded the prediction call errors
+     * in case of AutoML Models, or, in case of customer created Models, the
+     * behaviour is as documented by that Model.
+     * The schema of any single instance may be specified via Endpoint's
+     * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
+     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
+     * 
+ * + * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearInstances() { + if (instancesBuilder_ == null) { + instances_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + instancesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Required. The instances that are the input to the prediction call.
+     * A DeployedModel may have an upper limit on the number of instances it
+     * supports per request, and when it is exceeded the prediction call errors
+     * in case of AutoML Models, or, in case of customer created Models, the
+     * behaviour is as documented by that Model.
+     * The schema of any single instance may be specified via Endpoint's
+     * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
+     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
+     * 
+ * + * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeInstances(int index) { + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + instances_.remove(index); + onChanged(); + } else { + instancesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Required. The instances that are the input to the prediction call.
+     * A DeployedModel may have an upper limit on the number of instances it
+     * supports per request, and when it is exceeded the prediction call errors
+     * in case of AutoML Models, or, in case of customer created Models, the
+     * behaviour is as documented by that Model.
+     * The schema of any single instance may be specified via Endpoint's
+     * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
+     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
+     * 
+ * + * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.Value.Builder getInstancesBuilder(int index) { + return getInstancesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Required. The instances that are the input to the prediction call.
+     * A DeployedModel may have an upper limit on the number of instances it
+     * supports per request, and when it is exceeded the prediction call errors
+     * in case of AutoML Models, or, in case of customer created Models, the
+     * behaviour is as documented by that Model.
+     * The schema of any single instance may be specified via Endpoint's
+     * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
+     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
+     * 
+ * + * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.ValueOrBuilder getInstancesOrBuilder(int index) { + if (instancesBuilder_ == null) { + return instances_.get(index); + } else { + return instancesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Required. The instances that are the input to the prediction call.
+     * A DeployedModel may have an upper limit on the number of instances it
+     * supports per request, and when it is exceeded the prediction call errors
+     * in case of AutoML Models, or, in case of customer created Models, the
+     * behaviour is as documented by that Model.
+     * The schema of any single instance may be specified via Endpoint's
+     * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
+     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
+     * 
+ * + * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getInstancesOrBuilderList() { + if (instancesBuilder_ != null) { + return instancesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(instances_); + } + } + /** + * + * + *
+     * Required. The instances that are the input to the prediction call.
+     * A DeployedModel may have an upper limit on the number of instances it
+     * supports per request, and when it is exceeded the prediction call errors
+     * in case of AutoML Models, or, in case of customer created Models, the
+     * behaviour is as documented by that Model.
+     * The schema of any single instance may be specified via Endpoint's
+     * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
+     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
+     * 
+ * + * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.Value.Builder addInstancesBuilder() { + return getInstancesFieldBuilder().addBuilder(com.google.protobuf.Value.getDefaultInstance()); + } + /** + * + * + *
+     * Required. The instances that are the input to the prediction call.
+     * A DeployedModel may have an upper limit on the number of instances it
+     * supports per request, and when it is exceeded the prediction call errors
+     * in case of AutoML Models, or, in case of customer created Models, the
+     * behaviour is as documented by that Model.
+     * The schema of any single instance may be specified via Endpoint's
+     * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
+     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
+     * 
+ * + * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.Value.Builder addInstancesBuilder(int index) { + return getInstancesFieldBuilder() + .addBuilder(index, com.google.protobuf.Value.getDefaultInstance()); + } + /** + * + * + *
+     * Required. The instances that are the input to the prediction call.
+     * A DeployedModel may have an upper limit on the number of instances it
+     * supports per request, and when it is exceeded the prediction call errors
+     * in case of AutoML Models, or, in case of customer created Models, the
+     * behaviour is as documented by that Model.
+     * The schema of any single instance may be specified via Endpoint's
+     * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
+     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
+     * 
+ * + * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List getInstancesBuilderList() { + return getInstancesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protobuf.Value, + com.google.protobuf.Value.Builder, + com.google.protobuf.ValueOrBuilder> + getInstancesFieldBuilder() { + if (instancesBuilder_ == null) { + instancesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protobuf.Value, + com.google.protobuf.Value.Builder, + com.google.protobuf.ValueOrBuilder>( + instances_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + instances_ = null; + } + return instancesBuilder_; + } + + private com.google.protobuf.Value parameters_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Value, + com.google.protobuf.Value.Builder, + com.google.protobuf.ValueOrBuilder> + parametersBuilder_; + /** + * + * + *
+     * The parameters that govern the prediction. The schema of the parameters may
+     * be specified via Endpoint's DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model]
+     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+     * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
+     * 
+ * + * .google.protobuf.Value parameters = 3; + * + * @return Whether the parameters field is set. + */ + public boolean hasParameters() { + return parametersBuilder_ != null || parameters_ != null; + } + /** + * + * + *
+     * The parameters that govern the prediction. The schema of the parameters may
+     * be specified via Endpoint's DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model]
+     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+     * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
+     * 
+ * + * .google.protobuf.Value parameters = 3; + * + * @return The parameters. + */ + public com.google.protobuf.Value getParameters() { + if (parametersBuilder_ == null) { + return parameters_ == null ? com.google.protobuf.Value.getDefaultInstance() : parameters_; + } else { + return parametersBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The parameters that govern the prediction. The schema of the parameters may
+     * be specified via Endpoint's DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model]
+     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+     * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
+     * 
+ * + * .google.protobuf.Value parameters = 3; + */ + public Builder setParameters(com.google.protobuf.Value value) { + if (parametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + parameters_ = value; + onChanged(); + } else { + parametersBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The parameters that govern the prediction. The schema of the parameters may
+     * be specified via Endpoint's DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model]
+     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+     * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
+     * 
+ * + * .google.protobuf.Value parameters = 3; + */ + public Builder setParameters(com.google.protobuf.Value.Builder builderForValue) { + if (parametersBuilder_ == null) { + parameters_ = builderForValue.build(); + onChanged(); + } else { + parametersBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The parameters that govern the prediction. The schema of the parameters may
+     * be specified via Endpoint's DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model]
+     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+     * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
+     * 
+ * + * .google.protobuf.Value parameters = 3; + */ + public Builder mergeParameters(com.google.protobuf.Value value) { + if (parametersBuilder_ == null) { + if (parameters_ != null) { + parameters_ = + com.google.protobuf.Value.newBuilder(parameters_).mergeFrom(value).buildPartial(); + } else { + parameters_ = value; + } + onChanged(); + } else { + parametersBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The parameters that govern the prediction. The schema of the parameters may
+     * be specified via Endpoint's DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model]
+     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+     * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
+     * 
+ * + * .google.protobuf.Value parameters = 3; + */ + public Builder clearParameters() { + if (parametersBuilder_ == null) { + parameters_ = null; + onChanged(); + } else { + parameters_ = null; + parametersBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The parameters that govern the prediction. The schema of the parameters may
+     * be specified via Endpoint's DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model]
+     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+     * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
+     * 
+ * + * .google.protobuf.Value parameters = 3; + */ + public com.google.protobuf.Value.Builder getParametersBuilder() { + + onChanged(); + return getParametersFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The parameters that govern the prediction. The schema of the parameters may
+     * be specified via Endpoint's DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model]
+     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+     * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
+     * 
+ * + * .google.protobuf.Value parameters = 3; + */ + public com.google.protobuf.ValueOrBuilder getParametersOrBuilder() { + if (parametersBuilder_ != null) { + return parametersBuilder_.getMessageOrBuilder(); + } else { + return parameters_ == null ? com.google.protobuf.Value.getDefaultInstance() : parameters_; + } + } + /** + * + * + *
+     * The parameters that govern the prediction. The schema of the parameters may
+     * be specified via Endpoint's DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model]
+     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+     * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
+     * 
+ * + * .google.protobuf.Value parameters = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Value, + com.google.protobuf.Value.Builder, + com.google.protobuf.ValueOrBuilder> + getParametersFieldBuilder() { + if (parametersBuilder_ == null) { + parametersBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Value, + com.google.protobuf.Value.Builder, + com.google.protobuf.ValueOrBuilder>( + getParameters(), getParentForChildren(), isClean()); + parameters_ = null; + } + return parametersBuilder_; + } + + @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.v1.PredictRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.PredictRequest) + private static final com.google.cloud.aiplatform.v1.PredictRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.PredictRequest(); + } + + public static com.google.cloud.aiplatform.v1.PredictRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PredictRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PredictRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.PredictRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PredictRequestOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PredictRequestOrBuilder.java new file mode 100644 index 000000000..f0eae5851 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PredictRequestOrBuilder.java @@ -0,0 +1,198 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/prediction_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface PredictRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.PredictRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the Endpoint requested to serve the prediction.
+   * Format:
+   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+   * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The endpoint. + */ + java.lang.String getEndpoint(); + /** + * + * + *
+   * Required. The name of the Endpoint requested to serve the prediction.
+   * Format:
+   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+   * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for endpoint. + */ + com.google.protobuf.ByteString getEndpointBytes(); + + /** + * + * + *
+   * Required. The instances that are the input to the prediction call.
+   * A DeployedModel may have an upper limit on the number of instances it
+   * supports per request, and when it is exceeded the prediction call errors
+   * in case of AutoML Models, or, in case of customer created Models, the
+   * behaviour is as documented by that Model.
+   * The schema of any single instance may be specified via Endpoint's
+   * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
+   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+   * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
+   * 
+ * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List getInstancesList(); + /** + * + * + *
+   * Required. The instances that are the input to the prediction call.
+   * A DeployedModel may have an upper limit on the number of instances it
+   * supports per request, and when it is exceeded the prediction call errors
+   * in case of AutoML Models, or, in case of customer created Models, the
+   * behaviour is as documented by that Model.
+   * The schema of any single instance may be specified via Endpoint's
+   * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
+   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+   * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
+   * 
+ * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.Value getInstances(int index); + /** + * + * + *
+   * Required. The instances that are the input to the prediction call.
+   * A DeployedModel may have an upper limit on the number of instances it
+   * supports per request, and when it is exceeded the prediction call errors
+   * in case of AutoML Models, or, in case of customer created Models, the
+   * behaviour is as documented by that Model.
+   * The schema of any single instance may be specified via Endpoint's
+   * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
+   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+   * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
+   * 
+ * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getInstancesCount(); + /** + * + * + *
+   * Required. The instances that are the input to the prediction call.
+   * A DeployedModel may have an upper limit on the number of instances it
+   * supports per request, and when it is exceeded the prediction call errors
+   * in case of AutoML Models, or, in case of customer created Models, the
+   * behaviour is as documented by that Model.
+   * The schema of any single instance may be specified via Endpoint's
+   * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
+   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+   * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
+   * 
+ * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List getInstancesOrBuilderList(); + /** + * + * + *
+   * Required. The instances that are the input to the prediction call.
+   * A DeployedModel may have an upper limit on the number of instances it
+   * supports per request, and when it is exceeded the prediction call errors
+   * in case of AutoML Models, or, in case of customer created Models, the
+   * behaviour is as documented by that Model.
+   * The schema of any single instance may be specified via Endpoint's
+   * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
+   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+   * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
+   * 
+ * + * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.ValueOrBuilder getInstancesOrBuilder(int index); + + /** + * + * + *
+   * The parameters that govern the prediction. The schema of the parameters may
+   * be specified via Endpoint's DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model]
+   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+   * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
+   * 
+ * + * .google.protobuf.Value parameters = 3; + * + * @return Whether the parameters field is set. + */ + boolean hasParameters(); + /** + * + * + *
+   * The parameters that govern the prediction. The schema of the parameters may
+   * be specified via Endpoint's DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model]
+   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+   * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
+   * 
+ * + * .google.protobuf.Value parameters = 3; + * + * @return The parameters. + */ + com.google.protobuf.Value getParameters(); + /** + * + * + *
+   * The parameters that govern the prediction. The schema of the parameters may
+   * be specified via Endpoint's DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model]
+   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+   * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
+   * 
+ * + * .google.protobuf.Value parameters = 3; + */ + com.google.protobuf.ValueOrBuilder getParametersOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PredictResponse.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PredictResponse.java new file mode 100644 index 000000000..33371e153 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PredictResponse.java @@ -0,0 +1,1214 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/prediction_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Response message for [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.PredictResponse} + */ +public final class PredictResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.PredictResponse) + PredictResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use PredictResponse.newBuilder() to construct. + private PredictResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PredictResponse() { + predictions_ = java.util.Collections.emptyList(); + deployedModelId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PredictResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private PredictResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + predictions_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + predictions_.add( + input.readMessage(com.google.protobuf.Value.parser(), extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + deployedModelId_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + predictions_ = java.util.Collections.unmodifiableList(predictions_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.PredictionServiceProto + .internal_static_google_cloud_aiplatform_v1_PredictResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.PredictionServiceProto + .internal_static_google_cloud_aiplatform_v1_PredictResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.PredictResponse.class, + com.google.cloud.aiplatform.v1.PredictResponse.Builder.class); + } + + public static final int PREDICTIONS_FIELD_NUMBER = 1; + private java.util.List predictions_; + /** + * + * + *
+   * The predictions that are the output of the predictions call.
+   * The schema of any single prediction may be specified via Endpoint's
+   * DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model]
+   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+   * [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri].
+   * 
+ * + * repeated .google.protobuf.Value predictions = 1; + */ + @java.lang.Override + public java.util.List getPredictionsList() { + return predictions_; + } + /** + * + * + *
+   * The predictions that are the output of the predictions call.
+   * The schema of any single prediction may be specified via Endpoint's
+   * DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model]
+   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+   * [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri].
+   * 
+ * + * repeated .google.protobuf.Value predictions = 1; + */ + @java.lang.Override + public java.util.List + getPredictionsOrBuilderList() { + return predictions_; + } + /** + * + * + *
+   * The predictions that are the output of the predictions call.
+   * The schema of any single prediction may be specified via Endpoint's
+   * DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model]
+   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+   * [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri].
+   * 
+ * + * repeated .google.protobuf.Value predictions = 1; + */ + @java.lang.Override + public int getPredictionsCount() { + return predictions_.size(); + } + /** + * + * + *
+   * The predictions that are the output of the predictions call.
+   * The schema of any single prediction may be specified via Endpoint's
+   * DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model]
+   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+   * [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri].
+   * 
+ * + * repeated .google.protobuf.Value predictions = 1; + */ + @java.lang.Override + public com.google.protobuf.Value getPredictions(int index) { + return predictions_.get(index); + } + /** + * + * + *
+   * The predictions that are the output of the predictions call.
+   * The schema of any single prediction may be specified via Endpoint's
+   * DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model]
+   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+   * [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri].
+   * 
+ * + * repeated .google.protobuf.Value predictions = 1; + */ + @java.lang.Override + public com.google.protobuf.ValueOrBuilder getPredictionsOrBuilder(int index) { + return predictions_.get(index); + } + + public static final int DEPLOYED_MODEL_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object deployedModelId_; + /** + * + * + *
+   * ID of the Endpoint's DeployedModel that served this prediction.
+   * 
+ * + * string deployed_model_id = 2; + * + * @return The deployedModelId. + */ + @java.lang.Override + public java.lang.String getDeployedModelId() { + java.lang.Object ref = deployedModelId_; + 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(); + deployedModelId_ = s; + return s; + } + } + /** + * + * + *
+   * ID of the Endpoint's DeployedModel that served this prediction.
+   * 
+ * + * string deployed_model_id = 2; + * + * @return The bytes for deployedModelId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDeployedModelIdBytes() { + java.lang.Object ref = deployedModelId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + deployedModelId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < predictions_.size(); i++) { + output.writeMessage(1, predictions_.get(i)); + } + if (!getDeployedModelIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, deployedModelId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < predictions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, predictions_.get(i)); + } + if (!getDeployedModelIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, deployedModelId_); + } + 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.v1.PredictResponse)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.PredictResponse other = + (com.google.cloud.aiplatform.v1.PredictResponse) obj; + + if (!getPredictionsList().equals(other.getPredictionsList())) return false; + if (!getDeployedModelId().equals(other.getDeployedModelId())) 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 (getPredictionsCount() > 0) { + hash = (37 * hash) + PREDICTIONS_FIELD_NUMBER; + hash = (53 * hash) + getPredictionsList().hashCode(); + } + hash = (37 * hash) + DEPLOYED_MODEL_ID_FIELD_NUMBER; + hash = (53 * hash) + getDeployedModelId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.PredictResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.PredictResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.PredictResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.PredictResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.PredictResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.PredictResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.PredictResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.PredictResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.PredictResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.PredictResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.PredictResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.PredictResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1.PredictResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.PredictResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.PredictResponse) + com.google.cloud.aiplatform.v1.PredictResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.PredictionServiceProto + .internal_static_google_cloud_aiplatform_v1_PredictResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.PredictionServiceProto + .internal_static_google_cloud_aiplatform_v1_PredictResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.PredictResponse.class, + com.google.cloud.aiplatform.v1.PredictResponse.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.PredictResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPredictionsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (predictionsBuilder_ == null) { + predictions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + predictionsBuilder_.clear(); + } + deployedModelId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.PredictionServiceProto + .internal_static_google_cloud_aiplatform_v1_PredictResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.PredictResponse getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.PredictResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.PredictResponse build() { + com.google.cloud.aiplatform.v1.PredictResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.PredictResponse buildPartial() { + com.google.cloud.aiplatform.v1.PredictResponse result = + new com.google.cloud.aiplatform.v1.PredictResponse(this); + int from_bitField0_ = bitField0_; + if (predictionsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + predictions_ = java.util.Collections.unmodifiableList(predictions_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.predictions_ = predictions_; + } else { + result.predictions_ = predictionsBuilder_.build(); + } + result.deployedModelId_ = deployedModelId_; + 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.v1.PredictResponse) { + return mergeFrom((com.google.cloud.aiplatform.v1.PredictResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.PredictResponse other) { + if (other == com.google.cloud.aiplatform.v1.PredictResponse.getDefaultInstance()) return this; + if (predictionsBuilder_ == null) { + if (!other.predictions_.isEmpty()) { + if (predictions_.isEmpty()) { + predictions_ = other.predictions_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePredictionsIsMutable(); + predictions_.addAll(other.predictions_); + } + onChanged(); + } + } else { + if (!other.predictions_.isEmpty()) { + if (predictionsBuilder_.isEmpty()) { + predictionsBuilder_.dispose(); + predictionsBuilder_ = null; + predictions_ = other.predictions_; + bitField0_ = (bitField0_ & ~0x00000001); + predictionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPredictionsFieldBuilder() + : null; + } else { + predictionsBuilder_.addAllMessages(other.predictions_); + } + } + } + if (!other.getDeployedModelId().isEmpty()) { + deployedModelId_ = other.deployedModelId_; + 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.v1.PredictResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.aiplatform.v1.PredictResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List predictions_ = + java.util.Collections.emptyList(); + + private void ensurePredictionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + predictions_ = new java.util.ArrayList(predictions_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protobuf.Value, + com.google.protobuf.Value.Builder, + com.google.protobuf.ValueOrBuilder> + predictionsBuilder_; + + /** + * + * + *
+     * The predictions that are the output of the predictions call.
+     * The schema of any single prediction may be specified via Endpoint's
+     * DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model]
+     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+     * [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri].
+     * 
+ * + * repeated .google.protobuf.Value predictions = 1; + */ + public java.util.List getPredictionsList() { + if (predictionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(predictions_); + } else { + return predictionsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The predictions that are the output of the predictions call.
+     * The schema of any single prediction may be specified via Endpoint's
+     * DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model]
+     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+     * [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri].
+     * 
+ * + * repeated .google.protobuf.Value predictions = 1; + */ + public int getPredictionsCount() { + if (predictionsBuilder_ == null) { + return predictions_.size(); + } else { + return predictionsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The predictions that are the output of the predictions call.
+     * The schema of any single prediction may be specified via Endpoint's
+     * DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model]
+     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+     * [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri].
+     * 
+ * + * repeated .google.protobuf.Value predictions = 1; + */ + public com.google.protobuf.Value getPredictions(int index) { + if (predictionsBuilder_ == null) { + return predictions_.get(index); + } else { + return predictionsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The predictions that are the output of the predictions call.
+     * The schema of any single prediction may be specified via Endpoint's
+     * DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model]
+     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+     * [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri].
+     * 
+ * + * repeated .google.protobuf.Value predictions = 1; + */ + public Builder setPredictions(int index, com.google.protobuf.Value value) { + if (predictionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePredictionsIsMutable(); + predictions_.set(index, value); + onChanged(); + } else { + predictionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The predictions that are the output of the predictions call.
+     * The schema of any single prediction may be specified via Endpoint's
+     * DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model]
+     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+     * [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri].
+     * 
+ * + * repeated .google.protobuf.Value predictions = 1; + */ + public Builder setPredictions(int index, com.google.protobuf.Value.Builder builderForValue) { + if (predictionsBuilder_ == null) { + ensurePredictionsIsMutable(); + predictions_.set(index, builderForValue.build()); + onChanged(); + } else { + predictionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The predictions that are the output of the predictions call.
+     * The schema of any single prediction may be specified via Endpoint's
+     * DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model]
+     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+     * [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri].
+     * 
+ * + * repeated .google.protobuf.Value predictions = 1; + */ + public Builder addPredictions(com.google.protobuf.Value value) { + if (predictionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePredictionsIsMutable(); + predictions_.add(value); + onChanged(); + } else { + predictionsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The predictions that are the output of the predictions call.
+     * The schema of any single prediction may be specified via Endpoint's
+     * DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model]
+     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+     * [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri].
+     * 
+ * + * repeated .google.protobuf.Value predictions = 1; + */ + public Builder addPredictions(int index, com.google.protobuf.Value value) { + if (predictionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePredictionsIsMutable(); + predictions_.add(index, value); + onChanged(); + } else { + predictionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The predictions that are the output of the predictions call.
+     * The schema of any single prediction may be specified via Endpoint's
+     * DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model]
+     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+     * [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri].
+     * 
+ * + * repeated .google.protobuf.Value predictions = 1; + */ + public Builder addPredictions(com.google.protobuf.Value.Builder builderForValue) { + if (predictionsBuilder_ == null) { + ensurePredictionsIsMutable(); + predictions_.add(builderForValue.build()); + onChanged(); + } else { + predictionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The predictions that are the output of the predictions call.
+     * The schema of any single prediction may be specified via Endpoint's
+     * DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model]
+     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+     * [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri].
+     * 
+ * + * repeated .google.protobuf.Value predictions = 1; + */ + public Builder addPredictions(int index, com.google.protobuf.Value.Builder builderForValue) { + if (predictionsBuilder_ == null) { + ensurePredictionsIsMutable(); + predictions_.add(index, builderForValue.build()); + onChanged(); + } else { + predictionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The predictions that are the output of the predictions call.
+     * The schema of any single prediction may be specified via Endpoint's
+     * DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model]
+     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+     * [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri].
+     * 
+ * + * repeated .google.protobuf.Value predictions = 1; + */ + public Builder addAllPredictions( + java.lang.Iterable values) { + if (predictionsBuilder_ == null) { + ensurePredictionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, predictions_); + onChanged(); + } else { + predictionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The predictions that are the output of the predictions call.
+     * The schema of any single prediction may be specified via Endpoint's
+     * DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model]
+     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+     * [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri].
+     * 
+ * + * repeated .google.protobuf.Value predictions = 1; + */ + public Builder clearPredictions() { + if (predictionsBuilder_ == null) { + predictions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + predictionsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The predictions that are the output of the predictions call.
+     * The schema of any single prediction may be specified via Endpoint's
+     * DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model]
+     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+     * [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri].
+     * 
+ * + * repeated .google.protobuf.Value predictions = 1; + */ + public Builder removePredictions(int index) { + if (predictionsBuilder_ == null) { + ensurePredictionsIsMutable(); + predictions_.remove(index); + onChanged(); + } else { + predictionsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The predictions that are the output of the predictions call.
+     * The schema of any single prediction may be specified via Endpoint's
+     * DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model]
+     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+     * [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri].
+     * 
+ * + * repeated .google.protobuf.Value predictions = 1; + */ + public com.google.protobuf.Value.Builder getPredictionsBuilder(int index) { + return getPredictionsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The predictions that are the output of the predictions call.
+     * The schema of any single prediction may be specified via Endpoint's
+     * DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model]
+     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+     * [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri].
+     * 
+ * + * repeated .google.protobuf.Value predictions = 1; + */ + public com.google.protobuf.ValueOrBuilder getPredictionsOrBuilder(int index) { + if (predictionsBuilder_ == null) { + return predictions_.get(index); + } else { + return predictionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The predictions that are the output of the predictions call.
+     * The schema of any single prediction may be specified via Endpoint's
+     * DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model]
+     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+     * [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri].
+     * 
+ * + * repeated .google.protobuf.Value predictions = 1; + */ + public java.util.List + getPredictionsOrBuilderList() { + if (predictionsBuilder_ != null) { + return predictionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(predictions_); + } + } + /** + * + * + *
+     * The predictions that are the output of the predictions call.
+     * The schema of any single prediction may be specified via Endpoint's
+     * DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model]
+     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+     * [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri].
+     * 
+ * + * repeated .google.protobuf.Value predictions = 1; + */ + public com.google.protobuf.Value.Builder addPredictionsBuilder() { + return getPredictionsFieldBuilder() + .addBuilder(com.google.protobuf.Value.getDefaultInstance()); + } + /** + * + * + *
+     * The predictions that are the output of the predictions call.
+     * The schema of any single prediction may be specified via Endpoint's
+     * DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model]
+     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+     * [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri].
+     * 
+ * + * repeated .google.protobuf.Value predictions = 1; + */ + public com.google.protobuf.Value.Builder addPredictionsBuilder(int index) { + return getPredictionsFieldBuilder() + .addBuilder(index, com.google.protobuf.Value.getDefaultInstance()); + } + /** + * + * + *
+     * The predictions that are the output of the predictions call.
+     * The schema of any single prediction may be specified via Endpoint's
+     * DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model]
+     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+     * [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri].
+     * 
+ * + * repeated .google.protobuf.Value predictions = 1; + */ + public java.util.List getPredictionsBuilderList() { + return getPredictionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protobuf.Value, + com.google.protobuf.Value.Builder, + com.google.protobuf.ValueOrBuilder> + getPredictionsFieldBuilder() { + if (predictionsBuilder_ == null) { + predictionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protobuf.Value, + com.google.protobuf.Value.Builder, + com.google.protobuf.ValueOrBuilder>( + predictions_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + predictions_ = null; + } + return predictionsBuilder_; + } + + private java.lang.Object deployedModelId_ = ""; + /** + * + * + *
+     * ID of the Endpoint's DeployedModel that served this prediction.
+     * 
+ * + * string deployed_model_id = 2; + * + * @return The deployedModelId. + */ + public java.lang.String getDeployedModelId() { + java.lang.Object ref = deployedModelId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deployedModelId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * ID of the Endpoint's DeployedModel that served this prediction.
+     * 
+ * + * string deployed_model_id = 2; + * + * @return The bytes for deployedModelId. + */ + public com.google.protobuf.ByteString getDeployedModelIdBytes() { + java.lang.Object ref = deployedModelId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + deployedModelId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * ID of the Endpoint's DeployedModel that served this prediction.
+     * 
+ * + * string deployed_model_id = 2; + * + * @param value The deployedModelId to set. + * @return This builder for chaining. + */ + public Builder setDeployedModelId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + deployedModelId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * ID of the Endpoint's DeployedModel that served this prediction.
+     * 
+ * + * string deployed_model_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearDeployedModelId() { + + deployedModelId_ = getDefaultInstance().getDeployedModelId(); + onChanged(); + return this; + } + /** + * + * + *
+     * ID of the Endpoint's DeployedModel that served this prediction.
+     * 
+ * + * string deployed_model_id = 2; + * + * @param value The bytes for deployedModelId to set. + * @return This builder for chaining. + */ + public Builder setDeployedModelIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + deployedModelId_ = 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.v1.PredictResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.PredictResponse) + private static final com.google.cloud.aiplatform.v1.PredictResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.PredictResponse(); + } + + public static com.google.cloud.aiplatform.v1.PredictResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PredictResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PredictResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.PredictResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PredictResponseOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PredictResponseOrBuilder.java new file mode 100644 index 000000000..3722df8c8 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PredictResponseOrBuilder.java @@ -0,0 +1,121 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/prediction_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface PredictResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.PredictResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The predictions that are the output of the predictions call.
+   * The schema of any single prediction may be specified via Endpoint's
+   * DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model]
+   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+   * [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri].
+   * 
+ * + * repeated .google.protobuf.Value predictions = 1; + */ + java.util.List getPredictionsList(); + /** + * + * + *
+   * The predictions that are the output of the predictions call.
+   * The schema of any single prediction may be specified via Endpoint's
+   * DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model]
+   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+   * [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri].
+   * 
+ * + * repeated .google.protobuf.Value predictions = 1; + */ + com.google.protobuf.Value getPredictions(int index); + /** + * + * + *
+   * The predictions that are the output of the predictions call.
+   * The schema of any single prediction may be specified via Endpoint's
+   * DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model]
+   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+   * [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri].
+   * 
+ * + * repeated .google.protobuf.Value predictions = 1; + */ + int getPredictionsCount(); + /** + * + * + *
+   * The predictions that are the output of the predictions call.
+   * The schema of any single prediction may be specified via Endpoint's
+   * DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model]
+   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+   * [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri].
+   * 
+ * + * repeated .google.protobuf.Value predictions = 1; + */ + java.util.List getPredictionsOrBuilderList(); + /** + * + * + *
+   * The predictions that are the output of the predictions call.
+   * The schema of any single prediction may be specified via Endpoint's
+   * DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model]
+   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+   * [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri].
+   * 
+ * + * repeated .google.protobuf.Value predictions = 1; + */ + com.google.protobuf.ValueOrBuilder getPredictionsOrBuilder(int index); + + /** + * + * + *
+   * ID of the Endpoint's DeployedModel that served this prediction.
+   * 
+ * + * string deployed_model_id = 2; + * + * @return The deployedModelId. + */ + java.lang.String getDeployedModelId(); + /** + * + * + *
+   * ID of the Endpoint's DeployedModel that served this prediction.
+   * 
+ * + * string deployed_model_id = 2; + * + * @return The bytes for deployedModelId. + */ + com.google.protobuf.ByteString getDeployedModelIdBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PredictSchemata.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PredictSchemata.java new file mode 100644 index 000000000..7b7b50cd5 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PredictSchemata.java @@ -0,0 +1,1192 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/model.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Contains the schemata used in Model's predictions and explanations via
+ * [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict], [PredictionService.Explain][] and
+ * [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.PredictSchemata} + */ +public final class PredictSchemata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.PredictSchemata) + PredictSchemataOrBuilder { + private static final long serialVersionUID = 0L; + // Use PredictSchemata.newBuilder() to construct. + private PredictSchemata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PredictSchemata() { + instanceSchemaUri_ = ""; + parametersSchemaUri_ = ""; + predictionSchemaUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PredictSchemata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private PredictSchemata( + 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(); + + instanceSchemaUri_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + parametersSchemaUri_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + predictionSchemaUri_ = 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.v1.ModelProto + .internal_static_google_cloud_aiplatform_v1_PredictSchemata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ModelProto + .internal_static_google_cloud_aiplatform_v1_PredictSchemata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.PredictSchemata.class, + com.google.cloud.aiplatform.v1.PredictSchemata.Builder.class); + } + + public static final int INSTANCE_SCHEMA_URI_FIELD_NUMBER = 1; + private volatile java.lang.Object instanceSchemaUri_; + /** + * + * + *
+   * Immutable. Points to a YAML file stored on Google Cloud Storage describing the format
+   * of a single instance, which are used in [PredictRequest.instances][google.cloud.aiplatform.v1.PredictRequest.instances],
+   * [ExplainRequest.instances][] and
+   * [BatchPredictionJob.input_config][google.cloud.aiplatform.v1.BatchPredictionJob.input_config].
+   * The schema is defined as an OpenAPI 3.0.2
+   * [Schema Object](https://tinyurl.com/y538mdwt#schema-object).
+   * AutoML Models always have this field populated by AI Platform.
+   * Note: The URI given on output will be immutable and probably different,
+   * including the URI scheme, than the one given on input. The output URI will
+   * point to a location where the user only has a read access.
+   * 
+ * + * string instance_schema_uri = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The instanceSchemaUri. + */ + @java.lang.Override + public java.lang.String getInstanceSchemaUri() { + java.lang.Object ref = instanceSchemaUri_; + 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(); + instanceSchemaUri_ = s; + return s; + } + } + /** + * + * + *
+   * Immutable. Points to a YAML file stored on Google Cloud Storage describing the format
+   * of a single instance, which are used in [PredictRequest.instances][google.cloud.aiplatform.v1.PredictRequest.instances],
+   * [ExplainRequest.instances][] and
+   * [BatchPredictionJob.input_config][google.cloud.aiplatform.v1.BatchPredictionJob.input_config].
+   * The schema is defined as an OpenAPI 3.0.2
+   * [Schema Object](https://tinyurl.com/y538mdwt#schema-object).
+   * AutoML Models always have this field populated by AI Platform.
+   * Note: The URI given on output will be immutable and probably different,
+   * including the URI scheme, than the one given on input. The output URI will
+   * point to a location where the user only has a read access.
+   * 
+ * + * string instance_schema_uri = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for instanceSchemaUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInstanceSchemaUriBytes() { + java.lang.Object ref = instanceSchemaUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceSchemaUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PARAMETERS_SCHEMA_URI_FIELD_NUMBER = 2; + private volatile java.lang.Object parametersSchemaUri_; + /** + * + * + *
+   * Immutable. Points to a YAML file stored on Google Cloud Storage describing the
+   * parameters of prediction and explanation via
+   * [PredictRequest.parameters][google.cloud.aiplatform.v1.PredictRequest.parameters], [ExplainRequest.parameters][] and
+   * [BatchPredictionJob.model_parameters][google.cloud.aiplatform.v1.BatchPredictionJob.model_parameters].
+   * The schema is defined as an OpenAPI 3.0.2
+   * [Schema Object](https://tinyurl.com/y538mdwt#schema-object).
+   * AutoML Models always have this field populated by AI Platform, if no
+   * parameters are supported, then it is set to an empty string.
+   * Note: The URI given on output will be immutable and probably different,
+   * including the URI scheme, than the one given on input. The output URI will
+   * point to a location where the user only has a read access.
+   * 
+ * + * string parameters_schema_uri = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The parametersSchemaUri. + */ + @java.lang.Override + public java.lang.String getParametersSchemaUri() { + java.lang.Object ref = parametersSchemaUri_; + 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(); + parametersSchemaUri_ = s; + return s; + } + } + /** + * + * + *
+   * Immutable. Points to a YAML file stored on Google Cloud Storage describing the
+   * parameters of prediction and explanation via
+   * [PredictRequest.parameters][google.cloud.aiplatform.v1.PredictRequest.parameters], [ExplainRequest.parameters][] and
+   * [BatchPredictionJob.model_parameters][google.cloud.aiplatform.v1.BatchPredictionJob.model_parameters].
+   * The schema is defined as an OpenAPI 3.0.2
+   * [Schema Object](https://tinyurl.com/y538mdwt#schema-object).
+   * AutoML Models always have this field populated by AI Platform, if no
+   * parameters are supported, then it is set to an empty string.
+   * Note: The URI given on output will be immutable and probably different,
+   * including the URI scheme, than the one given on input. The output URI will
+   * point to a location where the user only has a read access.
+   * 
+ * + * string parameters_schema_uri = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for parametersSchemaUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParametersSchemaUriBytes() { + java.lang.Object ref = parametersSchemaUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parametersSchemaUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PREDICTION_SCHEMA_URI_FIELD_NUMBER = 3; + private volatile java.lang.Object predictionSchemaUri_; + /** + * + * + *
+   * Immutable. Points to a YAML file stored on Google Cloud Storage describing the format
+   * of a single prediction produced by this Model, which are returned via
+   * [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions], [ExplainResponse.explanations][], and
+   * [BatchPredictionJob.output_config][google.cloud.aiplatform.v1.BatchPredictionJob.output_config].
+   * The schema is defined as an OpenAPI 3.0.2
+   * [Schema Object](https://tinyurl.com/y538mdwt#schema-object).
+   * AutoML Models always have this field populated by AI Platform.
+   * Note: The URI given on output will be immutable and probably different,
+   * including the URI scheme, than the one given on input. The output URI will
+   * point to a location where the user only has a read access.
+   * 
+ * + * string prediction_schema_uri = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The predictionSchemaUri. + */ + @java.lang.Override + public java.lang.String getPredictionSchemaUri() { + java.lang.Object ref = predictionSchemaUri_; + 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(); + predictionSchemaUri_ = s; + return s; + } + } + /** + * + * + *
+   * Immutable. Points to a YAML file stored on Google Cloud Storage describing the format
+   * of a single prediction produced by this Model, which are returned via
+   * [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions], [ExplainResponse.explanations][], and
+   * [BatchPredictionJob.output_config][google.cloud.aiplatform.v1.BatchPredictionJob.output_config].
+   * The schema is defined as an OpenAPI 3.0.2
+   * [Schema Object](https://tinyurl.com/y538mdwt#schema-object).
+   * AutoML Models always have this field populated by AI Platform.
+   * Note: The URI given on output will be immutable and probably different,
+   * including the URI scheme, than the one given on input. The output URI will
+   * point to a location where the user only has a read access.
+   * 
+ * + * string prediction_schema_uri = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for predictionSchemaUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPredictionSchemaUriBytes() { + java.lang.Object ref = predictionSchemaUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + predictionSchemaUri_ = 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 (!getInstanceSchemaUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, instanceSchemaUri_); + } + if (!getParametersSchemaUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, parametersSchemaUri_); + } + if (!getPredictionSchemaUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, predictionSchemaUri_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getInstanceSchemaUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, instanceSchemaUri_); + } + if (!getParametersSchemaUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, parametersSchemaUri_); + } + if (!getPredictionSchemaUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, predictionSchemaUri_); + } + 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.v1.PredictSchemata)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.PredictSchemata other = + (com.google.cloud.aiplatform.v1.PredictSchemata) obj; + + if (!getInstanceSchemaUri().equals(other.getInstanceSchemaUri())) return false; + if (!getParametersSchemaUri().equals(other.getParametersSchemaUri())) return false; + if (!getPredictionSchemaUri().equals(other.getPredictionSchemaUri())) 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) + INSTANCE_SCHEMA_URI_FIELD_NUMBER; + hash = (53 * hash) + getInstanceSchemaUri().hashCode(); + hash = (37 * hash) + PARAMETERS_SCHEMA_URI_FIELD_NUMBER; + hash = (53 * hash) + getParametersSchemaUri().hashCode(); + hash = (37 * hash) + PREDICTION_SCHEMA_URI_FIELD_NUMBER; + hash = (53 * hash) + getPredictionSchemaUri().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.PredictSchemata parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.PredictSchemata 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.v1.PredictSchemata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.PredictSchemata 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.v1.PredictSchemata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.PredictSchemata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.PredictSchemata parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.PredictSchemata 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.v1.PredictSchemata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.PredictSchemata 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.v1.PredictSchemata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.PredictSchemata 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.v1.PredictSchemata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Contains the schemata used in Model's predictions and explanations via
+   * [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict], [PredictionService.Explain][] and
+   * [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.PredictSchemata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.PredictSchemata) + com.google.cloud.aiplatform.v1.PredictSchemataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.ModelProto + .internal_static_google_cloud_aiplatform_v1_PredictSchemata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ModelProto + .internal_static_google_cloud_aiplatform_v1_PredictSchemata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.PredictSchemata.class, + com.google.cloud.aiplatform.v1.PredictSchemata.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.PredictSchemata.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(); + instanceSchemaUri_ = ""; + + parametersSchemaUri_ = ""; + + predictionSchemaUri_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.ModelProto + .internal_static_google_cloud_aiplatform_v1_PredictSchemata_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.PredictSchemata getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.PredictSchemata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.PredictSchemata build() { + com.google.cloud.aiplatform.v1.PredictSchemata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.PredictSchemata buildPartial() { + com.google.cloud.aiplatform.v1.PredictSchemata result = + new com.google.cloud.aiplatform.v1.PredictSchemata(this); + result.instanceSchemaUri_ = instanceSchemaUri_; + result.parametersSchemaUri_ = parametersSchemaUri_; + result.predictionSchemaUri_ = predictionSchemaUri_; + 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.v1.PredictSchemata) { + return mergeFrom((com.google.cloud.aiplatform.v1.PredictSchemata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.PredictSchemata other) { + if (other == com.google.cloud.aiplatform.v1.PredictSchemata.getDefaultInstance()) return this; + if (!other.getInstanceSchemaUri().isEmpty()) { + instanceSchemaUri_ = other.instanceSchemaUri_; + onChanged(); + } + if (!other.getParametersSchemaUri().isEmpty()) { + parametersSchemaUri_ = other.parametersSchemaUri_; + onChanged(); + } + if (!other.getPredictionSchemaUri().isEmpty()) { + predictionSchemaUri_ = other.predictionSchemaUri_; + 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.v1.PredictSchemata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.aiplatform.v1.PredictSchemata) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object instanceSchemaUri_ = ""; + /** + * + * + *
+     * Immutable. Points to a YAML file stored on Google Cloud Storage describing the format
+     * of a single instance, which are used in [PredictRequest.instances][google.cloud.aiplatform.v1.PredictRequest.instances],
+     * [ExplainRequest.instances][] and
+     * [BatchPredictionJob.input_config][google.cloud.aiplatform.v1.BatchPredictionJob.input_config].
+     * The schema is defined as an OpenAPI 3.0.2
+     * [Schema Object](https://tinyurl.com/y538mdwt#schema-object).
+     * AutoML Models always have this field populated by AI Platform.
+     * Note: The URI given on output will be immutable and probably different,
+     * including the URI scheme, than the one given on input. The output URI will
+     * point to a location where the user only has a read access.
+     * 
+ * + * string instance_schema_uri = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The instanceSchemaUri. + */ + public java.lang.String getInstanceSchemaUri() { + java.lang.Object ref = instanceSchemaUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instanceSchemaUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Immutable. Points to a YAML file stored on Google Cloud Storage describing the format
+     * of a single instance, which are used in [PredictRequest.instances][google.cloud.aiplatform.v1.PredictRequest.instances],
+     * [ExplainRequest.instances][] and
+     * [BatchPredictionJob.input_config][google.cloud.aiplatform.v1.BatchPredictionJob.input_config].
+     * The schema is defined as an OpenAPI 3.0.2
+     * [Schema Object](https://tinyurl.com/y538mdwt#schema-object).
+     * AutoML Models always have this field populated by AI Platform.
+     * Note: The URI given on output will be immutable and probably different,
+     * including the URI scheme, than the one given on input. The output URI will
+     * point to a location where the user only has a read access.
+     * 
+ * + * string instance_schema_uri = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for instanceSchemaUri. + */ + public com.google.protobuf.ByteString getInstanceSchemaUriBytes() { + java.lang.Object ref = instanceSchemaUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceSchemaUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Immutable. Points to a YAML file stored on Google Cloud Storage describing the format
+     * of a single instance, which are used in [PredictRequest.instances][google.cloud.aiplatform.v1.PredictRequest.instances],
+     * [ExplainRequest.instances][] and
+     * [BatchPredictionJob.input_config][google.cloud.aiplatform.v1.BatchPredictionJob.input_config].
+     * The schema is defined as an OpenAPI 3.0.2
+     * [Schema Object](https://tinyurl.com/y538mdwt#schema-object).
+     * AutoML Models always have this field populated by AI Platform.
+     * Note: The URI given on output will be immutable and probably different,
+     * including the URI scheme, than the one given on input. The output URI will
+     * point to a location where the user only has a read access.
+     * 
+ * + * string instance_schema_uri = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The instanceSchemaUri to set. + * @return This builder for chaining. + */ + public Builder setInstanceSchemaUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + instanceSchemaUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. Points to a YAML file stored on Google Cloud Storage describing the format
+     * of a single instance, which are used in [PredictRequest.instances][google.cloud.aiplatform.v1.PredictRequest.instances],
+     * [ExplainRequest.instances][] and
+     * [BatchPredictionJob.input_config][google.cloud.aiplatform.v1.BatchPredictionJob.input_config].
+     * The schema is defined as an OpenAPI 3.0.2
+     * [Schema Object](https://tinyurl.com/y538mdwt#schema-object).
+     * AutoML Models always have this field populated by AI Platform.
+     * Note: The URI given on output will be immutable and probably different,
+     * including the URI scheme, than the one given on input. The output URI will
+     * point to a location where the user only has a read access.
+     * 
+ * + * string instance_schema_uri = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearInstanceSchemaUri() { + + instanceSchemaUri_ = getDefaultInstance().getInstanceSchemaUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. Points to a YAML file stored on Google Cloud Storage describing the format
+     * of a single instance, which are used in [PredictRequest.instances][google.cloud.aiplatform.v1.PredictRequest.instances],
+     * [ExplainRequest.instances][] and
+     * [BatchPredictionJob.input_config][google.cloud.aiplatform.v1.BatchPredictionJob.input_config].
+     * The schema is defined as an OpenAPI 3.0.2
+     * [Schema Object](https://tinyurl.com/y538mdwt#schema-object).
+     * AutoML Models always have this field populated by AI Platform.
+     * Note: The URI given on output will be immutable and probably different,
+     * including the URI scheme, than the one given on input. The output URI will
+     * point to a location where the user only has a read access.
+     * 
+ * + * string instance_schema_uri = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The bytes for instanceSchemaUri to set. + * @return This builder for chaining. + */ + public Builder setInstanceSchemaUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + instanceSchemaUri_ = value; + onChanged(); + return this; + } + + private java.lang.Object parametersSchemaUri_ = ""; + /** + * + * + *
+     * Immutable. Points to a YAML file stored on Google Cloud Storage describing the
+     * parameters of prediction and explanation via
+     * [PredictRequest.parameters][google.cloud.aiplatform.v1.PredictRequest.parameters], [ExplainRequest.parameters][] and
+     * [BatchPredictionJob.model_parameters][google.cloud.aiplatform.v1.BatchPredictionJob.model_parameters].
+     * The schema is defined as an OpenAPI 3.0.2
+     * [Schema Object](https://tinyurl.com/y538mdwt#schema-object).
+     * AutoML Models always have this field populated by AI Platform, if no
+     * parameters are supported, then it is set to an empty string.
+     * Note: The URI given on output will be immutable and probably different,
+     * including the URI scheme, than the one given on input. The output URI will
+     * point to a location where the user only has a read access.
+     * 
+ * + * string parameters_schema_uri = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The parametersSchemaUri. + */ + public java.lang.String getParametersSchemaUri() { + java.lang.Object ref = parametersSchemaUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parametersSchemaUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Immutable. Points to a YAML file stored on Google Cloud Storage describing the
+     * parameters of prediction and explanation via
+     * [PredictRequest.parameters][google.cloud.aiplatform.v1.PredictRequest.parameters], [ExplainRequest.parameters][] and
+     * [BatchPredictionJob.model_parameters][google.cloud.aiplatform.v1.BatchPredictionJob.model_parameters].
+     * The schema is defined as an OpenAPI 3.0.2
+     * [Schema Object](https://tinyurl.com/y538mdwt#schema-object).
+     * AutoML Models always have this field populated by AI Platform, if no
+     * parameters are supported, then it is set to an empty string.
+     * Note: The URI given on output will be immutable and probably different,
+     * including the URI scheme, than the one given on input. The output URI will
+     * point to a location where the user only has a read access.
+     * 
+ * + * string parameters_schema_uri = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for parametersSchemaUri. + */ + public com.google.protobuf.ByteString getParametersSchemaUriBytes() { + java.lang.Object ref = parametersSchemaUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parametersSchemaUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Immutable. Points to a YAML file stored on Google Cloud Storage describing the
+     * parameters of prediction and explanation via
+     * [PredictRequest.parameters][google.cloud.aiplatform.v1.PredictRequest.parameters], [ExplainRequest.parameters][] and
+     * [BatchPredictionJob.model_parameters][google.cloud.aiplatform.v1.BatchPredictionJob.model_parameters].
+     * The schema is defined as an OpenAPI 3.0.2
+     * [Schema Object](https://tinyurl.com/y538mdwt#schema-object).
+     * AutoML Models always have this field populated by AI Platform, if no
+     * parameters are supported, then it is set to an empty string.
+     * Note: The URI given on output will be immutable and probably different,
+     * including the URI scheme, than the one given on input. The output URI will
+     * point to a location where the user only has a read access.
+     * 
+ * + * string parameters_schema_uri = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The parametersSchemaUri to set. + * @return This builder for chaining. + */ + public Builder setParametersSchemaUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parametersSchemaUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. Points to a YAML file stored on Google Cloud Storage describing the
+     * parameters of prediction and explanation via
+     * [PredictRequest.parameters][google.cloud.aiplatform.v1.PredictRequest.parameters], [ExplainRequest.parameters][] and
+     * [BatchPredictionJob.model_parameters][google.cloud.aiplatform.v1.BatchPredictionJob.model_parameters].
+     * The schema is defined as an OpenAPI 3.0.2
+     * [Schema Object](https://tinyurl.com/y538mdwt#schema-object).
+     * AutoML Models always have this field populated by AI Platform, if no
+     * parameters are supported, then it is set to an empty string.
+     * Note: The URI given on output will be immutable and probably different,
+     * including the URI scheme, than the one given on input. The output URI will
+     * point to a location where the user only has a read access.
+     * 
+ * + * string parameters_schema_uri = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearParametersSchemaUri() { + + parametersSchemaUri_ = getDefaultInstance().getParametersSchemaUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. Points to a YAML file stored on Google Cloud Storage describing the
+     * parameters of prediction and explanation via
+     * [PredictRequest.parameters][google.cloud.aiplatform.v1.PredictRequest.parameters], [ExplainRequest.parameters][] and
+     * [BatchPredictionJob.model_parameters][google.cloud.aiplatform.v1.BatchPredictionJob.model_parameters].
+     * The schema is defined as an OpenAPI 3.0.2
+     * [Schema Object](https://tinyurl.com/y538mdwt#schema-object).
+     * AutoML Models always have this field populated by AI Platform, if no
+     * parameters are supported, then it is set to an empty string.
+     * Note: The URI given on output will be immutable and probably different,
+     * including the URI scheme, than the one given on input. The output URI will
+     * point to a location where the user only has a read access.
+     * 
+ * + * string parameters_schema_uri = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The bytes for parametersSchemaUri to set. + * @return This builder for chaining. + */ + public Builder setParametersSchemaUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parametersSchemaUri_ = value; + onChanged(); + return this; + } + + private java.lang.Object predictionSchemaUri_ = ""; + /** + * + * + *
+     * Immutable. Points to a YAML file stored on Google Cloud Storage describing the format
+     * of a single prediction produced by this Model, which are returned via
+     * [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions], [ExplainResponse.explanations][], and
+     * [BatchPredictionJob.output_config][google.cloud.aiplatform.v1.BatchPredictionJob.output_config].
+     * The schema is defined as an OpenAPI 3.0.2
+     * [Schema Object](https://tinyurl.com/y538mdwt#schema-object).
+     * AutoML Models always have this field populated by AI Platform.
+     * Note: The URI given on output will be immutable and probably different,
+     * including the URI scheme, than the one given on input. The output URI will
+     * point to a location where the user only has a read access.
+     * 
+ * + * string prediction_schema_uri = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The predictionSchemaUri. + */ + public java.lang.String getPredictionSchemaUri() { + java.lang.Object ref = predictionSchemaUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + predictionSchemaUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Immutable. Points to a YAML file stored on Google Cloud Storage describing the format
+     * of a single prediction produced by this Model, which are returned via
+     * [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions], [ExplainResponse.explanations][], and
+     * [BatchPredictionJob.output_config][google.cloud.aiplatform.v1.BatchPredictionJob.output_config].
+     * The schema is defined as an OpenAPI 3.0.2
+     * [Schema Object](https://tinyurl.com/y538mdwt#schema-object).
+     * AutoML Models always have this field populated by AI Platform.
+     * Note: The URI given on output will be immutable and probably different,
+     * including the URI scheme, than the one given on input. The output URI will
+     * point to a location where the user only has a read access.
+     * 
+ * + * string prediction_schema_uri = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for predictionSchemaUri. + */ + public com.google.protobuf.ByteString getPredictionSchemaUriBytes() { + java.lang.Object ref = predictionSchemaUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + predictionSchemaUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Immutable. Points to a YAML file stored on Google Cloud Storage describing the format
+     * of a single prediction produced by this Model, which are returned via
+     * [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions], [ExplainResponse.explanations][], and
+     * [BatchPredictionJob.output_config][google.cloud.aiplatform.v1.BatchPredictionJob.output_config].
+     * The schema is defined as an OpenAPI 3.0.2
+     * [Schema Object](https://tinyurl.com/y538mdwt#schema-object).
+     * AutoML Models always have this field populated by AI Platform.
+     * Note: The URI given on output will be immutable and probably different,
+     * including the URI scheme, than the one given on input. The output URI will
+     * point to a location where the user only has a read access.
+     * 
+ * + * string prediction_schema_uri = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The predictionSchemaUri to set. + * @return This builder for chaining. + */ + public Builder setPredictionSchemaUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + predictionSchemaUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. Points to a YAML file stored on Google Cloud Storage describing the format
+     * of a single prediction produced by this Model, which are returned via
+     * [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions], [ExplainResponse.explanations][], and
+     * [BatchPredictionJob.output_config][google.cloud.aiplatform.v1.BatchPredictionJob.output_config].
+     * The schema is defined as an OpenAPI 3.0.2
+     * [Schema Object](https://tinyurl.com/y538mdwt#schema-object).
+     * AutoML Models always have this field populated by AI Platform.
+     * Note: The URI given on output will be immutable and probably different,
+     * including the URI scheme, than the one given on input. The output URI will
+     * point to a location where the user only has a read access.
+     * 
+ * + * string prediction_schema_uri = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearPredictionSchemaUri() { + + predictionSchemaUri_ = getDefaultInstance().getPredictionSchemaUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. Points to a YAML file stored on Google Cloud Storage describing the format
+     * of a single prediction produced by this Model, which are returned via
+     * [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions], [ExplainResponse.explanations][], and
+     * [BatchPredictionJob.output_config][google.cloud.aiplatform.v1.BatchPredictionJob.output_config].
+     * The schema is defined as an OpenAPI 3.0.2
+     * [Schema Object](https://tinyurl.com/y538mdwt#schema-object).
+     * AutoML Models always have this field populated by AI Platform.
+     * Note: The URI given on output will be immutable and probably different,
+     * including the URI scheme, than the one given on input. The output URI will
+     * point to a location where the user only has a read access.
+     * 
+ * + * string prediction_schema_uri = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The bytes for predictionSchemaUri to set. + * @return This builder for chaining. + */ + public Builder setPredictionSchemaUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + predictionSchemaUri_ = 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.v1.PredictSchemata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.PredictSchemata) + private static final com.google.cloud.aiplatform.v1.PredictSchemata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.PredictSchemata(); + } + + public static com.google.cloud.aiplatform.v1.PredictSchemata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PredictSchemata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PredictSchemata(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.v1.PredictSchemata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PredictSchemataOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PredictSchemataOrBuilder.java new file mode 100644 index 000000000..a31d4043d --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PredictSchemataOrBuilder.java @@ -0,0 +1,156 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/model.proto + +package com.google.cloud.aiplatform.v1; + +public interface PredictSchemataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.PredictSchemata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Immutable. Points to a YAML file stored on Google Cloud Storage describing the format
+   * of a single instance, which are used in [PredictRequest.instances][google.cloud.aiplatform.v1.PredictRequest.instances],
+   * [ExplainRequest.instances][] and
+   * [BatchPredictionJob.input_config][google.cloud.aiplatform.v1.BatchPredictionJob.input_config].
+   * The schema is defined as an OpenAPI 3.0.2
+   * [Schema Object](https://tinyurl.com/y538mdwt#schema-object).
+   * AutoML Models always have this field populated by AI Platform.
+   * Note: The URI given on output will be immutable and probably different,
+   * including the URI scheme, than the one given on input. The output URI will
+   * point to a location where the user only has a read access.
+   * 
+ * + * string instance_schema_uri = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The instanceSchemaUri. + */ + java.lang.String getInstanceSchemaUri(); + /** + * + * + *
+   * Immutable. Points to a YAML file stored on Google Cloud Storage describing the format
+   * of a single instance, which are used in [PredictRequest.instances][google.cloud.aiplatform.v1.PredictRequest.instances],
+   * [ExplainRequest.instances][] and
+   * [BatchPredictionJob.input_config][google.cloud.aiplatform.v1.BatchPredictionJob.input_config].
+   * The schema is defined as an OpenAPI 3.0.2
+   * [Schema Object](https://tinyurl.com/y538mdwt#schema-object).
+   * AutoML Models always have this field populated by AI Platform.
+   * Note: The URI given on output will be immutable and probably different,
+   * including the URI scheme, than the one given on input. The output URI will
+   * point to a location where the user only has a read access.
+   * 
+ * + * string instance_schema_uri = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for instanceSchemaUri. + */ + com.google.protobuf.ByteString getInstanceSchemaUriBytes(); + + /** + * + * + *
+   * Immutable. Points to a YAML file stored on Google Cloud Storage describing the
+   * parameters of prediction and explanation via
+   * [PredictRequest.parameters][google.cloud.aiplatform.v1.PredictRequest.parameters], [ExplainRequest.parameters][] and
+   * [BatchPredictionJob.model_parameters][google.cloud.aiplatform.v1.BatchPredictionJob.model_parameters].
+   * The schema is defined as an OpenAPI 3.0.2
+   * [Schema Object](https://tinyurl.com/y538mdwt#schema-object).
+   * AutoML Models always have this field populated by AI Platform, if no
+   * parameters are supported, then it is set to an empty string.
+   * Note: The URI given on output will be immutable and probably different,
+   * including the URI scheme, than the one given on input. The output URI will
+   * point to a location where the user only has a read access.
+   * 
+ * + * string parameters_schema_uri = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The parametersSchemaUri. + */ + java.lang.String getParametersSchemaUri(); + /** + * + * + *
+   * Immutable. Points to a YAML file stored on Google Cloud Storage describing the
+   * parameters of prediction and explanation via
+   * [PredictRequest.parameters][google.cloud.aiplatform.v1.PredictRequest.parameters], [ExplainRequest.parameters][] and
+   * [BatchPredictionJob.model_parameters][google.cloud.aiplatform.v1.BatchPredictionJob.model_parameters].
+   * The schema is defined as an OpenAPI 3.0.2
+   * [Schema Object](https://tinyurl.com/y538mdwt#schema-object).
+   * AutoML Models always have this field populated by AI Platform, if no
+   * parameters are supported, then it is set to an empty string.
+   * Note: The URI given on output will be immutable and probably different,
+   * including the URI scheme, than the one given on input. The output URI will
+   * point to a location where the user only has a read access.
+   * 
+ * + * string parameters_schema_uri = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for parametersSchemaUri. + */ + com.google.protobuf.ByteString getParametersSchemaUriBytes(); + + /** + * + * + *
+   * Immutable. Points to a YAML file stored on Google Cloud Storage describing the format
+   * of a single prediction produced by this Model, which are returned via
+   * [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions], [ExplainResponse.explanations][], and
+   * [BatchPredictionJob.output_config][google.cloud.aiplatform.v1.BatchPredictionJob.output_config].
+   * The schema is defined as an OpenAPI 3.0.2
+   * [Schema Object](https://tinyurl.com/y538mdwt#schema-object).
+   * AutoML Models always have this field populated by AI Platform.
+   * Note: The URI given on output will be immutable and probably different,
+   * including the URI scheme, than the one given on input. The output URI will
+   * point to a location where the user only has a read access.
+   * 
+ * + * string prediction_schema_uri = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The predictionSchemaUri. + */ + java.lang.String getPredictionSchemaUri(); + /** + * + * + *
+   * Immutable. Points to a YAML file stored on Google Cloud Storage describing the format
+   * of a single prediction produced by this Model, which are returned via
+   * [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions], [ExplainResponse.explanations][], and
+   * [BatchPredictionJob.output_config][google.cloud.aiplatform.v1.BatchPredictionJob.output_config].
+   * The schema is defined as an OpenAPI 3.0.2
+   * [Schema Object](https://tinyurl.com/y538mdwt#schema-object).
+   * AutoML Models always have this field populated by AI Platform.
+   * Note: The URI given on output will be immutable and probably different,
+   * including the URI scheme, than the one given on input. The output URI will
+   * point to a location where the user only has a read access.
+   * 
+ * + * string prediction_schema_uri = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for predictionSchemaUri. + */ + com.google.protobuf.ByteString getPredictionSchemaUriBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PredictionServiceProto.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PredictionServiceProto.java new file mode 100644 index 000000000..3cfde4261 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PredictionServiceProto.java @@ -0,0 +1,116 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/prediction_service.proto + +package com.google.cloud.aiplatform.v1; + +public final class PredictionServiceProto { + private PredictionServiceProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_PredictRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_PredictRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_PredictResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_PredictResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n3google/cloud/aiplatform/v1/prediction_" + + "service.proto\022\032google.cloud.aiplatform.v" + + "1\032\034google/api/annotations.proto\032\027google/" + + "api/client.proto\032\037google/api/field_behav" + + "ior.proto\032\031google/api/resource.proto\032\034go" + + "ogle/protobuf/struct.proto\"\252\001\n\016PredictRe" + + "quest\022<\n\010endpoint\030\001 \001(\tB*\340A\002\372A$\n\"aiplatf" + + "orm.googleapis.com/Endpoint\022.\n\tinstances" + + "\030\002 \003(\0132\026.google.protobuf.ValueB\003\340A\002\022*\n\np" + + "arameters\030\003 \001(\0132\026.google.protobuf.Value\"" + + "Y\n\017PredictResponse\022+\n\013predictions\030\001 \003(\0132" + + "\026.google.protobuf.Value\022\031\n\021deployed_mode" + + "l_id\030\002 \001(\t2\255\002\n\021PredictionService\022\310\001\n\007Pre" + + "dict\022*.google.cloud.aiplatform.v1.Predic" + + "tRequest\032+.google.cloud.aiplatform.v1.Pr" + + "edictResponse\"d\202\323\344\223\002>\"9/v1/{endpoint=pro" + + "jects/*/locations/*/endpoints/*}:predict" + + ":\001*\332A\035endpoint,instances,parameters\032M\312A\031" + + "aiplatform.googleapis.com\322A.https://www." + + "googleapis.com/auth/cloud-platformB\200\001\n\036c" + + "om.google.cloud.aiplatform.v1B\026Predictio" + + "nServiceProtoP\001ZDgoogle.golang.org/genpr" + + "oto/googleapis/cloud/aiplatform/v1;aipla" + + "tformb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.protobuf.StructProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1_PredictRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_PredictRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_PredictRequest_descriptor, + new java.lang.String[] { + "Endpoint", "Instances", "Parameters", + }); + internal_static_google_cloud_aiplatform_v1_PredictResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_aiplatform_v1_PredictResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_PredictResponse_descriptor, + new java.lang.String[] { + "Predictions", "DeployedModelId", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.StructProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PythonPackageSpec.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PythonPackageSpec.java new file mode 100644 index 000000000..e96819bd0 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PythonPackageSpec.java @@ -0,0 +1,1904 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/custom_job.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * The spec of a Python packaged code.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.PythonPackageSpec} + */ +public final class PythonPackageSpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.PythonPackageSpec) + PythonPackageSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use PythonPackageSpec.newBuilder() to construct. + private PythonPackageSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PythonPackageSpec() { + executorImageUri_ = ""; + packageUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; + pythonModule_ = ""; + args_ = com.google.protobuf.LazyStringArrayList.EMPTY; + env_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PythonPackageSpec(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private PythonPackageSpec( + 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(); + + executorImageUri_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + packageUris_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + packageUris_.add(s); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + pythonModule_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + args_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + args_.add(s); + break; + } + case 42: + { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + env_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + env_.add( + input.readMessage( + com.google.cloud.aiplatform.v1.EnvVar.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)) { + packageUris_ = packageUris_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + args_ = args_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + env_ = java.util.Collections.unmodifiableList(env_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.CustomJobProto + .internal_static_google_cloud_aiplatform_v1_PythonPackageSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.CustomJobProto + .internal_static_google_cloud_aiplatform_v1_PythonPackageSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.PythonPackageSpec.class, + com.google.cloud.aiplatform.v1.PythonPackageSpec.Builder.class); + } + + public static final int EXECUTOR_IMAGE_URI_FIELD_NUMBER = 1; + private volatile java.lang.Object executorImageUri_; + /** + * + * + *
+   * Required. The URI of a container image in the Container Registry that will run the
+   * provided python package. AI Platform provides wide range of executor images
+   * with pre-installed packages to meet users' various use cases. Only one of
+   * the provided images can be set here.
+   * 
+ * + * string executor_image_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The executorImageUri. + */ + @java.lang.Override + public java.lang.String getExecutorImageUri() { + java.lang.Object ref = executorImageUri_; + 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(); + executorImageUri_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The URI of a container image in the Container Registry that will run the
+   * provided python package. AI Platform provides wide range of executor images
+   * with pre-installed packages to meet users' various use cases. Only one of
+   * the provided images can be set here.
+   * 
+ * + * string executor_image_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for executorImageUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getExecutorImageUriBytes() { + java.lang.Object ref = executorImageUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + executorImageUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PACKAGE_URIS_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList packageUris_; + /** + * + * + *
+   * Required. The Google Cloud Storage location of the Python package files which are
+   * the training program and its dependent packages.
+   * The maximum number of package URIs is 100.
+   * 
+ * + * repeated string package_uris = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the packageUris. + */ + public com.google.protobuf.ProtocolStringList getPackageUrisList() { + return packageUris_; + } + /** + * + * + *
+   * Required. The Google Cloud Storage location of the Python package files which are
+   * the training program and its dependent packages.
+   * The maximum number of package URIs is 100.
+   * 
+ * + * repeated string package_uris = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of packageUris. + */ + public int getPackageUrisCount() { + return packageUris_.size(); + } + /** + * + * + *
+   * Required. The Google Cloud Storage location of the Python package files which are
+   * the training program and its dependent packages.
+   * The maximum number of package URIs is 100.
+   * 
+ * + * repeated string package_uris = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The packageUris at the given index. + */ + public java.lang.String getPackageUris(int index) { + return packageUris_.get(index); + } + /** + * + * + *
+   * Required. The Google Cloud Storage location of the Python package files which are
+   * the training program and its dependent packages.
+   * The maximum number of package URIs is 100.
+   * 
+ * + * repeated string package_uris = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the packageUris at the given index. + */ + public com.google.protobuf.ByteString getPackageUrisBytes(int index) { + return packageUris_.getByteString(index); + } + + public static final int PYTHON_MODULE_FIELD_NUMBER = 3; + private volatile java.lang.Object pythonModule_; + /** + * + * + *
+   * Required. The Python module name to run after installing the packages.
+   * 
+ * + * string python_module = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The pythonModule. + */ + @java.lang.Override + public java.lang.String getPythonModule() { + java.lang.Object ref = pythonModule_; + 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(); + pythonModule_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The Python module name to run after installing the packages.
+   * 
+ * + * string python_module = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for pythonModule. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPythonModuleBytes() { + java.lang.Object ref = pythonModule_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pythonModule_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ARGS_FIELD_NUMBER = 4; + private com.google.protobuf.LazyStringList args_; + /** + * + * + *
+   * Command line arguments to be passed to the Python task.
+   * 
+ * + * repeated string args = 4; + * + * @return A list containing the args. + */ + public com.google.protobuf.ProtocolStringList getArgsList() { + return args_; + } + /** + * + * + *
+   * Command line arguments to be passed to the Python task.
+   * 
+ * + * repeated string args = 4; + * + * @return The count of args. + */ + public int getArgsCount() { + return args_.size(); + } + /** + * + * + *
+   * Command line arguments to be passed to the Python task.
+   * 
+ * + * repeated string args = 4; + * + * @param index The index of the element to return. + * @return The args at the given index. + */ + public java.lang.String getArgs(int index) { + return args_.get(index); + } + /** + * + * + *
+   * Command line arguments to be passed to the Python task.
+   * 
+ * + * repeated string args = 4; + * + * @param index The index of the value to return. + * @return The bytes of the args at the given index. + */ + public com.google.protobuf.ByteString getArgsBytes(int index) { + return args_.getByteString(index); + } + + public static final int ENV_FIELD_NUMBER = 5; + private java.util.List env_; + /** + * + * + *
+   * Environment variables to be passed to the python module.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 5; + */ + @java.lang.Override + public java.util.List getEnvList() { + return env_; + } + /** + * + * + *
+   * Environment variables to be passed to the python module.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 5; + */ + @java.lang.Override + public java.util.List + getEnvOrBuilderList() { + return env_; + } + /** + * + * + *
+   * Environment variables to be passed to the python module.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 5; + */ + @java.lang.Override + public int getEnvCount() { + return env_.size(); + } + /** + * + * + *
+   * Environment variables to be passed to the python module.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 5; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.EnvVar getEnv(int index) { + return env_.get(index); + } + /** + * + * + *
+   * Environment variables to be passed to the python module.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 5; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.EnvVarOrBuilder getEnvOrBuilder(int index) { + return env_.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 (!getExecutorImageUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, executorImageUri_); + } + for (int i = 0; i < packageUris_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, packageUris_.getRaw(i)); + } + if (!getPythonModuleBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pythonModule_); + } + for (int i = 0; i < args_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, args_.getRaw(i)); + } + for (int i = 0; i < env_.size(); i++) { + output.writeMessage(5, env_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getExecutorImageUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, executorImageUri_); + } + { + int dataSize = 0; + for (int i = 0; i < packageUris_.size(); i++) { + dataSize += computeStringSizeNoTag(packageUris_.getRaw(i)); + } + size += dataSize; + size += 1 * getPackageUrisList().size(); + } + if (!getPythonModuleBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pythonModule_); + } + { + int dataSize = 0; + for (int i = 0; i < args_.size(); i++) { + dataSize += computeStringSizeNoTag(args_.getRaw(i)); + } + size += dataSize; + size += 1 * getArgsList().size(); + } + for (int i = 0; i < env_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, env_.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.v1.PythonPackageSpec)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.PythonPackageSpec other = + (com.google.cloud.aiplatform.v1.PythonPackageSpec) obj; + + if (!getExecutorImageUri().equals(other.getExecutorImageUri())) return false; + if (!getPackageUrisList().equals(other.getPackageUrisList())) return false; + if (!getPythonModule().equals(other.getPythonModule())) return false; + if (!getArgsList().equals(other.getArgsList())) return false; + if (!getEnvList().equals(other.getEnvList())) 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) + EXECUTOR_IMAGE_URI_FIELD_NUMBER; + hash = (53 * hash) + getExecutorImageUri().hashCode(); + if (getPackageUrisCount() > 0) { + hash = (37 * hash) + PACKAGE_URIS_FIELD_NUMBER; + hash = (53 * hash) + getPackageUrisList().hashCode(); + } + hash = (37 * hash) + PYTHON_MODULE_FIELD_NUMBER; + hash = (53 * hash) + getPythonModule().hashCode(); + if (getArgsCount() > 0) { + hash = (37 * hash) + ARGS_FIELD_NUMBER; + hash = (53 * hash) + getArgsList().hashCode(); + } + if (getEnvCount() > 0) { + hash = (37 * hash) + ENV_FIELD_NUMBER; + hash = (53 * hash) + getEnvList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.PythonPackageSpec parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.PythonPackageSpec 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.v1.PythonPackageSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.PythonPackageSpec 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.v1.PythonPackageSpec parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.PythonPackageSpec parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.PythonPackageSpec parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.PythonPackageSpec 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.v1.PythonPackageSpec parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.PythonPackageSpec 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.v1.PythonPackageSpec parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.PythonPackageSpec 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.v1.PythonPackageSpec 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 spec of a Python packaged code.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.PythonPackageSpec} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.PythonPackageSpec) + com.google.cloud.aiplatform.v1.PythonPackageSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.CustomJobProto + .internal_static_google_cloud_aiplatform_v1_PythonPackageSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.CustomJobProto + .internal_static_google_cloud_aiplatform_v1_PythonPackageSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.PythonPackageSpec.class, + com.google.cloud.aiplatform.v1.PythonPackageSpec.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.PythonPackageSpec.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getEnvFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + executorImageUri_ = ""; + + packageUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + pythonModule_ = ""; + + args_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + if (envBuilder_ == null) { + env_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + envBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.CustomJobProto + .internal_static_google_cloud_aiplatform_v1_PythonPackageSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.PythonPackageSpec getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.PythonPackageSpec.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.PythonPackageSpec build() { + com.google.cloud.aiplatform.v1.PythonPackageSpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.PythonPackageSpec buildPartial() { + com.google.cloud.aiplatform.v1.PythonPackageSpec result = + new com.google.cloud.aiplatform.v1.PythonPackageSpec(this); + int from_bitField0_ = bitField0_; + result.executorImageUri_ = executorImageUri_; + if (((bitField0_ & 0x00000001) != 0)) { + packageUris_ = packageUris_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.packageUris_ = packageUris_; + result.pythonModule_ = pythonModule_; + if (((bitField0_ & 0x00000002) != 0)) { + args_ = args_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.args_ = args_; + if (envBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + env_ = java.util.Collections.unmodifiableList(env_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.env_ = env_; + } else { + result.env_ = envBuilder_.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.v1.PythonPackageSpec) { + return mergeFrom((com.google.cloud.aiplatform.v1.PythonPackageSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.PythonPackageSpec other) { + if (other == com.google.cloud.aiplatform.v1.PythonPackageSpec.getDefaultInstance()) + return this; + if (!other.getExecutorImageUri().isEmpty()) { + executorImageUri_ = other.executorImageUri_; + onChanged(); + } + if (!other.packageUris_.isEmpty()) { + if (packageUris_.isEmpty()) { + packageUris_ = other.packageUris_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePackageUrisIsMutable(); + packageUris_.addAll(other.packageUris_); + } + onChanged(); + } + if (!other.getPythonModule().isEmpty()) { + pythonModule_ = other.pythonModule_; + onChanged(); + } + if (!other.args_.isEmpty()) { + if (args_.isEmpty()) { + args_ = other.args_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureArgsIsMutable(); + args_.addAll(other.args_); + } + onChanged(); + } + if (envBuilder_ == null) { + if (!other.env_.isEmpty()) { + if (env_.isEmpty()) { + env_ = other.env_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureEnvIsMutable(); + env_.addAll(other.env_); + } + onChanged(); + } + } else { + if (!other.env_.isEmpty()) { + if (envBuilder_.isEmpty()) { + envBuilder_.dispose(); + envBuilder_ = null; + env_ = other.env_; + bitField0_ = (bitField0_ & ~0x00000004); + envBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getEnvFieldBuilder() + : null; + } else { + envBuilder_.addAllMessages(other.env_); + } + } + } + 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.v1.PythonPackageSpec parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.aiplatform.v1.PythonPackageSpec) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object executorImageUri_ = ""; + /** + * + * + *
+     * Required. The URI of a container image in the Container Registry that will run the
+     * provided python package. AI Platform provides wide range of executor images
+     * with pre-installed packages to meet users' various use cases. Only one of
+     * the provided images can be set here.
+     * 
+ * + * string executor_image_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The executorImageUri. + */ + public java.lang.String getExecutorImageUri() { + java.lang.Object ref = executorImageUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + executorImageUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The URI of a container image in the Container Registry that will run the
+     * provided python package. AI Platform provides wide range of executor images
+     * with pre-installed packages to meet users' various use cases. Only one of
+     * the provided images can be set here.
+     * 
+ * + * string executor_image_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for executorImageUri. + */ + public com.google.protobuf.ByteString getExecutorImageUriBytes() { + java.lang.Object ref = executorImageUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + executorImageUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The URI of a container image in the Container Registry that will run the
+     * provided python package. AI Platform provides wide range of executor images
+     * with pre-installed packages to meet users' various use cases. Only one of
+     * the provided images can be set here.
+     * 
+ * + * string executor_image_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The executorImageUri to set. + * @return This builder for chaining. + */ + public Builder setExecutorImageUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + executorImageUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The URI of a container image in the Container Registry that will run the
+     * provided python package. AI Platform provides wide range of executor images
+     * with pre-installed packages to meet users' various use cases. Only one of
+     * the provided images can be set here.
+     * 
+ * + * string executor_image_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearExecutorImageUri() { + + executorImageUri_ = getDefaultInstance().getExecutorImageUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The URI of a container image in the Container Registry that will run the
+     * provided python package. AI Platform provides wide range of executor images
+     * with pre-installed packages to meet users' various use cases. Only one of
+     * the provided images can be set here.
+     * 
+ * + * string executor_image_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for executorImageUri to set. + * @return This builder for chaining. + */ + public Builder setExecutorImageUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + executorImageUri_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList packageUris_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensurePackageUrisIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + packageUris_ = new com.google.protobuf.LazyStringArrayList(packageUris_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * Required. The Google Cloud Storage location of the Python package files which are
+     * the training program and its dependent packages.
+     * The maximum number of package URIs is 100.
+     * 
+ * + * repeated string package_uris = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the packageUris. + */ + public com.google.protobuf.ProtocolStringList getPackageUrisList() { + return packageUris_.getUnmodifiableView(); + } + /** + * + * + *
+     * Required. The Google Cloud Storage location of the Python package files which are
+     * the training program and its dependent packages.
+     * The maximum number of package URIs is 100.
+     * 
+ * + * repeated string package_uris = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of packageUris. + */ + public int getPackageUrisCount() { + return packageUris_.size(); + } + /** + * + * + *
+     * Required. The Google Cloud Storage location of the Python package files which are
+     * the training program and its dependent packages.
+     * The maximum number of package URIs is 100.
+     * 
+ * + * repeated string package_uris = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The packageUris at the given index. + */ + public java.lang.String getPackageUris(int index) { + return packageUris_.get(index); + } + /** + * + * + *
+     * Required. The Google Cloud Storage location of the Python package files which are
+     * the training program and its dependent packages.
+     * The maximum number of package URIs is 100.
+     * 
+ * + * repeated string package_uris = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the packageUris at the given index. + */ + public com.google.protobuf.ByteString getPackageUrisBytes(int index) { + return packageUris_.getByteString(index); + } + /** + * + * + *
+     * Required. The Google Cloud Storage location of the Python package files which are
+     * the training program and its dependent packages.
+     * The maximum number of package URIs is 100.
+     * 
+ * + * repeated string package_uris = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index to set the value at. + * @param value The packageUris to set. + * @return This builder for chaining. + */ + public Builder setPackageUris(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePackageUrisIsMutable(); + packageUris_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Google Cloud Storage location of the Python package files which are
+     * the training program and its dependent packages.
+     * The maximum number of package URIs is 100.
+     * 
+ * + * repeated string package_uris = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The packageUris to add. + * @return This builder for chaining. + */ + public Builder addPackageUris(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePackageUrisIsMutable(); + packageUris_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Google Cloud Storage location of the Python package files which are
+     * the training program and its dependent packages.
+     * The maximum number of package URIs is 100.
+     * 
+ * + * repeated string package_uris = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param values The packageUris to add. + * @return This builder for chaining. + */ + public Builder addAllPackageUris(java.lang.Iterable values) { + ensurePackageUrisIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, packageUris_); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Google Cloud Storage location of the Python package files which are
+     * the training program and its dependent packages.
+     * The maximum number of package URIs is 100.
+     * 
+ * + * repeated string package_uris = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearPackageUris() { + packageUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Google Cloud Storage location of the Python package files which are
+     * the training program and its dependent packages.
+     * The maximum number of package URIs is 100.
+     * 
+ * + * repeated string package_uris = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes of the packageUris to add. + * @return This builder for chaining. + */ + public Builder addPackageUrisBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensurePackageUrisIsMutable(); + packageUris_.add(value); + onChanged(); + return this; + } + + private java.lang.Object pythonModule_ = ""; + /** + * + * + *
+     * Required. The Python module name to run after installing the packages.
+     * 
+ * + * string python_module = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The pythonModule. + */ + public java.lang.String getPythonModule() { + java.lang.Object ref = pythonModule_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pythonModule_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The Python module name to run after installing the packages.
+     * 
+ * + * string python_module = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for pythonModule. + */ + public com.google.protobuf.ByteString getPythonModuleBytes() { + java.lang.Object ref = pythonModule_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pythonModule_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The Python module name to run after installing the packages.
+     * 
+ * + * string python_module = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The pythonModule to set. + * @return This builder for chaining. + */ + public Builder setPythonModule(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pythonModule_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Python module name to run after installing the packages.
+     * 
+ * + * string python_module = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearPythonModule() { + + pythonModule_ = getDefaultInstance().getPythonModule(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Python module name to run after installing the packages.
+     * 
+ * + * string python_module = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for pythonModule to set. + * @return This builder for chaining. + */ + public Builder setPythonModuleBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pythonModule_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList args_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureArgsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + args_ = new com.google.protobuf.LazyStringArrayList(args_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+     * Command line arguments to be passed to the Python task.
+     * 
+ * + * repeated string args = 4; + * + * @return A list containing the args. + */ + public com.google.protobuf.ProtocolStringList getArgsList() { + return args_.getUnmodifiableView(); + } + /** + * + * + *
+     * Command line arguments to be passed to the Python task.
+     * 
+ * + * repeated string args = 4; + * + * @return The count of args. + */ + public int getArgsCount() { + return args_.size(); + } + /** + * + * + *
+     * Command line arguments to be passed to the Python task.
+     * 
+ * + * repeated string args = 4; + * + * @param index The index of the element to return. + * @return The args at the given index. + */ + public java.lang.String getArgs(int index) { + return args_.get(index); + } + /** + * + * + *
+     * Command line arguments to be passed to the Python task.
+     * 
+ * + * repeated string args = 4; + * + * @param index The index of the value to return. + * @return The bytes of the args at the given index. + */ + public com.google.protobuf.ByteString getArgsBytes(int index) { + return args_.getByteString(index); + } + /** + * + * + *
+     * Command line arguments to be passed to the Python task.
+     * 
+ * + * repeated string args = 4; + * + * @param index The index to set the value at. + * @param value The args to set. + * @return This builder for chaining. + */ + public Builder setArgs(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureArgsIsMutable(); + args_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Command line arguments to be passed to the Python task.
+     * 
+ * + * repeated string args = 4; + * + * @param value The args to add. + * @return This builder for chaining. + */ + public Builder addArgs(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureArgsIsMutable(); + args_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Command line arguments to be passed to the Python task.
+     * 
+ * + * repeated string args = 4; + * + * @param values The args to add. + * @return This builder for chaining. + */ + public Builder addAllArgs(java.lang.Iterable values) { + ensureArgsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, args_); + onChanged(); + return this; + } + /** + * + * + *
+     * Command line arguments to be passed to the Python task.
+     * 
+ * + * repeated string args = 4; + * + * @return This builder for chaining. + */ + public Builder clearArgs() { + args_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Command line arguments to be passed to the Python task.
+     * 
+ * + * repeated string args = 4; + * + * @param value The bytes of the args to add. + * @return This builder for chaining. + */ + public Builder addArgsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureArgsIsMutable(); + args_.add(value); + onChanged(); + return this; + } + + private java.util.List env_ = + java.util.Collections.emptyList(); + + private void ensureEnvIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + env_ = new java.util.ArrayList(env_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.EnvVar, + com.google.cloud.aiplatform.v1.EnvVar.Builder, + com.google.cloud.aiplatform.v1.EnvVarOrBuilder> + envBuilder_; + + /** + * + * + *
+     * Environment variables to be passed to the python module.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 5; + */ + public java.util.List getEnvList() { + if (envBuilder_ == null) { + return java.util.Collections.unmodifiableList(env_); + } else { + return envBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Environment variables to be passed to the python module.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 5; + */ + public int getEnvCount() { + if (envBuilder_ == null) { + return env_.size(); + } else { + return envBuilder_.getCount(); + } + } + /** + * + * + *
+     * Environment variables to be passed to the python module.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 5; + */ + public com.google.cloud.aiplatform.v1.EnvVar getEnv(int index) { + if (envBuilder_ == null) { + return env_.get(index); + } else { + return envBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Environment variables to be passed to the python module.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 5; + */ + public Builder setEnv(int index, com.google.cloud.aiplatform.v1.EnvVar value) { + if (envBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEnvIsMutable(); + env_.set(index, value); + onChanged(); + } else { + envBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Environment variables to be passed to the python module.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 5; + */ + public Builder setEnv( + int index, com.google.cloud.aiplatform.v1.EnvVar.Builder builderForValue) { + if (envBuilder_ == null) { + ensureEnvIsMutable(); + env_.set(index, builderForValue.build()); + onChanged(); + } else { + envBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Environment variables to be passed to the python module.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 5; + */ + public Builder addEnv(com.google.cloud.aiplatform.v1.EnvVar value) { + if (envBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEnvIsMutable(); + env_.add(value); + onChanged(); + } else { + envBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Environment variables to be passed to the python module.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 5; + */ + public Builder addEnv(int index, com.google.cloud.aiplatform.v1.EnvVar value) { + if (envBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEnvIsMutable(); + env_.add(index, value); + onChanged(); + } else { + envBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Environment variables to be passed to the python module.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 5; + */ + public Builder addEnv(com.google.cloud.aiplatform.v1.EnvVar.Builder builderForValue) { + if (envBuilder_ == null) { + ensureEnvIsMutable(); + env_.add(builderForValue.build()); + onChanged(); + } else { + envBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Environment variables to be passed to the python module.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 5; + */ + public Builder addEnv( + int index, com.google.cloud.aiplatform.v1.EnvVar.Builder builderForValue) { + if (envBuilder_ == null) { + ensureEnvIsMutable(); + env_.add(index, builderForValue.build()); + onChanged(); + } else { + envBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Environment variables to be passed to the python module.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 5; + */ + public Builder addAllEnv( + java.lang.Iterable values) { + if (envBuilder_ == null) { + ensureEnvIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, env_); + onChanged(); + } else { + envBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Environment variables to be passed to the python module.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 5; + */ + public Builder clearEnv() { + if (envBuilder_ == null) { + env_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + envBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Environment variables to be passed to the python module.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 5; + */ + public Builder removeEnv(int index) { + if (envBuilder_ == null) { + ensureEnvIsMutable(); + env_.remove(index); + onChanged(); + } else { + envBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Environment variables to be passed to the python module.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 5; + */ + public com.google.cloud.aiplatform.v1.EnvVar.Builder getEnvBuilder(int index) { + return getEnvFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Environment variables to be passed to the python module.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 5; + */ + public com.google.cloud.aiplatform.v1.EnvVarOrBuilder getEnvOrBuilder(int index) { + if (envBuilder_ == null) { + return env_.get(index); + } else { + return envBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Environment variables to be passed to the python module.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 5; + */ + public java.util.List + getEnvOrBuilderList() { + if (envBuilder_ != null) { + return envBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(env_); + } + } + /** + * + * + *
+     * Environment variables to be passed to the python module.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 5; + */ + public com.google.cloud.aiplatform.v1.EnvVar.Builder addEnvBuilder() { + return getEnvFieldBuilder() + .addBuilder(com.google.cloud.aiplatform.v1.EnvVar.getDefaultInstance()); + } + /** + * + * + *
+     * Environment variables to be passed to the python module.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 5; + */ + public com.google.cloud.aiplatform.v1.EnvVar.Builder addEnvBuilder(int index) { + return getEnvFieldBuilder() + .addBuilder(index, com.google.cloud.aiplatform.v1.EnvVar.getDefaultInstance()); + } + /** + * + * + *
+     * Environment variables to be passed to the python module.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 5; + */ + public java.util.List getEnvBuilderList() { + return getEnvFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.EnvVar, + com.google.cloud.aiplatform.v1.EnvVar.Builder, + com.google.cloud.aiplatform.v1.EnvVarOrBuilder> + getEnvFieldBuilder() { + if (envBuilder_ == null) { + envBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.EnvVar, + com.google.cloud.aiplatform.v1.EnvVar.Builder, + com.google.cloud.aiplatform.v1.EnvVarOrBuilder>( + env_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + env_ = null; + } + return envBuilder_; + } + + @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.v1.PythonPackageSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.PythonPackageSpec) + private static final com.google.cloud.aiplatform.v1.PythonPackageSpec DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.PythonPackageSpec(); + } + + public static com.google.cloud.aiplatform.v1.PythonPackageSpec getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PythonPackageSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PythonPackageSpec(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.v1.PythonPackageSpec getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PythonPackageSpecOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PythonPackageSpecOrBuilder.java new file mode 100644 index 000000000..e06a88b36 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PythonPackageSpecOrBuilder.java @@ -0,0 +1,242 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/custom_job.proto + +package com.google.cloud.aiplatform.v1; + +public interface PythonPackageSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.PythonPackageSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The URI of a container image in the Container Registry that will run the
+   * provided python package. AI Platform provides wide range of executor images
+   * with pre-installed packages to meet users' various use cases. Only one of
+   * the provided images can be set here.
+   * 
+ * + * string executor_image_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The executorImageUri. + */ + java.lang.String getExecutorImageUri(); + /** + * + * + *
+   * Required. The URI of a container image in the Container Registry that will run the
+   * provided python package. AI Platform provides wide range of executor images
+   * with pre-installed packages to meet users' various use cases. Only one of
+   * the provided images can be set here.
+   * 
+ * + * string executor_image_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for executorImageUri. + */ + com.google.protobuf.ByteString getExecutorImageUriBytes(); + + /** + * + * + *
+   * Required. The Google Cloud Storage location of the Python package files which are
+   * the training program and its dependent packages.
+   * The maximum number of package URIs is 100.
+   * 
+ * + * repeated string package_uris = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the packageUris. + */ + java.util.List getPackageUrisList(); + /** + * + * + *
+   * Required. The Google Cloud Storage location of the Python package files which are
+   * the training program and its dependent packages.
+   * The maximum number of package URIs is 100.
+   * 
+ * + * repeated string package_uris = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of packageUris. + */ + int getPackageUrisCount(); + /** + * + * + *
+   * Required. The Google Cloud Storage location of the Python package files which are
+   * the training program and its dependent packages.
+   * The maximum number of package URIs is 100.
+   * 
+ * + * repeated string package_uris = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The packageUris at the given index. + */ + java.lang.String getPackageUris(int index); + /** + * + * + *
+   * Required. The Google Cloud Storage location of the Python package files which are
+   * the training program and its dependent packages.
+   * The maximum number of package URIs is 100.
+   * 
+ * + * repeated string package_uris = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the packageUris at the given index. + */ + com.google.protobuf.ByteString getPackageUrisBytes(int index); + + /** + * + * + *
+   * Required. The Python module name to run after installing the packages.
+   * 
+ * + * string python_module = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The pythonModule. + */ + java.lang.String getPythonModule(); + /** + * + * + *
+   * Required. The Python module name to run after installing the packages.
+   * 
+ * + * string python_module = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for pythonModule. + */ + com.google.protobuf.ByteString getPythonModuleBytes(); + + /** + * + * + *
+   * Command line arguments to be passed to the Python task.
+   * 
+ * + * repeated string args = 4; + * + * @return A list containing the args. + */ + java.util.List getArgsList(); + /** + * + * + *
+   * Command line arguments to be passed to the Python task.
+   * 
+ * + * repeated string args = 4; + * + * @return The count of args. + */ + int getArgsCount(); + /** + * + * + *
+   * Command line arguments to be passed to the Python task.
+   * 
+ * + * repeated string args = 4; + * + * @param index The index of the element to return. + * @return The args at the given index. + */ + java.lang.String getArgs(int index); + /** + * + * + *
+   * Command line arguments to be passed to the Python task.
+   * 
+ * + * repeated string args = 4; + * + * @param index The index of the value to return. + * @return The bytes of the args at the given index. + */ + com.google.protobuf.ByteString getArgsBytes(int index); + + /** + * + * + *
+   * Environment variables to be passed to the python module.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 5; + */ + java.util.List getEnvList(); + /** + * + * + *
+   * Environment variables to be passed to the python module.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 5; + */ + com.google.cloud.aiplatform.v1.EnvVar getEnv(int index); + /** + * + * + *
+   * Environment variables to be passed to the python module.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 5; + */ + int getEnvCount(); + /** + * + * + *
+   * Environment variables to be passed to the python module.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 5; + */ + java.util.List getEnvOrBuilderList(); + /** + * + * + *
+   * Environment variables to be passed to the python module.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.EnvVar env = 5; + */ + com.google.cloud.aiplatform.v1.EnvVarOrBuilder getEnvOrBuilder(int index); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ResourcesConsumed.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ResourcesConsumed.java new file mode 100644 index 000000000..992288340 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ResourcesConsumed.java @@ -0,0 +1,557 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/machine_resources.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Statistics information about resource consumption.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ResourcesConsumed} + */ +public final class ResourcesConsumed extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ResourcesConsumed) + ResourcesConsumedOrBuilder { + private static final long serialVersionUID = 0L; + // Use ResourcesConsumed.newBuilder() to construct. + private ResourcesConsumed(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ResourcesConsumed() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ResourcesConsumed(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ResourcesConsumed( + 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 9: + { + replicaHours_ = input.readDouble(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.MachineResourcesProto + .internal_static_google_cloud_aiplatform_v1_ResourcesConsumed_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.MachineResourcesProto + .internal_static_google_cloud_aiplatform_v1_ResourcesConsumed_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ResourcesConsumed.class, + com.google.cloud.aiplatform.v1.ResourcesConsumed.Builder.class); + } + + public static final int REPLICA_HOURS_FIELD_NUMBER = 1; + private double replicaHours_; + /** + * + * + *
+   * Output only. The number of replica hours used. Note that many replicas may run in
+   * parallel, and additionally any given work may be queued for some time.
+   * Therefore this value is not strictly related to wall time.
+   * 
+ * + * double replica_hours = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The replicaHours. + */ + @java.lang.Override + public double getReplicaHours() { + return replicaHours_; + } + + 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 (replicaHours_ != 0D) { + output.writeDouble(1, replicaHours_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (replicaHours_ != 0D) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(1, replicaHours_); + } + 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.v1.ResourcesConsumed)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ResourcesConsumed other = + (com.google.cloud.aiplatform.v1.ResourcesConsumed) obj; + + if (java.lang.Double.doubleToLongBits(getReplicaHours()) + != java.lang.Double.doubleToLongBits(other.getReplicaHours())) 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) + REPLICA_HOURS_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getReplicaHours())); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.ResourcesConsumed parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ResourcesConsumed 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.v1.ResourcesConsumed parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ResourcesConsumed 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.v1.ResourcesConsumed parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ResourcesConsumed parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.ResourcesConsumed parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ResourcesConsumed 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.v1.ResourcesConsumed parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ResourcesConsumed 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.v1.ResourcesConsumed parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ResourcesConsumed 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.v1.ResourcesConsumed 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; + } + /** + * + * + *
+   * Statistics information about resource consumption.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ResourcesConsumed} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ResourcesConsumed) + com.google.cloud.aiplatform.v1.ResourcesConsumedOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.MachineResourcesProto + .internal_static_google_cloud_aiplatform_v1_ResourcesConsumed_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.MachineResourcesProto + .internal_static_google_cloud_aiplatform_v1_ResourcesConsumed_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ResourcesConsumed.class, + com.google.cloud.aiplatform.v1.ResourcesConsumed.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ResourcesConsumed.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(); + replicaHours_ = 0D; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.MachineResourcesProto + .internal_static_google_cloud_aiplatform_v1_ResourcesConsumed_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ResourcesConsumed getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ResourcesConsumed.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ResourcesConsumed build() { + com.google.cloud.aiplatform.v1.ResourcesConsumed result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ResourcesConsumed buildPartial() { + com.google.cloud.aiplatform.v1.ResourcesConsumed result = + new com.google.cloud.aiplatform.v1.ResourcesConsumed(this); + result.replicaHours_ = replicaHours_; + 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.v1.ResourcesConsumed) { + return mergeFrom((com.google.cloud.aiplatform.v1.ResourcesConsumed) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.ResourcesConsumed other) { + if (other == com.google.cloud.aiplatform.v1.ResourcesConsumed.getDefaultInstance()) + return this; + if (other.getReplicaHours() != 0D) { + setReplicaHours(other.getReplicaHours()); + } + 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.v1.ResourcesConsumed parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.aiplatform.v1.ResourcesConsumed) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private double replicaHours_; + /** + * + * + *
+     * Output only. The number of replica hours used. Note that many replicas may run in
+     * parallel, and additionally any given work may be queued for some time.
+     * Therefore this value is not strictly related to wall time.
+     * 
+ * + * double replica_hours = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The replicaHours. + */ + @java.lang.Override + public double getReplicaHours() { + return replicaHours_; + } + /** + * + * + *
+     * Output only. The number of replica hours used. Note that many replicas may run in
+     * parallel, and additionally any given work may be queued for some time.
+     * Therefore this value is not strictly related to wall time.
+     * 
+ * + * double replica_hours = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The replicaHours to set. + * @return This builder for chaining. + */ + public Builder setReplicaHours(double value) { + + replicaHours_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The number of replica hours used. Note that many replicas may run in
+     * parallel, and additionally any given work may be queued for some time.
+     * Therefore this value is not strictly related to wall time.
+     * 
+ * + * double replica_hours = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearReplicaHours() { + + replicaHours_ = 0D; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.ResourcesConsumed) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ResourcesConsumed) + private static final com.google.cloud.aiplatform.v1.ResourcesConsumed DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ResourcesConsumed(); + } + + public static com.google.cloud.aiplatform.v1.ResourcesConsumed getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ResourcesConsumed parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ResourcesConsumed(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.v1.ResourcesConsumed getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ResourcesConsumedOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ResourcesConsumedOrBuilder.java new file mode 100644 index 000000000..c740155a5 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ResourcesConsumedOrBuilder.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/v1/machine_resources.proto + +package com.google.cloud.aiplatform.v1; + +public interface ResourcesConsumedOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ResourcesConsumed) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The number of replica hours used. Note that many replicas may run in
+   * parallel, and additionally any given work may be queued for some time.
+   * Therefore this value is not strictly related to wall time.
+   * 
+ * + * double replica_hours = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The replicaHours. + */ + double getReplicaHours(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SampleConfig.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SampleConfig.java new file mode 100644 index 000000000..866fbdf35 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SampleConfig.java @@ -0,0 +1,1127 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/data_labeling_job.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Active learning data sampling config. For every active learning labeling
+ * iteration, it will select a batch of data based on the sampling strategy.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.SampleConfig} + */ +public final class SampleConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.SampleConfig) + SampleConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use SampleConfig.newBuilder() to construct. + private SampleConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SampleConfig() { + sampleStrategy_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SampleConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private SampleConfig( + 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: + { + initialBatchSampleSizeCase_ = 1; + initialBatchSampleSize_ = input.readInt32(); + break; + } + case 24: + { + followingBatchSampleSizeCase_ = 3; + followingBatchSampleSize_ = input.readInt32(); + break; + } + case 40: + { + int rawValue = input.readEnum(); + + sampleStrategy_ = 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.v1.DataLabelingJobProto + .internal_static_google_cloud_aiplatform_v1_SampleConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.DataLabelingJobProto + .internal_static_google_cloud_aiplatform_v1_SampleConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.SampleConfig.class, + com.google.cloud.aiplatform.v1.SampleConfig.Builder.class); + } + + /** + * + * + *
+   * Sample strategy decides which subset of DataItems should be selected for
+   * human labeling in every batch.
+   * 
+ * + * Protobuf enum {@code google.cloud.aiplatform.v1.SampleConfig.SampleStrategy} + */ + public enum SampleStrategy implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Default will be treated as UNCERTAINTY.
+     * 
+ * + * SAMPLE_STRATEGY_UNSPECIFIED = 0; + */ + SAMPLE_STRATEGY_UNSPECIFIED(0), + /** + * + * + *
+     * Sample the most uncertain data to label.
+     * 
+ * + * UNCERTAINTY = 1; + */ + UNCERTAINTY(1), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Default will be treated as UNCERTAINTY.
+     * 
+ * + * SAMPLE_STRATEGY_UNSPECIFIED = 0; + */ + public static final int SAMPLE_STRATEGY_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Sample the most uncertain data to label.
+     * 
+ * + * UNCERTAINTY = 1; + */ + public static final int UNCERTAINTY_VALUE = 1; + + 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 SampleStrategy 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 SampleStrategy forNumber(int value) { + switch (value) { + case 0: + return SAMPLE_STRATEGY_UNSPECIFIED; + case 1: + return UNCERTAINTY; + 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 SampleStrategy findValueByNumber(int number) { + return SampleStrategy.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.v1.SampleConfig.getDescriptor().getEnumTypes().get(0); + } + + private static final SampleStrategy[] VALUES = values(); + + public static SampleStrategy 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 SampleStrategy(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.aiplatform.v1.SampleConfig.SampleStrategy) + } + + private int initialBatchSampleSizeCase_ = 0; + private java.lang.Object initialBatchSampleSize_; + + public enum InitialBatchSampleSizeCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + INITIAL_BATCH_SAMPLE_PERCENTAGE(1), + INITIALBATCHSAMPLESIZE_NOT_SET(0); + private final int value; + + private InitialBatchSampleSizeCase(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 InitialBatchSampleSizeCase valueOf(int value) { + return forNumber(value); + } + + public static InitialBatchSampleSizeCase forNumber(int value) { + switch (value) { + case 1: + return INITIAL_BATCH_SAMPLE_PERCENTAGE; + case 0: + return INITIALBATCHSAMPLESIZE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public InitialBatchSampleSizeCase getInitialBatchSampleSizeCase() { + return InitialBatchSampleSizeCase.forNumber(initialBatchSampleSizeCase_); + } + + private int followingBatchSampleSizeCase_ = 0; + private java.lang.Object followingBatchSampleSize_; + + public enum FollowingBatchSampleSizeCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + FOLLOWING_BATCH_SAMPLE_PERCENTAGE(3), + FOLLOWINGBATCHSAMPLESIZE_NOT_SET(0); + private final int value; + + private FollowingBatchSampleSizeCase(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 FollowingBatchSampleSizeCase valueOf(int value) { + return forNumber(value); + } + + public static FollowingBatchSampleSizeCase forNumber(int value) { + switch (value) { + case 3: + return FOLLOWING_BATCH_SAMPLE_PERCENTAGE; + case 0: + return FOLLOWINGBATCHSAMPLESIZE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public FollowingBatchSampleSizeCase getFollowingBatchSampleSizeCase() { + return FollowingBatchSampleSizeCase.forNumber(followingBatchSampleSizeCase_); + } + + public static final int INITIAL_BATCH_SAMPLE_PERCENTAGE_FIELD_NUMBER = 1; + /** + * + * + *
+   * The percentage of data needed to be labeled in the first batch.
+   * 
+ * + * int32 initial_batch_sample_percentage = 1; + * + * @return The initialBatchSamplePercentage. + */ + @java.lang.Override + public int getInitialBatchSamplePercentage() { + if (initialBatchSampleSizeCase_ == 1) { + return (java.lang.Integer) initialBatchSampleSize_; + } + return 0; + } + + public static final int FOLLOWING_BATCH_SAMPLE_PERCENTAGE_FIELD_NUMBER = 3; + /** + * + * + *
+   * The percentage of data needed to be labeled in each following batch
+   * (except the first batch).
+   * 
+ * + * int32 following_batch_sample_percentage = 3; + * + * @return The followingBatchSamplePercentage. + */ + @java.lang.Override + public int getFollowingBatchSamplePercentage() { + if (followingBatchSampleSizeCase_ == 3) { + return (java.lang.Integer) followingBatchSampleSize_; + } + return 0; + } + + public static final int SAMPLE_STRATEGY_FIELD_NUMBER = 5; + private int sampleStrategy_; + /** + * + * + *
+   * Field to choose sampling strategy. Sampling strategy will decide which data
+   * should be selected for human labeling in every batch.
+   * 
+ * + * .google.cloud.aiplatform.v1.SampleConfig.SampleStrategy sample_strategy = 5; + * + * @return The enum numeric value on the wire for sampleStrategy. + */ + @java.lang.Override + public int getSampleStrategyValue() { + return sampleStrategy_; + } + /** + * + * + *
+   * Field to choose sampling strategy. Sampling strategy will decide which data
+   * should be selected for human labeling in every batch.
+   * 
+ * + * .google.cloud.aiplatform.v1.SampleConfig.SampleStrategy sample_strategy = 5; + * + * @return The sampleStrategy. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.SampleConfig.SampleStrategy getSampleStrategy() { + @SuppressWarnings("deprecation") + com.google.cloud.aiplatform.v1.SampleConfig.SampleStrategy result = + com.google.cloud.aiplatform.v1.SampleConfig.SampleStrategy.valueOf(sampleStrategy_); + return result == null + ? com.google.cloud.aiplatform.v1.SampleConfig.SampleStrategy.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 (initialBatchSampleSizeCase_ == 1) { + output.writeInt32(1, (int) ((java.lang.Integer) initialBatchSampleSize_)); + } + if (followingBatchSampleSizeCase_ == 3) { + output.writeInt32(3, (int) ((java.lang.Integer) followingBatchSampleSize_)); + } + if (sampleStrategy_ + != com.google.cloud.aiplatform.v1.SampleConfig.SampleStrategy.SAMPLE_STRATEGY_UNSPECIFIED + .getNumber()) { + output.writeEnum(5, sampleStrategy_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (initialBatchSampleSizeCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeInt32Size( + 1, (int) ((java.lang.Integer) initialBatchSampleSize_)); + } + if (followingBatchSampleSizeCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeInt32Size( + 3, (int) ((java.lang.Integer) followingBatchSampleSize_)); + } + if (sampleStrategy_ + != com.google.cloud.aiplatform.v1.SampleConfig.SampleStrategy.SAMPLE_STRATEGY_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, sampleStrategy_); + } + 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.v1.SampleConfig)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.SampleConfig other = + (com.google.cloud.aiplatform.v1.SampleConfig) obj; + + if (sampleStrategy_ != other.sampleStrategy_) return false; + if (!getInitialBatchSampleSizeCase().equals(other.getInitialBatchSampleSizeCase())) + return false; + switch (initialBatchSampleSizeCase_) { + case 1: + if (getInitialBatchSamplePercentage() != other.getInitialBatchSamplePercentage()) + return false; + break; + case 0: + default: + } + if (!getFollowingBatchSampleSizeCase().equals(other.getFollowingBatchSampleSizeCase())) + return false; + switch (followingBatchSampleSizeCase_) { + case 3: + if (getFollowingBatchSamplePercentage() != other.getFollowingBatchSamplePercentage()) + 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) + SAMPLE_STRATEGY_FIELD_NUMBER; + hash = (53 * hash) + sampleStrategy_; + switch (initialBatchSampleSizeCase_) { + case 1: + hash = (37 * hash) + INITIAL_BATCH_SAMPLE_PERCENTAGE_FIELD_NUMBER; + hash = (53 * hash) + getInitialBatchSamplePercentage(); + break; + case 0: + default: + } + switch (followingBatchSampleSizeCase_) { + case 3: + hash = (37 * hash) + FOLLOWING_BATCH_SAMPLE_PERCENTAGE_FIELD_NUMBER; + hash = (53 * hash) + getFollowingBatchSamplePercentage(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.SampleConfig parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.SampleConfig 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.v1.SampleConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.SampleConfig 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.v1.SampleConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.SampleConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.SampleConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.SampleConfig 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.v1.SampleConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.SampleConfig 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.v1.SampleConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.SampleConfig 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.v1.SampleConfig 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; + } + /** + * + * + *
+   * Active learning data sampling config. For every active learning labeling
+   * iteration, it will select a batch of data based on the sampling strategy.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.SampleConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.SampleConfig) + com.google.cloud.aiplatform.v1.SampleConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.DataLabelingJobProto + .internal_static_google_cloud_aiplatform_v1_SampleConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.DataLabelingJobProto + .internal_static_google_cloud_aiplatform_v1_SampleConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.SampleConfig.class, + com.google.cloud.aiplatform.v1.SampleConfig.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.SampleConfig.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(); + sampleStrategy_ = 0; + + initialBatchSampleSizeCase_ = 0; + initialBatchSampleSize_ = null; + followingBatchSampleSizeCase_ = 0; + followingBatchSampleSize_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.DataLabelingJobProto + .internal_static_google_cloud_aiplatform_v1_SampleConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.SampleConfig getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.SampleConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.SampleConfig build() { + com.google.cloud.aiplatform.v1.SampleConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.SampleConfig buildPartial() { + com.google.cloud.aiplatform.v1.SampleConfig result = + new com.google.cloud.aiplatform.v1.SampleConfig(this); + if (initialBatchSampleSizeCase_ == 1) { + result.initialBatchSampleSize_ = initialBatchSampleSize_; + } + if (followingBatchSampleSizeCase_ == 3) { + result.followingBatchSampleSize_ = followingBatchSampleSize_; + } + result.sampleStrategy_ = sampleStrategy_; + result.initialBatchSampleSizeCase_ = initialBatchSampleSizeCase_; + result.followingBatchSampleSizeCase_ = followingBatchSampleSizeCase_; + 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.v1.SampleConfig) { + return mergeFrom((com.google.cloud.aiplatform.v1.SampleConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.SampleConfig other) { + if (other == com.google.cloud.aiplatform.v1.SampleConfig.getDefaultInstance()) return this; + if (other.sampleStrategy_ != 0) { + setSampleStrategyValue(other.getSampleStrategyValue()); + } + switch (other.getInitialBatchSampleSizeCase()) { + case INITIAL_BATCH_SAMPLE_PERCENTAGE: + { + setInitialBatchSamplePercentage(other.getInitialBatchSamplePercentage()); + break; + } + case INITIALBATCHSAMPLESIZE_NOT_SET: + { + break; + } + } + switch (other.getFollowingBatchSampleSizeCase()) { + case FOLLOWING_BATCH_SAMPLE_PERCENTAGE: + { + setFollowingBatchSamplePercentage(other.getFollowingBatchSamplePercentage()); + break; + } + case FOLLOWINGBATCHSAMPLESIZE_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.v1.SampleConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.aiplatform.v1.SampleConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int initialBatchSampleSizeCase_ = 0; + private java.lang.Object initialBatchSampleSize_; + + public InitialBatchSampleSizeCase getInitialBatchSampleSizeCase() { + return InitialBatchSampleSizeCase.forNumber(initialBatchSampleSizeCase_); + } + + public Builder clearInitialBatchSampleSize() { + initialBatchSampleSizeCase_ = 0; + initialBatchSampleSize_ = null; + onChanged(); + return this; + } + + private int followingBatchSampleSizeCase_ = 0; + private java.lang.Object followingBatchSampleSize_; + + public FollowingBatchSampleSizeCase getFollowingBatchSampleSizeCase() { + return FollowingBatchSampleSizeCase.forNumber(followingBatchSampleSizeCase_); + } + + public Builder clearFollowingBatchSampleSize() { + followingBatchSampleSizeCase_ = 0; + followingBatchSampleSize_ = null; + onChanged(); + return this; + } + + /** + * + * + *
+     * The percentage of data needed to be labeled in the first batch.
+     * 
+ * + * int32 initial_batch_sample_percentage = 1; + * + * @return The initialBatchSamplePercentage. + */ + public int getInitialBatchSamplePercentage() { + if (initialBatchSampleSizeCase_ == 1) { + return (java.lang.Integer) initialBatchSampleSize_; + } + return 0; + } + /** + * + * + *
+     * The percentage of data needed to be labeled in the first batch.
+     * 
+ * + * int32 initial_batch_sample_percentage = 1; + * + * @param value The initialBatchSamplePercentage to set. + * @return This builder for chaining. + */ + public Builder setInitialBatchSamplePercentage(int value) { + initialBatchSampleSizeCase_ = 1; + initialBatchSampleSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The percentage of data needed to be labeled in the first batch.
+     * 
+ * + * int32 initial_batch_sample_percentage = 1; + * + * @return This builder for chaining. + */ + public Builder clearInitialBatchSamplePercentage() { + if (initialBatchSampleSizeCase_ == 1) { + initialBatchSampleSizeCase_ = 0; + initialBatchSampleSize_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * The percentage of data needed to be labeled in each following batch
+     * (except the first batch).
+     * 
+ * + * int32 following_batch_sample_percentage = 3; + * + * @return The followingBatchSamplePercentage. + */ + public int getFollowingBatchSamplePercentage() { + if (followingBatchSampleSizeCase_ == 3) { + return (java.lang.Integer) followingBatchSampleSize_; + } + return 0; + } + /** + * + * + *
+     * The percentage of data needed to be labeled in each following batch
+     * (except the first batch).
+     * 
+ * + * int32 following_batch_sample_percentage = 3; + * + * @param value The followingBatchSamplePercentage to set. + * @return This builder for chaining. + */ + public Builder setFollowingBatchSamplePercentage(int value) { + followingBatchSampleSizeCase_ = 3; + followingBatchSampleSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The percentage of data needed to be labeled in each following batch
+     * (except the first batch).
+     * 
+ * + * int32 following_batch_sample_percentage = 3; + * + * @return This builder for chaining. + */ + public Builder clearFollowingBatchSamplePercentage() { + if (followingBatchSampleSizeCase_ == 3) { + followingBatchSampleSizeCase_ = 0; + followingBatchSampleSize_ = null; + onChanged(); + } + return this; + } + + private int sampleStrategy_ = 0; + /** + * + * + *
+     * Field to choose sampling strategy. Sampling strategy will decide which data
+     * should be selected for human labeling in every batch.
+     * 
+ * + * .google.cloud.aiplatform.v1.SampleConfig.SampleStrategy sample_strategy = 5; + * + * @return The enum numeric value on the wire for sampleStrategy. + */ + @java.lang.Override + public int getSampleStrategyValue() { + return sampleStrategy_; + } + /** + * + * + *
+     * Field to choose sampling strategy. Sampling strategy will decide which data
+     * should be selected for human labeling in every batch.
+     * 
+ * + * .google.cloud.aiplatform.v1.SampleConfig.SampleStrategy sample_strategy = 5; + * + * @param value The enum numeric value on the wire for sampleStrategy to set. + * @return This builder for chaining. + */ + public Builder setSampleStrategyValue(int value) { + + sampleStrategy_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Field to choose sampling strategy. Sampling strategy will decide which data
+     * should be selected for human labeling in every batch.
+     * 
+ * + * .google.cloud.aiplatform.v1.SampleConfig.SampleStrategy sample_strategy = 5; + * + * @return The sampleStrategy. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.SampleConfig.SampleStrategy getSampleStrategy() { + @SuppressWarnings("deprecation") + com.google.cloud.aiplatform.v1.SampleConfig.SampleStrategy result = + com.google.cloud.aiplatform.v1.SampleConfig.SampleStrategy.valueOf(sampleStrategy_); + return result == null + ? com.google.cloud.aiplatform.v1.SampleConfig.SampleStrategy.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Field to choose sampling strategy. Sampling strategy will decide which data
+     * should be selected for human labeling in every batch.
+     * 
+ * + * .google.cloud.aiplatform.v1.SampleConfig.SampleStrategy sample_strategy = 5; + * + * @param value The sampleStrategy to set. + * @return This builder for chaining. + */ + public Builder setSampleStrategy( + com.google.cloud.aiplatform.v1.SampleConfig.SampleStrategy value) { + if (value == null) { + throw new NullPointerException(); + } + + sampleStrategy_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Field to choose sampling strategy. Sampling strategy will decide which data
+     * should be selected for human labeling in every batch.
+     * 
+ * + * .google.cloud.aiplatform.v1.SampleConfig.SampleStrategy sample_strategy = 5; + * + * @return This builder for chaining. + */ + public Builder clearSampleStrategy() { + + sampleStrategy_ = 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.v1.SampleConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.SampleConfig) + private static final com.google.cloud.aiplatform.v1.SampleConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.SampleConfig(); + } + + public static com.google.cloud.aiplatform.v1.SampleConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SampleConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SampleConfig(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.v1.SampleConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SampleConfigOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SampleConfigOrBuilder.java new file mode 100644 index 000000000..7492c4a20 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SampleConfigOrBuilder.java @@ -0,0 +1,85 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/data_labeling_job.proto + +package com.google.cloud.aiplatform.v1; + +public interface SampleConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.SampleConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The percentage of data needed to be labeled in the first batch.
+   * 
+ * + * int32 initial_batch_sample_percentage = 1; + * + * @return The initialBatchSamplePercentage. + */ + int getInitialBatchSamplePercentage(); + + /** + * + * + *
+   * The percentage of data needed to be labeled in each following batch
+   * (except the first batch).
+   * 
+ * + * int32 following_batch_sample_percentage = 3; + * + * @return The followingBatchSamplePercentage. + */ + int getFollowingBatchSamplePercentage(); + + /** + * + * + *
+   * Field to choose sampling strategy. Sampling strategy will decide which data
+   * should be selected for human labeling in every batch.
+   * 
+ * + * .google.cloud.aiplatform.v1.SampleConfig.SampleStrategy sample_strategy = 5; + * + * @return The enum numeric value on the wire for sampleStrategy. + */ + int getSampleStrategyValue(); + /** + * + * + *
+   * Field to choose sampling strategy. Sampling strategy will decide which data
+   * should be selected for human labeling in every batch.
+   * 
+ * + * .google.cloud.aiplatform.v1.SampleConfig.SampleStrategy sample_strategy = 5; + * + * @return The sampleStrategy. + */ + com.google.cloud.aiplatform.v1.SampleConfig.SampleStrategy getSampleStrategy(); + + public com.google.cloud.aiplatform.v1.SampleConfig.InitialBatchSampleSizeCase + getInitialBatchSampleSizeCase(); + + public com.google.cloud.aiplatform.v1.SampleConfig.FollowingBatchSampleSizeCase + getFollowingBatchSampleSizeCase(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/Scheduling.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/Scheduling.java new file mode 100644 index 000000000..18a2d6c91 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/Scheduling.java @@ -0,0 +1,820 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/custom_job.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * All parameters related to queuing and scheduling of custom jobs.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.Scheduling} + */ +public final class Scheduling extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.Scheduling) + SchedulingOrBuilder { + private static final long serialVersionUID = 0L; + // Use Scheduling.newBuilder() to construct. + private Scheduling(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Scheduling() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Scheduling(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Scheduling( + 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 (timeout_ != null) { + subBuilder = timeout_.toBuilder(); + } + timeout_ = + input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(timeout_); + timeout_ = subBuilder.buildPartial(); + } + + break; + } + case 24: + { + restartJobOnWorkerRestart_ = 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.v1.CustomJobProto + .internal_static_google_cloud_aiplatform_v1_Scheduling_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.CustomJobProto + .internal_static_google_cloud_aiplatform_v1_Scheduling_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.Scheduling.class, + com.google.cloud.aiplatform.v1.Scheduling.Builder.class); + } + + public static final int TIMEOUT_FIELD_NUMBER = 1; + private com.google.protobuf.Duration timeout_; + /** + * + * + *
+   * The maximum job running time. The default is 7 days.
+   * 
+ * + * .google.protobuf.Duration timeout = 1; + * + * @return Whether the timeout field is set. + */ + @java.lang.Override + public boolean hasTimeout() { + return timeout_ != null; + } + /** + * + * + *
+   * The maximum job running time. The default is 7 days.
+   * 
+ * + * .google.protobuf.Duration timeout = 1; + * + * @return The timeout. + */ + @java.lang.Override + public com.google.protobuf.Duration getTimeout() { + return timeout_ == null ? com.google.protobuf.Duration.getDefaultInstance() : timeout_; + } + /** + * + * + *
+   * The maximum job running time. The default is 7 days.
+   * 
+ * + * .google.protobuf.Duration timeout = 1; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getTimeoutOrBuilder() { + return getTimeout(); + } + + public static final int RESTART_JOB_ON_WORKER_RESTART_FIELD_NUMBER = 3; + private boolean restartJobOnWorkerRestart_; + /** + * + * + *
+   * Restarts the entire CustomJob if a worker gets restarted.
+   * This feature can be used by distributed training jobs that are not
+   * resilient to workers leaving and joining a job.
+   * 
+ * + * bool restart_job_on_worker_restart = 3; + * + * @return The restartJobOnWorkerRestart. + */ + @java.lang.Override + public boolean getRestartJobOnWorkerRestart() { + return restartJobOnWorkerRestart_; + } + + 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 (timeout_ != null) { + output.writeMessage(1, getTimeout()); + } + if (restartJobOnWorkerRestart_ != false) { + output.writeBool(3, restartJobOnWorkerRestart_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (timeout_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getTimeout()); + } + if (restartJobOnWorkerRestart_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, restartJobOnWorkerRestart_); + } + 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.v1.Scheduling)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.Scheduling other = + (com.google.cloud.aiplatform.v1.Scheduling) obj; + + if (hasTimeout() != other.hasTimeout()) return false; + if (hasTimeout()) { + if (!getTimeout().equals(other.getTimeout())) return false; + } + if (getRestartJobOnWorkerRestart() != other.getRestartJobOnWorkerRestart()) 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 (hasTimeout()) { + hash = (37 * hash) + TIMEOUT_FIELD_NUMBER; + hash = (53 * hash) + getTimeout().hashCode(); + } + hash = (37 * hash) + RESTART_JOB_ON_WORKER_RESTART_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getRestartJobOnWorkerRestart()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.Scheduling parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.Scheduling 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.v1.Scheduling parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.Scheduling 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.v1.Scheduling parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.Scheduling parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.Scheduling parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.Scheduling 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.v1.Scheduling parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.Scheduling 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.v1.Scheduling parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.Scheduling 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.v1.Scheduling 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; + } + /** + * + * + *
+   * All parameters related to queuing and scheduling of custom jobs.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.Scheduling} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.Scheduling) + com.google.cloud.aiplatform.v1.SchedulingOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.CustomJobProto + .internal_static_google_cloud_aiplatform_v1_Scheduling_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.CustomJobProto + .internal_static_google_cloud_aiplatform_v1_Scheduling_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.Scheduling.class, + com.google.cloud.aiplatform.v1.Scheduling.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.Scheduling.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 (timeoutBuilder_ == null) { + timeout_ = null; + } else { + timeout_ = null; + timeoutBuilder_ = null; + } + restartJobOnWorkerRestart_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.CustomJobProto + .internal_static_google_cloud_aiplatform_v1_Scheduling_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.Scheduling getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.Scheduling.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.Scheduling build() { + com.google.cloud.aiplatform.v1.Scheduling result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.Scheduling buildPartial() { + com.google.cloud.aiplatform.v1.Scheduling result = + new com.google.cloud.aiplatform.v1.Scheduling(this); + if (timeoutBuilder_ == null) { + result.timeout_ = timeout_; + } else { + result.timeout_ = timeoutBuilder_.build(); + } + result.restartJobOnWorkerRestart_ = restartJobOnWorkerRestart_; + 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.v1.Scheduling) { + return mergeFrom((com.google.cloud.aiplatform.v1.Scheduling) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.Scheduling other) { + if (other == com.google.cloud.aiplatform.v1.Scheduling.getDefaultInstance()) return this; + if (other.hasTimeout()) { + mergeTimeout(other.getTimeout()); + } + if (other.getRestartJobOnWorkerRestart() != false) { + setRestartJobOnWorkerRestart(other.getRestartJobOnWorkerRestart()); + } + 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.v1.Scheduling parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.aiplatform.v1.Scheduling) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.Duration timeout_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + timeoutBuilder_; + /** + * + * + *
+     * The maximum job running time. The default is 7 days.
+     * 
+ * + * .google.protobuf.Duration timeout = 1; + * + * @return Whether the timeout field is set. + */ + public boolean hasTimeout() { + return timeoutBuilder_ != null || timeout_ != null; + } + /** + * + * + *
+     * The maximum job running time. The default is 7 days.
+     * 
+ * + * .google.protobuf.Duration timeout = 1; + * + * @return The timeout. + */ + public com.google.protobuf.Duration getTimeout() { + if (timeoutBuilder_ == null) { + return timeout_ == null ? com.google.protobuf.Duration.getDefaultInstance() : timeout_; + } else { + return timeoutBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The maximum job running time. The default is 7 days.
+     * 
+ * + * .google.protobuf.Duration timeout = 1; + */ + public Builder setTimeout(com.google.protobuf.Duration value) { + if (timeoutBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + timeout_ = value; + onChanged(); + } else { + timeoutBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The maximum job running time. The default is 7 days.
+     * 
+ * + * .google.protobuf.Duration timeout = 1; + */ + public Builder setTimeout(com.google.protobuf.Duration.Builder builderForValue) { + if (timeoutBuilder_ == null) { + timeout_ = builderForValue.build(); + onChanged(); + } else { + timeoutBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The maximum job running time. The default is 7 days.
+     * 
+ * + * .google.protobuf.Duration timeout = 1; + */ + public Builder mergeTimeout(com.google.protobuf.Duration value) { + if (timeoutBuilder_ == null) { + if (timeout_ != null) { + timeout_ = + com.google.protobuf.Duration.newBuilder(timeout_).mergeFrom(value).buildPartial(); + } else { + timeout_ = value; + } + onChanged(); + } else { + timeoutBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The maximum job running time. The default is 7 days.
+     * 
+ * + * .google.protobuf.Duration timeout = 1; + */ + public Builder clearTimeout() { + if (timeoutBuilder_ == null) { + timeout_ = null; + onChanged(); + } else { + timeout_ = null; + timeoutBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The maximum job running time. The default is 7 days.
+     * 
+ * + * .google.protobuf.Duration timeout = 1; + */ + public com.google.protobuf.Duration.Builder getTimeoutBuilder() { + + onChanged(); + return getTimeoutFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The maximum job running time. The default is 7 days.
+     * 
+ * + * .google.protobuf.Duration timeout = 1; + */ + public com.google.protobuf.DurationOrBuilder getTimeoutOrBuilder() { + if (timeoutBuilder_ != null) { + return timeoutBuilder_.getMessageOrBuilder(); + } else { + return timeout_ == null ? com.google.protobuf.Duration.getDefaultInstance() : timeout_; + } + } + /** + * + * + *
+     * The maximum job running time. The default is 7 days.
+     * 
+ * + * .google.protobuf.Duration timeout = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getTimeoutFieldBuilder() { + if (timeoutBuilder_ == null) { + timeoutBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getTimeout(), getParentForChildren(), isClean()); + timeout_ = null; + } + return timeoutBuilder_; + } + + private boolean restartJobOnWorkerRestart_; + /** + * + * + *
+     * Restarts the entire CustomJob if a worker gets restarted.
+     * This feature can be used by distributed training jobs that are not
+     * resilient to workers leaving and joining a job.
+     * 
+ * + * bool restart_job_on_worker_restart = 3; + * + * @return The restartJobOnWorkerRestart. + */ + @java.lang.Override + public boolean getRestartJobOnWorkerRestart() { + return restartJobOnWorkerRestart_; + } + /** + * + * + *
+     * Restarts the entire CustomJob if a worker gets restarted.
+     * This feature can be used by distributed training jobs that are not
+     * resilient to workers leaving and joining a job.
+     * 
+ * + * bool restart_job_on_worker_restart = 3; + * + * @param value The restartJobOnWorkerRestart to set. + * @return This builder for chaining. + */ + public Builder setRestartJobOnWorkerRestart(boolean value) { + + restartJobOnWorkerRestart_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Restarts the entire CustomJob if a worker gets restarted.
+     * This feature can be used by distributed training jobs that are not
+     * resilient to workers leaving and joining a job.
+     * 
+ * + * bool restart_job_on_worker_restart = 3; + * + * @return This builder for chaining. + */ + public Builder clearRestartJobOnWorkerRestart() { + + restartJobOnWorkerRestart_ = 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.v1.Scheduling) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.Scheduling) + private static final com.google.cloud.aiplatform.v1.Scheduling DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.Scheduling(); + } + + public static com.google.cloud.aiplatform.v1.Scheduling getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Scheduling parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Scheduling(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.v1.Scheduling getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SchedulingOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SchedulingOrBuilder.java new file mode 100644 index 000000000..c8b7b3dcf --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SchedulingOrBuilder.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/v1/custom_job.proto + +package com.google.cloud.aiplatform.v1; + +public interface SchedulingOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.Scheduling) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The maximum job running time. The default is 7 days.
+   * 
+ * + * .google.protobuf.Duration timeout = 1; + * + * @return Whether the timeout field is set. + */ + boolean hasTimeout(); + /** + * + * + *
+   * The maximum job running time. The default is 7 days.
+   * 
+ * + * .google.protobuf.Duration timeout = 1; + * + * @return The timeout. + */ + com.google.protobuf.Duration getTimeout(); + /** + * + * + *
+   * The maximum job running time. The default is 7 days.
+   * 
+ * + * .google.protobuf.Duration timeout = 1; + */ + com.google.protobuf.DurationOrBuilder getTimeoutOrBuilder(); + + /** + * + * + *
+   * Restarts the entire CustomJob if a worker gets restarted.
+   * This feature can be used by distributed training jobs that are not
+   * resilient to workers leaving and joining a job.
+   * 
+ * + * bool restart_job_on_worker_restart = 3; + * + * @return The restartJobOnWorkerRestart. + */ + boolean getRestartJobOnWorkerRestart(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SearchMigratableResourcesRequest.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SearchMigratableResourcesRequest.java new file mode 100644 index 000000000..406810ea7 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SearchMigratableResourcesRequest.java @@ -0,0 +1,1195 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/migration_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for [MigrationService.SearchMigratableResources][google.cloud.aiplatform.v1.MigrationService.SearchMigratableResources].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.SearchMigratableResourcesRequest} + */ +public final class SearchMigratableResourcesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.SearchMigratableResourcesRequest) + SearchMigratableResourcesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use SearchMigratableResourcesRequest.newBuilder() to construct. + private SearchMigratableResourcesRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SearchMigratableResourcesRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SearchMigratableResourcesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private SearchMigratableResourcesRequest( + 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(); + + parent_ = s; + break; + } + case 16: + { + pageSize_ = input.readInt32(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + filter_ = 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.v1.MigrationServiceProto + .internal_static_google_cloud_aiplatform_v1_SearchMigratableResourcesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.MigrationServiceProto + .internal_static_google_cloud_aiplatform_v1_SearchMigratableResourcesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.SearchMigratableResourcesRequest.class, + com.google.cloud.aiplatform.v1.SearchMigratableResourcesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object 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}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * 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}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * + * + *
+   * The standard page size.
+   * The default and maximum value is 100.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * The standard page token.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The standard page token.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + private volatile java.lang.Object filter_; + /** + * + * + *
+   * Supported filters are:
+   * * Resource type: For a specific type of MigratableResource.
+   *   * `ml_engine_model_version:*`
+   *   * `automl_model:*`,
+   *   * `automl_dataset:*`
+   *   * `data_labeling_dataset:*`.
+   * * Migrated or not: Filter migrated resource or not by last_migrate_time.
+   *   * `last_migrate_time:*` will filter migrated resources.
+   *   * `NOT last_migrate_time:*` will filter not yet migrated resources.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * Supported filters are:
+   * * Resource type: For a specific type of MigratableResource.
+   *   * `ml_engine_model_version:*`
+   *   * `automl_model:*`,
+   *   * `automl_dataset:*`
+   *   * `data_labeling_dataset:*`.
+   * * Migrated or not: Filter migrated resource or not by last_migrate_time.
+   *   * `last_migrate_time:*` will filter migrated resources.
+   *   * `NOT last_migrate_time:*` will filter not yet migrated resources.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!getFilterBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!getFilterBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + 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.v1.SearchMigratableResourcesRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.SearchMigratableResourcesRequest other = + (com.google.cloud.aiplatform.v1.SearchMigratableResourcesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.SearchMigratableResourcesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.SearchMigratableResourcesRequest 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.v1.SearchMigratableResourcesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.SearchMigratableResourcesRequest 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.v1.SearchMigratableResourcesRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.SearchMigratableResourcesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.SearchMigratableResourcesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.SearchMigratableResourcesRequest 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.v1.SearchMigratableResourcesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.SearchMigratableResourcesRequest 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.v1.SearchMigratableResourcesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.SearchMigratableResourcesRequest 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.v1.SearchMigratableResourcesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [MigrationService.SearchMigratableResources][google.cloud.aiplatform.v1.MigrationService.SearchMigratableResources].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.SearchMigratableResourcesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.SearchMigratableResourcesRequest) + com.google.cloud.aiplatform.v1.SearchMigratableResourcesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.MigrationServiceProto + .internal_static_google_cloud_aiplatform_v1_SearchMigratableResourcesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.MigrationServiceProto + .internal_static_google_cloud_aiplatform_v1_SearchMigratableResourcesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.SearchMigratableResourcesRequest.class, + com.google.cloud.aiplatform.v1.SearchMigratableResourcesRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.SearchMigratableResourcesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + filter_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.MigrationServiceProto + .internal_static_google_cloud_aiplatform_v1_SearchMigratableResourcesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.SearchMigratableResourcesRequest + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.SearchMigratableResourcesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.SearchMigratableResourcesRequest build() { + com.google.cloud.aiplatform.v1.SearchMigratableResourcesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.SearchMigratableResourcesRequest buildPartial() { + com.google.cloud.aiplatform.v1.SearchMigratableResourcesRequest result = + new com.google.cloud.aiplatform.v1.SearchMigratableResourcesRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + result.filter_ = filter_; + 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.v1.SearchMigratableResourcesRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.SearchMigratableResourcesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.SearchMigratableResourcesRequest other) { + if (other + == com.google.cloud.aiplatform.v1.SearchMigratableResourcesRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + 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.v1.SearchMigratableResourcesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.SearchMigratableResourcesRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object 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}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * 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}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * 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}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * 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}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * 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}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The standard page size.
+     * The default and maximum value is 100.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The standard page size.
+     * The default and maximum value is 100.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The standard page size.
+     * The default and maximum value is 100.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * The standard page token.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The standard page token.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The standard page token.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The standard page token.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The standard page token.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Supported filters are:
+     * * Resource type: For a specific type of MigratableResource.
+     *   * `ml_engine_model_version:*`
+     *   * `automl_model:*`,
+     *   * `automl_dataset:*`
+     *   * `data_labeling_dataset:*`.
+     * * Migrated or not: Filter migrated resource or not by last_migrate_time.
+     *   * `last_migrate_time:*` will filter migrated resources.
+     *   * `NOT last_migrate_time:*` will filter not yet migrated resources.
+     * 
+ * + * string filter = 4; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Supported filters are:
+     * * Resource type: For a specific type of MigratableResource.
+     *   * `ml_engine_model_version:*`
+     *   * `automl_model:*`,
+     *   * `automl_dataset:*`
+     *   * `data_labeling_dataset:*`.
+     * * Migrated or not: Filter migrated resource or not by last_migrate_time.
+     *   * `last_migrate_time:*` will filter migrated resources.
+     *   * `NOT last_migrate_time:*` will filter not yet migrated resources.
+     * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Supported filters are:
+     * * Resource type: For a specific type of MigratableResource.
+     *   * `ml_engine_model_version:*`
+     *   * `automl_model:*`,
+     *   * `automl_dataset:*`
+     *   * `data_labeling_dataset:*`.
+     * * Migrated or not: Filter migrated resource or not by last_migrate_time.
+     *   * `last_migrate_time:*` will filter migrated resources.
+     *   * `NOT last_migrate_time:*` will filter not yet migrated resources.
+     * 
+ * + * string filter = 4; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Supported filters are:
+     * * Resource type: For a specific type of MigratableResource.
+     *   * `ml_engine_model_version:*`
+     *   * `automl_model:*`,
+     *   * `automl_dataset:*`
+     *   * `data_labeling_dataset:*`.
+     * * Migrated or not: Filter migrated resource or not by last_migrate_time.
+     *   * `last_migrate_time:*` will filter migrated resources.
+     *   * `NOT last_migrate_time:*` will filter not yet migrated resources.
+     * 
+ * + * string filter = 4; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + * + * + *
+     * Supported filters are:
+     * * Resource type: For a specific type of MigratableResource.
+     *   * `ml_engine_model_version:*`
+     *   * `automl_model:*`,
+     *   * `automl_dataset:*`
+     *   * `data_labeling_dataset:*`.
+     * * Migrated or not: Filter migrated resource or not by last_migrate_time.
+     *   * `last_migrate_time:*` will filter migrated resources.
+     *   * `NOT last_migrate_time:*` will filter not yet migrated resources.
+     * 
+ * + * string filter = 4; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = 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.v1.SearchMigratableResourcesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.SearchMigratableResourcesRequest) + private static final com.google.cloud.aiplatform.v1.SearchMigratableResourcesRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.SearchMigratableResourcesRequest(); + } + + public static com.google.cloud.aiplatform.v1.SearchMigratableResourcesRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SearchMigratableResourcesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SearchMigratableResourcesRequest(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.v1.SearchMigratableResourcesRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SearchMigratableResourcesRequestOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SearchMigratableResourcesRequestOrBuilder.java new file mode 100644 index 000000000..6e5e23be2 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SearchMigratableResourcesRequestOrBuilder.java @@ -0,0 +1,142 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/migration_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface SearchMigratableResourcesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.SearchMigratableResourcesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * 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}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * 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}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The standard page size.
+   * The default and maximum value is 100.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * The standard page token.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * The standard page token.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Supported filters are:
+   * * Resource type: For a specific type of MigratableResource.
+   *   * `ml_engine_model_version:*`
+   *   * `automl_model:*`,
+   *   * `automl_dataset:*`
+   *   * `data_labeling_dataset:*`.
+   * * Migrated or not: Filter migrated resource or not by last_migrate_time.
+   *   * `last_migrate_time:*` will filter migrated resources.
+   *   * `NOT last_migrate_time:*` will filter not yet migrated resources.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Supported filters are:
+   * * Resource type: For a specific type of MigratableResource.
+   *   * `ml_engine_model_version:*`
+   *   * `automl_model:*`,
+   *   * `automl_dataset:*`
+   *   * `data_labeling_dataset:*`.
+   * * Migrated or not: Filter migrated resource or not by last_migrate_time.
+   *   * `last_migrate_time:*` will filter migrated resources.
+   *   * `NOT last_migrate_time:*` will filter not yet migrated resources.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SearchMigratableResourcesResponse.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SearchMigratableResourcesResponse.java new file mode 100644 index 000000000..2f5ebf387 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SearchMigratableResourcesResponse.java @@ -0,0 +1,1211 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/migration_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Response message for [MigrationService.SearchMigratableResources][google.cloud.aiplatform.v1.MigrationService.SearchMigratableResources].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.SearchMigratableResourcesResponse} + */ +public final class SearchMigratableResourcesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.SearchMigratableResourcesResponse) + SearchMigratableResourcesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use SearchMigratableResourcesResponse.newBuilder() to construct. + private SearchMigratableResourcesResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SearchMigratableResourcesResponse() { + migratableResources_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SearchMigratableResourcesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private SearchMigratableResourcesResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + migratableResources_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + migratableResources_.add( + input.readMessage( + com.google.cloud.aiplatform.v1.MigratableResource.parser(), + extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + migratableResources_ = java.util.Collections.unmodifiableList(migratableResources_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.MigrationServiceProto + .internal_static_google_cloud_aiplatform_v1_SearchMigratableResourcesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.MigrationServiceProto + .internal_static_google_cloud_aiplatform_v1_SearchMigratableResourcesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.SearchMigratableResourcesResponse.class, + com.google.cloud.aiplatform.v1.SearchMigratableResourcesResponse.Builder.class); + } + + public static final int MIGRATABLE_RESOURCES_FIELD_NUMBER = 1; + private java.util.List migratableResources_; + /** + * + * + *
+   * All migratable resources that can be migrated to the
+   * location specified in the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.MigratableResource migratable_resources = 1; + */ + @java.lang.Override + public java.util.List + getMigratableResourcesList() { + return migratableResources_; + } + /** + * + * + *
+   * All migratable resources that can be migrated to the
+   * location specified in the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.MigratableResource migratable_resources = 1; + */ + @java.lang.Override + public java.util.List + getMigratableResourcesOrBuilderList() { + return migratableResources_; + } + /** + * + * + *
+   * All migratable resources that can be migrated to the
+   * location specified in the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.MigratableResource migratable_resources = 1; + */ + @java.lang.Override + public int getMigratableResourcesCount() { + return migratableResources_.size(); + } + /** + * + * + *
+   * All migratable resources that can be migrated to the
+   * location specified in the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.MigratableResource migratable_resources = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigratableResource getMigratableResources(int index) { + return migratableResources_.get(index); + } + /** + * + * + *
+   * All migratable resources that can be migrated to the
+   * location specified in the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.MigratableResource migratable_resources = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.MigratableResourceOrBuilder getMigratableResourcesOrBuilder( + int index) { + return migratableResources_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * The standard next-page token.
+   * The migratable_resources may not fill page_size in
+   * SearchMigratableResourcesRequest even when there are subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The standard next-page token.
+   * The migratable_resources may not fill page_size in
+   * SearchMigratableResourcesRequest even when there are subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < migratableResources_.size(); i++) { + output.writeMessage(1, migratableResources_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < migratableResources_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, migratableResources_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.SearchMigratableResourcesResponse)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.SearchMigratableResourcesResponse other = + (com.google.cloud.aiplatform.v1.SearchMigratableResourcesResponse) obj; + + if (!getMigratableResourcesList().equals(other.getMigratableResourcesList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getMigratableResourcesCount() > 0) { + hash = (37 * hash) + MIGRATABLE_RESOURCES_FIELD_NUMBER; + hash = (53 * hash) + getMigratableResourcesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.SearchMigratableResourcesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.SearchMigratableResourcesResponse 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.v1.SearchMigratableResourcesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.SearchMigratableResourcesResponse 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.v1.SearchMigratableResourcesResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.SearchMigratableResourcesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.SearchMigratableResourcesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.SearchMigratableResourcesResponse 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.v1.SearchMigratableResourcesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.SearchMigratableResourcesResponse 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.v1.SearchMigratableResourcesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.SearchMigratableResourcesResponse 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.v1.SearchMigratableResourcesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for [MigrationService.SearchMigratableResources][google.cloud.aiplatform.v1.MigrationService.SearchMigratableResources].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.SearchMigratableResourcesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.SearchMigratableResourcesResponse) + com.google.cloud.aiplatform.v1.SearchMigratableResourcesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.MigrationServiceProto + .internal_static_google_cloud_aiplatform_v1_SearchMigratableResourcesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.MigrationServiceProto + .internal_static_google_cloud_aiplatform_v1_SearchMigratableResourcesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.SearchMigratableResourcesResponse.class, + com.google.cloud.aiplatform.v1.SearchMigratableResourcesResponse.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.SearchMigratableResourcesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getMigratableResourcesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (migratableResourcesBuilder_ == null) { + migratableResources_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + migratableResourcesBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.MigrationServiceProto + .internal_static_google_cloud_aiplatform_v1_SearchMigratableResourcesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.SearchMigratableResourcesResponse + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.SearchMigratableResourcesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.SearchMigratableResourcesResponse build() { + com.google.cloud.aiplatform.v1.SearchMigratableResourcesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.SearchMigratableResourcesResponse buildPartial() { + com.google.cloud.aiplatform.v1.SearchMigratableResourcesResponse result = + new com.google.cloud.aiplatform.v1.SearchMigratableResourcesResponse(this); + int from_bitField0_ = bitField0_; + if (migratableResourcesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + migratableResources_ = java.util.Collections.unmodifiableList(migratableResources_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.migratableResources_ = migratableResources_; + } else { + result.migratableResources_ = migratableResourcesBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + 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.v1.SearchMigratableResourcesResponse) { + return mergeFrom((com.google.cloud.aiplatform.v1.SearchMigratableResourcesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.SearchMigratableResourcesResponse other) { + if (other + == com.google.cloud.aiplatform.v1.SearchMigratableResourcesResponse.getDefaultInstance()) + return this; + if (migratableResourcesBuilder_ == null) { + if (!other.migratableResources_.isEmpty()) { + if (migratableResources_.isEmpty()) { + migratableResources_ = other.migratableResources_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureMigratableResourcesIsMutable(); + migratableResources_.addAll(other.migratableResources_); + } + onChanged(); + } + } else { + if (!other.migratableResources_.isEmpty()) { + if (migratableResourcesBuilder_.isEmpty()) { + migratableResourcesBuilder_.dispose(); + migratableResourcesBuilder_ = null; + migratableResources_ = other.migratableResources_; + bitField0_ = (bitField0_ & ~0x00000001); + migratableResourcesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getMigratableResourcesFieldBuilder() + : null; + } else { + migratableResourcesBuilder_.addAllMessages(other.migratableResources_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.aiplatform.v1.SearchMigratableResourcesResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.SearchMigratableResourcesResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List migratableResources_ = + java.util.Collections.emptyList(); + + private void ensureMigratableResourcesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + migratableResources_ = + new java.util.ArrayList( + migratableResources_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.MigratableResource, + com.google.cloud.aiplatform.v1.MigratableResource.Builder, + com.google.cloud.aiplatform.v1.MigratableResourceOrBuilder> + migratableResourcesBuilder_; + + /** + * + * + *
+     * All migratable resources that can be migrated to the
+     * location specified in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.MigratableResource migratable_resources = 1; + * + */ + public java.util.List + getMigratableResourcesList() { + if (migratableResourcesBuilder_ == null) { + return java.util.Collections.unmodifiableList(migratableResources_); + } else { + return migratableResourcesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * All migratable resources that can be migrated to the
+     * location specified in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.MigratableResource migratable_resources = 1; + * + */ + public int getMigratableResourcesCount() { + if (migratableResourcesBuilder_ == null) { + return migratableResources_.size(); + } else { + return migratableResourcesBuilder_.getCount(); + } + } + /** + * + * + *
+     * All migratable resources that can be migrated to the
+     * location specified in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.MigratableResource migratable_resources = 1; + * + */ + public com.google.cloud.aiplatform.v1.MigratableResource getMigratableResources(int index) { + if (migratableResourcesBuilder_ == null) { + return migratableResources_.get(index); + } else { + return migratableResourcesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * All migratable resources that can be migrated to the
+     * location specified in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.MigratableResource migratable_resources = 1; + * + */ + public Builder setMigratableResources( + int index, com.google.cloud.aiplatform.v1.MigratableResource value) { + if (migratableResourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMigratableResourcesIsMutable(); + migratableResources_.set(index, value); + onChanged(); + } else { + migratableResourcesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * All migratable resources that can be migrated to the
+     * location specified in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.MigratableResource migratable_resources = 1; + * + */ + public Builder setMigratableResources( + int index, com.google.cloud.aiplatform.v1.MigratableResource.Builder builderForValue) { + if (migratableResourcesBuilder_ == null) { + ensureMigratableResourcesIsMutable(); + migratableResources_.set(index, builderForValue.build()); + onChanged(); + } else { + migratableResourcesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * All migratable resources that can be migrated to the
+     * location specified in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.MigratableResource migratable_resources = 1; + * + */ + public Builder addMigratableResources(com.google.cloud.aiplatform.v1.MigratableResource value) { + if (migratableResourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMigratableResourcesIsMutable(); + migratableResources_.add(value); + onChanged(); + } else { + migratableResourcesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * All migratable resources that can be migrated to the
+     * location specified in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.MigratableResource migratable_resources = 1; + * + */ + public Builder addMigratableResources( + int index, com.google.cloud.aiplatform.v1.MigratableResource value) { + if (migratableResourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMigratableResourcesIsMutable(); + migratableResources_.add(index, value); + onChanged(); + } else { + migratableResourcesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * All migratable resources that can be migrated to the
+     * location specified in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.MigratableResource migratable_resources = 1; + * + */ + public Builder addMigratableResources( + com.google.cloud.aiplatform.v1.MigratableResource.Builder builderForValue) { + if (migratableResourcesBuilder_ == null) { + ensureMigratableResourcesIsMutable(); + migratableResources_.add(builderForValue.build()); + onChanged(); + } else { + migratableResourcesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * All migratable resources that can be migrated to the
+     * location specified in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.MigratableResource migratable_resources = 1; + * + */ + public Builder addMigratableResources( + int index, com.google.cloud.aiplatform.v1.MigratableResource.Builder builderForValue) { + if (migratableResourcesBuilder_ == null) { + ensureMigratableResourcesIsMutable(); + migratableResources_.add(index, builderForValue.build()); + onChanged(); + } else { + migratableResourcesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * All migratable resources that can be migrated to the
+     * location specified in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.MigratableResource migratable_resources = 1; + * + */ + public Builder addAllMigratableResources( + java.lang.Iterable values) { + if (migratableResourcesBuilder_ == null) { + ensureMigratableResourcesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, migratableResources_); + onChanged(); + } else { + migratableResourcesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * All migratable resources that can be migrated to the
+     * location specified in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.MigratableResource migratable_resources = 1; + * + */ + public Builder clearMigratableResources() { + if (migratableResourcesBuilder_ == null) { + migratableResources_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + migratableResourcesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * All migratable resources that can be migrated to the
+     * location specified in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.MigratableResource migratable_resources = 1; + * + */ + public Builder removeMigratableResources(int index) { + if (migratableResourcesBuilder_ == null) { + ensureMigratableResourcesIsMutable(); + migratableResources_.remove(index); + onChanged(); + } else { + migratableResourcesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * All migratable resources that can be migrated to the
+     * location specified in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.MigratableResource migratable_resources = 1; + * + */ + public com.google.cloud.aiplatform.v1.MigratableResource.Builder getMigratableResourcesBuilder( + int index) { + return getMigratableResourcesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * All migratable resources that can be migrated to the
+     * location specified in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.MigratableResource migratable_resources = 1; + * + */ + public com.google.cloud.aiplatform.v1.MigratableResourceOrBuilder + getMigratableResourcesOrBuilder(int index) { + if (migratableResourcesBuilder_ == null) { + return migratableResources_.get(index); + } else { + return migratableResourcesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * All migratable resources that can be migrated to the
+     * location specified in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.MigratableResource migratable_resources = 1; + * + */ + public java.util.List + getMigratableResourcesOrBuilderList() { + if (migratableResourcesBuilder_ != null) { + return migratableResourcesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(migratableResources_); + } + } + /** + * + * + *
+     * All migratable resources that can be migrated to the
+     * location specified in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.MigratableResource migratable_resources = 1; + * + */ + public com.google.cloud.aiplatform.v1.MigratableResource.Builder + addMigratableResourcesBuilder() { + return getMigratableResourcesFieldBuilder() + .addBuilder(com.google.cloud.aiplatform.v1.MigratableResource.getDefaultInstance()); + } + /** + * + * + *
+     * All migratable resources that can be migrated to the
+     * location specified in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.MigratableResource migratable_resources = 1; + * + */ + public com.google.cloud.aiplatform.v1.MigratableResource.Builder addMigratableResourcesBuilder( + int index) { + return getMigratableResourcesFieldBuilder() + .addBuilder( + index, com.google.cloud.aiplatform.v1.MigratableResource.getDefaultInstance()); + } + /** + * + * + *
+     * All migratable resources that can be migrated to the
+     * location specified in the request.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.MigratableResource migratable_resources = 1; + * + */ + public java.util.List + getMigratableResourcesBuilderList() { + return getMigratableResourcesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.MigratableResource, + com.google.cloud.aiplatform.v1.MigratableResource.Builder, + com.google.cloud.aiplatform.v1.MigratableResourceOrBuilder> + getMigratableResourcesFieldBuilder() { + if (migratableResourcesBuilder_ == null) { + migratableResourcesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.MigratableResource, + com.google.cloud.aiplatform.v1.MigratableResource.Builder, + com.google.cloud.aiplatform.v1.MigratableResourceOrBuilder>( + migratableResources_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + migratableResources_ = null; + } + return migratableResourcesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * The standard next-page token.
+     * The migratable_resources may not fill page_size in
+     * SearchMigratableResourcesRequest even when there are subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The standard next-page token.
+     * The migratable_resources may not fill page_size in
+     * SearchMigratableResourcesRequest even when there are subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The standard next-page token.
+     * The migratable_resources may not fill page_size in
+     * SearchMigratableResourcesRequest even when there are subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The standard next-page token.
+     * The migratable_resources may not fill page_size in
+     * SearchMigratableResourcesRequest even when there are subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The standard next-page token.
+     * The migratable_resources may not fill page_size in
+     * SearchMigratableResourcesRequest even when there are subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.SearchMigratableResourcesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.SearchMigratableResourcesResponse) + private static final com.google.cloud.aiplatform.v1.SearchMigratableResourcesResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.SearchMigratableResourcesResponse(); + } + + public static com.google.cloud.aiplatform.v1.SearchMigratableResourcesResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SearchMigratableResourcesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SearchMigratableResourcesResponse(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.v1.SearchMigratableResourcesResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SearchMigratableResourcesResponseOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SearchMigratableResourcesResponseOrBuilder.java new file mode 100644 index 000000000..d9f77d788 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SearchMigratableResourcesResponseOrBuilder.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/v1/migration_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface SearchMigratableResourcesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.SearchMigratableResourcesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * All migratable resources that can be migrated to the
+   * location specified in the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.MigratableResource migratable_resources = 1; + */ + java.util.List getMigratableResourcesList(); + /** + * + * + *
+   * All migratable resources that can be migrated to the
+   * location specified in the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.MigratableResource migratable_resources = 1; + */ + com.google.cloud.aiplatform.v1.MigratableResource getMigratableResources(int index); + /** + * + * + *
+   * All migratable resources that can be migrated to the
+   * location specified in the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.MigratableResource migratable_resources = 1; + */ + int getMigratableResourcesCount(); + /** + * + * + *
+   * All migratable resources that can be migrated to the
+   * location specified in the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.MigratableResource migratable_resources = 1; + */ + java.util.List + getMigratableResourcesOrBuilderList(); + /** + * + * + *
+   * All migratable resources that can be migrated to the
+   * location specified in the request.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.MigratableResource migratable_resources = 1; + */ + com.google.cloud.aiplatform.v1.MigratableResourceOrBuilder getMigratableResourcesOrBuilder( + int index); + + /** + * + * + *
+   * The standard next-page token.
+   * The migratable_resources may not fill page_size in
+   * SearchMigratableResourcesRequest even when there are subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * The standard next-page token.
+   * The migratable_resources may not fill page_size in
+   * SearchMigratableResourcesRequest even when there are subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SpecialistPool.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SpecialistPool.java new file mode 100644 index 000000000..bcf7fa18b --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SpecialistPool.java @@ -0,0 +1,1525 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/specialist_pool.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * SpecialistPool represents customers' own workforce to work on their data
+ * labeling jobs. It includes a group of specialist managers who are responsible
+ * for managing the labelers in this pool as well as customers' data labeling
+ * jobs associated with this pool.
+ * Customers create specialist pool as well as start data labeling jobs on
+ * Cloud, managers and labelers work with the jobs using CrowdCompute console.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.SpecialistPool} + */ +public final class SpecialistPool extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.SpecialistPool) + SpecialistPoolOrBuilder { + private static final long serialVersionUID = 0L; + // Use SpecialistPool.newBuilder() to construct. + private SpecialistPool(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SpecialistPool() { + name_ = ""; + displayName_ = ""; + specialistManagerEmails_ = com.google.protobuf.LazyStringArrayList.EMPTY; + pendingDataLabelingJobs_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SpecialistPool(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private SpecialistPool( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 24: + { + specialistManagersCount_ = input.readInt32(); + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + specialistManagerEmails_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + specialistManagerEmails_.add(s); + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + pendingDataLabelingJobs_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + pendingDataLabelingJobs_.add(s); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + specialistManagerEmails_ = specialistManagerEmails_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + pendingDataLabelingJobs_ = pendingDataLabelingJobs_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.SpecialistPoolProto + .internal_static_google_cloud_aiplatform_v1_SpecialistPool_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.SpecialistPoolProto + .internal_static_google_cloud_aiplatform_v1_SpecialistPool_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.SpecialistPool.class, + com.google.cloud.aiplatform.v1.SpecialistPool.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The resource name of the SpecialistPool.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the SpecialistPool.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * Required. The user-defined name of the SpecialistPool.
+   * The name can be up to 128 characters long and can be consist of any UTF-8
+   * characters.
+   * This field should be unique on project-level.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+   * Required. The user-defined name of the SpecialistPool.
+   * The name can be up to 128 characters long and can be consist of any UTF-8
+   * characters.
+   * This field should be unique on project-level.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 SPECIALIST_MANAGERS_COUNT_FIELD_NUMBER = 3; + private int specialistManagersCount_; + /** + * + * + *
+   * Output only. The number of Specialists in this SpecialistPool.
+   * 
+ * + * int32 specialist_managers_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The specialistManagersCount. + */ + @java.lang.Override + public int getSpecialistManagersCount() { + return specialistManagersCount_; + } + + public static final int SPECIALIST_MANAGER_EMAILS_FIELD_NUMBER = 4; + private com.google.protobuf.LazyStringList specialistManagerEmails_; + /** + * + * + *
+   * The email addresses of the specialists in the SpecialistPool.
+   * 
+ * + * repeated string specialist_manager_emails = 4; + * + * @return A list containing the specialistManagerEmails. + */ + public com.google.protobuf.ProtocolStringList getSpecialistManagerEmailsList() { + return specialistManagerEmails_; + } + /** + * + * + *
+   * The email addresses of the specialists in the SpecialistPool.
+   * 
+ * + * repeated string specialist_manager_emails = 4; + * + * @return The count of specialistManagerEmails. + */ + public int getSpecialistManagerEmailsCount() { + return specialistManagerEmails_.size(); + } + /** + * + * + *
+   * The email addresses of the specialists in the SpecialistPool.
+   * 
+ * + * repeated string specialist_manager_emails = 4; + * + * @param index The index of the element to return. + * @return The specialistManagerEmails at the given index. + */ + public java.lang.String getSpecialistManagerEmails(int index) { + return specialistManagerEmails_.get(index); + } + /** + * + * + *
+   * The email addresses of the specialists in the SpecialistPool.
+   * 
+ * + * repeated string specialist_manager_emails = 4; + * + * @param index The index of the value to return. + * @return The bytes of the specialistManagerEmails at the given index. + */ + public com.google.protobuf.ByteString getSpecialistManagerEmailsBytes(int index) { + return specialistManagerEmails_.getByteString(index); + } + + public static final int PENDING_DATA_LABELING_JOBS_FIELD_NUMBER = 5; + private com.google.protobuf.LazyStringList pendingDataLabelingJobs_; + /** + * + * + *
+   * Output only. The resource name of the pending data labeling jobs.
+   * 
+ * + * + * repeated string pending_data_labeling_jobs = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the pendingDataLabelingJobs. + */ + public com.google.protobuf.ProtocolStringList getPendingDataLabelingJobsList() { + return pendingDataLabelingJobs_; + } + /** + * + * + *
+   * Output only. The resource name of the pending data labeling jobs.
+   * 
+ * + * + * repeated string pending_data_labeling_jobs = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of pendingDataLabelingJobs. + */ + public int getPendingDataLabelingJobsCount() { + return pendingDataLabelingJobs_.size(); + } + /** + * + * + *
+   * Output only. The resource name of the pending data labeling jobs.
+   * 
+ * + * + * repeated string pending_data_labeling_jobs = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The pendingDataLabelingJobs at the given index. + */ + public java.lang.String getPendingDataLabelingJobs(int index) { + return pendingDataLabelingJobs_.get(index); + } + /** + * + * + *
+   * Output only. The resource name of the pending data labeling jobs.
+   * 
+ * + * + * repeated string pending_data_labeling_jobs = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The bytes of the pendingDataLabelingJobs at the given index. + */ + public com.google.protobuf.ByteString getPendingDataLabelingJobsBytes(int index) { + return pendingDataLabelingJobs_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + if (specialistManagersCount_ != 0) { + output.writeInt32(3, specialistManagersCount_); + } + for (int i = 0; i < specialistManagerEmails_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 4, specialistManagerEmails_.getRaw(i)); + } + for (int i = 0; i < pendingDataLabelingJobs_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 5, pendingDataLabelingJobs_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + if (specialistManagersCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, specialistManagersCount_); + } + { + int dataSize = 0; + for (int i = 0; i < specialistManagerEmails_.size(); i++) { + dataSize += computeStringSizeNoTag(specialistManagerEmails_.getRaw(i)); + } + size += dataSize; + size += 1 * getSpecialistManagerEmailsList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < pendingDataLabelingJobs_.size(); i++) { + dataSize += computeStringSizeNoTag(pendingDataLabelingJobs_.getRaw(i)); + } + size += dataSize; + size += 1 * getPendingDataLabelingJobsList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.SpecialistPool)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.SpecialistPool other = + (com.google.cloud.aiplatform.v1.SpecialistPool) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (getSpecialistManagersCount() != other.getSpecialistManagersCount()) return false; + if (!getSpecialistManagerEmailsList().equals(other.getSpecialistManagerEmailsList())) + return false; + if (!getPendingDataLabelingJobsList().equals(other.getPendingDataLabelingJobsList())) + return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + SPECIALIST_MANAGERS_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getSpecialistManagersCount(); + if (getSpecialistManagerEmailsCount() > 0) { + hash = (37 * hash) + SPECIALIST_MANAGER_EMAILS_FIELD_NUMBER; + hash = (53 * hash) + getSpecialistManagerEmailsList().hashCode(); + } + if (getPendingDataLabelingJobsCount() > 0) { + hash = (37 * hash) + PENDING_DATA_LABELING_JOBS_FIELD_NUMBER; + hash = (53 * hash) + getPendingDataLabelingJobsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.SpecialistPool parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.SpecialistPool 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.v1.SpecialistPool parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.SpecialistPool 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.v1.SpecialistPool parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.SpecialistPool parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.SpecialistPool parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.SpecialistPool 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.v1.SpecialistPool parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.SpecialistPool 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.v1.SpecialistPool parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.SpecialistPool 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.v1.SpecialistPool 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; + } + /** + * + * + *
+   * SpecialistPool represents customers' own workforce to work on their data
+   * labeling jobs. It includes a group of specialist managers who are responsible
+   * for managing the labelers in this pool as well as customers' data labeling
+   * jobs associated with this pool.
+   * Customers create specialist pool as well as start data labeling jobs on
+   * Cloud, managers and labelers work with the jobs using CrowdCompute console.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.SpecialistPool} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.SpecialistPool) + com.google.cloud.aiplatform.v1.SpecialistPoolOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.SpecialistPoolProto + .internal_static_google_cloud_aiplatform_v1_SpecialistPool_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.SpecialistPoolProto + .internal_static_google_cloud_aiplatform_v1_SpecialistPool_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.SpecialistPool.class, + com.google.cloud.aiplatform.v1.SpecialistPool.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.SpecialistPool.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + displayName_ = ""; + + specialistManagersCount_ = 0; + + specialistManagerEmails_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + pendingDataLabelingJobs_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.SpecialistPoolProto + .internal_static_google_cloud_aiplatform_v1_SpecialistPool_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.SpecialistPool getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.SpecialistPool.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.SpecialistPool build() { + com.google.cloud.aiplatform.v1.SpecialistPool result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.SpecialistPool buildPartial() { + com.google.cloud.aiplatform.v1.SpecialistPool result = + new com.google.cloud.aiplatform.v1.SpecialistPool(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.displayName_ = displayName_; + result.specialistManagersCount_ = specialistManagersCount_; + if (((bitField0_ & 0x00000001) != 0)) { + specialistManagerEmails_ = specialistManagerEmails_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.specialistManagerEmails_ = specialistManagerEmails_; + if (((bitField0_ & 0x00000002) != 0)) { + pendingDataLabelingJobs_ = pendingDataLabelingJobs_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.pendingDataLabelingJobs_ = pendingDataLabelingJobs_; + 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.v1.SpecialistPool) { + return mergeFrom((com.google.cloud.aiplatform.v1.SpecialistPool) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.SpecialistPool other) { + if (other == com.google.cloud.aiplatform.v1.SpecialistPool.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (other.getSpecialistManagersCount() != 0) { + setSpecialistManagersCount(other.getSpecialistManagersCount()); + } + if (!other.specialistManagerEmails_.isEmpty()) { + if (specialistManagerEmails_.isEmpty()) { + specialistManagerEmails_ = other.specialistManagerEmails_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSpecialistManagerEmailsIsMutable(); + specialistManagerEmails_.addAll(other.specialistManagerEmails_); + } + onChanged(); + } + if (!other.pendingDataLabelingJobs_.isEmpty()) { + if (pendingDataLabelingJobs_.isEmpty()) { + pendingDataLabelingJobs_ = other.pendingDataLabelingJobs_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensurePendingDataLabelingJobsIsMutable(); + pendingDataLabelingJobs_.addAll(other.pendingDataLabelingJobs_); + } + 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.v1.SpecialistPool parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.aiplatform.v1.SpecialistPool) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The resource name of the SpecialistPool.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the SpecialistPool.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the SpecialistPool.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the SpecialistPool.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the SpecialistPool.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Required. The user-defined name of the SpecialistPool.
+     * The name can be up to 128 characters long and can be consist of any UTF-8
+     * characters.
+     * This field should be unique on project-level.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+     * Required. The user-defined name of the SpecialistPool.
+     * The name can be up to 128 characters long and can be consist of any UTF-8
+     * characters.
+     * This field should be unique on project-level.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+     * Required. The user-defined name of the SpecialistPool.
+     * The name can be up to 128 characters long and can be consist of any UTF-8
+     * characters.
+     * This field should be unique on project-level.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + /** + * + * + *
+     * Required. The user-defined name of the SpecialistPool.
+     * The name can be up to 128 characters long and can be consist of any UTF-8
+     * characters.
+     * This field should be unique on project-level.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The user-defined name of the SpecialistPool.
+     * The name can be up to 128 characters long and can be consist of any UTF-8
+     * characters.
+     * This field should be unique on project-level.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 int specialistManagersCount_; + /** + * + * + *
+     * Output only. The number of Specialists in this SpecialistPool.
+     * 
+ * + * int32 specialist_managers_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The specialistManagersCount. + */ + @java.lang.Override + public int getSpecialistManagersCount() { + return specialistManagersCount_; + } + /** + * + * + *
+     * Output only. The number of Specialists in this SpecialistPool.
+     * 
+ * + * int32 specialist_managers_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The specialistManagersCount to set. + * @return This builder for chaining. + */ + public Builder setSpecialistManagersCount(int value) { + + specialistManagersCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The number of Specialists in this SpecialistPool.
+     * 
+ * + * int32 specialist_managers_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearSpecialistManagersCount() { + + specialistManagersCount_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList specialistManagerEmails_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureSpecialistManagerEmailsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + specialistManagerEmails_ = + new com.google.protobuf.LazyStringArrayList(specialistManagerEmails_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * The email addresses of the specialists in the SpecialistPool.
+     * 
+ * + * repeated string specialist_manager_emails = 4; + * + * @return A list containing the specialistManagerEmails. + */ + public com.google.protobuf.ProtocolStringList getSpecialistManagerEmailsList() { + return specialistManagerEmails_.getUnmodifiableView(); + } + /** + * + * + *
+     * The email addresses of the specialists in the SpecialistPool.
+     * 
+ * + * repeated string specialist_manager_emails = 4; + * + * @return The count of specialistManagerEmails. + */ + public int getSpecialistManagerEmailsCount() { + return specialistManagerEmails_.size(); + } + /** + * + * + *
+     * The email addresses of the specialists in the SpecialistPool.
+     * 
+ * + * repeated string specialist_manager_emails = 4; + * + * @param index The index of the element to return. + * @return The specialistManagerEmails at the given index. + */ + public java.lang.String getSpecialistManagerEmails(int index) { + return specialistManagerEmails_.get(index); + } + /** + * + * + *
+     * The email addresses of the specialists in the SpecialistPool.
+     * 
+ * + * repeated string specialist_manager_emails = 4; + * + * @param index The index of the value to return. + * @return The bytes of the specialistManagerEmails at the given index. + */ + public com.google.protobuf.ByteString getSpecialistManagerEmailsBytes(int index) { + return specialistManagerEmails_.getByteString(index); + } + /** + * + * + *
+     * The email addresses of the specialists in the SpecialistPool.
+     * 
+ * + * repeated string specialist_manager_emails = 4; + * + * @param index The index to set the value at. + * @param value The specialistManagerEmails to set. + * @return This builder for chaining. + */ + public Builder setSpecialistManagerEmails(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSpecialistManagerEmailsIsMutable(); + specialistManagerEmails_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * The email addresses of the specialists in the SpecialistPool.
+     * 
+ * + * repeated string specialist_manager_emails = 4; + * + * @param value The specialistManagerEmails to add. + * @return This builder for chaining. + */ + public Builder addSpecialistManagerEmails(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSpecialistManagerEmailsIsMutable(); + specialistManagerEmails_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * The email addresses of the specialists in the SpecialistPool.
+     * 
+ * + * repeated string specialist_manager_emails = 4; + * + * @param values The specialistManagerEmails to add. + * @return This builder for chaining. + */ + public Builder addAllSpecialistManagerEmails(java.lang.Iterable values) { + ensureSpecialistManagerEmailsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, specialistManagerEmails_); + onChanged(); + return this; + } + /** + * + * + *
+     * The email addresses of the specialists in the SpecialistPool.
+     * 
+ * + * repeated string specialist_manager_emails = 4; + * + * @return This builder for chaining. + */ + public Builder clearSpecialistManagerEmails() { + specialistManagerEmails_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The email addresses of the specialists in the SpecialistPool.
+     * 
+ * + * repeated string specialist_manager_emails = 4; + * + * @param value The bytes of the specialistManagerEmails to add. + * @return This builder for chaining. + */ + public Builder addSpecialistManagerEmailsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureSpecialistManagerEmailsIsMutable(); + specialistManagerEmails_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList pendingDataLabelingJobs_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensurePendingDataLabelingJobsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + pendingDataLabelingJobs_ = + new com.google.protobuf.LazyStringArrayList(pendingDataLabelingJobs_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+     * Output only. The resource name of the pending data labeling jobs.
+     * 
+ * + * + * repeated string pending_data_labeling_jobs = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the pendingDataLabelingJobs. + */ + public com.google.protobuf.ProtocolStringList getPendingDataLabelingJobsList() { + return pendingDataLabelingJobs_.getUnmodifiableView(); + } + /** + * + * + *
+     * Output only. The resource name of the pending data labeling jobs.
+     * 
+ * + * + * repeated string pending_data_labeling_jobs = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of pendingDataLabelingJobs. + */ + public int getPendingDataLabelingJobsCount() { + return pendingDataLabelingJobs_.size(); + } + /** + * + * + *
+     * Output only. The resource name of the pending data labeling jobs.
+     * 
+ * + * + * repeated string pending_data_labeling_jobs = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The pendingDataLabelingJobs at the given index. + */ + public java.lang.String getPendingDataLabelingJobs(int index) { + return pendingDataLabelingJobs_.get(index); + } + /** + * + * + *
+     * Output only. The resource name of the pending data labeling jobs.
+     * 
+ * + * + * repeated string pending_data_labeling_jobs = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The bytes of the pendingDataLabelingJobs at the given index. + */ + public com.google.protobuf.ByteString getPendingDataLabelingJobsBytes(int index) { + return pendingDataLabelingJobs_.getByteString(index); + } + /** + * + * + *
+     * Output only. The resource name of the pending data labeling jobs.
+     * 
+ * + * + * repeated string pending_data_labeling_jobs = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index to set the value at. + * @param value The pendingDataLabelingJobs to set. + * @return This builder for chaining. + */ + public Builder setPendingDataLabelingJobs(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePendingDataLabelingJobsIsMutable(); + pendingDataLabelingJobs_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource name of the pending data labeling jobs.
+     * 
+ * + * + * repeated string pending_data_labeling_jobs = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The pendingDataLabelingJobs to add. + * @return This builder for chaining. + */ + public Builder addPendingDataLabelingJobs(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePendingDataLabelingJobsIsMutable(); + pendingDataLabelingJobs_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource name of the pending data labeling jobs.
+     * 
+ * + * + * repeated string pending_data_labeling_jobs = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param values The pendingDataLabelingJobs to add. + * @return This builder for chaining. + */ + public Builder addAllPendingDataLabelingJobs(java.lang.Iterable values) { + ensurePendingDataLabelingJobsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, pendingDataLabelingJobs_); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource name of the pending data labeling jobs.
+     * 
+ * + * + * repeated string pending_data_labeling_jobs = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearPendingDataLabelingJobs() { + pendingDataLabelingJobs_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource name of the pending data labeling jobs.
+     * 
+ * + * + * repeated string pending_data_labeling_jobs = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The bytes of the pendingDataLabelingJobs to add. + * @return This builder for chaining. + */ + public Builder addPendingDataLabelingJobsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensurePendingDataLabelingJobsIsMutable(); + pendingDataLabelingJobs_.add(value); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.SpecialistPool) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.SpecialistPool) + private static final com.google.cloud.aiplatform.v1.SpecialistPool DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.SpecialistPool(); + } + + public static com.google.cloud.aiplatform.v1.SpecialistPool getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SpecialistPool parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SpecialistPool(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.v1.SpecialistPool getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SpecialistPoolName.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SpecialistPoolName.java new file mode 100644 index 000000000..544e34a47 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SpecialistPoolName.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.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class SpecialistPoolName implements ResourceName { + 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; + } + + public String getLocation() { + return location; + } + + public String getSpecialistPool() { + return specialistPool; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static SpecialistPoolName of(String project, String location, String specialistPool) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setSpecialistPool(specialistPool) + .build(); + } + + public static String format(String project, String location, String specialistPool) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setSpecialistPool(specialistPool) + .build() + .toString(); + } + + public static SpecialistPoolName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + 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")); + } + + 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 (SpecialistPoolName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String 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(); + 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(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_SPECIALIST_POOL.instantiate( + "project", project, "location", location, "specialist_pool", specialistPool); + } + + @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; + } + + public String getLocation() { + return location; + } + + public String getSpecialistPool() { + return specialistPool; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setSpecialistPool(String specialistPool) { + this.specialistPool = specialistPool; + return this; + } + + private Builder(SpecialistPoolName specialistPoolName) { + project = specialistPoolName.project; + location = specialistPoolName.location; + specialistPool = specialistPoolName.specialistPool; + } + + public SpecialistPoolName build() { + return new SpecialistPoolName(this); + } + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SpecialistPoolOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SpecialistPoolOrBuilder.java new file mode 100644 index 000000000..77d7e405a --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SpecialistPoolOrBuilder.java @@ -0,0 +1,204 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/specialist_pool.proto + +package com.google.cloud.aiplatform.v1; + +public interface SpecialistPoolOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.SpecialistPool) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the SpecialistPool.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The resource name of the SpecialistPool.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The user-defined name of the SpecialistPool.
+   * The name can be up to 128 characters long and can be consist of any UTF-8
+   * characters.
+   * This field should be unique on project-level.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Required. The user-defined name of the SpecialistPool.
+   * The name can be up to 128 characters long and can be consist of any UTF-8
+   * characters.
+   * This field should be unique on project-level.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Output only. The number of Specialists in this SpecialistPool.
+   * 
+ * + * int32 specialist_managers_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The specialistManagersCount. + */ + int getSpecialistManagersCount(); + + /** + * + * + *
+   * The email addresses of the specialists in the SpecialistPool.
+   * 
+ * + * repeated string specialist_manager_emails = 4; + * + * @return A list containing the specialistManagerEmails. + */ + java.util.List getSpecialistManagerEmailsList(); + /** + * + * + *
+   * The email addresses of the specialists in the SpecialistPool.
+   * 
+ * + * repeated string specialist_manager_emails = 4; + * + * @return The count of specialistManagerEmails. + */ + int getSpecialistManagerEmailsCount(); + /** + * + * + *
+   * The email addresses of the specialists in the SpecialistPool.
+   * 
+ * + * repeated string specialist_manager_emails = 4; + * + * @param index The index of the element to return. + * @return The specialistManagerEmails at the given index. + */ + java.lang.String getSpecialistManagerEmails(int index); + /** + * + * + *
+   * The email addresses of the specialists in the SpecialistPool.
+   * 
+ * + * repeated string specialist_manager_emails = 4; + * + * @param index The index of the value to return. + * @return The bytes of the specialistManagerEmails at the given index. + */ + com.google.protobuf.ByteString getSpecialistManagerEmailsBytes(int index); + + /** + * + * + *
+   * Output only. The resource name of the pending data labeling jobs.
+   * 
+ * + * + * repeated string pending_data_labeling_jobs = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the pendingDataLabelingJobs. + */ + java.util.List getPendingDataLabelingJobsList(); + /** + * + * + *
+   * Output only. The resource name of the pending data labeling jobs.
+   * 
+ * + * + * repeated string pending_data_labeling_jobs = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of pendingDataLabelingJobs. + */ + int getPendingDataLabelingJobsCount(); + /** + * + * + *
+   * Output only. The resource name of the pending data labeling jobs.
+   * 
+ * + * + * repeated string pending_data_labeling_jobs = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The pendingDataLabelingJobs at the given index. + */ + java.lang.String getPendingDataLabelingJobs(int index); + /** + * + * + *
+   * Output only. The resource name of the pending data labeling jobs.
+   * 
+ * + * + * repeated string pending_data_labeling_jobs = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The bytes of the pendingDataLabelingJobs at the given index. + */ + com.google.protobuf.ByteString getPendingDataLabelingJobsBytes(int index); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SpecialistPoolProto.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SpecialistPoolProto.java new file mode 100644 index 000000000..2f9025092 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SpecialistPoolProto.java @@ -0,0 +1,92 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/specialist_pool.proto + +package com.google.cloud.aiplatform.v1; + +public final class SpecialistPoolProto { + private SpecialistPoolProto() {} + + 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_v1_SpecialistPool_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_SpecialistPool_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n0google/cloud/aiplatform/v1/specialist_" + + "pool.proto\022\032google.cloud.aiplatform.v1\032\037" + + "google/api/field_behavior.proto\032\031google/" + + "api/resource.proto\032\034google/api/annotatio" + + "ns.proto\"\254\002\n\016SpecialistPool\022\021\n\004name\030\001 \001(" + + "\tB\003\340A\002\022\031\n\014display_name\030\002 \001(\tB\003\340A\002\022&\n\031spe" + + "cialist_managers_count\030\003 \001(\005B\003\340A\003\022!\n\031spe" + + "cialist_manager_emails\030\004 \003(\t\022\'\n\032pending_" + + "data_labeling_jobs\030\005 \003(\tB\003\340A\003:x\352Au\n(aipl" + + "atform.googleapis.com/SpecialistPool\022Ipr" + + "ojects/{project}/locations/{location}/sp" + + "ecialistPools/{specialist_pool}B}\n\036com.g" + + "oogle.cloud.aiplatform.v1B\023SpecialistPoo" + + "lProtoP\001ZDgoogle.golang.org/genproto/goo" + + "gleapis/cloud/aiplatform/v1;aiplatformb\006" + + "proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1_SpecialistPool_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_SpecialistPool_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_SpecialistPool_descriptor, + new java.lang.String[] { + "Name", + "DisplayName", + "SpecialistManagersCount", + "SpecialistManagerEmails", + "PendingDataLabelingJobs", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SpecialistPoolServiceProto.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SpecialistPoolServiceProto.java new file mode 100644 index 000000000..9a46c5d97 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SpecialistPoolServiceProto.java @@ -0,0 +1,245 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/specialist_pool_service.proto + +package com.google.cloud.aiplatform.v1; + +public final class SpecialistPoolServiceProto { + private SpecialistPoolServiceProto() {} + + 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_v1_CreateSpecialistPoolRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_CreateSpecialistPoolRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_CreateSpecialistPoolOperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_CreateSpecialistPoolOperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_GetSpecialistPoolRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_GetSpecialistPoolRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ListSpecialistPoolsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ListSpecialistPoolsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ListSpecialistPoolsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ListSpecialistPoolsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_DeleteSpecialistPoolRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_DeleteSpecialistPoolRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_UpdateSpecialistPoolRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_UpdateSpecialistPoolRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_UpdateSpecialistPoolOperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_UpdateSpecialistPoolOperationMetadata_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n8google/cloud/aiplatform/v1/specialist_" + + "pool_service.proto\022\032google.cloud.aiplatf" + + "orm.v1\032\034google/api/annotations.proto\032\027go" + + "ogle/api/client.proto\032\037google/api/field_" + + "behavior.proto\032\031google/api/resource.prot" + + "o\032*google/cloud/aiplatform/v1/operation." + + "proto\0320google/cloud/aiplatform/v1/specia" + + "list_pool.proto\032#google/longrunning/oper" + + "ations.proto\032 google/protobuf/field_mask" + + ".proto\"\242\001\n\033CreateSpecialistPoolRequest\0229" + + "\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!locations.google" + + "apis.com/Location\022H\n\017specialist_pool\030\002 \001" + + "(\0132*.google.cloud.aiplatform.v1.Speciali" + + "stPoolB\003\340A\002\"w\n%CreateSpecialistPoolOpera" + + "tionMetadata\022N\n\020generic_metadata\030\001 \001(\01324" + + ".google.cloud.aiplatform.v1.GenericOpera" + + "tionMetadata\"Z\n\030GetSpecialistPoolRequest" + + "\022>\n\004name\030\001 \001(\tB0\340A\002\372A*\n(aiplatform.googl" + + "eapis.com/SpecialistPool\"\255\001\n\032ListSpecial" + + "istPoolsRequest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n" + + "!locations.googleapis.com/Location\022\021\n\tpa" + + "ge_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022-\n\trea" + + "d_mask\030\004 \001(\0132\032.google.protobuf.FieldMask" + + "\"|\n\033ListSpecialistPoolsResponse\022D\n\020speci" + + "alist_pools\030\001 \003(\0132*.google.cloud.aiplatf" + + "orm.v1.SpecialistPool\022\027\n\017next_page_token" + + "\030\002 \001(\t\"l\n\033DeleteSpecialistPoolRequest\022>\n" + + "\004name\030\001 \001(\tB0\340A\002\372A*\n(aiplatform.googleap" + + "is.com/SpecialistPool\022\r\n\005force\030\002 \001(\010\"\235\001\n" + + "\033UpdateSpecialistPoolRequest\022H\n\017speciali" + + "st_pool\030\001 \001(\0132*.google.cloud.aiplatform." + + "v1.SpecialistPoolB\003\340A\002\0224\n\013update_mask\030\002 " + + "\001(\0132\032.google.protobuf.FieldMaskB\003\340A\002\"\302\001\n" + + "%UpdateSpecialistPoolOperationMetadata\022I" + + "\n\017specialist_pool\030\001 \001(\tB0\340A\003\372A*\n(aiplatf" + + "orm.googleapis.com/SpecialistPool\022N\n\020gen" + + "eric_metadata\030\002 \001(\01324.google.cloud.aipla" + + "tform.v1.GenericOperationMetadata2\224\n\n\025Sp" + + "ecialistPoolService\022\220\002\n\024CreateSpecialist" + + "Pool\0227.google.cloud.aiplatform.v1.Create" + + "SpecialistPoolRequest\032\035.google.longrunni" + + "ng.Operation\"\237\001\202\323\344\223\002F\"3/v1/{parent=proje" + + "cts/*/locations/*}/specialistPools:\017spec" + + "ialist_pool\332A\026parent,specialist_pool\312A7\n" + + "\016SpecialistPool\022%CreateSpecialistPoolOpe" + + "rationMetadata\022\271\001\n\021GetSpecialistPool\0224.g" + + "oogle.cloud.aiplatform.v1.GetSpecialistP" + + "oolRequest\032*.google.cloud.aiplatform.v1." + + "SpecialistPool\"B\202\323\344\223\0025\0223/v1/{name=projec" + + "ts/*/locations/*/specialistPools/*}\332A\004na" + + "me\022\314\001\n\023ListSpecialistPools\0226.google.clou" + + "d.aiplatform.v1.ListSpecialistPoolsReque" + + "st\0327.google.cloud.aiplatform.v1.ListSpec" + + "ialistPoolsResponse\"D\202\323\344\223\0025\0223/v1/{parent" + + "=projects/*/locations/*}/specialistPools" + + "\332A\006parent\022\345\001\n\024DeleteSpecialistPool\0227.goo" + + "gle.cloud.aiplatform.v1.DeleteSpecialist" + + "PoolRequest\032\035.google.longrunning.Operati" + + "on\"u\202\323\344\223\0025*3/v1/{name=projects/*/locatio" + + "ns/*/specialistPools/*}\332A\004name\312A0\n\025googl" + + "e.protobuf.Empty\022\027DeleteOperationMetadat" + + "a\022\245\002\n\024UpdateSpecialistPool\0227.google.clou" + + "d.aiplatform.v1.UpdateSpecialistPoolRequ" + + "est\032\035.google.longrunning.Operation\"\264\001\202\323\344" + + "\223\002V2C/v1/{specialist_pool.name=projects/" + + "*/locations/*/specialistPools/*}:\017specia" + + "list_pool\332A\033specialist_pool,update_mask\312" + + "A7\n\016SpecialistPool\022%UpdateSpecialistPool" + + "OperationMetadata\032M\312A\031aiplatform.googlea" + + "pis.com\322A.https://www.googleapis.com/aut" + + "h/cloud-platformB\204\001\n\036com.google.cloud.ai" + + "platform.v1B\032SpecialistPoolServiceProtoP" + + "\001ZDgoogle.golang.org/genproto/googleapis" + + "/cloud/aiplatform/v1;aiplatformb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.aiplatform.v1.OperationProto.getDescriptor(), + com.google.cloud.aiplatform.v1.SpecialistPoolProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1_CreateSpecialistPoolRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_CreateSpecialistPoolRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_CreateSpecialistPoolRequest_descriptor, + new java.lang.String[] { + "Parent", "SpecialistPool", + }); + internal_static_google_cloud_aiplatform_v1_CreateSpecialistPoolOperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_aiplatform_v1_CreateSpecialistPoolOperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_CreateSpecialistPoolOperationMetadata_descriptor, + new java.lang.String[] { + "GenericMetadata", + }); + internal_static_google_cloud_aiplatform_v1_GetSpecialistPoolRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_aiplatform_v1_GetSpecialistPoolRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_GetSpecialistPoolRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_aiplatform_v1_ListSpecialistPoolsRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_aiplatform_v1_ListSpecialistPoolsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ListSpecialistPoolsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "ReadMask", + }); + internal_static_google_cloud_aiplatform_v1_ListSpecialistPoolsResponse_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_aiplatform_v1_ListSpecialistPoolsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ListSpecialistPoolsResponse_descriptor, + new java.lang.String[] { + "SpecialistPools", "NextPageToken", + }); + internal_static_google_cloud_aiplatform_v1_DeleteSpecialistPoolRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_aiplatform_v1_DeleteSpecialistPoolRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_DeleteSpecialistPoolRequest_descriptor, + new java.lang.String[] { + "Name", "Force", + }); + internal_static_google_cloud_aiplatform_v1_UpdateSpecialistPoolRequest_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_aiplatform_v1_UpdateSpecialistPoolRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_UpdateSpecialistPoolRequest_descriptor, + new java.lang.String[] { + "SpecialistPool", "UpdateMask", + }); + internal_static_google_cloud_aiplatform_v1_UpdateSpecialistPoolOperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_aiplatform_v1_UpdateSpecialistPoolOperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_UpdateSpecialistPoolOperationMetadata_descriptor, + new java.lang.String[] { + "SpecialistPool", "GenericMetadata", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resourceReference); + registry.add(com.google.longrunning.OperationsProto.operationInfo); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.aiplatform.v1.OperationProto.getDescriptor(); + com.google.cloud.aiplatform.v1.SpecialistPoolProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/StudyProto.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/StudyProto.java new file mode 100644 index 000000000..45d3a0dbd --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/StudyProto.java @@ -0,0 +1,372 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/study.proto + +package com.google.cloud.aiplatform.v1; + +public final class StudyProto { + private StudyProto() {} + + 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_v1_Trial_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_Trial_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_Trial_Parameter_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_Trial_Parameter_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_StudySpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_StudySpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_StudySpec_MetricSpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_StudySpec_MetricSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_DoubleValueSpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_DoubleValueSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_IntegerValueSpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_IntegerValueSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_CategoricalValueSpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_CategoricalValueSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_DiscreteValueSpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_DiscreteValueSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_ConditionalParameterSpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_ConditionalParameterSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_ConditionalParameterSpec_DiscreteValueCondition_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_ConditionalParameterSpec_DiscreteValueCondition_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_ConditionalParameterSpec_IntValueCondition_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_ConditionalParameterSpec_IntValueCondition_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_ConditionalParameterSpec_CategoricalValueCondition_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_ConditionalParameterSpec_CategoricalValueCondition_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_Measurement_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_Measurement_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_Measurement_Metric_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_Measurement_Metric_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/v1/study.proto" + + "\022\032google.cloud.aiplatform.v1\032\037google/api" + + "/field_behavior.proto\032\031google/api/resour" + + "ce.proto\032\036google/protobuf/duration.proto" + + "\032\034google/protobuf/struct.proto\032\037google/p" + + "rotobuf/timestamp.proto\032\036google/protobuf" + + "/wrappers.proto\032\034google/api/annotations." + + "proto\"\267\005\n\005Trial\022\017\n\002id\030\002 \001(\tB\003\340A\003\022;\n\005stat" + + "e\030\003 \001(\0162\'.google.cloud.aiplatform.v1.Tri" + + "al.StateB\003\340A\003\022D\n\nparameters\030\004 \003(\0132+.goog" + + "le.cloud.aiplatform.v1.Trial.ParameterB\003" + + "\340A\003\022G\n\021final_measurement\030\005 \001(\0132\'.google." + + "cloud.aiplatform.v1.MeasurementB\003\340A\003\0223\n\n" + + "start_time\030\007 \001(\0132\032.google.protobuf.Times" + + "tampB\003\340A\003\0221\n\010end_time\030\010 \001(\0132\032.google.pro" + + "tobuf.TimestampB\003\340A\003\022?\n\ncustom_job\030\013 \001(\t" + + "B+\340A\003\372A%\n#aiplatform.googleapis.com/Cust" + + "omJob\032R\n\tParameter\022\031\n\014parameter_id\030\001 \001(\t" + + "B\003\340A\003\022*\n\005value\030\002 \001(\0132\026.google.protobuf.V" + + "alueB\003\340A\003\"f\n\005State\022\025\n\021STATE_UNSPECIFIED\020" + + "\000\022\r\n\tREQUESTED\020\001\022\n\n\006ACTIVE\020\002\022\014\n\010STOPPING" + + "\020\003\022\r\n\tSUCCEEDED\020\004\022\016\n\nINFEASIBLE\020\005:l\352Ai\n\037" + + "aiplatform.googleapis.com/Trial\022Fproject" + + "s/{project}/locations/{location}/studies" + + "/{study}/trials/{trial}\"\366\023\n\tStudySpec\022F\n" + + "\007metrics\030\001 \003(\01320.google.cloud.aiplatform" + + ".v1.StudySpec.MetricSpecB\003\340A\002\022L\n\nparamet" + + "ers\030\002 \003(\01323.google.cloud.aiplatform.v1.S" + + "tudySpec.ParameterSpecB\003\340A\002\022B\n\talgorithm" + + "\030\003 \001(\0162/.google.cloud.aiplatform.v1.Stud" + + "ySpec.Algorithm\022Q\n\021observation_noise\030\006 \001" + + "(\01626.google.cloud.aiplatform.v1.StudySpe" + + "c.ObservationNoise\022b\n\032measurement_select" + + "ion_type\030\007 \001(\0162>.google.cloud.aiplatform" + + ".v1.StudySpec.MeasurementSelectionType\032\265" + + "\001\n\nMetricSpec\022\026\n\tmetric_id\030\001 \001(\tB\003\340A\002\022L\n" + + "\004goal\030\002 \001(\01629.google.cloud.aiplatform.v1" + + ".StudySpec.MetricSpec.GoalTypeB\003\340A\002\"A\n\010G" + + "oalType\022\031\n\025GOAL_TYPE_UNSPECIFIED\020\000\022\014\n\010MA" + + "XIMIZE\020\001\022\014\n\010MINIMIZE\020\002\032\225\r\n\rParameterSpec" + + "\022`\n\021double_value_spec\030\002 \001(\0132C.google.clo" + + "ud.aiplatform.v1.StudySpec.ParameterSpec" + + ".DoubleValueSpecH\000\022b\n\022integer_value_spec" + + "\030\003 \001(\0132D.google.cloud.aiplatform.v1.Stud" + + "ySpec.ParameterSpec.IntegerValueSpecH\000\022j" + + "\n\026categorical_value_spec\030\004 \001(\0132H.google." + + "cloud.aiplatform.v1.StudySpec.ParameterS" + + "pec.CategoricalValueSpecH\000\022d\n\023discrete_v" + + "alue_spec\030\005 \001(\0132E.google.cloud.aiplatfor" + + "m.v1.StudySpec.ParameterSpec.DiscreteVal" + + "ueSpecH\000\022\031\n\014parameter_id\030\001 \001(\tB\003\340A\002\022Q\n\ns" + + "cale_type\030\006 \001(\0162=.google.cloud.aiplatfor" + + "m.v1.StudySpec.ParameterSpec.ScaleType\022q" + + "\n\033conditional_parameter_specs\030\n \003(\0132L.go" + + "ogle.cloud.aiplatform.v1.StudySpec.Param" + + "eterSpec.ConditionalParameterSpec\032A\n\017Dou" + + "bleValueSpec\022\026\n\tmin_value\030\001 \001(\001B\003\340A\002\022\026\n\t" + + "max_value\030\002 \001(\001B\003\340A\002\032B\n\020IntegerValueSpec" + + "\022\026\n\tmin_value\030\001 \001(\003B\003\340A\002\022\026\n\tmax_value\030\002 " + + "\001(\003B\003\340A\002\032+\n\024CategoricalValueSpec\022\023\n\006valu" + + "es\030\001 \003(\tB\003\340A\002\032(\n\021DiscreteValueSpec\022\023\n\006va" + + "lues\030\001 \003(\001B\003\340A\002\032\244\005\n\030ConditionalParameter" + + "Spec\022\205\001\n\026parent_discrete_values\030\002 \001(\0132c." + + "google.cloud.aiplatform.v1.StudySpec.Par" + + "ameterSpec.ConditionalParameterSpec.Disc" + + "reteValueConditionH\000\022{\n\021parent_int_value" + + "s\030\003 \001(\0132^.google.cloud.aiplatform.v1.Stu" + + "dySpec.ParameterSpec.ConditionalParamete" + + "rSpec.IntValueConditionH\000\022\213\001\n\031parent_cat" + + "egorical_values\030\004 \001(\0132f.google.cloud.aip" + + "latform.v1.StudySpec.ParameterSpec.Condi" + + "tionalParameterSpec.CategoricalValueCond" + + "itionH\000\022P\n\016parameter_spec\030\001 \001(\01323.google" + + ".cloud.aiplatform.v1.StudySpec.Parameter" + + "SpecB\003\340A\002\032-\n\026DiscreteValueCondition\022\023\n\006v" + + "alues\030\001 \003(\001B\003\340A\002\032(\n\021IntValueCondition\022\023\n" + + "\006values\030\001 \003(\003B\003\340A\002\0320\n\031CategoricalValueCo" + + "ndition\022\023\n\006values\030\001 \003(\tB\003\340A\002B\030\n\026parent_v" + + "alue_condition\"n\n\tScaleType\022\032\n\026SCALE_TYP" + + "E_UNSPECIFIED\020\000\022\025\n\021UNIT_LINEAR_SCALE\020\001\022\022" + + "\n\016UNIT_LOG_SCALE\020\002\022\032\n\026UNIT_REVERSE_LOG_S" + + "CALE\020\003B\026\n\024parameter_value_spec\"J\n\tAlgori" + + "thm\022\031\n\025ALGORITHM_UNSPECIFIED\020\000\022\017\n\013GRID_S" + + "EARCH\020\002\022\021\n\rRANDOM_SEARCH\020\003\"H\n\020Observatio" + + "nNoise\022!\n\035OBSERVATION_NOISE_UNSPECIFIED\020" + + "\000\022\007\n\003LOW\020\001\022\010\n\004HIGH\020\002\"r\n\030MeasurementSelec" + + "tionType\022*\n&MEASUREMENT_SELECTION_TYPE_U" + + "NSPECIFIED\020\000\022\024\n\020LAST_MEASUREMENT\020\001\022\024\n\020BE" + + "ST_MEASUREMENT\020\002\"\242\001\n\013Measurement\022\027\n\nstep" + + "_count\030\002 \001(\003B\003\340A\003\022D\n\007metrics\030\003 \003(\0132..goo" + + "gle.cloud.aiplatform.v1.Measurement.Metr" + + "icB\003\340A\003\0324\n\006Metric\022\026\n\tmetric_id\030\001 \001(\tB\003\340A" + + "\003\022\022\n\005value\030\002 \001(\001B\003\340A\003Bt\n\036com.google.clou" + + "d.aiplatform.v1B\nStudyProtoP\001ZDgoogle.go" + + "lang.org/genproto/googleapis/cloud/aipla" + + "tform/v1;aiplatformb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.protobuf.DurationProto.getDescriptor(), + com.google.protobuf.StructProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.protobuf.WrappersProto.getDescriptor(), + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1_Trial_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_Trial_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_Trial_descriptor, + new java.lang.String[] { + "Id", "State", "Parameters", "FinalMeasurement", "StartTime", "EndTime", "CustomJob", + }); + internal_static_google_cloud_aiplatform_v1_Trial_Parameter_descriptor = + internal_static_google_cloud_aiplatform_v1_Trial_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_aiplatform_v1_Trial_Parameter_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_Trial_Parameter_descriptor, + new java.lang.String[] { + "ParameterId", "Value", + }); + internal_static_google_cloud_aiplatform_v1_StudySpec_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_aiplatform_v1_StudySpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_StudySpec_descriptor, + new java.lang.String[] { + "Metrics", "Parameters", "Algorithm", "ObservationNoise", "MeasurementSelectionType", + }); + internal_static_google_cloud_aiplatform_v1_StudySpec_MetricSpec_descriptor = + internal_static_google_cloud_aiplatform_v1_StudySpec_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_aiplatform_v1_StudySpec_MetricSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_StudySpec_MetricSpec_descriptor, + new java.lang.String[] { + "MetricId", "Goal", + }); + internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_descriptor = + internal_static_google_cloud_aiplatform_v1_StudySpec_descriptor.getNestedTypes().get(1); + internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_descriptor, + new java.lang.String[] { + "DoubleValueSpec", + "IntegerValueSpec", + "CategoricalValueSpec", + "DiscreteValueSpec", + "ParameterId", + "ScaleType", + "ConditionalParameterSpecs", + "ParameterValueSpec", + }); + internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_DoubleValueSpec_descriptor = + internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_DoubleValueSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_DoubleValueSpec_descriptor, + new java.lang.String[] { + "MinValue", "MaxValue", + }); + internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_IntegerValueSpec_descriptor = + internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_IntegerValueSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_IntegerValueSpec_descriptor, + new java.lang.String[] { + "MinValue", "MaxValue", + }); + internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_CategoricalValueSpec_descriptor = + internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_descriptor + .getNestedTypes() + .get(2); + internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_CategoricalValueSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_CategoricalValueSpec_descriptor, + new java.lang.String[] { + "Values", + }); + internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_DiscreteValueSpec_descriptor = + internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_descriptor + .getNestedTypes() + .get(3); + internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_DiscreteValueSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_DiscreteValueSpec_descriptor, + new java.lang.String[] { + "Values", + }); + internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_ConditionalParameterSpec_descriptor = + internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_descriptor + .getNestedTypes() + .get(4); + internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_ConditionalParameterSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_ConditionalParameterSpec_descriptor, + new java.lang.String[] { + "ParentDiscreteValues", + "ParentIntValues", + "ParentCategoricalValues", + "ParameterSpec", + "ParentValueCondition", + }); + internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_ConditionalParameterSpec_DiscreteValueCondition_descriptor = + internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_ConditionalParameterSpec_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_ConditionalParameterSpec_DiscreteValueCondition_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_ConditionalParameterSpec_DiscreteValueCondition_descriptor, + new java.lang.String[] { + "Values", + }); + internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_ConditionalParameterSpec_IntValueCondition_descriptor = + internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_ConditionalParameterSpec_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_ConditionalParameterSpec_IntValueCondition_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_ConditionalParameterSpec_IntValueCondition_descriptor, + new java.lang.String[] { + "Values", + }); + internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_ConditionalParameterSpec_CategoricalValueCondition_descriptor = + internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_ConditionalParameterSpec_descriptor + .getNestedTypes() + .get(2); + internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_ConditionalParameterSpec_CategoricalValueCondition_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_ConditionalParameterSpec_CategoricalValueCondition_descriptor, + new java.lang.String[] { + "Values", + }); + internal_static_google_cloud_aiplatform_v1_Measurement_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_aiplatform_v1_Measurement_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_Measurement_descriptor, + new java.lang.String[] { + "StepCount", "Metrics", + }); + internal_static_google_cloud_aiplatform_v1_Measurement_Metric_descriptor = + internal_static_google_cloud_aiplatform_v1_Measurement_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_aiplatform_v1_Measurement_Metric_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_Measurement_Metric_descriptor, + new java.lang.String[] { + "MetricId", "Value", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.DurationProto.getDescriptor(); + com.google.protobuf.StructProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.protobuf.WrappersProto.getDescriptor(); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/StudySpec.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/StudySpec.java new file mode 100644 index 000000000..d345f9743 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/StudySpec.java @@ -0,0 +1,14913 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/study.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Represents specification of a Study.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.StudySpec} + */ +public final class StudySpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.StudySpec) + StudySpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use StudySpec.newBuilder() to construct. + private StudySpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private StudySpec() { + metrics_ = java.util.Collections.emptyList(); + parameters_ = java.util.Collections.emptyList(); + algorithm_ = 0; + observationNoise_ = 0; + measurementSelectionType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new StudySpec(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private StudySpec( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + metrics_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + metrics_.add( + input.readMessage( + com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.parser(), + extensionRegistry)); + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + parameters_ = + new java.util.ArrayList< + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec>(); + mutable_bitField0_ |= 0x00000002; + } + parameters_.add( + input.readMessage( + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.parser(), + extensionRegistry)); + break; + } + case 24: + { + int rawValue = input.readEnum(); + + algorithm_ = rawValue; + break; + } + case 48: + { + int rawValue = input.readEnum(); + + observationNoise_ = rawValue; + break; + } + case 56: + { + int rawValue = input.readEnum(); + + measurementSelectionType_ = 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 { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + metrics_ = java.util.Collections.unmodifiableList(metrics_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + parameters_ = java.util.Collections.unmodifiableList(parameters_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_StudySpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_StudySpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.StudySpec.class, + com.google.cloud.aiplatform.v1.StudySpec.Builder.class); + } + + /** + * + * + *
+   * The available search algorithms for the Study.
+   * 
+ * + * Protobuf enum {@code google.cloud.aiplatform.v1.StudySpec.Algorithm} + */ + public enum Algorithm implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The default algorithm used by AI Platform Optimization service.
+     * 
+ * + * ALGORITHM_UNSPECIFIED = 0; + */ + ALGORITHM_UNSPECIFIED(0), + /** + * + * + *
+     * Simple grid search within the feasible space. To use grid search,
+     * all parameters must be `INTEGER`, `CATEGORICAL`, or `DISCRETE`.
+     * 
+ * + * GRID_SEARCH = 2; + */ + GRID_SEARCH(2), + /** + * + * + *
+     * Simple random search within the feasible space.
+     * 
+ * + * RANDOM_SEARCH = 3; + */ + RANDOM_SEARCH(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The default algorithm used by AI Platform Optimization service.
+     * 
+ * + * ALGORITHM_UNSPECIFIED = 0; + */ + public static final int ALGORITHM_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Simple grid search within the feasible space. To use grid search,
+     * all parameters must be `INTEGER`, `CATEGORICAL`, or `DISCRETE`.
+     * 
+ * + * GRID_SEARCH = 2; + */ + public static final int GRID_SEARCH_VALUE = 2; + /** + * + * + *
+     * Simple random search within the feasible space.
+     * 
+ * + * RANDOM_SEARCH = 3; + */ + public static final int RANDOM_SEARCH_VALUE = 3; + + 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 Algorithm 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 Algorithm forNumber(int value) { + switch (value) { + case 0: + return ALGORITHM_UNSPECIFIED; + case 2: + return GRID_SEARCH; + case 3: + return RANDOM_SEARCH; + 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 Algorithm findValueByNumber(int number) { + return Algorithm.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.v1.StudySpec.getDescriptor().getEnumTypes().get(0); + } + + private static final Algorithm[] VALUES = values(); + + public static Algorithm 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 Algorithm(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.aiplatform.v1.StudySpec.Algorithm) + } + + /** + * + * + *
+   * Describes the noise level of the repeated observations.
+   * "Noisy" means that the repeated observations with the same Trial parameters
+   * may lead to different metric evaluations.
+   * 
+ * + * Protobuf enum {@code google.cloud.aiplatform.v1.StudySpec.ObservationNoise} + */ + public enum ObservationNoise implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The default noise level chosen by the AI Platform service.
+     * 
+ * + * OBSERVATION_NOISE_UNSPECIFIED = 0; + */ + OBSERVATION_NOISE_UNSPECIFIED(0), + /** + * + * + *
+     * AI Platform Vizier assumes that the objective function is (nearly)
+     * perfectly reproducible, and will never repeat the same Trial
+     * parameters.
+     * 
+ * + * LOW = 1; + */ + LOW(1), + /** + * + * + *
+     * AI Platform Vizier will estimate the amount of noise in metric
+     * evaluations, it may repeat the same Trial parameters more than once.
+     * 
+ * + * HIGH = 2; + */ + HIGH(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The default noise level chosen by the AI Platform service.
+     * 
+ * + * OBSERVATION_NOISE_UNSPECIFIED = 0; + */ + public static final int OBSERVATION_NOISE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * AI Platform Vizier assumes that the objective function is (nearly)
+     * perfectly reproducible, and will never repeat the same Trial
+     * parameters.
+     * 
+ * + * LOW = 1; + */ + public static final int LOW_VALUE = 1; + /** + * + * + *
+     * AI Platform Vizier will estimate the amount of noise in metric
+     * evaluations, it may repeat the same Trial parameters more than once.
+     * 
+ * + * HIGH = 2; + */ + public static final int HIGH_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 ObservationNoise 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 ObservationNoise forNumber(int value) { + switch (value) { + case 0: + return OBSERVATION_NOISE_UNSPECIFIED; + case 1: + return LOW; + case 2: + return HIGH; + 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 ObservationNoise findValueByNumber(int number) { + return ObservationNoise.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.v1.StudySpec.getDescriptor().getEnumTypes().get(1); + } + + private static final ObservationNoise[] VALUES = values(); + + public static ObservationNoise 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 ObservationNoise(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.aiplatform.v1.StudySpec.ObservationNoise) + } + + /** + * + * + *
+   * This indicates which measurement to use if/when the service automatically
+   * selects the final measurement from previously reported intermediate
+   * measurements. Choose this based on two considerations:
+   *  A) Do you expect your measurements to monotonically improve?
+   *     If so, choose LAST_MEASUREMENT. On the other hand, if you're in a
+   *     situation where your system can "over-train" and you expect the
+   *     performance to get better for a while but then start declining,
+   *     choose BEST_MEASUREMENT.
+   *  B) Are your measurements significantly noisy and/or irreproducible?
+   *     If so, BEST_MEASUREMENT will tend to be over-optimistic, and it
+   *     may be better to choose LAST_MEASUREMENT.
+   *  If both or neither of (A) and (B) apply, it doesn't matter which
+   *  selection type is chosen.
+   * 
+ * + * Protobuf enum {@code google.cloud.aiplatform.v1.StudySpec.MeasurementSelectionType} + */ + public enum MeasurementSelectionType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Will be treated as LAST_MEASUREMENT.
+     * 
+ * + * MEASUREMENT_SELECTION_TYPE_UNSPECIFIED = 0; + */ + MEASUREMENT_SELECTION_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Use the last measurement reported.
+     * 
+ * + * LAST_MEASUREMENT = 1; + */ + LAST_MEASUREMENT(1), + /** + * + * + *
+     * Use the best measurement reported.
+     * 
+ * + * BEST_MEASUREMENT = 2; + */ + BEST_MEASUREMENT(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Will be treated as LAST_MEASUREMENT.
+     * 
+ * + * MEASUREMENT_SELECTION_TYPE_UNSPECIFIED = 0; + */ + public static final int MEASUREMENT_SELECTION_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Use the last measurement reported.
+     * 
+ * + * LAST_MEASUREMENT = 1; + */ + public static final int LAST_MEASUREMENT_VALUE = 1; + /** + * + * + *
+     * Use the best measurement reported.
+     * 
+ * + * BEST_MEASUREMENT = 2; + */ + public static final int BEST_MEASUREMENT_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 MeasurementSelectionType 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 MeasurementSelectionType forNumber(int value) { + switch (value) { + case 0: + return MEASUREMENT_SELECTION_TYPE_UNSPECIFIED; + case 1: + return LAST_MEASUREMENT; + case 2: + return BEST_MEASUREMENT; + 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 MeasurementSelectionType findValueByNumber(int number) { + return MeasurementSelectionType.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.v1.StudySpec.getDescriptor().getEnumTypes().get(2); + } + + private static final MeasurementSelectionType[] VALUES = values(); + + public static MeasurementSelectionType 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 MeasurementSelectionType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.aiplatform.v1.StudySpec.MeasurementSelectionType) + } + + public interface MetricSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.StudySpec.MetricSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The ID of the metric. Must not contain whitespaces and must be unique
+     * amongst all MetricSpecs.
+     * 
+ * + * string metric_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The metricId. + */ + java.lang.String getMetricId(); + /** + * + * + *
+     * Required. The ID of the metric. Must not contain whitespaces and must be unique
+     * amongst all MetricSpecs.
+     * 
+ * + * string metric_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for metricId. + */ + com.google.protobuf.ByteString getMetricIdBytes(); + + /** + * + * + *
+     * Required. The optimization goal of the metric.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.MetricSpec.GoalType goal = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for goal. + */ + int getGoalValue(); + /** + * + * + *
+     * Required. The optimization goal of the metric.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.MetricSpec.GoalType goal = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The goal. + */ + com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.GoalType getGoal(); + } + /** + * + * + *
+   * Represents a metric to optimize.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.StudySpec.MetricSpec} + */ + public static final class MetricSpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.StudySpec.MetricSpec) + MetricSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use MetricSpec.newBuilder() to construct. + private MetricSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MetricSpec() { + metricId_ = ""; + goal_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MetricSpec(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private MetricSpec( + 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(); + + metricId_ = s; + break; + } + case 16: + { + int rawValue = input.readEnum(); + + goal_ = 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.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_StudySpec_MetricSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_StudySpec_MetricSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.class, + com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.Builder.class); + } + + /** + * + * + *
+     * The available types of optimization goals.
+     * 
+ * + * Protobuf enum {@code google.cloud.aiplatform.v1.StudySpec.MetricSpec.GoalType} + */ + public enum GoalType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Goal Type will default to maximize.
+       * 
+ * + * GOAL_TYPE_UNSPECIFIED = 0; + */ + GOAL_TYPE_UNSPECIFIED(0), + /** + * + * + *
+       * Maximize the goal metric.
+       * 
+ * + * MAXIMIZE = 1; + */ + MAXIMIZE(1), + /** + * + * + *
+       * Minimize the goal metric.
+       * 
+ * + * MINIMIZE = 2; + */ + MINIMIZE(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * Goal Type will default to maximize.
+       * 
+ * + * GOAL_TYPE_UNSPECIFIED = 0; + */ + public static final int GOAL_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * Maximize the goal metric.
+       * 
+ * + * MAXIMIZE = 1; + */ + public static final int MAXIMIZE_VALUE = 1; + /** + * + * + *
+       * Minimize the goal metric.
+       * 
+ * + * MINIMIZE = 2; + */ + public static final int MINIMIZE_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 GoalType 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 GoalType forNumber(int value) { + switch (value) { + case 0: + return GOAL_TYPE_UNSPECIFIED; + case 1: + return MAXIMIZE; + case 2: + return MINIMIZE; + 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 GoalType findValueByNumber(int number) { + return GoalType.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.v1.StudySpec.MetricSpec.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final GoalType[] VALUES = values(); + + public static GoalType 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 GoalType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.aiplatform.v1.StudySpec.MetricSpec.GoalType) + } + + public static final int METRIC_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object metricId_; + /** + * + * + *
+     * Required. The ID of the metric. Must not contain whitespaces and must be unique
+     * amongst all MetricSpecs.
+     * 
+ * + * string metric_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The metricId. + */ + @java.lang.Override + public java.lang.String getMetricId() { + java.lang.Object ref = metricId_; + 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(); + metricId_ = s; + return s; + } + } + /** + * + * + *
+     * Required. The ID of the metric. Must not contain whitespaces and must be unique
+     * amongst all MetricSpecs.
+     * 
+ * + * string metric_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for metricId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMetricIdBytes() { + java.lang.Object ref = metricId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + metricId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GOAL_FIELD_NUMBER = 2; + private int goal_; + /** + * + * + *
+     * Required. The optimization goal of the metric.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.MetricSpec.GoalType goal = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for goal. + */ + @java.lang.Override + public int getGoalValue() { + return goal_; + } + /** + * + * + *
+     * Required. The optimization goal of the metric.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.MetricSpec.GoalType goal = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The goal. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.GoalType getGoal() { + @SuppressWarnings("deprecation") + com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.GoalType result = + com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.GoalType.valueOf(goal_); + return result == null + ? com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.GoalType.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 (!getMetricIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, metricId_); + } + if (goal_ + != com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.GoalType.GOAL_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, goal_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getMetricIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, metricId_); + } + if (goal_ + != com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.GoalType.GOAL_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, goal_); + } + 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.v1.StudySpec.MetricSpec)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.StudySpec.MetricSpec other = + (com.google.cloud.aiplatform.v1.StudySpec.MetricSpec) obj; + + if (!getMetricId().equals(other.getMetricId())) return false; + if (goal_ != other.goal_) 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) + METRIC_ID_FIELD_NUMBER; + hash = (53 * hash) + getMetricId().hashCode(); + hash = (37 * hash) + GOAL_FIELD_NUMBER; + hash = (53 * hash) + goal_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.StudySpec.MetricSpec parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.MetricSpec 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.v1.StudySpec.MetricSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.MetricSpec 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.v1.StudySpec.MetricSpec parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.MetricSpec parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.MetricSpec parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.MetricSpec 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.v1.StudySpec.MetricSpec parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.MetricSpec 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.v1.StudySpec.MetricSpec parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.MetricSpec 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.v1.StudySpec.MetricSpec 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 metric to optimize.
+     * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.StudySpec.MetricSpec} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.StudySpec.MetricSpec) + com.google.cloud.aiplatform.v1.StudySpec.MetricSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_StudySpec_MetricSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_StudySpec_MetricSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.class, + com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.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(); + metricId_ = ""; + + goal_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_StudySpec_MetricSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.MetricSpec getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.MetricSpec build() { + com.google.cloud.aiplatform.v1.StudySpec.MetricSpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.MetricSpec buildPartial() { + com.google.cloud.aiplatform.v1.StudySpec.MetricSpec result = + new com.google.cloud.aiplatform.v1.StudySpec.MetricSpec(this); + result.metricId_ = metricId_; + result.goal_ = goal_; + 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.v1.StudySpec.MetricSpec) { + return mergeFrom((com.google.cloud.aiplatform.v1.StudySpec.MetricSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.StudySpec.MetricSpec other) { + if (other == com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.getDefaultInstance()) + return this; + if (!other.getMetricId().isEmpty()) { + metricId_ = other.metricId_; + onChanged(); + } + if (other.goal_ != 0) { + setGoalValue(other.getGoalValue()); + } + 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.v1.StudySpec.MetricSpec parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.StudySpec.MetricSpec) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object metricId_ = ""; + /** + * + * + *
+       * Required. The ID of the metric. Must not contain whitespaces and must be unique
+       * amongst all MetricSpecs.
+       * 
+ * + * string metric_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The metricId. + */ + public java.lang.String getMetricId() { + java.lang.Object ref = metricId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + metricId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. The ID of the metric. Must not contain whitespaces and must be unique
+       * amongst all MetricSpecs.
+       * 
+ * + * string metric_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for metricId. + */ + public com.google.protobuf.ByteString getMetricIdBytes() { + java.lang.Object ref = metricId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + metricId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. The ID of the metric. Must not contain whitespaces and must be unique
+       * amongst all MetricSpecs.
+       * 
+ * + * string metric_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The metricId to set. + * @return This builder for chaining. + */ + public Builder setMetricId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + metricId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The ID of the metric. Must not contain whitespaces and must be unique
+       * amongst all MetricSpecs.
+       * 
+ * + * string metric_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearMetricId() { + + metricId_ = getDefaultInstance().getMetricId(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The ID of the metric. Must not contain whitespaces and must be unique
+       * amongst all MetricSpecs.
+       * 
+ * + * string metric_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for metricId to set. + * @return This builder for chaining. + */ + public Builder setMetricIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + metricId_ = value; + onChanged(); + return this; + } + + private int goal_ = 0; + /** + * + * + *
+       * Required. The optimization goal of the metric.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.MetricSpec.GoalType goal = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for goal. + */ + @java.lang.Override + public int getGoalValue() { + return goal_; + } + /** + * + * + *
+       * Required. The optimization goal of the metric.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.MetricSpec.GoalType goal = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for goal to set. + * @return This builder for chaining. + */ + public Builder setGoalValue(int value) { + + goal_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The optimization goal of the metric.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.MetricSpec.GoalType goal = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The goal. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.GoalType getGoal() { + @SuppressWarnings("deprecation") + com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.GoalType result = + com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.GoalType.valueOf(goal_); + return result == null + ? com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.GoalType.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * Required. The optimization goal of the metric.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.MetricSpec.GoalType goal = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The goal to set. + * @return This builder for chaining. + */ + public Builder setGoal(com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.GoalType value) { + if (value == null) { + throw new NullPointerException(); + } + + goal_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The optimization goal of the metric.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.MetricSpec.GoalType goal = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearGoal() { + + goal_ = 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.v1.StudySpec.MetricSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.StudySpec.MetricSpec) + private static final com.google.cloud.aiplatform.v1.StudySpec.MetricSpec DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.StudySpec.MetricSpec(); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.MetricSpec getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MetricSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new MetricSpec(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.v1.StudySpec.MetricSpec getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ParameterSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.StudySpec.ParameterSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The value spec for a 'DOUBLE' parameter.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec double_value_spec = 2; + * + * + * @return Whether the doubleValueSpec field is set. + */ + boolean hasDoubleValueSpec(); + /** + * + * + *
+     * The value spec for a 'DOUBLE' parameter.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec double_value_spec = 2; + * + * + * @return The doubleValueSpec. + */ + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec getDoubleValueSpec(); + /** + * + * + *
+     * The value spec for a 'DOUBLE' parameter.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec double_value_spec = 2; + * + */ + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpecOrBuilder + getDoubleValueSpecOrBuilder(); + + /** + * + * + *
+     * The value spec for an 'INTEGER' parameter.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec integer_value_spec = 3; + * + * + * @return Whether the integerValueSpec field is set. + */ + boolean hasIntegerValueSpec(); + /** + * + * + *
+     * The value spec for an 'INTEGER' parameter.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec integer_value_spec = 3; + * + * + * @return The integerValueSpec. + */ + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec getIntegerValueSpec(); + /** + * + * + *
+     * The value spec for an 'INTEGER' parameter.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec integer_value_spec = 3; + * + */ + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpecOrBuilder + getIntegerValueSpecOrBuilder(); + + /** + * + * + *
+     * The value spec for a 'CATEGORICAL' parameter.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec categorical_value_spec = 4; + * + * + * @return Whether the categoricalValueSpec field is set. + */ + boolean hasCategoricalValueSpec(); + /** + * + * + *
+     * The value spec for a 'CATEGORICAL' parameter.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec categorical_value_spec = 4; + * + * + * @return The categoricalValueSpec. + */ + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec + getCategoricalValueSpec(); + /** + * + * + *
+     * The value spec for a 'CATEGORICAL' parameter.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec categorical_value_spec = 4; + * + */ + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpecOrBuilder + getCategoricalValueSpecOrBuilder(); + + /** + * + * + *
+     * The value spec for a 'DISCRETE' parameter.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec discrete_value_spec = 5; + * + * + * @return Whether the discreteValueSpec field is set. + */ + boolean hasDiscreteValueSpec(); + /** + * + * + *
+     * The value spec for a 'DISCRETE' parameter.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec discrete_value_spec = 5; + * + * + * @return The discreteValueSpec. + */ + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec getDiscreteValueSpec(); + /** + * + * + *
+     * The value spec for a 'DISCRETE' parameter.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec discrete_value_spec = 5; + * + */ + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpecOrBuilder + getDiscreteValueSpecOrBuilder(); + + /** + * + * + *
+     * Required. The ID of the parameter. Must not contain whitespaces and must be unique
+     * amongst all ParameterSpecs.
+     * 
+ * + * string parameter_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parameterId. + */ + java.lang.String getParameterId(); + /** + * + * + *
+     * Required. The ID of the parameter. Must not contain whitespaces and must be unique
+     * amongst all ParameterSpecs.
+     * 
+ * + * string parameter_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parameterId. + */ + com.google.protobuf.ByteString getParameterIdBytes(); + + /** + * + * + *
+     * How the parameter should be scaled.
+     * Leave unset for `CATEGORICAL` parameters.
+     * 
+ * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ScaleType scale_type = 6; + * + * @return The enum numeric value on the wire for scaleType. + */ + int getScaleTypeValue(); + /** + * + * + *
+     * How the parameter should be scaled.
+     * Leave unset for `CATEGORICAL` parameters.
+     * 
+ * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ScaleType scale_type = 6; + * + * @return The scaleType. + */ + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ScaleType getScaleType(); + + /** + * + * + *
+     * A conditional parameter node is active if the parameter's value matches
+     * the conditional node's parent_value_condition.
+     * If two items in conditional_parameter_specs have the same name, they
+     * must have disjoint parent_value_condition.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec conditional_parameter_specs = 10; + * + */ + java.util.List + getConditionalParameterSpecsList(); + /** + * + * + *
+     * A conditional parameter node is active if the parameter's value matches
+     * the conditional node's parent_value_condition.
+     * If two items in conditional_parameter_specs have the same name, they
+     * must have disjoint parent_value_condition.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec conditional_parameter_specs = 10; + * + */ + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + getConditionalParameterSpecs(int index); + /** + * + * + *
+     * A conditional parameter node is active if the parameter's value matches
+     * the conditional node's parent_value_condition.
+     * If two items in conditional_parameter_specs have the same name, they
+     * must have disjoint parent_value_condition.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec conditional_parameter_specs = 10; + * + */ + int getConditionalParameterSpecsCount(); + /** + * + * + *
+     * A conditional parameter node is active if the parameter's value matches
+     * the conditional node's parent_value_condition.
+     * If two items in conditional_parameter_specs have the same name, they
+     * must have disjoint parent_value_condition.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec conditional_parameter_specs = 10; + * + */ + java.util.List< + ? extends + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec + .ConditionalParameterSpecOrBuilder> + getConditionalParameterSpecsOrBuilderList(); + /** + * + * + *
+     * A conditional parameter node is active if the parameter's value matches
+     * the conditional node's parent_value_condition.
+     * If two items in conditional_parameter_specs have the same name, they
+     * must have disjoint parent_value_condition.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec conditional_parameter_specs = 10; + * + */ + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpecOrBuilder + getConditionalParameterSpecsOrBuilder(int index); + + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ParameterValueSpecCase + getParameterValueSpecCase(); + } + /** + * + * + *
+   * Represents a single parameter to optimize.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.StudySpec.ParameterSpec} + */ + public static final class ParameterSpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.StudySpec.ParameterSpec) + ParameterSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use ParameterSpec.newBuilder() to construct. + private ParameterSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ParameterSpec() { + parameterId_ = ""; + scaleType_ = 0; + conditionalParameterSpecs_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ParameterSpec(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ParameterSpec( + 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(); + + parameterId_ = s; + break; + } + case 18: + { + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec.Builder + subBuilder = null; + if (parameterValueSpecCase_ == 2) { + subBuilder = + ((com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec) + parameterValueSpec_) + .toBuilder(); + } + parameterValueSpec_ = + input.readMessage( + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec) + parameterValueSpec_); + parameterValueSpec_ = subBuilder.buildPartial(); + } + parameterValueSpecCase_ = 2; + break; + } + case 26: + { + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec.Builder + subBuilder = null; + if (parameterValueSpecCase_ == 3) { + subBuilder = + ((com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec) + parameterValueSpec_) + .toBuilder(); + } + parameterValueSpec_ = + input.readMessage( + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec) + parameterValueSpec_); + parameterValueSpec_ = subBuilder.buildPartial(); + } + parameterValueSpecCase_ = 3; + break; + } + case 34: + { + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec.Builder + subBuilder = null; + if (parameterValueSpecCase_ == 4) { + subBuilder = + ((com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec) + parameterValueSpec_) + .toBuilder(); + } + parameterValueSpec_ = + input.readMessage( + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec) + parameterValueSpec_); + parameterValueSpec_ = subBuilder.buildPartial(); + } + parameterValueSpecCase_ = 4; + break; + } + case 42: + { + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec.Builder + subBuilder = null; + if (parameterValueSpecCase_ == 5) { + subBuilder = + ((com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec) + parameterValueSpec_) + .toBuilder(); + } + parameterValueSpec_ = + input.readMessage( + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec) + parameterValueSpec_); + parameterValueSpec_ = subBuilder.buildPartial(); + } + parameterValueSpecCase_ = 5; + break; + } + case 48: + { + int rawValue = input.readEnum(); + + scaleType_ = rawValue; + break; + } + case 82: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + conditionalParameterSpecs_ = + new java.util.ArrayList< + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec + .ConditionalParameterSpec>(); + mutable_bitField0_ |= 0x00000001; + } + conditionalParameterSpecs_.add( + input.readMessage( + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec + .ConditionalParameterSpec.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)) { + conditionalParameterSpecs_ = + java.util.Collections.unmodifiableList(conditionalParameterSpecs_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.class, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.Builder.class); + } + + /** + * + * + *
+     * The type of scaling that should be applied to this parameter.
+     * 
+ * + * Protobuf enum {@code google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ScaleType} + */ + public enum ScaleType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * By default, no scaling is applied.
+       * 
+ * + * SCALE_TYPE_UNSPECIFIED = 0; + */ + SCALE_TYPE_UNSPECIFIED(0), + /** + * + * + *
+       * Scales the feasible space to (0, 1) linearly.
+       * 
+ * + * UNIT_LINEAR_SCALE = 1; + */ + UNIT_LINEAR_SCALE(1), + /** + * + * + *
+       * Scales the feasible space logarithmically to (0, 1). The entire
+       * feasible space must be strictly positive.
+       * 
+ * + * UNIT_LOG_SCALE = 2; + */ + UNIT_LOG_SCALE(2), + /** + * + * + *
+       * Scales the feasible space "reverse" logarithmically to (0, 1). The
+       * result is that values close to the top of the feasible space are spread
+       * out more than points near the bottom. The entire feasible space must be
+       * strictly positive.
+       * 
+ * + * UNIT_REVERSE_LOG_SCALE = 3; + */ + UNIT_REVERSE_LOG_SCALE(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * By default, no scaling is applied.
+       * 
+ * + * SCALE_TYPE_UNSPECIFIED = 0; + */ + public static final int SCALE_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * Scales the feasible space to (0, 1) linearly.
+       * 
+ * + * UNIT_LINEAR_SCALE = 1; + */ + public static final int UNIT_LINEAR_SCALE_VALUE = 1; + /** + * + * + *
+       * Scales the feasible space logarithmically to (0, 1). The entire
+       * feasible space must be strictly positive.
+       * 
+ * + * UNIT_LOG_SCALE = 2; + */ + public static final int UNIT_LOG_SCALE_VALUE = 2; + /** + * + * + *
+       * Scales the feasible space "reverse" logarithmically to (0, 1). The
+       * result is that values close to the top of the feasible space are spread
+       * out more than points near the bottom. The entire feasible space must be
+       * strictly positive.
+       * 
+ * + * UNIT_REVERSE_LOG_SCALE = 3; + */ + public static final int UNIT_REVERSE_LOG_SCALE_VALUE = 3; + + 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 ScaleType 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 ScaleType forNumber(int value) { + switch (value) { + case 0: + return SCALE_TYPE_UNSPECIFIED; + case 1: + return UNIT_LINEAR_SCALE; + case 2: + return UNIT_LOG_SCALE; + case 3: + return UNIT_REVERSE_LOG_SCALE; + 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 ScaleType findValueByNumber(int number) { + return ScaleType.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.v1.StudySpec.ParameterSpec.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final ScaleType[] VALUES = values(); + + public static ScaleType 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 ScaleType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ScaleType) + } + + public interface DoubleValueSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Required. Inclusive minimum value of the parameter.
+       * 
+ * + * double min_value = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The minValue. + */ + double getMinValue(); + + /** + * + * + *
+       * Required. Inclusive maximum value of the parameter.
+       * 
+ * + * double max_value = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The maxValue. + */ + double getMaxValue(); + } + /** + * + * + *
+     * Value specification for a parameter in `DOUBLE` type.
+     * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec} + */ + public static final class DoubleValueSpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec) + DoubleValueSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use DoubleValueSpec.newBuilder() to construct. + private DoubleValueSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DoubleValueSpec() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DoubleValueSpec(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DoubleValueSpec( + 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 9: + { + minValue_ = input.readDouble(); + break; + } + case 17: + { + maxValue_ = input.readDouble(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_DoubleValueSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_DoubleValueSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec.class, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec.Builder + .class); + } + + public static final int MIN_VALUE_FIELD_NUMBER = 1; + private double minValue_; + /** + * + * + *
+       * Required. Inclusive minimum value of the parameter.
+       * 
+ * + * double min_value = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The minValue. + */ + @java.lang.Override + public double getMinValue() { + return minValue_; + } + + public static final int MAX_VALUE_FIELD_NUMBER = 2; + private double maxValue_; + /** + * + * + *
+       * Required. Inclusive maximum value of the parameter.
+       * 
+ * + * double max_value = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The maxValue. + */ + @java.lang.Override + public double getMaxValue() { + return maxValue_; + } + + 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 (minValue_ != 0D) { + output.writeDouble(1, minValue_); + } + if (maxValue_ != 0D) { + output.writeDouble(2, maxValue_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (minValue_ != 0D) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(1, minValue_); + } + if (maxValue_ != 0D) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(2, maxValue_); + } + 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.v1.StudySpec.ParameterSpec.DoubleValueSpec)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec other = + (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec) obj; + + if (java.lang.Double.doubleToLongBits(getMinValue()) + != java.lang.Double.doubleToLongBits(other.getMinValue())) return false; + if (java.lang.Double.doubleToLongBits(getMaxValue()) + != java.lang.Double.doubleToLongBits(other.getMaxValue())) 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) + MIN_VALUE_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getMinValue())); + hash = (37 * hash) + MAX_VALUE_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getMaxValue())); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec + 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.v1.StudySpec.ParameterSpec.DoubleValueSpec + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec + 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.v1.StudySpec.ParameterSpec.DoubleValueSpec + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec + 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.v1.StudySpec.ParameterSpec.DoubleValueSpec + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec + 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.v1.StudySpec.ParameterSpec.DoubleValueSpec + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec + 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.v1.StudySpec.ParameterSpec.DoubleValueSpec 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; + } + /** + * + * + *
+       * Value specification for a parameter in `DOUBLE` type.
+       * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec) + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_DoubleValueSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_DoubleValueSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec.class, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec.Builder + .class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec.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(); + minValue_ = 0D; + + maxValue_ = 0D; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_DoubleValueSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec build() { + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec + buildPartial() { + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec result = + new com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec(this); + result.minValue_ = minValue_; + result.maxValue_ = maxValue_; + 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.v1.StudySpec.ParameterSpec.DoubleValueSpec) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec other) { + if (other + == com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec + .getDefaultInstance()) return this; + if (other.getMinValue() != 0D) { + setMinValue(other.getMinValue()); + } + if (other.getMaxValue() != 0D) { + setMaxValue(other.getMaxValue()); + } + 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.v1.StudySpec.ParameterSpec.DoubleValueSpec parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private double minValue_; + /** + * + * + *
+         * Required. Inclusive minimum value of the parameter.
+         * 
+ * + * double min_value = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The minValue. + */ + @java.lang.Override + public double getMinValue() { + return minValue_; + } + /** + * + * + *
+         * Required. Inclusive minimum value of the parameter.
+         * 
+ * + * double min_value = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The minValue to set. + * @return This builder for chaining. + */ + public Builder setMinValue(double value) { + + minValue_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Required. Inclusive minimum value of the parameter.
+         * 
+ * + * double min_value = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearMinValue() { + + minValue_ = 0D; + onChanged(); + return this; + } + + private double maxValue_; + /** + * + * + *
+         * Required. Inclusive maximum value of the parameter.
+         * 
+ * + * double max_value = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The maxValue. + */ + @java.lang.Override + public double getMaxValue() { + return maxValue_; + } + /** + * + * + *
+         * Required. Inclusive maximum value of the parameter.
+         * 
+ * + * double max_value = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The maxValue to set. + * @return This builder for chaining. + */ + public Builder setMaxValue(double value) { + + maxValue_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Required. Inclusive maximum value of the parameter.
+         * 
+ * + * double max_value = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearMaxValue() { + + maxValue_ = 0D; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec) + private static final com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec(); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DoubleValueSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DoubleValueSpec(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.v1.StudySpec.ParameterSpec.DoubleValueSpec + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface IntegerValueSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Required. Inclusive minimum value of the parameter.
+       * 
+ * + * int64 min_value = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The minValue. + */ + long getMinValue(); + + /** + * + * + *
+       * Required. Inclusive maximum value of the parameter.
+       * 
+ * + * int64 max_value = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The maxValue. + */ + long getMaxValue(); + } + /** + * + * + *
+     * Value specification for a parameter in `INTEGER` type.
+     * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec} + */ + public static final class IntegerValueSpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec) + IntegerValueSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use IntegerValueSpec.newBuilder() to construct. + private IntegerValueSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private IntegerValueSpec() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new IntegerValueSpec(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private IntegerValueSpec( + 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: + { + minValue_ = input.readInt64(); + break; + } + case 16: + { + maxValue_ = 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.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_IntegerValueSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_IntegerValueSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec.class, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec.Builder + .class); + } + + public static final int MIN_VALUE_FIELD_NUMBER = 1; + private long minValue_; + /** + * + * + *
+       * Required. Inclusive minimum value of the parameter.
+       * 
+ * + * int64 min_value = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The minValue. + */ + @java.lang.Override + public long getMinValue() { + return minValue_; + } + + public static final int MAX_VALUE_FIELD_NUMBER = 2; + private long maxValue_; + /** + * + * + *
+       * Required. Inclusive maximum value of the parameter.
+       * 
+ * + * int64 max_value = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The maxValue. + */ + @java.lang.Override + public long getMaxValue() { + return maxValue_; + } + + 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 (minValue_ != 0L) { + output.writeInt64(1, minValue_); + } + if (maxValue_ != 0L) { + output.writeInt64(2, maxValue_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (minValue_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, minValue_); + } + if (maxValue_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, maxValue_); + } + 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.v1.StudySpec.ParameterSpec.IntegerValueSpec)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec other = + (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec) obj; + + if (getMinValue() != other.getMinValue()) return false; + if (getMaxValue() != other.getMaxValue()) 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) + MIN_VALUE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getMinValue()); + hash = (37 * hash) + MAX_VALUE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getMaxValue()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec + 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.v1.StudySpec.ParameterSpec.IntegerValueSpec + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec + 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.v1.StudySpec.ParameterSpec.IntegerValueSpec + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec + 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.v1.StudySpec.ParameterSpec.IntegerValueSpec + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec + 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.v1.StudySpec.ParameterSpec.IntegerValueSpec + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec + 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.v1.StudySpec.ParameterSpec.IntegerValueSpec 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; + } + /** + * + * + *
+       * Value specification for a parameter in `INTEGER` type.
+       * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec) + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_IntegerValueSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_IntegerValueSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec.class, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec.Builder + .class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec.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(); + minValue_ = 0L; + + maxValue_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_IntegerValueSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec build() { + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec + buildPartial() { + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec result = + new com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec(this); + result.minValue_ = minValue_; + result.maxValue_ = maxValue_; + 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.v1.StudySpec.ParameterSpec.IntegerValueSpec) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec other) { + if (other + == com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec + .getDefaultInstance()) return this; + if (other.getMinValue() != 0L) { + setMinValue(other.getMinValue()); + } + if (other.getMaxValue() != 0L) { + setMaxValue(other.getMaxValue()); + } + 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.v1.StudySpec.ParameterSpec.IntegerValueSpec parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private long minValue_; + /** + * + * + *
+         * Required. Inclusive minimum value of the parameter.
+         * 
+ * + * int64 min_value = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The minValue. + */ + @java.lang.Override + public long getMinValue() { + return minValue_; + } + /** + * + * + *
+         * Required. Inclusive minimum value of the parameter.
+         * 
+ * + * int64 min_value = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The minValue to set. + * @return This builder for chaining. + */ + public Builder setMinValue(long value) { + + minValue_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Required. Inclusive minimum value of the parameter.
+         * 
+ * + * int64 min_value = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearMinValue() { + + minValue_ = 0L; + onChanged(); + return this; + } + + private long maxValue_; + /** + * + * + *
+         * Required. Inclusive maximum value of the parameter.
+         * 
+ * + * int64 max_value = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The maxValue. + */ + @java.lang.Override + public long getMaxValue() { + return maxValue_; + } + /** + * + * + *
+         * Required. Inclusive maximum value of the parameter.
+         * 
+ * + * int64 max_value = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The maxValue to set. + * @return This builder for chaining. + */ + public Builder setMaxValue(long value) { + + maxValue_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Required. Inclusive maximum value of the parameter.
+         * 
+ * + * int64 max_value = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearMaxValue() { + + maxValue_ = 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.v1.StudySpec.ParameterSpec.IntegerValueSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec) + private static final com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec(); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IntegerValueSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new IntegerValueSpec(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.v1.StudySpec.ParameterSpec.IntegerValueSpec + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface CategoricalValueSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Required. The list of possible categories.
+       * 
+ * + * repeated string values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the values. + */ + java.util.List getValuesList(); + /** + * + * + *
+       * Required. The list of possible categories.
+       * 
+ * + * repeated string values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of values. + */ + int getValuesCount(); + /** + * + * + *
+       * Required. The list of possible categories.
+       * 
+ * + * repeated string values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The values at the given index. + */ + java.lang.String getValues(int index); + /** + * + * + *
+       * Required. The list of possible categories.
+       * 
+ * + * repeated string values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the values at the given index. + */ + com.google.protobuf.ByteString getValuesBytes(int index); + } + /** + * + * + *
+     * Value specification for a parameter in `CATEGORICAL` type.
+     * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec} + */ + public static final class CategoricalValueSpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec) + CategoricalValueSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use CategoricalValueSpec.newBuilder() to construct. + private CategoricalValueSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CategoricalValueSpec() { + values_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CategoricalValueSpec(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CategoricalValueSpec( + 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)) { + values_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + values_.add(s); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + values_ = values_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_CategoricalValueSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_CategoricalValueSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec.class, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec.Builder + .class); + } + + public static final int VALUES_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList values_; + /** + * + * + *
+       * Required. The list of possible categories.
+       * 
+ * + * repeated string values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the values. + */ + public com.google.protobuf.ProtocolStringList getValuesList() { + return values_; + } + /** + * + * + *
+       * Required. The list of possible categories.
+       * 
+ * + * repeated string values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of values. + */ + public int getValuesCount() { + return values_.size(); + } + /** + * + * + *
+       * Required. The list of possible categories.
+       * 
+ * + * repeated string values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The values at the given index. + */ + public java.lang.String getValues(int index) { + return values_.get(index); + } + /** + * + * + *
+       * Required. The list of possible categories.
+       * 
+ * + * repeated string values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the values at the given index. + */ + public com.google.protobuf.ByteString getValuesBytes(int index) { + return values_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < values_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, values_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < values_.size(); i++) { + dataSize += computeStringSizeNoTag(values_.getRaw(i)); + } + size += dataSize; + size += 1 * getValuesList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec other = + (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec) obj; + + if (!getValuesList().equals(other.getValuesList())) 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 (getValuesCount() > 0) { + hash = (37 * hash) + VALUES_FIELD_NUMBER; + hash = (53 * hash) + getValuesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec + 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.v1.StudySpec.ParameterSpec.CategoricalValueSpec + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec + 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.v1.StudySpec.ParameterSpec.CategoricalValueSpec + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec + 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.v1.StudySpec.ParameterSpec.CategoricalValueSpec + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec + 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.v1.StudySpec.ParameterSpec.CategoricalValueSpec + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec + 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.v1.StudySpec.ParameterSpec.CategoricalValueSpec 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; + } + /** + * + * + *
+       * Value specification for a parameter in `CATEGORICAL` type.
+       * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec) + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_CategoricalValueSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_CategoricalValueSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec.class, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec + .Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec.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(); + values_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_CategoricalValueSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec build() { + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec + buildPartial() { + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec result = + new com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + values_ = values_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.values_ = values_; + 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.v1.StudySpec.ParameterSpec.CategoricalValueSpec) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec other) { + if (other + == com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec + .getDefaultInstance()) return this; + if (!other.values_.isEmpty()) { + if (values_.isEmpty()) { + values_ = other.values_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureValuesIsMutable(); + values_.addAll(other.values_); + } + 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.v1.StudySpec.ParameterSpec.CategoricalValueSpec + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringList values_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureValuesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + values_ = new com.google.protobuf.LazyStringArrayList(values_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+         * Required. The list of possible categories.
+         * 
+ * + * repeated string values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the values. + */ + public com.google.protobuf.ProtocolStringList getValuesList() { + return values_.getUnmodifiableView(); + } + /** + * + * + *
+         * Required. The list of possible categories.
+         * 
+ * + * repeated string values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of values. + */ + public int getValuesCount() { + return values_.size(); + } + /** + * + * + *
+         * Required. The list of possible categories.
+         * 
+ * + * repeated string values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The values at the given index. + */ + public java.lang.String getValues(int index) { + return values_.get(index); + } + /** + * + * + *
+         * Required. The list of possible categories.
+         * 
+ * + * repeated string values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the values at the given index. + */ + public com.google.protobuf.ByteString getValuesBytes(int index) { + return values_.getByteString(index); + } + /** + * + * + *
+         * Required. The list of possible categories.
+         * 
+ * + * repeated string values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index to set the value at. + * @param value The values to set. + * @return This builder for chaining. + */ + public Builder setValues(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+         * Required. The list of possible categories.
+         * 
+ * + * repeated string values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The values to add. + * @return This builder for chaining. + */ + public Builder addValues(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+         * Required. The list of possible categories.
+         * 
+ * + * repeated string values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param values The values to add. + * @return This builder for chaining. + */ + public Builder addAllValues(java.lang.Iterable values) { + ensureValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, values_); + onChanged(); + return this; + } + /** + * + * + *
+         * Required. The list of possible categories.
+         * 
+ * + * repeated string values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearValues() { + values_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+         * Required. The list of possible categories.
+         * 
+ * + * repeated string values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes of the values to add. + * @return This builder for chaining. + */ + public Builder addValuesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureValuesIsMutable(); + values_.add(value); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec) + private static final com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec + .CategoricalValueSpec + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec(); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CategoricalValueSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CategoricalValueSpec(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.v1.StudySpec.ParameterSpec.CategoricalValueSpec + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface DiscreteValueSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Required. A list of possible values.
+       * The list should be in increasing order and at least 1e-10 apart.
+       * For instance, this parameter might have possible settings of 1.5, 2.5,
+       * and 4.0. This list should not contain more than 1,000 values.
+       * 
+ * + * repeated double values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the values. + */ + java.util.List getValuesList(); + /** + * + * + *
+       * Required. A list of possible values.
+       * The list should be in increasing order and at least 1e-10 apart.
+       * For instance, this parameter might have possible settings of 1.5, 2.5,
+       * and 4.0. This list should not contain more than 1,000 values.
+       * 
+ * + * repeated double values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of values. + */ + int getValuesCount(); + /** + * + * + *
+       * Required. A list of possible values.
+       * The list should be in increasing order and at least 1e-10 apart.
+       * For instance, this parameter might have possible settings of 1.5, 2.5,
+       * and 4.0. This list should not contain more than 1,000 values.
+       * 
+ * + * repeated double values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The values at the given index. + */ + double getValues(int index); + } + /** + * + * + *
+     * Value specification for a parameter in `DISCRETE` type.
+     * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec} + */ + public static final class DiscreteValueSpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec) + DiscreteValueSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use DiscreteValueSpec.newBuilder() to construct. + private DiscreteValueSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DiscreteValueSpec() { + values_ = emptyDoubleList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DiscreteValueSpec(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DiscreteValueSpec( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 9: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + values_ = newDoubleList(); + mutable_bitField0_ |= 0x00000001; + } + values_.addDouble(input.readDouble()); + break; + } + case 10: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) { + values_ = newDoubleList(); + mutable_bitField0_ |= 0x00000001; + } + while (input.getBytesUntilLimit() > 0) { + values_.addDouble(input.readDouble()); + } + 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)) { + values_.makeImmutable(); // C + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_DiscreteValueSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_DiscreteValueSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec.class, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec.Builder + .class); + } + + public static final int VALUES_FIELD_NUMBER = 1; + private com.google.protobuf.Internal.DoubleList values_; + /** + * + * + *
+       * Required. A list of possible values.
+       * The list should be in increasing order and at least 1e-10 apart.
+       * For instance, this parameter might have possible settings of 1.5, 2.5,
+       * and 4.0. This list should not contain more than 1,000 values.
+       * 
+ * + * repeated double values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the values. + */ + @java.lang.Override + public java.util.List getValuesList() { + return values_; + } + /** + * + * + *
+       * Required. A list of possible values.
+       * The list should be in increasing order and at least 1e-10 apart.
+       * For instance, this parameter might have possible settings of 1.5, 2.5,
+       * and 4.0. This list should not contain more than 1,000 values.
+       * 
+ * + * repeated double values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of values. + */ + public int getValuesCount() { + return values_.size(); + } + /** + * + * + *
+       * Required. A list of possible values.
+       * The list should be in increasing order and at least 1e-10 apart.
+       * For instance, this parameter might have possible settings of 1.5, 2.5,
+       * and 4.0. This list should not contain more than 1,000 values.
+       * 
+ * + * repeated double values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The values at the given index. + */ + public double getValues(int index) { + return values_.getDouble(index); + } + + private int valuesMemoizedSerializedSize = -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 (getValuesList().size() > 0) { + output.writeUInt32NoTag(10); + output.writeUInt32NoTag(valuesMemoizedSerializedSize); + } + for (int i = 0; i < values_.size(); i++) { + output.writeDoubleNoTag(values_.getDouble(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + dataSize = 8 * getValuesList().size(); + size += dataSize; + if (!getValuesList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); + } + valuesMemoizedSerializedSize = 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.v1.StudySpec.ParameterSpec.DiscreteValueSpec)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec other = + (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec) obj; + + if (!getValuesList().equals(other.getValuesList())) 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 (getValuesCount() > 0) { + hash = (37 * hash) + VALUES_FIELD_NUMBER; + hash = (53 * hash) + getValuesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec + 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.v1.StudySpec.ParameterSpec.DiscreteValueSpec + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec + 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.v1.StudySpec.ParameterSpec.DiscreteValueSpec + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec + 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.v1.StudySpec.ParameterSpec.DiscreteValueSpec + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec + 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.v1.StudySpec.ParameterSpec.DiscreteValueSpec + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec + 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.v1.StudySpec.ParameterSpec.DiscreteValueSpec 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; + } + /** + * + * + *
+       * Value specification for a parameter in `DISCRETE` type.
+       * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec) + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_DiscreteValueSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_DiscreteValueSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec.class, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec.Builder + .class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec.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(); + values_ = emptyDoubleList(); + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_DiscreteValueSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec build() { + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec + buildPartial() { + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec result = + new com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + values_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.values_ = values_; + 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.v1.StudySpec.ParameterSpec.DiscreteValueSpec) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec other) { + if (other + == com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec + .getDefaultInstance()) return this; + if (!other.values_.isEmpty()) { + if (values_.isEmpty()) { + values_ = other.values_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureValuesIsMutable(); + values_.addAll(other.values_); + } + 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.v1.StudySpec.ParameterSpec.DiscreteValueSpec parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.protobuf.Internal.DoubleList values_ = emptyDoubleList(); + + private void ensureValuesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + values_ = mutableCopy(values_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+         * Required. A list of possible values.
+         * The list should be in increasing order and at least 1e-10 apart.
+         * For instance, this parameter might have possible settings of 1.5, 2.5,
+         * and 4.0. This list should not contain more than 1,000 values.
+         * 
+ * + * repeated double values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the values. + */ + public java.util.List getValuesList() { + return ((bitField0_ & 0x00000001) != 0) + ? java.util.Collections.unmodifiableList(values_) + : values_; + } + /** + * + * + *
+         * Required. A list of possible values.
+         * The list should be in increasing order and at least 1e-10 apart.
+         * For instance, this parameter might have possible settings of 1.5, 2.5,
+         * and 4.0. This list should not contain more than 1,000 values.
+         * 
+ * + * repeated double values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of values. + */ + public int getValuesCount() { + return values_.size(); + } + /** + * + * + *
+         * Required. A list of possible values.
+         * The list should be in increasing order and at least 1e-10 apart.
+         * For instance, this parameter might have possible settings of 1.5, 2.5,
+         * and 4.0. This list should not contain more than 1,000 values.
+         * 
+ * + * repeated double values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The values at the given index. + */ + public double getValues(int index) { + return values_.getDouble(index); + } + /** + * + * + *
+         * Required. A list of possible values.
+         * The list should be in increasing order and at least 1e-10 apart.
+         * For instance, this parameter might have possible settings of 1.5, 2.5,
+         * and 4.0. This list should not contain more than 1,000 values.
+         * 
+ * + * repeated double values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index to set the value at. + * @param value The values to set. + * @return This builder for chaining. + */ + public Builder setValues(int index, double value) { + ensureValuesIsMutable(); + values_.setDouble(index, value); + onChanged(); + return this; + } + /** + * + * + *
+         * Required. A list of possible values.
+         * The list should be in increasing order and at least 1e-10 apart.
+         * For instance, this parameter might have possible settings of 1.5, 2.5,
+         * and 4.0. This list should not contain more than 1,000 values.
+         * 
+ * + * repeated double values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The values to add. + * @return This builder for chaining. + */ + public Builder addValues(double value) { + ensureValuesIsMutable(); + values_.addDouble(value); + onChanged(); + return this; + } + /** + * + * + *
+         * Required. A list of possible values.
+         * The list should be in increasing order and at least 1e-10 apart.
+         * For instance, this parameter might have possible settings of 1.5, 2.5,
+         * and 4.0. This list should not contain more than 1,000 values.
+         * 
+ * + * repeated double values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param values The values to add. + * @return This builder for chaining. + */ + public Builder addAllValues(java.lang.Iterable values) { + ensureValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, values_); + onChanged(); + return this; + } + /** + * + * + *
+         * Required. A list of possible values.
+         * The list should be in increasing order and at least 1e-10 apart.
+         * For instance, this parameter might have possible settings of 1.5, 2.5,
+         * and 4.0. This list should not contain more than 1,000 values.
+         * 
+ * + * repeated double values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearValues() { + values_ = emptyDoubleList(); + bitField0_ = (bitField0_ & ~0x00000001); + 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.v1.StudySpec.ParameterSpec.DiscreteValueSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec) + private static final com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec(); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DiscreteValueSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DiscreteValueSpec(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.v1.StudySpec.ParameterSpec.DiscreteValueSpec + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ConditionalParameterSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * The spec for matching values from a parent parameter of
+       * `DISCRETE` type.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.DiscreteValueCondition parent_discrete_values = 2; + * + * + * @return Whether the parentDiscreteValues field is set. + */ + boolean hasParentDiscreteValues(); + /** + * + * + *
+       * The spec for matching values from a parent parameter of
+       * `DISCRETE` type.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.DiscreteValueCondition parent_discrete_values = 2; + * + * + * @return The parentDiscreteValues. + */ + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .DiscreteValueCondition + getParentDiscreteValues(); + /** + * + * + *
+       * The spec for matching values from a parent parameter of
+       * `DISCRETE` type.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.DiscreteValueCondition parent_discrete_values = 2; + * + */ + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .DiscreteValueConditionOrBuilder + getParentDiscreteValuesOrBuilder(); + + /** + * + * + *
+       * The spec for matching values from a parent parameter of `INTEGER`
+       * type.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.IntValueCondition parent_int_values = 3; + * + * + * @return Whether the parentIntValues field is set. + */ + boolean hasParentIntValues(); + /** + * + * + *
+       * The spec for matching values from a parent parameter of `INTEGER`
+       * type.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.IntValueCondition parent_int_values = 3; + * + * + * @return The parentIntValues. + */ + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .IntValueCondition + getParentIntValues(); + /** + * + * + *
+       * The spec for matching values from a parent parameter of `INTEGER`
+       * type.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.IntValueCondition parent_int_values = 3; + * + */ + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .IntValueConditionOrBuilder + getParentIntValuesOrBuilder(); + + /** + * + * + *
+       * The spec for matching values from a parent parameter of
+       * `CATEGORICAL` type.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.CategoricalValueCondition parent_categorical_values = 4; + * + * + * @return Whether the parentCategoricalValues field is set. + */ + boolean hasParentCategoricalValues(); + /** + * + * + *
+       * The spec for matching values from a parent parameter of
+       * `CATEGORICAL` type.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.CategoricalValueCondition parent_categorical_values = 4; + * + * + * @return The parentCategoricalValues. + */ + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .CategoricalValueCondition + getParentCategoricalValues(); + /** + * + * + *
+       * The spec for matching values from a parent parameter of
+       * `CATEGORICAL` type.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.CategoricalValueCondition parent_categorical_values = 4; + * + */ + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .CategoricalValueConditionOrBuilder + getParentCategoricalValuesOrBuilder(); + + /** + * + * + *
+       * Required. The spec for a conditional parameter.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec parameter_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the parameterSpec field is set. + */ + boolean hasParameterSpec(); + /** + * + * + *
+       * Required. The spec for a conditional parameter.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec parameter_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The parameterSpec. + */ + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec getParameterSpec(); + /** + * + * + *
+       * Required. The spec for a conditional parameter.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec parameter_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpecOrBuilder getParameterSpecOrBuilder(); + + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .ParentValueConditionCase + getParentValueConditionCase(); + } + /** + * + * + *
+     * Represents a parameter spec with condition from its parent parameter.
+     * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec} + */ + public static final class ConditionalParameterSpec + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec) + ConditionalParameterSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use ConditionalParameterSpec.newBuilder() to construct. + private ConditionalParameterSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ConditionalParameterSpec() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ConditionalParameterSpec(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ConditionalParameterSpec( + 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.v1.StudySpec.ParameterSpec.Builder subBuilder = null; + if (parameterSpec_ != null) { + subBuilder = parameterSpec_.toBuilder(); + } + parameterSpec_ = + input.readMessage( + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(parameterSpec_); + parameterSpec_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .DiscreteValueCondition.Builder + subBuilder = null; + if (parentValueConditionCase_ == 2) { + subBuilder = + ((com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec + .ConditionalParameterSpec.DiscreteValueCondition) + parentValueCondition_) + .toBuilder(); + } + parentValueCondition_ = + input.readMessage( + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec + .ConditionalParameterSpec.DiscreteValueCondition.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec + .ConditionalParameterSpec.DiscreteValueCondition) + parentValueCondition_); + parentValueCondition_ = subBuilder.buildPartial(); + } + parentValueConditionCase_ = 2; + break; + } + case 26: + { + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .IntValueCondition.Builder + subBuilder = null; + if (parentValueConditionCase_ == 3) { + subBuilder = + ((com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec + .ConditionalParameterSpec.IntValueCondition) + parentValueCondition_) + .toBuilder(); + } + parentValueCondition_ = + input.readMessage( + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec + .ConditionalParameterSpec.IntValueCondition.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec + .ConditionalParameterSpec.IntValueCondition) + parentValueCondition_); + parentValueCondition_ = subBuilder.buildPartial(); + } + parentValueConditionCase_ = 3; + break; + } + case 34: + { + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .CategoricalValueCondition.Builder + subBuilder = null; + if (parentValueConditionCase_ == 4) { + subBuilder = + ((com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec + .ConditionalParameterSpec.CategoricalValueCondition) + parentValueCondition_) + .toBuilder(); + } + parentValueCondition_ = + input.readMessage( + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec + .ConditionalParameterSpec.CategoricalValueCondition.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec + .ConditionalParameterSpec.CategoricalValueCondition) + parentValueCondition_); + parentValueCondition_ = subBuilder.buildPartial(); + } + parentValueConditionCase_ = 4; + 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.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_ConditionalParameterSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_ConditionalParameterSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .class, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .Builder.class); + } + + public interface DiscreteValueConditionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.DiscreteValueCondition) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+         * Required. Matches values of the parent parameter of 'DISCRETE' type.
+         * All values must exist in `discrete_value_spec` of parent parameter.
+         * The Epsilon of the value matching is 1e-10.
+         * 
+ * + * repeated double values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the values. + */ + java.util.List getValuesList(); + /** + * + * + *
+         * Required. Matches values of the parent parameter of 'DISCRETE' type.
+         * All values must exist in `discrete_value_spec` of parent parameter.
+         * The Epsilon of the value matching is 1e-10.
+         * 
+ * + * repeated double values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of values. + */ + int getValuesCount(); + /** + * + * + *
+         * Required. Matches values of the parent parameter of 'DISCRETE' type.
+         * All values must exist in `discrete_value_spec` of parent parameter.
+         * The Epsilon of the value matching is 1e-10.
+         * 
+ * + * repeated double values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The values at the given index. + */ + double getValues(int index); + } + /** + * + * + *
+       * Represents the spec to match discrete values from parent parameter.
+       * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.DiscreteValueCondition} + */ + public static final class DiscreteValueCondition + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.DiscreteValueCondition) + DiscreteValueConditionOrBuilder { + private static final long serialVersionUID = 0L; + // Use DiscreteValueCondition.newBuilder() to construct. + private DiscreteValueCondition(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DiscreteValueCondition() { + values_ = emptyDoubleList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DiscreteValueCondition(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DiscreteValueCondition( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 9: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + values_ = newDoubleList(); + mutable_bitField0_ |= 0x00000001; + } + values_.addDouble(input.readDouble()); + break; + } + case 10: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000001) != 0) + && input.getBytesUntilLimit() > 0) { + values_ = newDoubleList(); + mutable_bitField0_ |= 0x00000001; + } + while (input.getBytesUntilLimit() > 0) { + values_.addDouble(input.readDouble()); + } + 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)) { + values_.makeImmutable(); // C + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_ConditionalParameterSpec_DiscreteValueCondition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_ConditionalParameterSpec_DiscreteValueCondition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .DiscreteValueCondition.class, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .DiscreteValueCondition.Builder.class); + } + + public static final int VALUES_FIELD_NUMBER = 1; + private com.google.protobuf.Internal.DoubleList values_; + /** + * + * + *
+         * Required. Matches values of the parent parameter of 'DISCRETE' type.
+         * All values must exist in `discrete_value_spec` of parent parameter.
+         * The Epsilon of the value matching is 1e-10.
+         * 
+ * + * repeated double values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the values. + */ + @java.lang.Override + public java.util.List getValuesList() { + return values_; + } + /** + * + * + *
+         * Required. Matches values of the parent parameter of 'DISCRETE' type.
+         * All values must exist in `discrete_value_spec` of parent parameter.
+         * The Epsilon of the value matching is 1e-10.
+         * 
+ * + * repeated double values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of values. + */ + public int getValuesCount() { + return values_.size(); + } + /** + * + * + *
+         * Required. Matches values of the parent parameter of 'DISCRETE' type.
+         * All values must exist in `discrete_value_spec` of parent parameter.
+         * The Epsilon of the value matching is 1e-10.
+         * 
+ * + * repeated double values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The values at the given index. + */ + public double getValues(int index) { + return values_.getDouble(index); + } + + private int valuesMemoizedSerializedSize = -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 (getValuesList().size() > 0) { + output.writeUInt32NoTag(10); + output.writeUInt32NoTag(valuesMemoizedSerializedSize); + } + for (int i = 0; i < values_.size(); i++) { + output.writeDoubleNoTag(values_.getDouble(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + dataSize = 8 * getValuesList().size(); + size += dataSize; + if (!getValuesList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); + } + valuesMemoizedSerializedSize = 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.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .DiscreteValueCondition)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .DiscreteValueCondition + other = + (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .DiscreteValueCondition) + obj; + + if (!getValuesList().equals(other.getValuesList())) 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 (getValuesCount() > 0) { + hash = (37 * hash) + VALUES_FIELD_NUMBER; + hash = (53 * hash) + getValuesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec + .ConditionalParameterSpec.DiscreteValueCondition + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec + .ConditionalParameterSpec.DiscreteValueCondition + 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.v1.StudySpec.ParameterSpec + .ConditionalParameterSpec.DiscreteValueCondition + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec + .ConditionalParameterSpec.DiscreteValueCondition + 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.v1.StudySpec.ParameterSpec + .ConditionalParameterSpec.DiscreteValueCondition + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec + .ConditionalParameterSpec.DiscreteValueCondition + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec + .ConditionalParameterSpec.DiscreteValueCondition + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec + .ConditionalParameterSpec.DiscreteValueCondition + 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.v1.StudySpec.ParameterSpec + .ConditionalParameterSpec.DiscreteValueCondition + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec + .ConditionalParameterSpec.DiscreteValueCondition + 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.v1.StudySpec.ParameterSpec + .ConditionalParameterSpec.DiscreteValueCondition + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec + .ConditionalParameterSpec.DiscreteValueCondition + 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.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .DiscreteValueCondition + 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 the spec to match discrete values from parent parameter.
+         * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.DiscreteValueCondition} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.DiscreteValueCondition) + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .DiscreteValueConditionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_ConditionalParameterSpec_DiscreteValueCondition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_ConditionalParameterSpec_DiscreteValueCondition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .DiscreteValueCondition.class, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .DiscreteValueCondition.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.DiscreteValueCondition.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(); + values_ = emptyDoubleList(); + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_ConditionalParameterSpec_DiscreteValueCondition_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .DiscreteValueCondition + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .DiscreteValueCondition.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .DiscreteValueCondition + build() { + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .DiscreteValueCondition + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .DiscreteValueCondition + buildPartial() { + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .DiscreteValueCondition + result = + new com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec + .ConditionalParameterSpec.DiscreteValueCondition(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + values_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.values_ = values_; + 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.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .DiscreteValueCondition) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .DiscreteValueCondition) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .DiscreteValueCondition + other) { + if (other + == com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .DiscreteValueCondition.getDefaultInstance()) return this; + if (!other.values_.isEmpty()) { + if (values_.isEmpty()) { + values_ = other.values_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureValuesIsMutable(); + values_.addAll(other.values_); + } + 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.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .DiscreteValueCondition + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .DiscreteValueCondition) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.protobuf.Internal.DoubleList values_ = emptyDoubleList(); + + private void ensureValuesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + values_ = mutableCopy(values_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+           * Required. Matches values of the parent parameter of 'DISCRETE' type.
+           * All values must exist in `discrete_value_spec` of parent parameter.
+           * The Epsilon of the value matching is 1e-10.
+           * 
+ * + * repeated double values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the values. + */ + public java.util.List getValuesList() { + return ((bitField0_ & 0x00000001) != 0) + ? java.util.Collections.unmodifiableList(values_) + : values_; + } + /** + * + * + *
+           * Required. Matches values of the parent parameter of 'DISCRETE' type.
+           * All values must exist in `discrete_value_spec` of parent parameter.
+           * The Epsilon of the value matching is 1e-10.
+           * 
+ * + * repeated double values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of values. + */ + public int getValuesCount() { + return values_.size(); + } + /** + * + * + *
+           * Required. Matches values of the parent parameter of 'DISCRETE' type.
+           * All values must exist in `discrete_value_spec` of parent parameter.
+           * The Epsilon of the value matching is 1e-10.
+           * 
+ * + * repeated double values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The values at the given index. + */ + public double getValues(int index) { + return values_.getDouble(index); + } + /** + * + * + *
+           * Required. Matches values of the parent parameter of 'DISCRETE' type.
+           * All values must exist in `discrete_value_spec` of parent parameter.
+           * The Epsilon of the value matching is 1e-10.
+           * 
+ * + * repeated double values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index to set the value at. + * @param value The values to set. + * @return This builder for chaining. + */ + public Builder setValues(int index, double value) { + ensureValuesIsMutable(); + values_.setDouble(index, value); + onChanged(); + return this; + } + /** + * + * + *
+           * Required. Matches values of the parent parameter of 'DISCRETE' type.
+           * All values must exist in `discrete_value_spec` of parent parameter.
+           * The Epsilon of the value matching is 1e-10.
+           * 
+ * + * repeated double values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The values to add. + * @return This builder for chaining. + */ + public Builder addValues(double value) { + ensureValuesIsMutable(); + values_.addDouble(value); + onChanged(); + return this; + } + /** + * + * + *
+           * Required. Matches values of the parent parameter of 'DISCRETE' type.
+           * All values must exist in `discrete_value_spec` of parent parameter.
+           * The Epsilon of the value matching is 1e-10.
+           * 
+ * + * repeated double values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param values The values to add. + * @return This builder for chaining. + */ + public Builder addAllValues(java.lang.Iterable values) { + ensureValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, values_); + onChanged(); + return this; + } + /** + * + * + *
+           * Required. Matches values of the parent parameter of 'DISCRETE' type.
+           * All values must exist in `discrete_value_spec` of parent parameter.
+           * The Epsilon of the value matching is 1e-10.
+           * 
+ * + * repeated double values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearValues() { + values_ = emptyDoubleList(); + bitField0_ = (bitField0_ & ~0x00000001); + 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.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.DiscreteValueCondition) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.DiscreteValueCondition) + private static final com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec + .ConditionalParameterSpec.DiscreteValueCondition + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .DiscreteValueCondition(); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec + .ConditionalParameterSpec.DiscreteValueCondition + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DiscreteValueCondition parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DiscreteValueCondition(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.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .DiscreteValueCondition + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface IntValueConditionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.IntValueCondition) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+         * Required. Matches values of the parent parameter of 'INTEGER' type.
+         * All values must lie in `integer_value_spec` of parent parameter.
+         * 
+ * + * repeated int64 values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the values. + */ + java.util.List getValuesList(); + /** + * + * + *
+         * Required. Matches values of the parent parameter of 'INTEGER' type.
+         * All values must lie in `integer_value_spec` of parent parameter.
+         * 
+ * + * repeated int64 values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of values. + */ + int getValuesCount(); + /** + * + * + *
+         * Required. Matches values of the parent parameter of 'INTEGER' type.
+         * All values must lie in `integer_value_spec` of parent parameter.
+         * 
+ * + * repeated int64 values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The values at the given index. + */ + long getValues(int index); + } + /** + * + * + *
+       * Represents the spec to match integer values from parent parameter.
+       * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.IntValueCondition} + */ + public static final class IntValueCondition extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.IntValueCondition) + IntValueConditionOrBuilder { + private static final long serialVersionUID = 0L; + // Use IntValueCondition.newBuilder() to construct. + private IntValueCondition(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private IntValueCondition() { + values_ = emptyLongList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new IntValueCondition(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private IntValueCondition( + 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)) { + values_ = newLongList(); + mutable_bitField0_ |= 0x00000001; + } + values_.addLong(input.readInt64()); + break; + } + case 10: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000001) != 0) + && input.getBytesUntilLimit() > 0) { + values_ = newLongList(); + mutable_bitField0_ |= 0x00000001; + } + while (input.getBytesUntilLimit() > 0) { + values_.addLong(input.readInt64()); + } + 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)) { + values_.makeImmutable(); // C + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_ConditionalParameterSpec_IntValueCondition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_ConditionalParameterSpec_IntValueCondition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .IntValueCondition.class, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .IntValueCondition.Builder.class); + } + + public static final int VALUES_FIELD_NUMBER = 1; + private com.google.protobuf.Internal.LongList values_; + /** + * + * + *
+         * Required. Matches values of the parent parameter of 'INTEGER' type.
+         * All values must lie in `integer_value_spec` of parent parameter.
+         * 
+ * + * repeated int64 values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the values. + */ + @java.lang.Override + public java.util.List getValuesList() { + return values_; + } + /** + * + * + *
+         * Required. Matches values of the parent parameter of 'INTEGER' type.
+         * All values must lie in `integer_value_spec` of parent parameter.
+         * 
+ * + * repeated int64 values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of values. + */ + public int getValuesCount() { + return values_.size(); + } + /** + * + * + *
+         * Required. Matches values of the parent parameter of 'INTEGER' type.
+         * All values must lie in `integer_value_spec` of parent parameter.
+         * 
+ * + * repeated int64 values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The values at the given index. + */ + public long getValues(int index) { + return values_.getLong(index); + } + + private int valuesMemoizedSerializedSize = -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 (getValuesList().size() > 0) { + output.writeUInt32NoTag(10); + output.writeUInt32NoTag(valuesMemoizedSerializedSize); + } + for (int i = 0; i < values_.size(); i++) { + output.writeInt64NoTag(values_.getLong(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 < values_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeInt64SizeNoTag(values_.getLong(i)); + } + size += dataSize; + if (!getValuesList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); + } + valuesMemoizedSerializedSize = 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.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .IntValueCondition)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .IntValueCondition + other = + (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .IntValueCondition) + obj; + + if (!getValuesList().equals(other.getValuesList())) 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 (getValuesCount() > 0) { + hash = (37 * hash) + VALUES_FIELD_NUMBER; + hash = (53 * hash) + getValuesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec + .ConditionalParameterSpec.IntValueCondition + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec + .ConditionalParameterSpec.IntValueCondition + 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.v1.StudySpec.ParameterSpec + .ConditionalParameterSpec.IntValueCondition + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec + .ConditionalParameterSpec.IntValueCondition + 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.v1.StudySpec.ParameterSpec + .ConditionalParameterSpec.IntValueCondition + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec + .ConditionalParameterSpec.IntValueCondition + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec + .ConditionalParameterSpec.IntValueCondition + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec + .ConditionalParameterSpec.IntValueCondition + 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.v1.StudySpec.ParameterSpec + .ConditionalParameterSpec.IntValueCondition + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec + .ConditionalParameterSpec.IntValueCondition + 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.v1.StudySpec.ParameterSpec + .ConditionalParameterSpec.IntValueCondition + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec + .ConditionalParameterSpec.IntValueCondition + 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.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .IntValueCondition + 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 the spec to match integer values from parent parameter.
+         * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.IntValueCondition} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.IntValueCondition) + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .IntValueConditionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_ConditionalParameterSpec_IntValueCondition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_ConditionalParameterSpec_IntValueCondition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .IntValueCondition.class, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .IntValueCondition.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.IntValueCondition.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(); + values_ = emptyLongList(); + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_ConditionalParameterSpec_IntValueCondition_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .IntValueCondition + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .IntValueCondition.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .IntValueCondition + build() { + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .IntValueCondition + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .IntValueCondition + buildPartial() { + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .IntValueCondition + result = + new com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec + .ConditionalParameterSpec.IntValueCondition(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + values_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.values_ = values_; + 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.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .IntValueCondition) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .IntValueCondition) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .IntValueCondition + other) { + if (other + == com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .IntValueCondition.getDefaultInstance()) return this; + if (!other.values_.isEmpty()) { + if (values_.isEmpty()) { + values_ = other.values_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureValuesIsMutable(); + values_.addAll(other.values_); + } + 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.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .IntValueCondition + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .IntValueCondition) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.protobuf.Internal.LongList values_ = emptyLongList(); + + private void ensureValuesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + values_ = mutableCopy(values_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+           * Required. Matches values of the parent parameter of 'INTEGER' type.
+           * All values must lie in `integer_value_spec` of parent parameter.
+           * 
+ * + * repeated int64 values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the values. + */ + public java.util.List getValuesList() { + return ((bitField0_ & 0x00000001) != 0) + ? java.util.Collections.unmodifiableList(values_) + : values_; + } + /** + * + * + *
+           * Required. Matches values of the parent parameter of 'INTEGER' type.
+           * All values must lie in `integer_value_spec` of parent parameter.
+           * 
+ * + * repeated int64 values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of values. + */ + public int getValuesCount() { + return values_.size(); + } + /** + * + * + *
+           * Required. Matches values of the parent parameter of 'INTEGER' type.
+           * All values must lie in `integer_value_spec` of parent parameter.
+           * 
+ * + * repeated int64 values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The values at the given index. + */ + public long getValues(int index) { + return values_.getLong(index); + } + /** + * + * + *
+           * Required. Matches values of the parent parameter of 'INTEGER' type.
+           * All values must lie in `integer_value_spec` of parent parameter.
+           * 
+ * + * repeated int64 values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index to set the value at. + * @param value The values to set. + * @return This builder for chaining. + */ + public Builder setValues(int index, long value) { + ensureValuesIsMutable(); + values_.setLong(index, value); + onChanged(); + return this; + } + /** + * + * + *
+           * Required. Matches values of the parent parameter of 'INTEGER' type.
+           * All values must lie in `integer_value_spec` of parent parameter.
+           * 
+ * + * repeated int64 values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The values to add. + * @return This builder for chaining. + */ + public Builder addValues(long value) { + ensureValuesIsMutable(); + values_.addLong(value); + onChanged(); + return this; + } + /** + * + * + *
+           * Required. Matches values of the parent parameter of 'INTEGER' type.
+           * All values must lie in `integer_value_spec` of parent parameter.
+           * 
+ * + * repeated int64 values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param values The values to add. + * @return This builder for chaining. + */ + public Builder addAllValues(java.lang.Iterable values) { + ensureValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, values_); + onChanged(); + return this; + } + /** + * + * + *
+           * Required. Matches values of the parent parameter of 'INTEGER' type.
+           * All values must lie in `integer_value_spec` of parent parameter.
+           * 
+ * + * repeated int64 values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearValues() { + values_ = emptyLongList(); + bitField0_ = (bitField0_ & ~0x00000001); + 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.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.IntValueCondition) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.IntValueCondition) + private static final com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec + .ConditionalParameterSpec.IntValueCondition + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .IntValueCondition(); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec + .ConditionalParameterSpec.IntValueCondition + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IntValueCondition parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new IntValueCondition(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.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .IntValueCondition + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface CategoricalValueConditionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.CategoricalValueCondition) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+         * Required. Matches values of the parent parameter of 'CATEGORICAL' type.
+         * All values must exist in `categorical_value_spec` of parent
+         * parameter.
+         * 
+ * + * repeated string values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the values. + */ + java.util.List getValuesList(); + /** + * + * + *
+         * Required. Matches values of the parent parameter of 'CATEGORICAL' type.
+         * All values must exist in `categorical_value_spec` of parent
+         * parameter.
+         * 
+ * + * repeated string values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of values. + */ + int getValuesCount(); + /** + * + * + *
+         * Required. Matches values of the parent parameter of 'CATEGORICAL' type.
+         * All values must exist in `categorical_value_spec` of parent
+         * parameter.
+         * 
+ * + * repeated string values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The values at the given index. + */ + java.lang.String getValues(int index); + /** + * + * + *
+         * Required. Matches values of the parent parameter of 'CATEGORICAL' type.
+         * All values must exist in `categorical_value_spec` of parent
+         * parameter.
+         * 
+ * + * repeated string values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the values at the given index. + */ + com.google.protobuf.ByteString getValuesBytes(int index); + } + /** + * + * + *
+       * Represents the spec to match categorical values from parent parameter.
+       * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.CategoricalValueCondition} + */ + public static final class CategoricalValueCondition + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.CategoricalValueCondition) + CategoricalValueConditionOrBuilder { + private static final long serialVersionUID = 0L; + // Use CategoricalValueCondition.newBuilder() to construct. + private CategoricalValueCondition( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CategoricalValueCondition() { + values_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CategoricalValueCondition(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CategoricalValueCondition( + 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)) { + values_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + values_.add(s); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + values_ = values_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_ConditionalParameterSpec_CategoricalValueCondition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_ConditionalParameterSpec_CategoricalValueCondition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .CategoricalValueCondition.class, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .CategoricalValueCondition.Builder.class); + } + + public static final int VALUES_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList values_; + /** + * + * + *
+         * Required. Matches values of the parent parameter of 'CATEGORICAL' type.
+         * All values must exist in `categorical_value_spec` of parent
+         * parameter.
+         * 
+ * + * repeated string values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the values. + */ + public com.google.protobuf.ProtocolStringList getValuesList() { + return values_; + } + /** + * + * + *
+         * Required. Matches values of the parent parameter of 'CATEGORICAL' type.
+         * All values must exist in `categorical_value_spec` of parent
+         * parameter.
+         * 
+ * + * repeated string values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of values. + */ + public int getValuesCount() { + return values_.size(); + } + /** + * + * + *
+         * Required. Matches values of the parent parameter of 'CATEGORICAL' type.
+         * All values must exist in `categorical_value_spec` of parent
+         * parameter.
+         * 
+ * + * repeated string values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The values at the given index. + */ + public java.lang.String getValues(int index) { + return values_.get(index); + } + /** + * + * + *
+         * Required. Matches values of the parent parameter of 'CATEGORICAL' type.
+         * All values must exist in `categorical_value_spec` of parent
+         * parameter.
+         * 
+ * + * repeated string values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the values at the given index. + */ + public com.google.protobuf.ByteString getValuesBytes(int index) { + return values_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < values_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, values_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < values_.size(); i++) { + dataSize += computeStringSizeNoTag(values_.getRaw(i)); + } + size += dataSize; + size += 1 * getValuesList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .CategoricalValueCondition)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .CategoricalValueCondition + other = + (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .CategoricalValueCondition) + obj; + + if (!getValuesList().equals(other.getValuesList())) 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 (getValuesCount() > 0) { + hash = (37 * hash) + VALUES_FIELD_NUMBER; + hash = (53 * hash) + getValuesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec + .ConditionalParameterSpec.CategoricalValueCondition + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec + .ConditionalParameterSpec.CategoricalValueCondition + 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.v1.StudySpec.ParameterSpec + .ConditionalParameterSpec.CategoricalValueCondition + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec + .ConditionalParameterSpec.CategoricalValueCondition + 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.v1.StudySpec.ParameterSpec + .ConditionalParameterSpec.CategoricalValueCondition + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec + .ConditionalParameterSpec.CategoricalValueCondition + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec + .ConditionalParameterSpec.CategoricalValueCondition + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec + .ConditionalParameterSpec.CategoricalValueCondition + 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.v1.StudySpec.ParameterSpec + .ConditionalParameterSpec.CategoricalValueCondition + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec + .ConditionalParameterSpec.CategoricalValueCondition + 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.v1.StudySpec.ParameterSpec + .ConditionalParameterSpec.CategoricalValueCondition + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec + .ConditionalParameterSpec.CategoricalValueCondition + 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.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .CategoricalValueCondition + 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 the spec to match categorical values from parent parameter.
+         * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.CategoricalValueCondition} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.CategoricalValueCondition) + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .CategoricalValueConditionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_ConditionalParameterSpec_CategoricalValueCondition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_ConditionalParameterSpec_CategoricalValueCondition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .CategoricalValueCondition.class, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .CategoricalValueCondition.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.CategoricalValueCondition.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(); + values_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_ConditionalParameterSpec_CategoricalValueCondition_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .CategoricalValueCondition + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .CategoricalValueCondition.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .CategoricalValueCondition + build() { + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .CategoricalValueCondition + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .CategoricalValueCondition + buildPartial() { + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .CategoricalValueCondition + result = + new com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec + .ConditionalParameterSpec.CategoricalValueCondition(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + values_ = values_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.values_ = values_; + 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.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .CategoricalValueCondition) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .CategoricalValueCondition) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .CategoricalValueCondition + other) { + if (other + == com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .CategoricalValueCondition.getDefaultInstance()) return this; + if (!other.values_.isEmpty()) { + if (values_.isEmpty()) { + values_ = other.values_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureValuesIsMutable(); + values_.addAll(other.values_); + } + 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.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .CategoricalValueCondition + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .CategoricalValueCondition) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringList values_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureValuesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + values_ = new com.google.protobuf.LazyStringArrayList(values_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+           * Required. Matches values of the parent parameter of 'CATEGORICAL' type.
+           * All values must exist in `categorical_value_spec` of parent
+           * parameter.
+           * 
+ * + * repeated string values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the values. + */ + public com.google.protobuf.ProtocolStringList getValuesList() { + return values_.getUnmodifiableView(); + } + /** + * + * + *
+           * Required. Matches values of the parent parameter of 'CATEGORICAL' type.
+           * All values must exist in `categorical_value_spec` of parent
+           * parameter.
+           * 
+ * + * repeated string values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of values. + */ + public int getValuesCount() { + return values_.size(); + } + /** + * + * + *
+           * Required. Matches values of the parent parameter of 'CATEGORICAL' type.
+           * All values must exist in `categorical_value_spec` of parent
+           * parameter.
+           * 
+ * + * repeated string values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The values at the given index. + */ + public java.lang.String getValues(int index) { + return values_.get(index); + } + /** + * + * + *
+           * Required. Matches values of the parent parameter of 'CATEGORICAL' type.
+           * All values must exist in `categorical_value_spec` of parent
+           * parameter.
+           * 
+ * + * repeated string values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the values at the given index. + */ + public com.google.protobuf.ByteString getValuesBytes(int index) { + return values_.getByteString(index); + } + /** + * + * + *
+           * Required. Matches values of the parent parameter of 'CATEGORICAL' type.
+           * All values must exist in `categorical_value_spec` of parent
+           * parameter.
+           * 
+ * + * repeated string values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index to set the value at. + * @param value The values to set. + * @return This builder for chaining. + */ + public Builder setValues(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+           * Required. Matches values of the parent parameter of 'CATEGORICAL' type.
+           * All values must exist in `categorical_value_spec` of parent
+           * parameter.
+           * 
+ * + * repeated string values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The values to add. + * @return This builder for chaining. + */ + public Builder addValues(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+           * Required. Matches values of the parent parameter of 'CATEGORICAL' type.
+           * All values must exist in `categorical_value_spec` of parent
+           * parameter.
+           * 
+ * + * repeated string values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param values The values to add. + * @return This builder for chaining. + */ + public Builder addAllValues(java.lang.Iterable values) { + ensureValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, values_); + onChanged(); + return this; + } + /** + * + * + *
+           * Required. Matches values of the parent parameter of 'CATEGORICAL' type.
+           * All values must exist in `categorical_value_spec` of parent
+           * parameter.
+           * 
+ * + * repeated string values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearValues() { + values_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+           * Required. Matches values of the parent parameter of 'CATEGORICAL' type.
+           * All values must exist in `categorical_value_spec` of parent
+           * parameter.
+           * 
+ * + * repeated string values = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes of the values to add. + * @return This builder for chaining. + */ + public Builder addValuesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureValuesIsMutable(); + values_.add(value); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.CategoricalValueCondition) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.CategoricalValueCondition) + private static final com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec + .ConditionalParameterSpec.CategoricalValueCondition + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .CategoricalValueCondition(); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec + .ConditionalParameterSpec.CategoricalValueCondition + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CategoricalValueCondition parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CategoricalValueCondition(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.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .CategoricalValueCondition + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int parentValueConditionCase_ = 0; + private java.lang.Object parentValueCondition_; + + public enum ParentValueConditionCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + PARENT_DISCRETE_VALUES(2), + PARENT_INT_VALUES(3), + PARENT_CATEGORICAL_VALUES(4), + PARENTVALUECONDITION_NOT_SET(0); + private final int value; + + private ParentValueConditionCase(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 ParentValueConditionCase valueOf(int value) { + return forNumber(value); + } + + public static ParentValueConditionCase forNumber(int value) { + switch (value) { + case 2: + return PARENT_DISCRETE_VALUES; + case 3: + return PARENT_INT_VALUES; + case 4: + return PARENT_CATEGORICAL_VALUES; + case 0: + return PARENTVALUECONDITION_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ParentValueConditionCase getParentValueConditionCase() { + return ParentValueConditionCase.forNumber(parentValueConditionCase_); + } + + public static final int PARENT_DISCRETE_VALUES_FIELD_NUMBER = 2; + /** + * + * + *
+       * The spec for matching values from a parent parameter of
+       * `DISCRETE` type.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.DiscreteValueCondition parent_discrete_values = 2; + * + * + * @return Whether the parentDiscreteValues field is set. + */ + @java.lang.Override + public boolean hasParentDiscreteValues() { + return parentValueConditionCase_ == 2; + } + /** + * + * + *
+       * The spec for matching values from a parent parameter of
+       * `DISCRETE` type.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.DiscreteValueCondition parent_discrete_values = 2; + * + * + * @return The parentDiscreteValues. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .DiscreteValueCondition + getParentDiscreteValues() { + if (parentValueConditionCase_ == 2) { + return (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .DiscreteValueCondition) + parentValueCondition_; + } + return com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .DiscreteValueCondition.getDefaultInstance(); + } + /** + * + * + *
+       * The spec for matching values from a parent parameter of
+       * `DISCRETE` type.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.DiscreteValueCondition parent_discrete_values = 2; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .DiscreteValueConditionOrBuilder + getParentDiscreteValuesOrBuilder() { + if (parentValueConditionCase_ == 2) { + return (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .DiscreteValueCondition) + parentValueCondition_; + } + return com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .DiscreteValueCondition.getDefaultInstance(); + } + + public static final int PARENT_INT_VALUES_FIELD_NUMBER = 3; + /** + * + * + *
+       * The spec for matching values from a parent parameter of `INTEGER`
+       * type.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.IntValueCondition parent_int_values = 3; + * + * + * @return Whether the parentIntValues field is set. + */ + @java.lang.Override + public boolean hasParentIntValues() { + return parentValueConditionCase_ == 3; + } + /** + * + * + *
+       * The spec for matching values from a parent parameter of `INTEGER`
+       * type.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.IntValueCondition parent_int_values = 3; + * + * + * @return The parentIntValues. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .IntValueCondition + getParentIntValues() { + if (parentValueConditionCase_ == 3) { + return (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .IntValueCondition) + parentValueCondition_; + } + return com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .IntValueCondition.getDefaultInstance(); + } + /** + * + * + *
+       * The spec for matching values from a parent parameter of `INTEGER`
+       * type.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.IntValueCondition parent_int_values = 3; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .IntValueConditionOrBuilder + getParentIntValuesOrBuilder() { + if (parentValueConditionCase_ == 3) { + return (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .IntValueCondition) + parentValueCondition_; + } + return com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .IntValueCondition.getDefaultInstance(); + } + + public static final int PARENT_CATEGORICAL_VALUES_FIELD_NUMBER = 4; + /** + * + * + *
+       * The spec for matching values from a parent parameter of
+       * `CATEGORICAL` type.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.CategoricalValueCondition parent_categorical_values = 4; + * + * + * @return Whether the parentCategoricalValues field is set. + */ + @java.lang.Override + public boolean hasParentCategoricalValues() { + return parentValueConditionCase_ == 4; + } + /** + * + * + *
+       * The spec for matching values from a parent parameter of
+       * `CATEGORICAL` type.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.CategoricalValueCondition parent_categorical_values = 4; + * + * + * @return The parentCategoricalValues. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .CategoricalValueCondition + getParentCategoricalValues() { + if (parentValueConditionCase_ == 4) { + return (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .CategoricalValueCondition) + parentValueCondition_; + } + return com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .CategoricalValueCondition.getDefaultInstance(); + } + /** + * + * + *
+       * The spec for matching values from a parent parameter of
+       * `CATEGORICAL` type.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.CategoricalValueCondition parent_categorical_values = 4; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .CategoricalValueConditionOrBuilder + getParentCategoricalValuesOrBuilder() { + if (parentValueConditionCase_ == 4) { + return (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .CategoricalValueCondition) + parentValueCondition_; + } + return com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .CategoricalValueCondition.getDefaultInstance(); + } + + public static final int PARAMETER_SPEC_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec parameterSpec_; + /** + * + * + *
+       * Required. The spec for a conditional parameter.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec parameter_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the parameterSpec field is set. + */ + @java.lang.Override + public boolean hasParameterSpec() { + return parameterSpec_ != null; + } + /** + * + * + *
+       * Required. The spec for a conditional parameter.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec parameter_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The parameterSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec getParameterSpec() { + return parameterSpec_ == null + ? com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.getDefaultInstance() + : parameterSpec_; + } + /** + * + * + *
+       * Required. The spec for a conditional parameter.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec parameter_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpecOrBuilder + getParameterSpecOrBuilder() { + return getParameterSpec(); + } + + 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 (parameterSpec_ != null) { + output.writeMessage(1, getParameterSpec()); + } + if (parentValueConditionCase_ == 2) { + output.writeMessage( + 2, + (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .DiscreteValueCondition) + parentValueCondition_); + } + if (parentValueConditionCase_ == 3) { + output.writeMessage( + 3, + (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .IntValueCondition) + parentValueCondition_); + } + if (parentValueConditionCase_ == 4) { + output.writeMessage( + 4, + (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .CategoricalValueCondition) + parentValueCondition_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (parameterSpec_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getParameterSpec()); + } + if (parentValueConditionCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, + (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .DiscreteValueCondition) + parentValueCondition_); + } + if (parentValueConditionCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, + (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .IntValueCondition) + parentValueCondition_); + } + if (parentValueConditionCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, + (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .CategoricalValueCondition) + parentValueCondition_); + } + 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.v1.StudySpec.ParameterSpec.ConditionalParameterSpec)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec other = + (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec) obj; + + if (hasParameterSpec() != other.hasParameterSpec()) return false; + if (hasParameterSpec()) { + if (!getParameterSpec().equals(other.getParameterSpec())) return false; + } + if (!getParentValueConditionCase().equals(other.getParentValueConditionCase())) + return false; + switch (parentValueConditionCase_) { + case 2: + if (!getParentDiscreteValues().equals(other.getParentDiscreteValues())) return false; + break; + case 3: + if (!getParentIntValues().equals(other.getParentIntValues())) return false; + break; + case 4: + if (!getParentCategoricalValues().equals(other.getParentCategoricalValues())) + return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasParameterSpec()) { + hash = (37 * hash) + PARAMETER_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getParameterSpec().hashCode(); + } + switch (parentValueConditionCase_) { + case 2: + hash = (37 * hash) + PARENT_DISCRETE_VALUES_FIELD_NUMBER; + hash = (53 * hash) + getParentDiscreteValues().hashCode(); + break; + case 3: + hash = (37 * hash) + PARENT_INT_VALUES_FIELD_NUMBER; + hash = (53 * hash) + getParentIntValues().hashCode(); + break; + case 4: + hash = (37 * hash) + PARENT_CATEGORICAL_VALUES_FIELD_NUMBER; + hash = (53 * hash) + getParentCategoricalValues().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + 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.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + 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.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + 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.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + 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.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + 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.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + 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 parameter spec with condition from its parent parameter.
+       * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec) + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_ConditionalParameterSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_ConditionalParameterSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .class, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.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 (parameterSpecBuilder_ == null) { + parameterSpec_ = null; + } else { + parameterSpec_ = null; + parameterSpecBuilder_ = null; + } + parentValueConditionCase_ = 0; + parentValueCondition_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_ConditionalParameterSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + build() { + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + buildPartial() { + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec result = + new com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec( + this); + if (parentValueConditionCase_ == 2) { + if (parentDiscreteValuesBuilder_ == null) { + result.parentValueCondition_ = parentValueCondition_; + } else { + result.parentValueCondition_ = parentDiscreteValuesBuilder_.build(); + } + } + if (parentValueConditionCase_ == 3) { + if (parentIntValuesBuilder_ == null) { + result.parentValueCondition_ = parentValueCondition_; + } else { + result.parentValueCondition_ = parentIntValuesBuilder_.build(); + } + } + if (parentValueConditionCase_ == 4) { + if (parentCategoricalValuesBuilder_ == null) { + result.parentValueCondition_ = parentValueCondition_; + } else { + result.parentValueCondition_ = parentCategoricalValuesBuilder_.build(); + } + } + if (parameterSpecBuilder_ == null) { + result.parameterSpec_ = parameterSpec_; + } else { + result.parameterSpec_ = parameterSpecBuilder_.build(); + } + result.parentValueConditionCase_ = parentValueConditionCase_; + 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.v1.StudySpec.ParameterSpec.ConditionalParameterSpec) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec other) { + if (other + == com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .getDefaultInstance()) return this; + if (other.hasParameterSpec()) { + mergeParameterSpec(other.getParameterSpec()); + } + switch (other.getParentValueConditionCase()) { + case PARENT_DISCRETE_VALUES: + { + mergeParentDiscreteValues(other.getParentDiscreteValues()); + break; + } + case PARENT_INT_VALUES: + { + mergeParentIntValues(other.getParentIntValues()); + break; + } + case PARENT_CATEGORICAL_VALUES: + { + mergeParentCategoricalValues(other.getParentCategoricalValues()); + break; + } + case PARENTVALUECONDITION_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.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int parentValueConditionCase_ = 0; + private java.lang.Object parentValueCondition_; + + public ParentValueConditionCase getParentValueConditionCase() { + return ParentValueConditionCase.forNumber(parentValueConditionCase_); + } + + public Builder clearParentValueCondition() { + parentValueConditionCase_ = 0; + parentValueCondition_ = null; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .DiscreteValueCondition, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .DiscreteValueCondition.Builder, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .DiscreteValueConditionOrBuilder> + parentDiscreteValuesBuilder_; + /** + * + * + *
+         * The spec for matching values from a parent parameter of
+         * `DISCRETE` type.
+         * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.DiscreteValueCondition parent_discrete_values = 2; + * + * + * @return Whether the parentDiscreteValues field is set. + */ + @java.lang.Override + public boolean hasParentDiscreteValues() { + return parentValueConditionCase_ == 2; + } + /** + * + * + *
+         * The spec for matching values from a parent parameter of
+         * `DISCRETE` type.
+         * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.DiscreteValueCondition parent_discrete_values = 2; + * + * + * @return The parentDiscreteValues. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .DiscreteValueCondition + getParentDiscreteValues() { + if (parentDiscreteValuesBuilder_ == null) { + if (parentValueConditionCase_ == 2) { + return (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec + .ConditionalParameterSpec.DiscreteValueCondition) + parentValueCondition_; + } + return com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .DiscreteValueCondition.getDefaultInstance(); + } else { + if (parentValueConditionCase_ == 2) { + return parentDiscreteValuesBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .DiscreteValueCondition.getDefaultInstance(); + } + } + /** + * + * + *
+         * The spec for matching values from a parent parameter of
+         * `DISCRETE` type.
+         * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.DiscreteValueCondition parent_discrete_values = 2; + * + */ + public Builder setParentDiscreteValues( + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .DiscreteValueCondition + value) { + if (parentDiscreteValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + parentValueCondition_ = value; + onChanged(); + } else { + parentDiscreteValuesBuilder_.setMessage(value); + } + parentValueConditionCase_ = 2; + return this; + } + /** + * + * + *
+         * The spec for matching values from a parent parameter of
+         * `DISCRETE` type.
+         * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.DiscreteValueCondition parent_discrete_values = 2; + * + */ + public Builder setParentDiscreteValues( + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .DiscreteValueCondition.Builder + builderForValue) { + if (parentDiscreteValuesBuilder_ == null) { + parentValueCondition_ = builderForValue.build(); + onChanged(); + } else { + parentDiscreteValuesBuilder_.setMessage(builderForValue.build()); + } + parentValueConditionCase_ = 2; + return this; + } + /** + * + * + *
+         * The spec for matching values from a parent parameter of
+         * `DISCRETE` type.
+         * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.DiscreteValueCondition parent_discrete_values = 2; + * + */ + public Builder mergeParentDiscreteValues( + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .DiscreteValueCondition + value) { + if (parentDiscreteValuesBuilder_ == null) { + if (parentValueConditionCase_ == 2 + && parentValueCondition_ + != com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec + .ConditionalParameterSpec.DiscreteValueCondition.getDefaultInstance()) { + parentValueCondition_ = + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .DiscreteValueCondition.newBuilder( + (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec + .ConditionalParameterSpec.DiscreteValueCondition) + parentValueCondition_) + .mergeFrom(value) + .buildPartial(); + } else { + parentValueCondition_ = value; + } + onChanged(); + } else { + if (parentValueConditionCase_ == 2) { + parentDiscreteValuesBuilder_.mergeFrom(value); + } + parentDiscreteValuesBuilder_.setMessage(value); + } + parentValueConditionCase_ = 2; + return this; + } + /** + * + * + *
+         * The spec for matching values from a parent parameter of
+         * `DISCRETE` type.
+         * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.DiscreteValueCondition parent_discrete_values = 2; + * + */ + public Builder clearParentDiscreteValues() { + if (parentDiscreteValuesBuilder_ == null) { + if (parentValueConditionCase_ == 2) { + parentValueConditionCase_ = 0; + parentValueCondition_ = null; + onChanged(); + } + } else { + if (parentValueConditionCase_ == 2) { + parentValueConditionCase_ = 0; + parentValueCondition_ = null; + } + parentDiscreteValuesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+         * The spec for matching values from a parent parameter of
+         * `DISCRETE` type.
+         * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.DiscreteValueCondition parent_discrete_values = 2; + * + */ + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .DiscreteValueCondition.Builder + getParentDiscreteValuesBuilder() { + return getParentDiscreteValuesFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * The spec for matching values from a parent parameter of
+         * `DISCRETE` type.
+         * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.DiscreteValueCondition parent_discrete_values = 2; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .DiscreteValueConditionOrBuilder + getParentDiscreteValuesOrBuilder() { + if ((parentValueConditionCase_ == 2) && (parentDiscreteValuesBuilder_ != null)) { + return parentDiscreteValuesBuilder_.getMessageOrBuilder(); + } else { + if (parentValueConditionCase_ == 2) { + return (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec + .ConditionalParameterSpec.DiscreteValueCondition) + parentValueCondition_; + } + return com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .DiscreteValueCondition.getDefaultInstance(); + } + } + /** + * + * + *
+         * The spec for matching values from a parent parameter of
+         * `DISCRETE` type.
+         * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.DiscreteValueCondition parent_discrete_values = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .DiscreteValueCondition, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .DiscreteValueCondition.Builder, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .DiscreteValueConditionOrBuilder> + getParentDiscreteValuesFieldBuilder() { + if (parentDiscreteValuesBuilder_ == null) { + if (!(parentValueConditionCase_ == 2)) { + parentValueCondition_ = + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .DiscreteValueCondition.getDefaultInstance(); + } + parentDiscreteValuesBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .DiscreteValueCondition, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .DiscreteValueCondition.Builder, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .DiscreteValueConditionOrBuilder>( + (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .DiscreteValueCondition) + parentValueCondition_, + getParentForChildren(), + isClean()); + parentValueCondition_ = null; + } + parentValueConditionCase_ = 2; + onChanged(); + ; + return parentDiscreteValuesBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .IntValueCondition, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .IntValueCondition.Builder, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .IntValueConditionOrBuilder> + parentIntValuesBuilder_; + /** + * + * + *
+         * The spec for matching values from a parent parameter of `INTEGER`
+         * type.
+         * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.IntValueCondition parent_int_values = 3; + * + * + * @return Whether the parentIntValues field is set. + */ + @java.lang.Override + public boolean hasParentIntValues() { + return parentValueConditionCase_ == 3; + } + /** + * + * + *
+         * The spec for matching values from a parent parameter of `INTEGER`
+         * type.
+         * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.IntValueCondition parent_int_values = 3; + * + * + * @return The parentIntValues. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .IntValueCondition + getParentIntValues() { + if (parentIntValuesBuilder_ == null) { + if (parentValueConditionCase_ == 3) { + return (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec + .ConditionalParameterSpec.IntValueCondition) + parentValueCondition_; + } + return com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .IntValueCondition.getDefaultInstance(); + } else { + if (parentValueConditionCase_ == 3) { + return parentIntValuesBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .IntValueCondition.getDefaultInstance(); + } + } + /** + * + * + *
+         * The spec for matching values from a parent parameter of `INTEGER`
+         * type.
+         * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.IntValueCondition parent_int_values = 3; + * + */ + public Builder setParentIntValues( + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .IntValueCondition + value) { + if (parentIntValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + parentValueCondition_ = value; + onChanged(); + } else { + parentIntValuesBuilder_.setMessage(value); + } + parentValueConditionCase_ = 3; + return this; + } + /** + * + * + *
+         * The spec for matching values from a parent parameter of `INTEGER`
+         * type.
+         * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.IntValueCondition parent_int_values = 3; + * + */ + public Builder setParentIntValues( + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .IntValueCondition.Builder + builderForValue) { + if (parentIntValuesBuilder_ == null) { + parentValueCondition_ = builderForValue.build(); + onChanged(); + } else { + parentIntValuesBuilder_.setMessage(builderForValue.build()); + } + parentValueConditionCase_ = 3; + return this; + } + /** + * + * + *
+         * The spec for matching values from a parent parameter of `INTEGER`
+         * type.
+         * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.IntValueCondition parent_int_values = 3; + * + */ + public Builder mergeParentIntValues( + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .IntValueCondition + value) { + if (parentIntValuesBuilder_ == null) { + if (parentValueConditionCase_ == 3 + && parentValueCondition_ + != com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec + .ConditionalParameterSpec.IntValueCondition.getDefaultInstance()) { + parentValueCondition_ = + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .IntValueCondition.newBuilder( + (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec + .ConditionalParameterSpec.IntValueCondition) + parentValueCondition_) + .mergeFrom(value) + .buildPartial(); + } else { + parentValueCondition_ = value; + } + onChanged(); + } else { + if (parentValueConditionCase_ == 3) { + parentIntValuesBuilder_.mergeFrom(value); + } + parentIntValuesBuilder_.setMessage(value); + } + parentValueConditionCase_ = 3; + return this; + } + /** + * + * + *
+         * The spec for matching values from a parent parameter of `INTEGER`
+         * type.
+         * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.IntValueCondition parent_int_values = 3; + * + */ + public Builder clearParentIntValues() { + if (parentIntValuesBuilder_ == null) { + if (parentValueConditionCase_ == 3) { + parentValueConditionCase_ = 0; + parentValueCondition_ = null; + onChanged(); + } + } else { + if (parentValueConditionCase_ == 3) { + parentValueConditionCase_ = 0; + parentValueCondition_ = null; + } + parentIntValuesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+         * The spec for matching values from a parent parameter of `INTEGER`
+         * type.
+         * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.IntValueCondition parent_int_values = 3; + * + */ + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .IntValueCondition.Builder + getParentIntValuesBuilder() { + return getParentIntValuesFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * The spec for matching values from a parent parameter of `INTEGER`
+         * type.
+         * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.IntValueCondition parent_int_values = 3; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .IntValueConditionOrBuilder + getParentIntValuesOrBuilder() { + if ((parentValueConditionCase_ == 3) && (parentIntValuesBuilder_ != null)) { + return parentIntValuesBuilder_.getMessageOrBuilder(); + } else { + if (parentValueConditionCase_ == 3) { + return (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec + .ConditionalParameterSpec.IntValueCondition) + parentValueCondition_; + } + return com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .IntValueCondition.getDefaultInstance(); + } + } + /** + * + * + *
+         * The spec for matching values from a parent parameter of `INTEGER`
+         * type.
+         * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.IntValueCondition parent_int_values = 3; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .IntValueCondition, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .IntValueCondition.Builder, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .IntValueConditionOrBuilder> + getParentIntValuesFieldBuilder() { + if (parentIntValuesBuilder_ == null) { + if (!(parentValueConditionCase_ == 3)) { + parentValueCondition_ = + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .IntValueCondition.getDefaultInstance(); + } + parentIntValuesBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .IntValueCondition, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .IntValueCondition.Builder, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .IntValueConditionOrBuilder>( + (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .IntValueCondition) + parentValueCondition_, + getParentForChildren(), + isClean()); + parentValueCondition_ = null; + } + parentValueConditionCase_ = 3; + onChanged(); + ; + return parentIntValuesBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .CategoricalValueCondition, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .CategoricalValueCondition.Builder, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .CategoricalValueConditionOrBuilder> + parentCategoricalValuesBuilder_; + /** + * + * + *
+         * The spec for matching values from a parent parameter of
+         * `CATEGORICAL` type.
+         * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.CategoricalValueCondition parent_categorical_values = 4; + * + * + * @return Whether the parentCategoricalValues field is set. + */ + @java.lang.Override + public boolean hasParentCategoricalValues() { + return parentValueConditionCase_ == 4; + } + /** + * + * + *
+         * The spec for matching values from a parent parameter of
+         * `CATEGORICAL` type.
+         * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.CategoricalValueCondition parent_categorical_values = 4; + * + * + * @return The parentCategoricalValues. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .CategoricalValueCondition + getParentCategoricalValues() { + if (parentCategoricalValuesBuilder_ == null) { + if (parentValueConditionCase_ == 4) { + return (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec + .ConditionalParameterSpec.CategoricalValueCondition) + parentValueCondition_; + } + return com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .CategoricalValueCondition.getDefaultInstance(); + } else { + if (parentValueConditionCase_ == 4) { + return parentCategoricalValuesBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .CategoricalValueCondition.getDefaultInstance(); + } + } + /** + * + * + *
+         * The spec for matching values from a parent parameter of
+         * `CATEGORICAL` type.
+         * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.CategoricalValueCondition parent_categorical_values = 4; + * + */ + public Builder setParentCategoricalValues( + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .CategoricalValueCondition + value) { + if (parentCategoricalValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + parentValueCondition_ = value; + onChanged(); + } else { + parentCategoricalValuesBuilder_.setMessage(value); + } + parentValueConditionCase_ = 4; + return this; + } + /** + * + * + *
+         * The spec for matching values from a parent parameter of
+         * `CATEGORICAL` type.
+         * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.CategoricalValueCondition parent_categorical_values = 4; + * + */ + public Builder setParentCategoricalValues( + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .CategoricalValueCondition.Builder + builderForValue) { + if (parentCategoricalValuesBuilder_ == null) { + parentValueCondition_ = builderForValue.build(); + onChanged(); + } else { + parentCategoricalValuesBuilder_.setMessage(builderForValue.build()); + } + parentValueConditionCase_ = 4; + return this; + } + /** + * + * + *
+         * The spec for matching values from a parent parameter of
+         * `CATEGORICAL` type.
+         * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.CategoricalValueCondition parent_categorical_values = 4; + * + */ + public Builder mergeParentCategoricalValues( + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .CategoricalValueCondition + value) { + if (parentCategoricalValuesBuilder_ == null) { + if (parentValueConditionCase_ == 4 + && parentValueCondition_ + != com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec + .ConditionalParameterSpec.CategoricalValueCondition.getDefaultInstance()) { + parentValueCondition_ = + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .CategoricalValueCondition.newBuilder( + (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec + .ConditionalParameterSpec.CategoricalValueCondition) + parentValueCondition_) + .mergeFrom(value) + .buildPartial(); + } else { + parentValueCondition_ = value; + } + onChanged(); + } else { + if (parentValueConditionCase_ == 4) { + parentCategoricalValuesBuilder_.mergeFrom(value); + } + parentCategoricalValuesBuilder_.setMessage(value); + } + parentValueConditionCase_ = 4; + return this; + } + /** + * + * + *
+         * The spec for matching values from a parent parameter of
+         * `CATEGORICAL` type.
+         * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.CategoricalValueCondition parent_categorical_values = 4; + * + */ + public Builder clearParentCategoricalValues() { + if (parentCategoricalValuesBuilder_ == null) { + if (parentValueConditionCase_ == 4) { + parentValueConditionCase_ = 0; + parentValueCondition_ = null; + onChanged(); + } + } else { + if (parentValueConditionCase_ == 4) { + parentValueConditionCase_ = 0; + parentValueCondition_ = null; + } + parentCategoricalValuesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+         * The spec for matching values from a parent parameter of
+         * `CATEGORICAL` type.
+         * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.CategoricalValueCondition parent_categorical_values = 4; + * + */ + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .CategoricalValueCondition.Builder + getParentCategoricalValuesBuilder() { + return getParentCategoricalValuesFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * The spec for matching values from a parent parameter of
+         * `CATEGORICAL` type.
+         * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.CategoricalValueCondition parent_categorical_values = 4; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .CategoricalValueConditionOrBuilder + getParentCategoricalValuesOrBuilder() { + if ((parentValueConditionCase_ == 4) && (parentCategoricalValuesBuilder_ != null)) { + return parentCategoricalValuesBuilder_.getMessageOrBuilder(); + } else { + if (parentValueConditionCase_ == 4) { + return (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec + .ConditionalParameterSpec.CategoricalValueCondition) + parentValueCondition_; + } + return com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .CategoricalValueCondition.getDefaultInstance(); + } + } + /** + * + * + *
+         * The spec for matching values from a parent parameter of
+         * `CATEGORICAL` type.
+         * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.CategoricalValueCondition parent_categorical_values = 4; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .CategoricalValueCondition, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .CategoricalValueCondition.Builder, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .CategoricalValueConditionOrBuilder> + getParentCategoricalValuesFieldBuilder() { + if (parentCategoricalValuesBuilder_ == null) { + if (!(parentValueConditionCase_ == 4)) { + parentValueCondition_ = + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .CategoricalValueCondition.getDefaultInstance(); + } + parentCategoricalValuesBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .CategoricalValueCondition, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .CategoricalValueCondition.Builder, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .CategoricalValueConditionOrBuilder>( + (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .CategoricalValueCondition) + parentValueCondition_, + getParentForChildren(), + isClean()); + parentValueCondition_ = null; + } + parentValueConditionCase_ = 4; + onChanged(); + ; + return parentCategoricalValuesBuilder_; + } + + private com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec parameterSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.Builder, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpecOrBuilder> + parameterSpecBuilder_; + /** + * + * + *
+         * Required. The spec for a conditional parameter.
+         * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec parameter_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the parameterSpec field is set. + */ + public boolean hasParameterSpec() { + return parameterSpecBuilder_ != null || parameterSpec_ != null; + } + /** + * + * + *
+         * Required. The spec for a conditional parameter.
+         * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec parameter_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The parameterSpec. + */ + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec getParameterSpec() { + if (parameterSpecBuilder_ == null) { + return parameterSpec_ == null + ? com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.getDefaultInstance() + : parameterSpec_; + } else { + return parameterSpecBuilder_.getMessage(); + } + } + /** + * + * + *
+         * Required. The spec for a conditional parameter.
+         * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec parameter_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setParameterSpec( + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec value) { + if (parameterSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + parameterSpec_ = value; + onChanged(); + } else { + parameterSpecBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+         * Required. The spec for a conditional parameter.
+         * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec parameter_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setParameterSpec( + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.Builder builderForValue) { + if (parameterSpecBuilder_ == null) { + parameterSpec_ = builderForValue.build(); + onChanged(); + } else { + parameterSpecBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+         * Required. The spec for a conditional parameter.
+         * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec parameter_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeParameterSpec( + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec value) { + if (parameterSpecBuilder_ == null) { + if (parameterSpec_ != null) { + parameterSpec_ = + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.newBuilder(parameterSpec_) + .mergeFrom(value) + .buildPartial(); + } else { + parameterSpec_ = value; + } + onChanged(); + } else { + parameterSpecBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+         * Required. The spec for a conditional parameter.
+         * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec parameter_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearParameterSpec() { + if (parameterSpecBuilder_ == null) { + parameterSpec_ = null; + onChanged(); + } else { + parameterSpec_ = null; + parameterSpecBuilder_ = null; + } + + return this; + } + /** + * + * + *
+         * Required. The spec for a conditional parameter.
+         * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec parameter_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.Builder + getParameterSpecBuilder() { + + onChanged(); + return getParameterSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * Required. The spec for a conditional parameter.
+         * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec parameter_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpecOrBuilder + getParameterSpecOrBuilder() { + if (parameterSpecBuilder_ != null) { + return parameterSpecBuilder_.getMessageOrBuilder(); + } else { + return parameterSpec_ == null + ? com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.getDefaultInstance() + : parameterSpec_; + } + } + /** + * + * + *
+         * Required. The spec for a conditional parameter.
+         * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec parameter_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.Builder, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpecOrBuilder> + getParameterSpecFieldBuilder() { + if (parameterSpecBuilder_ == null) { + parameterSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.Builder, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpecOrBuilder>( + getParameterSpec(), getParentForChildren(), isClean()); + parameterSpec_ = null; + } + return parameterSpecBuilder_; + } + + @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.v1.StudySpec.ParameterSpec.ConditionalParameterSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec) + private static final com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec + .ConditionalParameterSpec + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec(); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ConditionalParameterSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ConditionalParameterSpec(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.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int parameterValueSpecCase_ = 0; + private java.lang.Object parameterValueSpec_; + + public enum ParameterValueSpecCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + DOUBLE_VALUE_SPEC(2), + INTEGER_VALUE_SPEC(3), + CATEGORICAL_VALUE_SPEC(4), + DISCRETE_VALUE_SPEC(5), + PARAMETERVALUESPEC_NOT_SET(0); + private final int value; + + private ParameterValueSpecCase(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 ParameterValueSpecCase valueOf(int value) { + return forNumber(value); + } + + public static ParameterValueSpecCase forNumber(int value) { + switch (value) { + case 2: + return DOUBLE_VALUE_SPEC; + case 3: + return INTEGER_VALUE_SPEC; + case 4: + return CATEGORICAL_VALUE_SPEC; + case 5: + return DISCRETE_VALUE_SPEC; + case 0: + return PARAMETERVALUESPEC_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ParameterValueSpecCase getParameterValueSpecCase() { + return ParameterValueSpecCase.forNumber(parameterValueSpecCase_); + } + + public static final int DOUBLE_VALUE_SPEC_FIELD_NUMBER = 2; + /** + * + * + *
+     * The value spec for a 'DOUBLE' parameter.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec double_value_spec = 2; + * + * + * @return Whether the doubleValueSpec field is set. + */ + @java.lang.Override + public boolean hasDoubleValueSpec() { + return parameterValueSpecCase_ == 2; + } + /** + * + * + *
+     * The value spec for a 'DOUBLE' parameter.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec double_value_spec = 2; + * + * + * @return The doubleValueSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec + getDoubleValueSpec() { + if (parameterValueSpecCase_ == 2) { + return (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec) + parameterValueSpec_; + } + return com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec + .getDefaultInstance(); + } + /** + * + * + *
+     * The value spec for a 'DOUBLE' parameter.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec double_value_spec = 2; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpecOrBuilder + getDoubleValueSpecOrBuilder() { + if (parameterValueSpecCase_ == 2) { + return (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec) + parameterValueSpec_; + } + return com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec + .getDefaultInstance(); + } + + public static final int INTEGER_VALUE_SPEC_FIELD_NUMBER = 3; + /** + * + * + *
+     * The value spec for an 'INTEGER' parameter.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec integer_value_spec = 3; + * + * + * @return Whether the integerValueSpec field is set. + */ + @java.lang.Override + public boolean hasIntegerValueSpec() { + return parameterValueSpecCase_ == 3; + } + /** + * + * + *
+     * The value spec for an 'INTEGER' parameter.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec integer_value_spec = 3; + * + * + * @return The integerValueSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec + getIntegerValueSpec() { + if (parameterValueSpecCase_ == 3) { + return (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec) + parameterValueSpec_; + } + return com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec + .getDefaultInstance(); + } + /** + * + * + *
+     * The value spec for an 'INTEGER' parameter.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec integer_value_spec = 3; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpecOrBuilder + getIntegerValueSpecOrBuilder() { + if (parameterValueSpecCase_ == 3) { + return (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec) + parameterValueSpec_; + } + return com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec + .getDefaultInstance(); + } + + public static final int CATEGORICAL_VALUE_SPEC_FIELD_NUMBER = 4; + /** + * + * + *
+     * The value spec for a 'CATEGORICAL' parameter.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec categorical_value_spec = 4; + * + * + * @return Whether the categoricalValueSpec field is set. + */ + @java.lang.Override + public boolean hasCategoricalValueSpec() { + return parameterValueSpecCase_ == 4; + } + /** + * + * + *
+     * The value spec for a 'CATEGORICAL' parameter.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec categorical_value_spec = 4; + * + * + * @return The categoricalValueSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec + getCategoricalValueSpec() { + if (parameterValueSpecCase_ == 4) { + return (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec) + parameterValueSpec_; + } + return com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec + .getDefaultInstance(); + } + /** + * + * + *
+     * The value spec for a 'CATEGORICAL' parameter.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec categorical_value_spec = 4; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpecOrBuilder + getCategoricalValueSpecOrBuilder() { + if (parameterValueSpecCase_ == 4) { + return (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec) + parameterValueSpec_; + } + return com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec + .getDefaultInstance(); + } + + public static final int DISCRETE_VALUE_SPEC_FIELD_NUMBER = 5; + /** + * + * + *
+     * The value spec for a 'DISCRETE' parameter.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec discrete_value_spec = 5; + * + * + * @return Whether the discreteValueSpec field is set. + */ + @java.lang.Override + public boolean hasDiscreteValueSpec() { + return parameterValueSpecCase_ == 5; + } + /** + * + * + *
+     * The value spec for a 'DISCRETE' parameter.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec discrete_value_spec = 5; + * + * + * @return The discreteValueSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec + getDiscreteValueSpec() { + if (parameterValueSpecCase_ == 5) { + return (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec) + parameterValueSpec_; + } + return com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec + .getDefaultInstance(); + } + /** + * + * + *
+     * The value spec for a 'DISCRETE' parameter.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec discrete_value_spec = 5; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpecOrBuilder + getDiscreteValueSpecOrBuilder() { + if (parameterValueSpecCase_ == 5) { + return (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec) + parameterValueSpec_; + } + return com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec + .getDefaultInstance(); + } + + public static final int PARAMETER_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object parameterId_; + /** + * + * + *
+     * Required. The ID of the parameter. Must not contain whitespaces and must be unique
+     * amongst all ParameterSpecs.
+     * 
+ * + * string parameter_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parameterId. + */ + @java.lang.Override + public java.lang.String getParameterId() { + java.lang.Object ref = parameterId_; + 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(); + parameterId_ = s; + return s; + } + } + /** + * + * + *
+     * Required. The ID of the parameter. Must not contain whitespaces and must be unique
+     * amongst all ParameterSpecs.
+     * 
+ * + * string parameter_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parameterId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParameterIdBytes() { + java.lang.Object ref = parameterId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parameterId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SCALE_TYPE_FIELD_NUMBER = 6; + private int scaleType_; + /** + * + * + *
+     * How the parameter should be scaled.
+     * Leave unset for `CATEGORICAL` parameters.
+     * 
+ * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ScaleType scale_type = 6; + * + * @return The enum numeric value on the wire for scaleType. + */ + @java.lang.Override + public int getScaleTypeValue() { + return scaleType_; + } + /** + * + * + *
+     * How the parameter should be scaled.
+     * Leave unset for `CATEGORICAL` parameters.
+     * 
+ * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ScaleType scale_type = 6; + * + * @return The scaleType. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ScaleType getScaleType() { + @SuppressWarnings("deprecation") + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ScaleType result = + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ScaleType.valueOf(scaleType_); + return result == null + ? com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ScaleType.UNRECOGNIZED + : result; + } + + public static final int CONDITIONAL_PARAMETER_SPECS_FIELD_NUMBER = 10; + private java.util.List< + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec> + conditionalParameterSpecs_; + /** + * + * + *
+     * A conditional parameter node is active if the parameter's value matches
+     * the conditional node's parent_value_condition.
+     * If two items in conditional_parameter_specs have the same name, they
+     * must have disjoint parent_value_condition.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec conditional_parameter_specs = 10; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec> + getConditionalParameterSpecsList() { + return conditionalParameterSpecs_; + } + /** + * + * + *
+     * A conditional parameter node is active if the parameter's value matches
+     * the conditional node's parent_value_condition.
+     * If two items in conditional_parameter_specs have the same name, they
+     * must have disjoint parent_value_condition.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec conditional_parameter_specs = 10; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec + .ConditionalParameterSpecOrBuilder> + getConditionalParameterSpecsOrBuilderList() { + return conditionalParameterSpecs_; + } + /** + * + * + *
+     * A conditional parameter node is active if the parameter's value matches
+     * the conditional node's parent_value_condition.
+     * If two items in conditional_parameter_specs have the same name, they
+     * must have disjoint parent_value_condition.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec conditional_parameter_specs = 10; + * + */ + @java.lang.Override + public int getConditionalParameterSpecsCount() { + return conditionalParameterSpecs_.size(); + } + /** + * + * + *
+     * A conditional parameter node is active if the parameter's value matches
+     * the conditional node's parent_value_condition.
+     * If two items in conditional_parameter_specs have the same name, they
+     * must have disjoint parent_value_condition.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec conditional_parameter_specs = 10; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + getConditionalParameterSpecs(int index) { + return conditionalParameterSpecs_.get(index); + } + /** + * + * + *
+     * A conditional parameter node is active if the parameter's value matches
+     * the conditional node's parent_value_condition.
+     * If two items in conditional_parameter_specs have the same name, they
+     * must have disjoint parent_value_condition.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec conditional_parameter_specs = 10; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpecOrBuilder + getConditionalParameterSpecsOrBuilder(int index) { + return conditionalParameterSpecs_.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 (!getParameterIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parameterId_); + } + if (parameterValueSpecCase_ == 2) { + output.writeMessage( + 2, + (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec) + parameterValueSpec_); + } + if (parameterValueSpecCase_ == 3) { + output.writeMessage( + 3, + (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec) + parameterValueSpec_); + } + if (parameterValueSpecCase_ == 4) { + output.writeMessage( + 4, + (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec) + parameterValueSpec_); + } + if (parameterValueSpecCase_ == 5) { + output.writeMessage( + 5, + (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec) + parameterValueSpec_); + } + if (scaleType_ + != com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ScaleType.SCALE_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(6, scaleType_); + } + for (int i = 0; i < conditionalParameterSpecs_.size(); i++) { + output.writeMessage(10, conditionalParameterSpecs_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParameterIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parameterId_); + } + if (parameterValueSpecCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, + (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec) + parameterValueSpec_); + } + if (parameterValueSpecCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, + (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec) + parameterValueSpec_); + } + if (parameterValueSpecCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, + (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec) + parameterValueSpec_); + } + if (parameterValueSpecCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, + (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec) + parameterValueSpec_); + } + if (scaleType_ + != com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ScaleType.SCALE_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, scaleType_); + } + for (int i = 0; i < conditionalParameterSpecs_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 10, conditionalParameterSpecs_.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.v1.StudySpec.ParameterSpec)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec other = + (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec) obj; + + if (!getParameterId().equals(other.getParameterId())) return false; + if (scaleType_ != other.scaleType_) return false; + if (!getConditionalParameterSpecsList().equals(other.getConditionalParameterSpecsList())) + return false; + if (!getParameterValueSpecCase().equals(other.getParameterValueSpecCase())) return false; + switch (parameterValueSpecCase_) { + case 2: + if (!getDoubleValueSpec().equals(other.getDoubleValueSpec())) return false; + break; + case 3: + if (!getIntegerValueSpec().equals(other.getIntegerValueSpec())) return false; + break; + case 4: + if (!getCategoricalValueSpec().equals(other.getCategoricalValueSpec())) return false; + break; + case 5: + if (!getDiscreteValueSpec().equals(other.getDiscreteValueSpec())) 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) + PARAMETER_ID_FIELD_NUMBER; + hash = (53 * hash) + getParameterId().hashCode(); + hash = (37 * hash) + SCALE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + scaleType_; + if (getConditionalParameterSpecsCount() > 0) { + hash = (37 * hash) + CONDITIONAL_PARAMETER_SPECS_FIELD_NUMBER; + hash = (53 * hash) + getConditionalParameterSpecsList().hashCode(); + } + switch (parameterValueSpecCase_) { + case 2: + hash = (37 * hash) + DOUBLE_VALUE_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getDoubleValueSpec().hashCode(); + break; + case 3: + hash = (37 * hash) + INTEGER_VALUE_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getIntegerValueSpec().hashCode(); + break; + case 4: + hash = (37 * hash) + CATEGORICAL_VALUE_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getCategoricalValueSpec().hashCode(); + break; + case 5: + hash = (37 * hash) + DISCRETE_VALUE_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getDiscreteValueSpec().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec 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.v1.StudySpec.ParameterSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec 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.v1.StudySpec.ParameterSpec parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec 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.v1.StudySpec.ParameterSpec parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec 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.v1.StudySpec.ParameterSpec parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec 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.v1.StudySpec.ParameterSpec 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 single parameter to optimize.
+     * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.StudySpec.ParameterSpec} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.StudySpec.ParameterSpec) + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.class, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getConditionalParameterSpecsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parameterId_ = ""; + + scaleType_ = 0; + + if (conditionalParameterSpecsBuilder_ == null) { + conditionalParameterSpecs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + conditionalParameterSpecsBuilder_.clear(); + } + parameterValueSpecCase_ = 0; + parameterValueSpec_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec build() { + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec buildPartial() { + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec result = + new com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec(this); + int from_bitField0_ = bitField0_; + if (parameterValueSpecCase_ == 2) { + if (doubleValueSpecBuilder_ == null) { + result.parameterValueSpec_ = parameterValueSpec_; + } else { + result.parameterValueSpec_ = doubleValueSpecBuilder_.build(); + } + } + if (parameterValueSpecCase_ == 3) { + if (integerValueSpecBuilder_ == null) { + result.parameterValueSpec_ = parameterValueSpec_; + } else { + result.parameterValueSpec_ = integerValueSpecBuilder_.build(); + } + } + if (parameterValueSpecCase_ == 4) { + if (categoricalValueSpecBuilder_ == null) { + result.parameterValueSpec_ = parameterValueSpec_; + } else { + result.parameterValueSpec_ = categoricalValueSpecBuilder_.build(); + } + } + if (parameterValueSpecCase_ == 5) { + if (discreteValueSpecBuilder_ == null) { + result.parameterValueSpec_ = parameterValueSpec_; + } else { + result.parameterValueSpec_ = discreteValueSpecBuilder_.build(); + } + } + result.parameterId_ = parameterId_; + result.scaleType_ = scaleType_; + if (conditionalParameterSpecsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + conditionalParameterSpecs_ = + java.util.Collections.unmodifiableList(conditionalParameterSpecs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.conditionalParameterSpecs_ = conditionalParameterSpecs_; + } else { + result.conditionalParameterSpecs_ = conditionalParameterSpecsBuilder_.build(); + } + result.parameterValueSpecCase_ = parameterValueSpecCase_; + 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.v1.StudySpec.ParameterSpec) { + return mergeFrom((com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec other) { + if (other == com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.getDefaultInstance()) + return this; + if (!other.getParameterId().isEmpty()) { + parameterId_ = other.parameterId_; + onChanged(); + } + if (other.scaleType_ != 0) { + setScaleTypeValue(other.getScaleTypeValue()); + } + if (conditionalParameterSpecsBuilder_ == null) { + if (!other.conditionalParameterSpecs_.isEmpty()) { + if (conditionalParameterSpecs_.isEmpty()) { + conditionalParameterSpecs_ = other.conditionalParameterSpecs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureConditionalParameterSpecsIsMutable(); + conditionalParameterSpecs_.addAll(other.conditionalParameterSpecs_); + } + onChanged(); + } + } else { + if (!other.conditionalParameterSpecs_.isEmpty()) { + if (conditionalParameterSpecsBuilder_.isEmpty()) { + conditionalParameterSpecsBuilder_.dispose(); + conditionalParameterSpecsBuilder_ = null; + conditionalParameterSpecs_ = other.conditionalParameterSpecs_; + bitField0_ = (bitField0_ & ~0x00000001); + conditionalParameterSpecsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getConditionalParameterSpecsFieldBuilder() + : null; + } else { + conditionalParameterSpecsBuilder_.addAllMessages(other.conditionalParameterSpecs_); + } + } + } + switch (other.getParameterValueSpecCase()) { + case DOUBLE_VALUE_SPEC: + { + mergeDoubleValueSpec(other.getDoubleValueSpec()); + break; + } + case INTEGER_VALUE_SPEC: + { + mergeIntegerValueSpec(other.getIntegerValueSpec()); + break; + } + case CATEGORICAL_VALUE_SPEC: + { + mergeCategoricalValueSpec(other.getCategoricalValueSpec()); + break; + } + case DISCRETE_VALUE_SPEC: + { + mergeDiscreteValueSpec(other.getDiscreteValueSpec()); + break; + } + case PARAMETERVALUESPEC_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.v1.StudySpec.ParameterSpec parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int parameterValueSpecCase_ = 0; + private java.lang.Object parameterValueSpec_; + + public ParameterValueSpecCase getParameterValueSpecCase() { + return ParameterValueSpecCase.forNumber(parameterValueSpecCase_); + } + + public Builder clearParameterValueSpec() { + parameterValueSpecCase_ = 0; + parameterValueSpec_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec.Builder, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpecOrBuilder> + doubleValueSpecBuilder_; + /** + * + * + *
+       * The value spec for a 'DOUBLE' parameter.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec double_value_spec = 2; + * + * + * @return Whether the doubleValueSpec field is set. + */ + @java.lang.Override + public boolean hasDoubleValueSpec() { + return parameterValueSpecCase_ == 2; + } + /** + * + * + *
+       * The value spec for a 'DOUBLE' parameter.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec double_value_spec = 2; + * + * + * @return The doubleValueSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec + getDoubleValueSpec() { + if (doubleValueSpecBuilder_ == null) { + if (parameterValueSpecCase_ == 2) { + return (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec) + parameterValueSpec_; + } + return com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec + .getDefaultInstance(); + } else { + if (parameterValueSpecCase_ == 2) { + return doubleValueSpecBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec + .getDefaultInstance(); + } + } + /** + * + * + *
+       * The value spec for a 'DOUBLE' parameter.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec double_value_spec = 2; + * + */ + public Builder setDoubleValueSpec( + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec value) { + if (doubleValueSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + parameterValueSpec_ = value; + onChanged(); + } else { + doubleValueSpecBuilder_.setMessage(value); + } + parameterValueSpecCase_ = 2; + return this; + } + /** + * + * + *
+       * The value spec for a 'DOUBLE' parameter.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec double_value_spec = 2; + * + */ + public Builder setDoubleValueSpec( + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec.Builder + builderForValue) { + if (doubleValueSpecBuilder_ == null) { + parameterValueSpec_ = builderForValue.build(); + onChanged(); + } else { + doubleValueSpecBuilder_.setMessage(builderForValue.build()); + } + parameterValueSpecCase_ = 2; + return this; + } + /** + * + * + *
+       * The value spec for a 'DOUBLE' parameter.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec double_value_spec = 2; + * + */ + public Builder mergeDoubleValueSpec( + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec value) { + if (doubleValueSpecBuilder_ == null) { + if (parameterValueSpecCase_ == 2 + && parameterValueSpec_ + != com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec + .getDefaultInstance()) { + parameterValueSpec_ = + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec.newBuilder( + (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec) + parameterValueSpec_) + .mergeFrom(value) + .buildPartial(); + } else { + parameterValueSpec_ = value; + } + onChanged(); + } else { + if (parameterValueSpecCase_ == 2) { + doubleValueSpecBuilder_.mergeFrom(value); + } + doubleValueSpecBuilder_.setMessage(value); + } + parameterValueSpecCase_ = 2; + return this; + } + /** + * + * + *
+       * The value spec for a 'DOUBLE' parameter.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec double_value_spec = 2; + * + */ + public Builder clearDoubleValueSpec() { + if (doubleValueSpecBuilder_ == null) { + if (parameterValueSpecCase_ == 2) { + parameterValueSpecCase_ = 0; + parameterValueSpec_ = null; + onChanged(); + } + } else { + if (parameterValueSpecCase_ == 2) { + parameterValueSpecCase_ = 0; + parameterValueSpec_ = null; + } + doubleValueSpecBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * The value spec for a 'DOUBLE' parameter.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec double_value_spec = 2; + * + */ + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec.Builder + getDoubleValueSpecBuilder() { + return getDoubleValueSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The value spec for a 'DOUBLE' parameter.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec double_value_spec = 2; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpecOrBuilder + getDoubleValueSpecOrBuilder() { + if ((parameterValueSpecCase_ == 2) && (doubleValueSpecBuilder_ != null)) { + return doubleValueSpecBuilder_.getMessageOrBuilder(); + } else { + if (parameterValueSpecCase_ == 2) { + return (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec) + parameterValueSpec_; + } + return com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec + .getDefaultInstance(); + } + } + /** + * + * + *
+       * The value spec for a 'DOUBLE' parameter.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec double_value_spec = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec.Builder, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpecOrBuilder> + getDoubleValueSpecFieldBuilder() { + if (doubleValueSpecBuilder_ == null) { + if (!(parameterValueSpecCase_ == 2)) { + parameterValueSpec_ = + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec + .getDefaultInstance(); + } + doubleValueSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec.Builder, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpecOrBuilder>( + (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec) + parameterValueSpec_, + getParentForChildren(), + isClean()); + parameterValueSpec_ = null; + } + parameterValueSpecCase_ = 2; + onChanged(); + ; + return doubleValueSpecBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec.Builder, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpecOrBuilder> + integerValueSpecBuilder_; + /** + * + * + *
+       * The value spec for an 'INTEGER' parameter.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec integer_value_spec = 3; + * + * + * @return Whether the integerValueSpec field is set. + */ + @java.lang.Override + public boolean hasIntegerValueSpec() { + return parameterValueSpecCase_ == 3; + } + /** + * + * + *
+       * The value spec for an 'INTEGER' parameter.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec integer_value_spec = 3; + * + * + * @return The integerValueSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec + getIntegerValueSpec() { + if (integerValueSpecBuilder_ == null) { + if (parameterValueSpecCase_ == 3) { + return (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec) + parameterValueSpec_; + } + return com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec + .getDefaultInstance(); + } else { + if (parameterValueSpecCase_ == 3) { + return integerValueSpecBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec + .getDefaultInstance(); + } + } + /** + * + * + *
+       * The value spec for an 'INTEGER' parameter.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec integer_value_spec = 3; + * + */ + public Builder setIntegerValueSpec( + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec value) { + if (integerValueSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + parameterValueSpec_ = value; + onChanged(); + } else { + integerValueSpecBuilder_.setMessage(value); + } + parameterValueSpecCase_ = 3; + return this; + } + /** + * + * + *
+       * The value spec for an 'INTEGER' parameter.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec integer_value_spec = 3; + * + */ + public Builder setIntegerValueSpec( + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec.Builder + builderForValue) { + if (integerValueSpecBuilder_ == null) { + parameterValueSpec_ = builderForValue.build(); + onChanged(); + } else { + integerValueSpecBuilder_.setMessage(builderForValue.build()); + } + parameterValueSpecCase_ = 3; + return this; + } + /** + * + * + *
+       * The value spec for an 'INTEGER' parameter.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec integer_value_spec = 3; + * + */ + public Builder mergeIntegerValueSpec( + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec value) { + if (integerValueSpecBuilder_ == null) { + if (parameterValueSpecCase_ == 3 + && parameterValueSpec_ + != com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec + .getDefaultInstance()) { + parameterValueSpec_ = + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec.newBuilder( + (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec) + parameterValueSpec_) + .mergeFrom(value) + .buildPartial(); + } else { + parameterValueSpec_ = value; + } + onChanged(); + } else { + if (parameterValueSpecCase_ == 3) { + integerValueSpecBuilder_.mergeFrom(value); + } + integerValueSpecBuilder_.setMessage(value); + } + parameterValueSpecCase_ = 3; + return this; + } + /** + * + * + *
+       * The value spec for an 'INTEGER' parameter.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec integer_value_spec = 3; + * + */ + public Builder clearIntegerValueSpec() { + if (integerValueSpecBuilder_ == null) { + if (parameterValueSpecCase_ == 3) { + parameterValueSpecCase_ = 0; + parameterValueSpec_ = null; + onChanged(); + } + } else { + if (parameterValueSpecCase_ == 3) { + parameterValueSpecCase_ = 0; + parameterValueSpec_ = null; + } + integerValueSpecBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * The value spec for an 'INTEGER' parameter.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec integer_value_spec = 3; + * + */ + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec.Builder + getIntegerValueSpecBuilder() { + return getIntegerValueSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The value spec for an 'INTEGER' parameter.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec integer_value_spec = 3; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpecOrBuilder + getIntegerValueSpecOrBuilder() { + if ((parameterValueSpecCase_ == 3) && (integerValueSpecBuilder_ != null)) { + return integerValueSpecBuilder_.getMessageOrBuilder(); + } else { + if (parameterValueSpecCase_ == 3) { + return (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec) + parameterValueSpec_; + } + return com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec + .getDefaultInstance(); + } + } + /** + * + * + *
+       * The value spec for an 'INTEGER' parameter.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec integer_value_spec = 3; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec.Builder, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpecOrBuilder> + getIntegerValueSpecFieldBuilder() { + if (integerValueSpecBuilder_ == null) { + if (!(parameterValueSpecCase_ == 3)) { + parameterValueSpec_ = + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec + .getDefaultInstance(); + } + integerValueSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec.Builder, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpecOrBuilder>( + (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec) + parameterValueSpec_, + getParentForChildren(), + isClean()); + parameterValueSpec_ = null; + } + parameterValueSpecCase_ = 3; + onChanged(); + ; + return integerValueSpecBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec.Builder, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpecOrBuilder> + categoricalValueSpecBuilder_; + /** + * + * + *
+       * The value spec for a 'CATEGORICAL' parameter.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec categorical_value_spec = 4; + * + * + * @return Whether the categoricalValueSpec field is set. + */ + @java.lang.Override + public boolean hasCategoricalValueSpec() { + return parameterValueSpecCase_ == 4; + } + /** + * + * + *
+       * The value spec for a 'CATEGORICAL' parameter.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec categorical_value_spec = 4; + * + * + * @return The categoricalValueSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec + getCategoricalValueSpec() { + if (categoricalValueSpecBuilder_ == null) { + if (parameterValueSpecCase_ == 4) { + return (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec) + parameterValueSpec_; + } + return com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec + .getDefaultInstance(); + } else { + if (parameterValueSpecCase_ == 4) { + return categoricalValueSpecBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec + .getDefaultInstance(); + } + } + /** + * + * + *
+       * The value spec for a 'CATEGORICAL' parameter.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec categorical_value_spec = 4; + * + */ + public Builder setCategoricalValueSpec( + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec value) { + if (categoricalValueSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + parameterValueSpec_ = value; + onChanged(); + } else { + categoricalValueSpecBuilder_.setMessage(value); + } + parameterValueSpecCase_ = 4; + return this; + } + /** + * + * + *
+       * The value spec for a 'CATEGORICAL' parameter.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec categorical_value_spec = 4; + * + */ + public Builder setCategoricalValueSpec( + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec.Builder + builderForValue) { + if (categoricalValueSpecBuilder_ == null) { + parameterValueSpec_ = builderForValue.build(); + onChanged(); + } else { + categoricalValueSpecBuilder_.setMessage(builderForValue.build()); + } + parameterValueSpecCase_ = 4; + return this; + } + /** + * + * + *
+       * The value spec for a 'CATEGORICAL' parameter.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec categorical_value_spec = 4; + * + */ + public Builder mergeCategoricalValueSpec( + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec value) { + if (categoricalValueSpecBuilder_ == null) { + if (parameterValueSpecCase_ == 4 + && parameterValueSpec_ + != com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec + .getDefaultInstance()) { + parameterValueSpec_ = + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec + .newBuilder( + (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec + .CategoricalValueSpec) + parameterValueSpec_) + .mergeFrom(value) + .buildPartial(); + } else { + parameterValueSpec_ = value; + } + onChanged(); + } else { + if (parameterValueSpecCase_ == 4) { + categoricalValueSpecBuilder_.mergeFrom(value); + } + categoricalValueSpecBuilder_.setMessage(value); + } + parameterValueSpecCase_ = 4; + return this; + } + /** + * + * + *
+       * The value spec for a 'CATEGORICAL' parameter.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec categorical_value_spec = 4; + * + */ + public Builder clearCategoricalValueSpec() { + if (categoricalValueSpecBuilder_ == null) { + if (parameterValueSpecCase_ == 4) { + parameterValueSpecCase_ = 0; + parameterValueSpec_ = null; + onChanged(); + } + } else { + if (parameterValueSpecCase_ == 4) { + parameterValueSpecCase_ = 0; + parameterValueSpec_ = null; + } + categoricalValueSpecBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * The value spec for a 'CATEGORICAL' parameter.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec categorical_value_spec = 4; + * + */ + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec.Builder + getCategoricalValueSpecBuilder() { + return getCategoricalValueSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The value spec for a 'CATEGORICAL' parameter.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec categorical_value_spec = 4; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpecOrBuilder + getCategoricalValueSpecOrBuilder() { + if ((parameterValueSpecCase_ == 4) && (categoricalValueSpecBuilder_ != null)) { + return categoricalValueSpecBuilder_.getMessageOrBuilder(); + } else { + if (parameterValueSpecCase_ == 4) { + return (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec) + parameterValueSpec_; + } + return com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec + .getDefaultInstance(); + } + } + /** + * + * + *
+       * The value spec for a 'CATEGORICAL' parameter.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec categorical_value_spec = 4; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec.Builder, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpecOrBuilder> + getCategoricalValueSpecFieldBuilder() { + if (categoricalValueSpecBuilder_ == null) { + if (!(parameterValueSpecCase_ == 4)) { + parameterValueSpec_ = + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec + .getDefaultInstance(); + } + categoricalValueSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec + .Builder, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec + .CategoricalValueSpecOrBuilder>( + (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec) + parameterValueSpec_, + getParentForChildren(), + isClean()); + parameterValueSpec_ = null; + } + parameterValueSpecCase_ = 4; + onChanged(); + ; + return categoricalValueSpecBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec.Builder, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpecOrBuilder> + discreteValueSpecBuilder_; + /** + * + * + *
+       * The value spec for a 'DISCRETE' parameter.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec discrete_value_spec = 5; + * + * + * @return Whether the discreteValueSpec field is set. + */ + @java.lang.Override + public boolean hasDiscreteValueSpec() { + return parameterValueSpecCase_ == 5; + } + /** + * + * + *
+       * The value spec for a 'DISCRETE' parameter.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec discrete_value_spec = 5; + * + * + * @return The discreteValueSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec + getDiscreteValueSpec() { + if (discreteValueSpecBuilder_ == null) { + if (parameterValueSpecCase_ == 5) { + return (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec) + parameterValueSpec_; + } + return com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec + .getDefaultInstance(); + } else { + if (parameterValueSpecCase_ == 5) { + return discreteValueSpecBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec + .getDefaultInstance(); + } + } + /** + * + * + *
+       * The value spec for a 'DISCRETE' parameter.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec discrete_value_spec = 5; + * + */ + public Builder setDiscreteValueSpec( + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec value) { + if (discreteValueSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + parameterValueSpec_ = value; + onChanged(); + } else { + discreteValueSpecBuilder_.setMessage(value); + } + parameterValueSpecCase_ = 5; + return this; + } + /** + * + * + *
+       * The value spec for a 'DISCRETE' parameter.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec discrete_value_spec = 5; + * + */ + public Builder setDiscreteValueSpec( + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec.Builder + builderForValue) { + if (discreteValueSpecBuilder_ == null) { + parameterValueSpec_ = builderForValue.build(); + onChanged(); + } else { + discreteValueSpecBuilder_.setMessage(builderForValue.build()); + } + parameterValueSpecCase_ = 5; + return this; + } + /** + * + * + *
+       * The value spec for a 'DISCRETE' parameter.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec discrete_value_spec = 5; + * + */ + public Builder mergeDiscreteValueSpec( + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec value) { + if (discreteValueSpecBuilder_ == null) { + if (parameterValueSpecCase_ == 5 + && parameterValueSpec_ + != com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec + .getDefaultInstance()) { + parameterValueSpec_ = + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec.newBuilder( + (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec) + parameterValueSpec_) + .mergeFrom(value) + .buildPartial(); + } else { + parameterValueSpec_ = value; + } + onChanged(); + } else { + if (parameterValueSpecCase_ == 5) { + discreteValueSpecBuilder_.mergeFrom(value); + } + discreteValueSpecBuilder_.setMessage(value); + } + parameterValueSpecCase_ = 5; + return this; + } + /** + * + * + *
+       * The value spec for a 'DISCRETE' parameter.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec discrete_value_spec = 5; + * + */ + public Builder clearDiscreteValueSpec() { + if (discreteValueSpecBuilder_ == null) { + if (parameterValueSpecCase_ == 5) { + parameterValueSpecCase_ = 0; + parameterValueSpec_ = null; + onChanged(); + } + } else { + if (parameterValueSpecCase_ == 5) { + parameterValueSpecCase_ = 0; + parameterValueSpec_ = null; + } + discreteValueSpecBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * The value spec for a 'DISCRETE' parameter.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec discrete_value_spec = 5; + * + */ + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec.Builder + getDiscreteValueSpecBuilder() { + return getDiscreteValueSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The value spec for a 'DISCRETE' parameter.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec discrete_value_spec = 5; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpecOrBuilder + getDiscreteValueSpecOrBuilder() { + if ((parameterValueSpecCase_ == 5) && (discreteValueSpecBuilder_ != null)) { + return discreteValueSpecBuilder_.getMessageOrBuilder(); + } else { + if (parameterValueSpecCase_ == 5) { + return (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec) + parameterValueSpec_; + } + return com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec + .getDefaultInstance(); + } + } + /** + * + * + *
+       * The value spec for a 'DISCRETE' parameter.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec discrete_value_spec = 5; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec.Builder, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpecOrBuilder> + getDiscreteValueSpecFieldBuilder() { + if (discreteValueSpecBuilder_ == null) { + if (!(parameterValueSpecCase_ == 5)) { + parameterValueSpec_ = + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec + .getDefaultInstance(); + } + discreteValueSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec.Builder, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec + .DiscreteValueSpecOrBuilder>( + (com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec) + parameterValueSpec_, + getParentForChildren(), + isClean()); + parameterValueSpec_ = null; + } + parameterValueSpecCase_ = 5; + onChanged(); + ; + return discreteValueSpecBuilder_; + } + + private java.lang.Object parameterId_ = ""; + /** + * + * + *
+       * Required. The ID of the parameter. Must not contain whitespaces and must be unique
+       * amongst all ParameterSpecs.
+       * 
+ * + * string parameter_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parameterId. + */ + public java.lang.String getParameterId() { + java.lang.Object ref = parameterId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parameterId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. The ID of the parameter. Must not contain whitespaces and must be unique
+       * amongst all ParameterSpecs.
+       * 
+ * + * string parameter_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parameterId. + */ + public com.google.protobuf.ByteString getParameterIdBytes() { + java.lang.Object ref = parameterId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parameterId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. The ID of the parameter. Must not contain whitespaces and must be unique
+       * amongst all ParameterSpecs.
+       * 
+ * + * string parameter_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The parameterId to set. + * @return This builder for chaining. + */ + public Builder setParameterId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parameterId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The ID of the parameter. Must not contain whitespaces and must be unique
+       * amongst all ParameterSpecs.
+       * 
+ * + * string parameter_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearParameterId() { + + parameterId_ = getDefaultInstance().getParameterId(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The ID of the parameter. Must not contain whitespaces and must be unique
+       * amongst all ParameterSpecs.
+       * 
+ * + * string parameter_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for parameterId to set. + * @return This builder for chaining. + */ + public Builder setParameterIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parameterId_ = value; + onChanged(); + return this; + } + + private int scaleType_ = 0; + /** + * + * + *
+       * How the parameter should be scaled.
+       * Leave unset for `CATEGORICAL` parameters.
+       * 
+ * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ScaleType scale_type = 6; + * + * @return The enum numeric value on the wire for scaleType. + */ + @java.lang.Override + public int getScaleTypeValue() { + return scaleType_; + } + /** + * + * + *
+       * How the parameter should be scaled.
+       * Leave unset for `CATEGORICAL` parameters.
+       * 
+ * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ScaleType scale_type = 6; + * + * @param value The enum numeric value on the wire for scaleType to set. + * @return This builder for chaining. + */ + public Builder setScaleTypeValue(int value) { + + scaleType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * How the parameter should be scaled.
+       * Leave unset for `CATEGORICAL` parameters.
+       * 
+ * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ScaleType scale_type = 6; + * + * @return The scaleType. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ScaleType getScaleType() { + @SuppressWarnings("deprecation") + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ScaleType result = + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ScaleType.valueOf(scaleType_); + return result == null + ? com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ScaleType.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * How the parameter should be scaled.
+       * Leave unset for `CATEGORICAL` parameters.
+       * 
+ * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ScaleType scale_type = 6; + * + * @param value The scaleType to set. + * @return This builder for chaining. + */ + public Builder setScaleType( + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ScaleType value) { + if (value == null) { + throw new NullPointerException(); + } + + scaleType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * How the parameter should be scaled.
+       * Leave unset for `CATEGORICAL` parameters.
+       * 
+ * + * .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ScaleType scale_type = 6; + * + * @return This builder for chaining. + */ + public Builder clearScaleType() { + + scaleType_ = 0; + onChanged(); + return this; + } + + private java.util.List< + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec> + conditionalParameterSpecs_ = java.util.Collections.emptyList(); + + private void ensureConditionalParameterSpecsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + conditionalParameterSpecs_ = + new java.util.ArrayList< + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec>( + conditionalParameterSpecs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .Builder, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec + .ConditionalParameterSpecOrBuilder> + conditionalParameterSpecsBuilder_; + + /** + * + * + *
+       * A conditional parameter node is active if the parameter's value matches
+       * the conditional node's parent_value_condition.
+       * If two items in conditional_parameter_specs have the same name, they
+       * must have disjoint parent_value_condition.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec conditional_parameter_specs = 10; + * + */ + public java.util.List< + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec> + getConditionalParameterSpecsList() { + if (conditionalParameterSpecsBuilder_ == null) { + return java.util.Collections.unmodifiableList(conditionalParameterSpecs_); + } else { + return conditionalParameterSpecsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * A conditional parameter node is active if the parameter's value matches
+       * the conditional node's parent_value_condition.
+       * If two items in conditional_parameter_specs have the same name, they
+       * must have disjoint parent_value_condition.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec conditional_parameter_specs = 10; + * + */ + public int getConditionalParameterSpecsCount() { + if (conditionalParameterSpecsBuilder_ == null) { + return conditionalParameterSpecs_.size(); + } else { + return conditionalParameterSpecsBuilder_.getCount(); + } + } + /** + * + * + *
+       * A conditional parameter node is active if the parameter's value matches
+       * the conditional node's parent_value_condition.
+       * If two items in conditional_parameter_specs have the same name, they
+       * must have disjoint parent_value_condition.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec conditional_parameter_specs = 10; + * + */ + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + getConditionalParameterSpecs(int index) { + if (conditionalParameterSpecsBuilder_ == null) { + return conditionalParameterSpecs_.get(index); + } else { + return conditionalParameterSpecsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * A conditional parameter node is active if the parameter's value matches
+       * the conditional node's parent_value_condition.
+       * If two items in conditional_parameter_specs have the same name, they
+       * must have disjoint parent_value_condition.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec conditional_parameter_specs = 10; + * + */ + public Builder setConditionalParameterSpecs( + int index, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec value) { + if (conditionalParameterSpecsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConditionalParameterSpecsIsMutable(); + conditionalParameterSpecs_.set(index, value); + onChanged(); + } else { + conditionalParameterSpecsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * A conditional parameter node is active if the parameter's value matches
+       * the conditional node's parent_value_condition.
+       * If two items in conditional_parameter_specs have the same name, they
+       * must have disjoint parent_value_condition.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec conditional_parameter_specs = 10; + * + */ + public Builder setConditionalParameterSpecs( + int index, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.Builder + builderForValue) { + if (conditionalParameterSpecsBuilder_ == null) { + ensureConditionalParameterSpecsIsMutable(); + conditionalParameterSpecs_.set(index, builderForValue.build()); + onChanged(); + } else { + conditionalParameterSpecsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * A conditional parameter node is active if the parameter's value matches
+       * the conditional node's parent_value_condition.
+       * If two items in conditional_parameter_specs have the same name, they
+       * must have disjoint parent_value_condition.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec conditional_parameter_specs = 10; + * + */ + public Builder addConditionalParameterSpecs( + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec value) { + if (conditionalParameterSpecsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConditionalParameterSpecsIsMutable(); + conditionalParameterSpecs_.add(value); + onChanged(); + } else { + conditionalParameterSpecsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * A conditional parameter node is active if the parameter's value matches
+       * the conditional node's parent_value_condition.
+       * If two items in conditional_parameter_specs have the same name, they
+       * must have disjoint parent_value_condition.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec conditional_parameter_specs = 10; + * + */ + public Builder addConditionalParameterSpecs( + int index, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec value) { + if (conditionalParameterSpecsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConditionalParameterSpecsIsMutable(); + conditionalParameterSpecs_.add(index, value); + onChanged(); + } else { + conditionalParameterSpecsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * A conditional parameter node is active if the parameter's value matches
+       * the conditional node's parent_value_condition.
+       * If two items in conditional_parameter_specs have the same name, they
+       * must have disjoint parent_value_condition.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec conditional_parameter_specs = 10; + * + */ + public Builder addConditionalParameterSpecs( + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.Builder + builderForValue) { + if (conditionalParameterSpecsBuilder_ == null) { + ensureConditionalParameterSpecsIsMutable(); + conditionalParameterSpecs_.add(builderForValue.build()); + onChanged(); + } else { + conditionalParameterSpecsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * A conditional parameter node is active if the parameter's value matches
+       * the conditional node's parent_value_condition.
+       * If two items in conditional_parameter_specs have the same name, they
+       * must have disjoint parent_value_condition.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec conditional_parameter_specs = 10; + * + */ + public Builder addConditionalParameterSpecs( + int index, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.Builder + builderForValue) { + if (conditionalParameterSpecsBuilder_ == null) { + ensureConditionalParameterSpecsIsMutable(); + conditionalParameterSpecs_.add(index, builderForValue.build()); + onChanged(); + } else { + conditionalParameterSpecsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * A conditional parameter node is active if the parameter's value matches
+       * the conditional node's parent_value_condition.
+       * If two items in conditional_parameter_specs have the same name, they
+       * must have disjoint parent_value_condition.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec conditional_parameter_specs = 10; + * + */ + public Builder addAllConditionalParameterSpecs( + java.lang.Iterable< + ? extends + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec + .ConditionalParameterSpec> + values) { + if (conditionalParameterSpecsBuilder_ == null) { + ensureConditionalParameterSpecsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, conditionalParameterSpecs_); + onChanged(); + } else { + conditionalParameterSpecsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * A conditional parameter node is active if the parameter's value matches
+       * the conditional node's parent_value_condition.
+       * If two items in conditional_parameter_specs have the same name, they
+       * must have disjoint parent_value_condition.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec conditional_parameter_specs = 10; + * + */ + public Builder clearConditionalParameterSpecs() { + if (conditionalParameterSpecsBuilder_ == null) { + conditionalParameterSpecs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + conditionalParameterSpecsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * A conditional parameter node is active if the parameter's value matches
+       * the conditional node's parent_value_condition.
+       * If two items in conditional_parameter_specs have the same name, they
+       * must have disjoint parent_value_condition.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec conditional_parameter_specs = 10; + * + */ + public Builder removeConditionalParameterSpecs(int index) { + if (conditionalParameterSpecsBuilder_ == null) { + ensureConditionalParameterSpecsIsMutable(); + conditionalParameterSpecs_.remove(index); + onChanged(); + } else { + conditionalParameterSpecsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * A conditional parameter node is active if the parameter's value matches
+       * the conditional node's parent_value_condition.
+       * If two items in conditional_parameter_specs have the same name, they
+       * must have disjoint parent_value_condition.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec conditional_parameter_specs = 10; + * + */ + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.Builder + getConditionalParameterSpecsBuilder(int index) { + return getConditionalParameterSpecsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * A conditional parameter node is active if the parameter's value matches
+       * the conditional node's parent_value_condition.
+       * If two items in conditional_parameter_specs have the same name, they
+       * must have disjoint parent_value_condition.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec conditional_parameter_specs = 10; + * + */ + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec + .ConditionalParameterSpecOrBuilder + getConditionalParameterSpecsOrBuilder(int index) { + if (conditionalParameterSpecsBuilder_ == null) { + return conditionalParameterSpecs_.get(index); + } else { + return conditionalParameterSpecsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * A conditional parameter node is active if the parameter's value matches
+       * the conditional node's parent_value_condition.
+       * If two items in conditional_parameter_specs have the same name, they
+       * must have disjoint parent_value_condition.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec conditional_parameter_specs = 10; + * + */ + public java.util.List< + ? extends + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec + .ConditionalParameterSpecOrBuilder> + getConditionalParameterSpecsOrBuilderList() { + if (conditionalParameterSpecsBuilder_ != null) { + return conditionalParameterSpecsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(conditionalParameterSpecs_); + } + } + /** + * + * + *
+       * A conditional parameter node is active if the parameter's value matches
+       * the conditional node's parent_value_condition.
+       * If two items in conditional_parameter_specs have the same name, they
+       * must have disjoint parent_value_condition.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec conditional_parameter_specs = 10; + * + */ + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.Builder + addConditionalParameterSpecsBuilder() { + return getConditionalParameterSpecsFieldBuilder() + .addBuilder( + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .getDefaultInstance()); + } + /** + * + * + *
+       * A conditional parameter node is active if the parameter's value matches
+       * the conditional node's parent_value_condition.
+       * If two items in conditional_parameter_specs have the same name, they
+       * must have disjoint parent_value_condition.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec conditional_parameter_specs = 10; + * + */ + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.Builder + addConditionalParameterSpecsBuilder(int index) { + return getConditionalParameterSpecsFieldBuilder() + .addBuilder( + index, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .getDefaultInstance()); + } + /** + * + * + *
+       * A conditional parameter node is active if the parameter's value matches
+       * the conditional node's parent_value_condition.
+       * If two items in conditional_parameter_specs have the same name, they
+       * must have disjoint parent_value_condition.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec conditional_parameter_specs = 10; + * + */ + public java.util.List< + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .Builder> + getConditionalParameterSpecsBuilderList() { + return getConditionalParameterSpecsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .Builder, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec + .ConditionalParameterSpecOrBuilder> + getConditionalParameterSpecsFieldBuilder() { + if (conditionalParameterSpecsBuilder_ == null) { + conditionalParameterSpecsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec + .Builder, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec + .ConditionalParameterSpecOrBuilder>( + conditionalParameterSpecs_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + conditionalParameterSpecs_ = null; + } + return conditionalParameterSpecsBuilder_; + } + + @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.v1.StudySpec.ParameterSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.StudySpec.ParameterSpec) + private static final com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec(); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ParameterSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ParameterSpec(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.v1.StudySpec.ParameterSpec getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int METRICS_FIELD_NUMBER = 1; + private java.util.List metrics_; + /** + * + * + *
+   * Required. Metric specs for the Study.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.MetricSpec metrics = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List getMetricsList() { + return metrics_; + } + /** + * + * + *
+   * Required. Metric specs for the Study.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.MetricSpec metrics = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getMetricsOrBuilderList() { + return metrics_; + } + /** + * + * + *
+   * Required. Metric specs for the Study.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.MetricSpec metrics = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getMetricsCount() { + return metrics_.size(); + } + /** + * + * + *
+   * Required. Metric specs for the Study.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.MetricSpec metrics = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.MetricSpec getMetrics(int index) { + return metrics_.get(index); + } + /** + * + * + *
+   * Required. Metric specs for the Study.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.MetricSpec metrics = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.MetricSpecOrBuilder getMetricsOrBuilder( + int index) { + return metrics_.get(index); + } + + public static final int PARAMETERS_FIELD_NUMBER = 2; + private java.util.List parameters_; + /** + * + * + *
+   * Required. The set of parameters to tune.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.ParameterSpec parameters = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getParametersList() { + return parameters_; + } + /** + * + * + *
+   * Required. The set of parameters to tune.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.ParameterSpec parameters = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getParametersOrBuilderList() { + return parameters_; + } + /** + * + * + *
+   * Required. The set of parameters to tune.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.ParameterSpec parameters = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getParametersCount() { + return parameters_.size(); + } + /** + * + * + *
+   * Required. The set of parameters to tune.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.ParameterSpec parameters = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec getParameters(int index) { + return parameters_.get(index); + } + /** + * + * + *
+   * Required. The set of parameters to tune.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.ParameterSpec parameters = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpecOrBuilder getParametersOrBuilder( + int index) { + return parameters_.get(index); + } + + public static final int ALGORITHM_FIELD_NUMBER = 3; + private int algorithm_; + /** + * + * + *
+   * The search algorithm specified for the Study.
+   * 
+ * + * .google.cloud.aiplatform.v1.StudySpec.Algorithm algorithm = 3; + * + * @return The enum numeric value on the wire for algorithm. + */ + @java.lang.Override + public int getAlgorithmValue() { + return algorithm_; + } + /** + * + * + *
+   * The search algorithm specified for the Study.
+   * 
+ * + * .google.cloud.aiplatform.v1.StudySpec.Algorithm algorithm = 3; + * + * @return The algorithm. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.Algorithm getAlgorithm() { + @SuppressWarnings("deprecation") + com.google.cloud.aiplatform.v1.StudySpec.Algorithm result = + com.google.cloud.aiplatform.v1.StudySpec.Algorithm.valueOf(algorithm_); + return result == null + ? com.google.cloud.aiplatform.v1.StudySpec.Algorithm.UNRECOGNIZED + : result; + } + + public static final int OBSERVATION_NOISE_FIELD_NUMBER = 6; + private int observationNoise_; + /** + * + * + *
+   * The observation noise level of the study.
+   * Currently only supported by the Vizier service. Not supported by
+   * HyperparamterTuningJob or TrainingPipeline.
+   * 
+ * + * .google.cloud.aiplatform.v1.StudySpec.ObservationNoise observation_noise = 6; + * + * @return The enum numeric value on the wire for observationNoise. + */ + @java.lang.Override + public int getObservationNoiseValue() { + return observationNoise_; + } + /** + * + * + *
+   * The observation noise level of the study.
+   * Currently only supported by the Vizier service. Not supported by
+   * HyperparamterTuningJob or TrainingPipeline.
+   * 
+ * + * .google.cloud.aiplatform.v1.StudySpec.ObservationNoise observation_noise = 6; + * + * @return The observationNoise. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.ObservationNoise getObservationNoise() { + @SuppressWarnings("deprecation") + com.google.cloud.aiplatform.v1.StudySpec.ObservationNoise result = + com.google.cloud.aiplatform.v1.StudySpec.ObservationNoise.valueOf(observationNoise_); + return result == null + ? com.google.cloud.aiplatform.v1.StudySpec.ObservationNoise.UNRECOGNIZED + : result; + } + + public static final int MEASUREMENT_SELECTION_TYPE_FIELD_NUMBER = 7; + private int measurementSelectionType_; + /** + * + * + *
+   * Describe which measurement selection type will be used
+   * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.MeasurementSelectionType measurement_selection_type = 7; + * + * + * @return The enum numeric value on the wire for measurementSelectionType. + */ + @java.lang.Override + public int getMeasurementSelectionTypeValue() { + return measurementSelectionType_; + } + /** + * + * + *
+   * Describe which measurement selection type will be used
+   * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.MeasurementSelectionType measurement_selection_type = 7; + * + * + * @return The measurementSelectionType. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.MeasurementSelectionType + getMeasurementSelectionType() { + @SuppressWarnings("deprecation") + com.google.cloud.aiplatform.v1.StudySpec.MeasurementSelectionType result = + com.google.cloud.aiplatform.v1.StudySpec.MeasurementSelectionType.valueOf( + measurementSelectionType_); + return result == null + ? com.google.cloud.aiplatform.v1.StudySpec.MeasurementSelectionType.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 { + for (int i = 0; i < metrics_.size(); i++) { + output.writeMessage(1, metrics_.get(i)); + } + for (int i = 0; i < parameters_.size(); i++) { + output.writeMessage(2, parameters_.get(i)); + } + if (algorithm_ + != com.google.cloud.aiplatform.v1.StudySpec.Algorithm.ALGORITHM_UNSPECIFIED.getNumber()) { + output.writeEnum(3, algorithm_); + } + if (observationNoise_ + != com.google.cloud.aiplatform.v1.StudySpec.ObservationNoise.OBSERVATION_NOISE_UNSPECIFIED + .getNumber()) { + output.writeEnum(6, observationNoise_); + } + if (measurementSelectionType_ + != com.google.cloud.aiplatform.v1.StudySpec.MeasurementSelectionType + .MEASUREMENT_SELECTION_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(7, measurementSelectionType_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < metrics_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, metrics_.get(i)); + } + for (int i = 0; i < parameters_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, parameters_.get(i)); + } + if (algorithm_ + != com.google.cloud.aiplatform.v1.StudySpec.Algorithm.ALGORITHM_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, algorithm_); + } + if (observationNoise_ + != com.google.cloud.aiplatform.v1.StudySpec.ObservationNoise.OBSERVATION_NOISE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, observationNoise_); + } + if (measurementSelectionType_ + != com.google.cloud.aiplatform.v1.StudySpec.MeasurementSelectionType + .MEASUREMENT_SELECTION_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(7, measurementSelectionType_); + } + 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.v1.StudySpec)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.StudySpec other = (com.google.cloud.aiplatform.v1.StudySpec) obj; + + if (!getMetricsList().equals(other.getMetricsList())) return false; + if (!getParametersList().equals(other.getParametersList())) return false; + if (algorithm_ != other.algorithm_) return false; + if (observationNoise_ != other.observationNoise_) return false; + if (measurementSelectionType_ != other.measurementSelectionType_) 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 (getMetricsCount() > 0) { + hash = (37 * hash) + METRICS_FIELD_NUMBER; + hash = (53 * hash) + getMetricsList().hashCode(); + } + if (getParametersCount() > 0) { + hash = (37 * hash) + PARAMETERS_FIELD_NUMBER; + hash = (53 * hash) + getParametersList().hashCode(); + } + hash = (37 * hash) + ALGORITHM_FIELD_NUMBER; + hash = (53 * hash) + algorithm_; + hash = (37 * hash) + OBSERVATION_NOISE_FIELD_NUMBER; + hash = (53 * hash) + observationNoise_; + hash = (37 * hash) + MEASUREMENT_SELECTION_TYPE_FIELD_NUMBER; + hash = (53 * hash) + measurementSelectionType_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.StudySpec parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.StudySpec 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.v1.StudySpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.StudySpec 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.v1.StudySpec parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.StudySpec parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.StudySpec parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.StudySpec 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.v1.StudySpec parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.StudySpec 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.v1.StudySpec parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.StudySpec 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.v1.StudySpec 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 specification of a Study.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.StudySpec} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.StudySpec) + com.google.cloud.aiplatform.v1.StudySpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_StudySpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_StudySpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.StudySpec.class, + com.google.cloud.aiplatform.v1.StudySpec.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.StudySpec.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getMetricsFieldBuilder(); + getParametersFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (metricsBuilder_ == null) { + metrics_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + metricsBuilder_.clear(); + } + if (parametersBuilder_ == null) { + parameters_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + parametersBuilder_.clear(); + } + algorithm_ = 0; + + observationNoise_ = 0; + + measurementSelectionType_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_StudySpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.StudySpec.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec build() { + com.google.cloud.aiplatform.v1.StudySpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec buildPartial() { + com.google.cloud.aiplatform.v1.StudySpec result = + new com.google.cloud.aiplatform.v1.StudySpec(this); + int from_bitField0_ = bitField0_; + if (metricsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + metrics_ = java.util.Collections.unmodifiableList(metrics_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.metrics_ = metrics_; + } else { + result.metrics_ = metricsBuilder_.build(); + } + if (parametersBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + parameters_ = java.util.Collections.unmodifiableList(parameters_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.parameters_ = parameters_; + } else { + result.parameters_ = parametersBuilder_.build(); + } + result.algorithm_ = algorithm_; + result.observationNoise_ = observationNoise_; + result.measurementSelectionType_ = measurementSelectionType_; + 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.v1.StudySpec) { + return mergeFrom((com.google.cloud.aiplatform.v1.StudySpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.StudySpec other) { + if (other == com.google.cloud.aiplatform.v1.StudySpec.getDefaultInstance()) return this; + if (metricsBuilder_ == null) { + if (!other.metrics_.isEmpty()) { + if (metrics_.isEmpty()) { + metrics_ = other.metrics_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureMetricsIsMutable(); + metrics_.addAll(other.metrics_); + } + onChanged(); + } + } else { + if (!other.metrics_.isEmpty()) { + if (metricsBuilder_.isEmpty()) { + metricsBuilder_.dispose(); + metricsBuilder_ = null; + metrics_ = other.metrics_; + bitField0_ = (bitField0_ & ~0x00000001); + metricsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getMetricsFieldBuilder() + : null; + } else { + metricsBuilder_.addAllMessages(other.metrics_); + } + } + } + if (parametersBuilder_ == null) { + if (!other.parameters_.isEmpty()) { + if (parameters_.isEmpty()) { + parameters_ = other.parameters_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureParametersIsMutable(); + parameters_.addAll(other.parameters_); + } + onChanged(); + } + } else { + if (!other.parameters_.isEmpty()) { + if (parametersBuilder_.isEmpty()) { + parametersBuilder_.dispose(); + parametersBuilder_ = null; + parameters_ = other.parameters_; + bitField0_ = (bitField0_ & ~0x00000002); + parametersBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getParametersFieldBuilder() + : null; + } else { + parametersBuilder_.addAllMessages(other.parameters_); + } + } + } + if (other.algorithm_ != 0) { + setAlgorithmValue(other.getAlgorithmValue()); + } + if (other.observationNoise_ != 0) { + setObservationNoiseValue(other.getObservationNoiseValue()); + } + if (other.measurementSelectionType_ != 0) { + setMeasurementSelectionTypeValue(other.getMeasurementSelectionTypeValue()); + } + 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.v1.StudySpec parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.aiplatform.v1.StudySpec) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List metrics_ = + java.util.Collections.emptyList(); + + private void ensureMetricsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + metrics_ = + new java.util.ArrayList(metrics_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.StudySpec.MetricSpec, + com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.Builder, + com.google.cloud.aiplatform.v1.StudySpec.MetricSpecOrBuilder> + metricsBuilder_; + + /** + * + * + *
+     * Required. Metric specs for the Study.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.MetricSpec metrics = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List getMetricsList() { + if (metricsBuilder_ == null) { + return java.util.Collections.unmodifiableList(metrics_); + } else { + return metricsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Required. Metric specs for the Study.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.MetricSpec metrics = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getMetricsCount() { + if (metricsBuilder_ == null) { + return metrics_.size(); + } else { + return metricsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Required. Metric specs for the Study.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.MetricSpec metrics = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.StudySpec.MetricSpec getMetrics(int index) { + if (metricsBuilder_ == null) { + return metrics_.get(index); + } else { + return metricsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Required. Metric specs for the Study.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.MetricSpec metrics = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setMetrics( + int index, com.google.cloud.aiplatform.v1.StudySpec.MetricSpec value) { + if (metricsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetricsIsMutable(); + metrics_.set(index, value); + onChanged(); + } else { + metricsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. Metric specs for the Study.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.MetricSpec metrics = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setMetrics( + int index, com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.Builder builderForValue) { + if (metricsBuilder_ == null) { + ensureMetricsIsMutable(); + metrics_.set(index, builderForValue.build()); + onChanged(); + } else { + metricsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. Metric specs for the Study.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.MetricSpec metrics = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addMetrics(com.google.cloud.aiplatform.v1.StudySpec.MetricSpec value) { + if (metricsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetricsIsMutable(); + metrics_.add(value); + onChanged(); + } else { + metricsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Required. Metric specs for the Study.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.MetricSpec metrics = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addMetrics( + int index, com.google.cloud.aiplatform.v1.StudySpec.MetricSpec value) { + if (metricsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetricsIsMutable(); + metrics_.add(index, value); + onChanged(); + } else { + metricsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. Metric specs for the Study.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.MetricSpec metrics = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addMetrics( + com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.Builder builderForValue) { + if (metricsBuilder_ == null) { + ensureMetricsIsMutable(); + metrics_.add(builderForValue.build()); + onChanged(); + } else { + metricsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. Metric specs for the Study.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.MetricSpec metrics = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addMetrics( + int index, com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.Builder builderForValue) { + if (metricsBuilder_ == null) { + ensureMetricsIsMutable(); + metrics_.add(index, builderForValue.build()); + onChanged(); + } else { + metricsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. Metric specs for the Study.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.MetricSpec metrics = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllMetrics( + java.lang.Iterable values) { + if (metricsBuilder_ == null) { + ensureMetricsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, metrics_); + onChanged(); + } else { + metricsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Required. Metric specs for the Study.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.MetricSpec metrics = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearMetrics() { + if (metricsBuilder_ == null) { + metrics_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + metricsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Required. Metric specs for the Study.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.MetricSpec metrics = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeMetrics(int index) { + if (metricsBuilder_ == null) { + ensureMetricsIsMutable(); + metrics_.remove(index); + onChanged(); + } else { + metricsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Required. Metric specs for the Study.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.MetricSpec metrics = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.Builder getMetricsBuilder( + int index) { + return getMetricsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Required. Metric specs for the Study.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.MetricSpec metrics = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.StudySpec.MetricSpecOrBuilder getMetricsOrBuilder( + int index) { + if (metricsBuilder_ == null) { + return metrics_.get(index); + } else { + return metricsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Required. Metric specs for the Study.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.MetricSpec metrics = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getMetricsOrBuilderList() { + if (metricsBuilder_ != null) { + return metricsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(metrics_); + } + } + /** + * + * + *
+     * Required. Metric specs for the Study.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.MetricSpec metrics = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.Builder addMetricsBuilder() { + return getMetricsFieldBuilder() + .addBuilder(com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.getDefaultInstance()); + } + /** + * + * + *
+     * Required. Metric specs for the Study.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.MetricSpec metrics = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.Builder addMetricsBuilder( + int index) { + return getMetricsFieldBuilder() + .addBuilder( + index, com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.getDefaultInstance()); + } + /** + * + * + *
+     * Required. Metric specs for the Study.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.MetricSpec metrics = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getMetricsBuilderList() { + return getMetricsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.StudySpec.MetricSpec, + com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.Builder, + com.google.cloud.aiplatform.v1.StudySpec.MetricSpecOrBuilder> + getMetricsFieldBuilder() { + if (metricsBuilder_ == null) { + metricsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.StudySpec.MetricSpec, + com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.Builder, + com.google.cloud.aiplatform.v1.StudySpec.MetricSpecOrBuilder>( + metrics_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + metrics_ = null; + } + return metricsBuilder_; + } + + private java.util.List parameters_ = + java.util.Collections.emptyList(); + + private void ensureParametersIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + parameters_ = + new java.util.ArrayList( + parameters_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.Builder, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpecOrBuilder> + parametersBuilder_; + + /** + * + * + *
+     * Required. The set of parameters to tune.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.ParameterSpec parameters = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getParametersList() { + if (parametersBuilder_ == null) { + return java.util.Collections.unmodifiableList(parameters_); + } else { + return parametersBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Required. The set of parameters to tune.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.ParameterSpec parameters = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getParametersCount() { + if (parametersBuilder_ == null) { + return parameters_.size(); + } else { + return parametersBuilder_.getCount(); + } + } + /** + * + * + *
+     * Required. The set of parameters to tune.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.ParameterSpec parameters = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec getParameters(int index) { + if (parametersBuilder_ == null) { + return parameters_.get(index); + } else { + return parametersBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Required. The set of parameters to tune.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.ParameterSpec parameters = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setParameters( + int index, com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec value) { + if (parametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureParametersIsMutable(); + parameters_.set(index, value); + onChanged(); + } else { + parametersBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. The set of parameters to tune.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.ParameterSpec parameters = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setParameters( + int index, com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.Builder builderForValue) { + if (parametersBuilder_ == null) { + ensureParametersIsMutable(); + parameters_.set(index, builderForValue.build()); + onChanged(); + } else { + parametersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The set of parameters to tune.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.ParameterSpec parameters = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addParameters(com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec value) { + if (parametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureParametersIsMutable(); + parameters_.add(value); + onChanged(); + } else { + parametersBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Required. The set of parameters to tune.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.ParameterSpec parameters = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addParameters( + int index, com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec value) { + if (parametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureParametersIsMutable(); + parameters_.add(index, value); + onChanged(); + } else { + parametersBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. The set of parameters to tune.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.ParameterSpec parameters = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addParameters( + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.Builder builderForValue) { + if (parametersBuilder_ == null) { + ensureParametersIsMutable(); + parameters_.add(builderForValue.build()); + onChanged(); + } else { + parametersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The set of parameters to tune.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.ParameterSpec parameters = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addParameters( + int index, com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.Builder builderForValue) { + if (parametersBuilder_ == null) { + ensureParametersIsMutable(); + parameters_.add(index, builderForValue.build()); + onChanged(); + } else { + parametersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The set of parameters to tune.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.ParameterSpec parameters = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllParameters( + java.lang.Iterable + values) { + if (parametersBuilder_ == null) { + ensureParametersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, parameters_); + onChanged(); + } else { + parametersBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Required. The set of parameters to tune.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.ParameterSpec parameters = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearParameters() { + if (parametersBuilder_ == null) { + parameters_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + parametersBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Required. The set of parameters to tune.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.ParameterSpec parameters = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeParameters(int index) { + if (parametersBuilder_ == null) { + ensureParametersIsMutable(); + parameters_.remove(index); + onChanged(); + } else { + parametersBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Required. The set of parameters to tune.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.ParameterSpec parameters = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.Builder getParametersBuilder( + int index) { + return getParametersFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Required. The set of parameters to tune.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.ParameterSpec parameters = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpecOrBuilder getParametersOrBuilder( + int index) { + if (parametersBuilder_ == null) { + return parameters_.get(index); + } else { + return parametersBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Required. The set of parameters to tune.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.ParameterSpec parameters = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getParametersOrBuilderList() { + if (parametersBuilder_ != null) { + return parametersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(parameters_); + } + } + /** + * + * + *
+     * Required. The set of parameters to tune.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.ParameterSpec parameters = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.Builder addParametersBuilder() { + return getParametersFieldBuilder() + .addBuilder(com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.getDefaultInstance()); + } + /** + * + * + *
+     * Required. The set of parameters to tune.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.ParameterSpec parameters = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.Builder addParametersBuilder( + int index) { + return getParametersFieldBuilder() + .addBuilder( + index, com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.getDefaultInstance()); + } + /** + * + * + *
+     * Required. The set of parameters to tune.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.ParameterSpec parameters = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getParametersBuilderList() { + return getParametersFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.Builder, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpecOrBuilder> + getParametersFieldBuilder() { + if (parametersBuilder_ == null) { + parametersBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec.Builder, + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpecOrBuilder>( + parameters_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + parameters_ = null; + } + return parametersBuilder_; + } + + private int algorithm_ = 0; + /** + * + * + *
+     * The search algorithm specified for the Study.
+     * 
+ * + * .google.cloud.aiplatform.v1.StudySpec.Algorithm algorithm = 3; + * + * @return The enum numeric value on the wire for algorithm. + */ + @java.lang.Override + public int getAlgorithmValue() { + return algorithm_; + } + /** + * + * + *
+     * The search algorithm specified for the Study.
+     * 
+ * + * .google.cloud.aiplatform.v1.StudySpec.Algorithm algorithm = 3; + * + * @param value The enum numeric value on the wire for algorithm to set. + * @return This builder for chaining. + */ + public Builder setAlgorithmValue(int value) { + + algorithm_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The search algorithm specified for the Study.
+     * 
+ * + * .google.cloud.aiplatform.v1.StudySpec.Algorithm algorithm = 3; + * + * @return The algorithm. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.Algorithm getAlgorithm() { + @SuppressWarnings("deprecation") + com.google.cloud.aiplatform.v1.StudySpec.Algorithm result = + com.google.cloud.aiplatform.v1.StudySpec.Algorithm.valueOf(algorithm_); + return result == null + ? com.google.cloud.aiplatform.v1.StudySpec.Algorithm.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The search algorithm specified for the Study.
+     * 
+ * + * .google.cloud.aiplatform.v1.StudySpec.Algorithm algorithm = 3; + * + * @param value The algorithm to set. + * @return This builder for chaining. + */ + public Builder setAlgorithm(com.google.cloud.aiplatform.v1.StudySpec.Algorithm value) { + if (value == null) { + throw new NullPointerException(); + } + + algorithm_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The search algorithm specified for the Study.
+     * 
+ * + * .google.cloud.aiplatform.v1.StudySpec.Algorithm algorithm = 3; + * + * @return This builder for chaining. + */ + public Builder clearAlgorithm() { + + algorithm_ = 0; + onChanged(); + return this; + } + + private int observationNoise_ = 0; + /** + * + * + *
+     * The observation noise level of the study.
+     * Currently only supported by the Vizier service. Not supported by
+     * HyperparamterTuningJob or TrainingPipeline.
+     * 
+ * + * .google.cloud.aiplatform.v1.StudySpec.ObservationNoise observation_noise = 6; + * + * @return The enum numeric value on the wire for observationNoise. + */ + @java.lang.Override + public int getObservationNoiseValue() { + return observationNoise_; + } + /** + * + * + *
+     * The observation noise level of the study.
+     * Currently only supported by the Vizier service. Not supported by
+     * HyperparamterTuningJob or TrainingPipeline.
+     * 
+ * + * .google.cloud.aiplatform.v1.StudySpec.ObservationNoise observation_noise = 6; + * + * @param value The enum numeric value on the wire for observationNoise to set. + * @return This builder for chaining. + */ + public Builder setObservationNoiseValue(int value) { + + observationNoise_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The observation noise level of the study.
+     * Currently only supported by the Vizier service. Not supported by
+     * HyperparamterTuningJob or TrainingPipeline.
+     * 
+ * + * .google.cloud.aiplatform.v1.StudySpec.ObservationNoise observation_noise = 6; + * + * @return The observationNoise. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.ObservationNoise getObservationNoise() { + @SuppressWarnings("deprecation") + com.google.cloud.aiplatform.v1.StudySpec.ObservationNoise result = + com.google.cloud.aiplatform.v1.StudySpec.ObservationNoise.valueOf(observationNoise_); + return result == null + ? com.google.cloud.aiplatform.v1.StudySpec.ObservationNoise.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The observation noise level of the study.
+     * Currently only supported by the Vizier service. Not supported by
+     * HyperparamterTuningJob or TrainingPipeline.
+     * 
+ * + * .google.cloud.aiplatform.v1.StudySpec.ObservationNoise observation_noise = 6; + * + * @param value The observationNoise to set. + * @return This builder for chaining. + */ + public Builder setObservationNoise( + com.google.cloud.aiplatform.v1.StudySpec.ObservationNoise value) { + if (value == null) { + throw new NullPointerException(); + } + + observationNoise_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The observation noise level of the study.
+     * Currently only supported by the Vizier service. Not supported by
+     * HyperparamterTuningJob or TrainingPipeline.
+     * 
+ * + * .google.cloud.aiplatform.v1.StudySpec.ObservationNoise observation_noise = 6; + * + * @return This builder for chaining. + */ + public Builder clearObservationNoise() { + + observationNoise_ = 0; + onChanged(); + return this; + } + + private int measurementSelectionType_ = 0; + /** + * + * + *
+     * Describe which measurement selection type will be used
+     * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.MeasurementSelectionType measurement_selection_type = 7; + * + * + * @return The enum numeric value on the wire for measurementSelectionType. + */ + @java.lang.Override + public int getMeasurementSelectionTypeValue() { + return measurementSelectionType_; + } + /** + * + * + *
+     * Describe which measurement selection type will be used
+     * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.MeasurementSelectionType measurement_selection_type = 7; + * + * + * @param value The enum numeric value on the wire for measurementSelectionType to set. + * @return This builder for chaining. + */ + public Builder setMeasurementSelectionTypeValue(int value) { + + measurementSelectionType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Describe which measurement selection type will be used
+     * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.MeasurementSelectionType measurement_selection_type = 7; + * + * + * @return The measurementSelectionType. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.MeasurementSelectionType + getMeasurementSelectionType() { + @SuppressWarnings("deprecation") + com.google.cloud.aiplatform.v1.StudySpec.MeasurementSelectionType result = + com.google.cloud.aiplatform.v1.StudySpec.MeasurementSelectionType.valueOf( + measurementSelectionType_); + return result == null + ? com.google.cloud.aiplatform.v1.StudySpec.MeasurementSelectionType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Describe which measurement selection type will be used
+     * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.MeasurementSelectionType measurement_selection_type = 7; + * + * + * @param value The measurementSelectionType to set. + * @return This builder for chaining. + */ + public Builder setMeasurementSelectionType( + com.google.cloud.aiplatform.v1.StudySpec.MeasurementSelectionType value) { + if (value == null) { + throw new NullPointerException(); + } + + measurementSelectionType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Describe which measurement selection type will be used
+     * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.MeasurementSelectionType measurement_selection_type = 7; + * + * + * @return This builder for chaining. + */ + public Builder clearMeasurementSelectionType() { + + measurementSelectionType_ = 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.v1.StudySpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.StudySpec) + private static final com.google.cloud.aiplatform.v1.StudySpec DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.StudySpec(); + } + + public static com.google.cloud.aiplatform.v1.StudySpec getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StudySpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StudySpec(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.v1.StudySpec getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/StudySpecOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/StudySpecOrBuilder.java new file mode 100644 index 000000000..f663c7444 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/StudySpecOrBuilder.java @@ -0,0 +1,232 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/study.proto + +package com.google.cloud.aiplatform.v1; + +public interface StudySpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.StudySpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Metric specs for the Study.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.MetricSpec metrics = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List getMetricsList(); + /** + * + * + *
+   * Required. Metric specs for the Study.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.MetricSpec metrics = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1.StudySpec.MetricSpec getMetrics(int index); + /** + * + * + *
+   * Required. Metric specs for the Study.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.MetricSpec metrics = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getMetricsCount(); + /** + * + * + *
+   * Required. Metric specs for the Study.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.MetricSpec metrics = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getMetricsOrBuilderList(); + /** + * + * + *
+   * Required. Metric specs for the Study.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.MetricSpec metrics = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1.StudySpec.MetricSpecOrBuilder getMetricsOrBuilder(int index); + + /** + * + * + *
+   * Required. The set of parameters to tune.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.ParameterSpec parameters = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List getParametersList(); + /** + * + * + *
+   * Required. The set of parameters to tune.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.ParameterSpec parameters = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpec getParameters(int index); + /** + * + * + *
+   * Required. The set of parameters to tune.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.ParameterSpec parameters = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getParametersCount(); + /** + * + * + *
+   * Required. The set of parameters to tune.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.ParameterSpec parameters = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getParametersOrBuilderList(); + /** + * + * + *
+   * Required. The set of parameters to tune.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.StudySpec.ParameterSpec parameters = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1.StudySpec.ParameterSpecOrBuilder getParametersOrBuilder(int index); + + /** + * + * + *
+   * The search algorithm specified for the Study.
+   * 
+ * + * .google.cloud.aiplatform.v1.StudySpec.Algorithm algorithm = 3; + * + * @return The enum numeric value on the wire for algorithm. + */ + int getAlgorithmValue(); + /** + * + * + *
+   * The search algorithm specified for the Study.
+   * 
+ * + * .google.cloud.aiplatform.v1.StudySpec.Algorithm algorithm = 3; + * + * @return The algorithm. + */ + com.google.cloud.aiplatform.v1.StudySpec.Algorithm getAlgorithm(); + + /** + * + * + *
+   * The observation noise level of the study.
+   * Currently only supported by the Vizier service. Not supported by
+   * HyperparamterTuningJob or TrainingPipeline.
+   * 
+ * + * .google.cloud.aiplatform.v1.StudySpec.ObservationNoise observation_noise = 6; + * + * @return The enum numeric value on the wire for observationNoise. + */ + int getObservationNoiseValue(); + /** + * + * + *
+   * The observation noise level of the study.
+   * Currently only supported by the Vizier service. Not supported by
+   * HyperparamterTuningJob or TrainingPipeline.
+   * 
+ * + * .google.cloud.aiplatform.v1.StudySpec.ObservationNoise observation_noise = 6; + * + * @return The observationNoise. + */ + com.google.cloud.aiplatform.v1.StudySpec.ObservationNoise getObservationNoise(); + + /** + * + * + *
+   * Describe which measurement selection type will be used
+   * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.MeasurementSelectionType measurement_selection_type = 7; + * + * + * @return The enum numeric value on the wire for measurementSelectionType. + */ + int getMeasurementSelectionTypeValue(); + /** + * + * + *
+   * Describe which measurement selection type will be used
+   * 
+ * + * + * .google.cloud.aiplatform.v1.StudySpec.MeasurementSelectionType measurement_selection_type = 7; + * + * + * @return The measurementSelectionType. + */ + com.google.cloud.aiplatform.v1.StudySpec.MeasurementSelectionType getMeasurementSelectionType(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TimestampSplit.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TimestampSplit.java new file mode 100644 index 000000000..acbbf37d2 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TimestampSplit.java @@ -0,0 +1,950 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/training_pipeline.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Assigns input data to training, validation, and test sets based on a
+ * provided timestamps. The youngest data pieces are assigned to training set,
+ * next to validation set, and the oldest to the test set.
+ * Supported only for tabular Datasets.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.TimestampSplit} + */ +public final class TimestampSplit extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.TimestampSplit) + TimestampSplitOrBuilder { + private static final long serialVersionUID = 0L; + // Use TimestampSplit.newBuilder() to construct. + private TimestampSplit(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TimestampSplit() { + key_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TimestampSplit(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TimestampSplit( + 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 9: + { + trainingFraction_ = input.readDouble(); + break; + } + case 17: + { + validationFraction_ = input.readDouble(); + break; + } + case 25: + { + testFraction_ = input.readDouble(); + break; + } + case 34: + { + 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.v1.TrainingPipelineProto + .internal_static_google_cloud_aiplatform_v1_TimestampSplit_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.TrainingPipelineProto + .internal_static_google_cloud_aiplatform_v1_TimestampSplit_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.TimestampSplit.class, + com.google.cloud.aiplatform.v1.TimestampSplit.Builder.class); + } + + public static final int TRAINING_FRACTION_FIELD_NUMBER = 1; + private double trainingFraction_; + /** + * + * + *
+   * The fraction of the input data that is to be used to train the Model.
+   * 
+ * + * double training_fraction = 1; + * + * @return The trainingFraction. + */ + @java.lang.Override + public double getTrainingFraction() { + return trainingFraction_; + } + + public static final int VALIDATION_FRACTION_FIELD_NUMBER = 2; + private double validationFraction_; + /** + * + * + *
+   * The fraction of the input data that is to be used to validate the Model.
+   * 
+ * + * double validation_fraction = 2; + * + * @return The validationFraction. + */ + @java.lang.Override + public double getValidationFraction() { + return validationFraction_; + } + + public static final int TEST_FRACTION_FIELD_NUMBER = 3; + private double testFraction_; + /** + * + * + *
+   * The fraction of the input data that is to be used to evaluate the Model.
+   * 
+ * + * double test_fraction = 3; + * + * @return The testFraction. + */ + @java.lang.Override + public double getTestFraction() { + return testFraction_; + } + + public static final int KEY_FIELD_NUMBER = 4; + private volatile java.lang.Object key_; + /** + * + * + *
+   * Required. The key is a name of one of the Dataset's data columns.
+   * The values of the key (the values in the column) must be in RFC 3339
+   * `date-time` format, where `time-offset` = `"Z"`
+   * (e.g. 1985-04-12T23:20:50.52Z). If for a piece of data the key is not
+   * present or has an invalid value, that piece is ignored by the pipeline.
+   * 
+ * + * string key = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+   * Required. The key is a name of one of the Dataset's data columns.
+   * The values of the key (the values in the column) must be in RFC 3339
+   * `date-time` format, where `time-offset` = `"Z"`
+   * (e.g. 1985-04-12T23:20:50.52Z). If for a piece of data the key is not
+   * present or has an invalid value, that piece is ignored by the pipeline.
+   * 
+ * + * string key = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 (trainingFraction_ != 0D) { + output.writeDouble(1, trainingFraction_); + } + if (validationFraction_ != 0D) { + output.writeDouble(2, validationFraction_); + } + if (testFraction_ != 0D) { + output.writeDouble(3, testFraction_); + } + if (!getKeyBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, key_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (trainingFraction_ != 0D) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(1, trainingFraction_); + } + if (validationFraction_ != 0D) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(2, validationFraction_); + } + if (testFraction_ != 0D) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(3, testFraction_); + } + if (!getKeyBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, 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.v1.TimestampSplit)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.TimestampSplit other = + (com.google.cloud.aiplatform.v1.TimestampSplit) obj; + + if (java.lang.Double.doubleToLongBits(getTrainingFraction()) + != java.lang.Double.doubleToLongBits(other.getTrainingFraction())) return false; + if (java.lang.Double.doubleToLongBits(getValidationFraction()) + != java.lang.Double.doubleToLongBits(other.getValidationFraction())) return false; + if (java.lang.Double.doubleToLongBits(getTestFraction()) + != java.lang.Double.doubleToLongBits(other.getTestFraction())) 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) + TRAINING_FRACTION_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getTrainingFraction())); + hash = (37 * hash) + VALIDATION_FRACTION_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getValidationFraction())); + hash = (37 * hash) + TEST_FRACTION_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getTestFraction())); + 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.v1.TimestampSplit parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.TimestampSplit 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.v1.TimestampSplit parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.TimestampSplit 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.v1.TimestampSplit parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.TimestampSplit parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.TimestampSplit parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.TimestampSplit 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.v1.TimestampSplit parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.TimestampSplit 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.v1.TimestampSplit parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.TimestampSplit 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.v1.TimestampSplit 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; + } + /** + * + * + *
+   * Assigns input data to training, validation, and test sets based on a
+   * provided timestamps. The youngest data pieces are assigned to training set,
+   * next to validation set, and the oldest to the test set.
+   * Supported only for tabular Datasets.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.TimestampSplit} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.TimestampSplit) + com.google.cloud.aiplatform.v1.TimestampSplitOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.TrainingPipelineProto + .internal_static_google_cloud_aiplatform_v1_TimestampSplit_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.TrainingPipelineProto + .internal_static_google_cloud_aiplatform_v1_TimestampSplit_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.TimestampSplit.class, + com.google.cloud.aiplatform.v1.TimestampSplit.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.TimestampSplit.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(); + trainingFraction_ = 0D; + + validationFraction_ = 0D; + + testFraction_ = 0D; + + key_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.TrainingPipelineProto + .internal_static_google_cloud_aiplatform_v1_TimestampSplit_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.TimestampSplit getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.TimestampSplit.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.TimestampSplit build() { + com.google.cloud.aiplatform.v1.TimestampSplit result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.TimestampSplit buildPartial() { + com.google.cloud.aiplatform.v1.TimestampSplit result = + new com.google.cloud.aiplatform.v1.TimestampSplit(this); + result.trainingFraction_ = trainingFraction_; + result.validationFraction_ = validationFraction_; + result.testFraction_ = testFraction_; + 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.v1.TimestampSplit) { + return mergeFrom((com.google.cloud.aiplatform.v1.TimestampSplit) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.TimestampSplit other) { + if (other == com.google.cloud.aiplatform.v1.TimestampSplit.getDefaultInstance()) return this; + if (other.getTrainingFraction() != 0D) { + setTrainingFraction(other.getTrainingFraction()); + } + if (other.getValidationFraction() != 0D) { + setValidationFraction(other.getValidationFraction()); + } + if (other.getTestFraction() != 0D) { + setTestFraction(other.getTestFraction()); + } + 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.v1.TimestampSplit parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.aiplatform.v1.TimestampSplit) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private double trainingFraction_; + /** + * + * + *
+     * The fraction of the input data that is to be used to train the Model.
+     * 
+ * + * double training_fraction = 1; + * + * @return The trainingFraction. + */ + @java.lang.Override + public double getTrainingFraction() { + return trainingFraction_; + } + /** + * + * + *
+     * The fraction of the input data that is to be used to train the Model.
+     * 
+ * + * double training_fraction = 1; + * + * @param value The trainingFraction to set. + * @return This builder for chaining. + */ + public Builder setTrainingFraction(double value) { + + trainingFraction_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The fraction of the input data that is to be used to train the Model.
+     * 
+ * + * double training_fraction = 1; + * + * @return This builder for chaining. + */ + public Builder clearTrainingFraction() { + + trainingFraction_ = 0D; + onChanged(); + return this; + } + + private double validationFraction_; + /** + * + * + *
+     * The fraction of the input data that is to be used to validate the Model.
+     * 
+ * + * double validation_fraction = 2; + * + * @return The validationFraction. + */ + @java.lang.Override + public double getValidationFraction() { + return validationFraction_; + } + /** + * + * + *
+     * The fraction of the input data that is to be used to validate the Model.
+     * 
+ * + * double validation_fraction = 2; + * + * @param value The validationFraction to set. + * @return This builder for chaining. + */ + public Builder setValidationFraction(double value) { + + validationFraction_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The fraction of the input data that is to be used to validate the Model.
+     * 
+ * + * double validation_fraction = 2; + * + * @return This builder for chaining. + */ + public Builder clearValidationFraction() { + + validationFraction_ = 0D; + onChanged(); + return this; + } + + private double testFraction_; + /** + * + * + *
+     * The fraction of the input data that is to be used to evaluate the Model.
+     * 
+ * + * double test_fraction = 3; + * + * @return The testFraction. + */ + @java.lang.Override + public double getTestFraction() { + return testFraction_; + } + /** + * + * + *
+     * The fraction of the input data that is to be used to evaluate the Model.
+     * 
+ * + * double test_fraction = 3; + * + * @param value The testFraction to set. + * @return This builder for chaining. + */ + public Builder setTestFraction(double value) { + + testFraction_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The fraction of the input data that is to be used to evaluate the Model.
+     * 
+ * + * double test_fraction = 3; + * + * @return This builder for chaining. + */ + public Builder clearTestFraction() { + + testFraction_ = 0D; + onChanged(); + return this; + } + + private java.lang.Object key_ = ""; + /** + * + * + *
+     * Required. The key is a name of one of the Dataset's data columns.
+     * The values of the key (the values in the column) must be in RFC 3339
+     * `date-time` format, where `time-offset` = `"Z"`
+     * (e.g. 1985-04-12T23:20:50.52Z). If for a piece of data the key is not
+     * present or has an invalid value, that piece is ignored by the pipeline.
+     * 
+ * + * string key = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+     * Required. The key is a name of one of the Dataset's data columns.
+     * The values of the key (the values in the column) must be in RFC 3339
+     * `date-time` format, where `time-offset` = `"Z"`
+     * (e.g. 1985-04-12T23:20:50.52Z). If for a piece of data the key is not
+     * present or has an invalid value, that piece is ignored by the pipeline.
+     * 
+ * + * string key = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+     * Required. The key is a name of one of the Dataset's data columns.
+     * The values of the key (the values in the column) must be in RFC 3339
+     * `date-time` format, where `time-offset` = `"Z"`
+     * (e.g. 1985-04-12T23:20:50.52Z). If for a piece of data the key is not
+     * present or has an invalid value, that piece is ignored by the pipeline.
+     * 
+ * + * string key = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + /** + * + * + *
+     * Required. The key is a name of one of the Dataset's data columns.
+     * The values of the key (the values in the column) must be in RFC 3339
+     * `date-time` format, where `time-offset` = `"Z"`
+     * (e.g. 1985-04-12T23:20:50.52Z). If for a piece of data the key is not
+     * present or has an invalid value, that piece is ignored by the pipeline.
+     * 
+ * + * string key = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearKey() { + + key_ = getDefaultInstance().getKey(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The key is a name of one of the Dataset's data columns.
+     * The values of the key (the values in the column) must be in RFC 3339
+     * `date-time` format, where `time-offset` = `"Z"`
+     * (e.g. 1985-04-12T23:20:50.52Z). If for a piece of data the key is not
+     * present or has an invalid value, that piece is ignored by the pipeline.
+     * 
+ * + * string key = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @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.v1.TimestampSplit) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.TimestampSplit) + private static final com.google.cloud.aiplatform.v1.TimestampSplit DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.TimestampSplit(); + } + + public static com.google.cloud.aiplatform.v1.TimestampSplit getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TimestampSplit parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TimestampSplit(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.v1.TimestampSplit getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TimestampSplitOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TimestampSplitOrBuilder.java new file mode 100644 index 000000000..1b3af0c3d --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TimestampSplitOrBuilder.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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/training_pipeline.proto + +package com.google.cloud.aiplatform.v1; + +public interface TimestampSplitOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.TimestampSplit) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The fraction of the input data that is to be used to train the Model.
+   * 
+ * + * double training_fraction = 1; + * + * @return The trainingFraction. + */ + double getTrainingFraction(); + + /** + * + * + *
+   * The fraction of the input data that is to be used to validate the Model.
+   * 
+ * + * double validation_fraction = 2; + * + * @return The validationFraction. + */ + double getValidationFraction(); + + /** + * + * + *
+   * The fraction of the input data that is to be used to evaluate the Model.
+   * 
+ * + * double test_fraction = 3; + * + * @return The testFraction. + */ + double getTestFraction(); + + /** + * + * + *
+   * Required. The key is a name of one of the Dataset's data columns.
+   * The values of the key (the values in the column) must be in RFC 3339
+   * `date-time` format, where `time-offset` = `"Z"`
+   * (e.g. 1985-04-12T23:20:50.52Z). If for a piece of data the key is not
+   * present or has an invalid value, that piece is ignored by the pipeline.
+   * 
+ * + * string key = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The key. + */ + java.lang.String getKey(); + /** + * + * + *
+   * Required. The key is a name of one of the Dataset's data columns.
+   * The values of the key (the values in the column) must be in RFC 3339
+   * `date-time` format, where `time-offset` = `"Z"`
+   * (e.g. 1985-04-12T23:20:50.52Z). If for a piece of data the key is not
+   * present or has an invalid value, that piece is ignored by the pipeline.
+   * 
+ * + * string key = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for key. + */ + com.google.protobuf.ByteString getKeyBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TrainingConfig.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TrainingConfig.java new file mode 100644 index 000000000..4e0646ecf --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TrainingConfig.java @@ -0,0 +1,552 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/data_labeling_job.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * CMLE training config. For every active learning labeling iteration, system
+ * will train a machine learning model on CMLE. The trained model will be used
+ * by data sampling algorithm to select DataItems.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.TrainingConfig} + */ +public final class TrainingConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.TrainingConfig) + TrainingConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use TrainingConfig.newBuilder() to construct. + private TrainingConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TrainingConfig() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TrainingConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TrainingConfig( + 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: + { + timeoutTrainingMilliHours_ = 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.v1.DataLabelingJobProto + .internal_static_google_cloud_aiplatform_v1_TrainingConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.DataLabelingJobProto + .internal_static_google_cloud_aiplatform_v1_TrainingConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.TrainingConfig.class, + com.google.cloud.aiplatform.v1.TrainingConfig.Builder.class); + } + + public static final int TIMEOUT_TRAINING_MILLI_HOURS_FIELD_NUMBER = 1; + private long timeoutTrainingMilliHours_; + /** + * + * + *
+   * The timeout hours for the CMLE training job, expressed in milli hours
+   * i.e. 1,000 value in this field means 1 hour.
+   * 
+ * + * int64 timeout_training_milli_hours = 1; + * + * @return The timeoutTrainingMilliHours. + */ + @java.lang.Override + public long getTimeoutTrainingMilliHours() { + return timeoutTrainingMilliHours_; + } + + 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 (timeoutTrainingMilliHours_ != 0L) { + output.writeInt64(1, timeoutTrainingMilliHours_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (timeoutTrainingMilliHours_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, timeoutTrainingMilliHours_); + } + 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.v1.TrainingConfig)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.TrainingConfig other = + (com.google.cloud.aiplatform.v1.TrainingConfig) obj; + + if (getTimeoutTrainingMilliHours() != other.getTimeoutTrainingMilliHours()) 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) + TIMEOUT_TRAINING_MILLI_HOURS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTimeoutTrainingMilliHours()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.TrainingConfig parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.TrainingConfig 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.v1.TrainingConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.TrainingConfig 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.v1.TrainingConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.TrainingConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.TrainingConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.TrainingConfig 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.v1.TrainingConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.TrainingConfig 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.v1.TrainingConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.TrainingConfig 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.v1.TrainingConfig 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; + } + /** + * + * + *
+   * CMLE training config. For every active learning labeling iteration, system
+   * will train a machine learning model on CMLE. The trained model will be used
+   * by data sampling algorithm to select DataItems.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.TrainingConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.TrainingConfig) + com.google.cloud.aiplatform.v1.TrainingConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.DataLabelingJobProto + .internal_static_google_cloud_aiplatform_v1_TrainingConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.DataLabelingJobProto + .internal_static_google_cloud_aiplatform_v1_TrainingConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.TrainingConfig.class, + com.google.cloud.aiplatform.v1.TrainingConfig.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.TrainingConfig.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(); + timeoutTrainingMilliHours_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.DataLabelingJobProto + .internal_static_google_cloud_aiplatform_v1_TrainingConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.TrainingConfig getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.TrainingConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.TrainingConfig build() { + com.google.cloud.aiplatform.v1.TrainingConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.TrainingConfig buildPartial() { + com.google.cloud.aiplatform.v1.TrainingConfig result = + new com.google.cloud.aiplatform.v1.TrainingConfig(this); + result.timeoutTrainingMilliHours_ = timeoutTrainingMilliHours_; + 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.v1.TrainingConfig) { + return mergeFrom((com.google.cloud.aiplatform.v1.TrainingConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.TrainingConfig other) { + if (other == com.google.cloud.aiplatform.v1.TrainingConfig.getDefaultInstance()) return this; + if (other.getTimeoutTrainingMilliHours() != 0L) { + setTimeoutTrainingMilliHours(other.getTimeoutTrainingMilliHours()); + } + 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.v1.TrainingConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.aiplatform.v1.TrainingConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private long timeoutTrainingMilliHours_; + /** + * + * + *
+     * The timeout hours for the CMLE training job, expressed in milli hours
+     * i.e. 1,000 value in this field means 1 hour.
+     * 
+ * + * int64 timeout_training_milli_hours = 1; + * + * @return The timeoutTrainingMilliHours. + */ + @java.lang.Override + public long getTimeoutTrainingMilliHours() { + return timeoutTrainingMilliHours_; + } + /** + * + * + *
+     * The timeout hours for the CMLE training job, expressed in milli hours
+     * i.e. 1,000 value in this field means 1 hour.
+     * 
+ * + * int64 timeout_training_milli_hours = 1; + * + * @param value The timeoutTrainingMilliHours to set. + * @return This builder for chaining. + */ + public Builder setTimeoutTrainingMilliHours(long value) { + + timeoutTrainingMilliHours_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The timeout hours for the CMLE training job, expressed in milli hours
+     * i.e. 1,000 value in this field means 1 hour.
+     * 
+ * + * int64 timeout_training_milli_hours = 1; + * + * @return This builder for chaining. + */ + public Builder clearTimeoutTrainingMilliHours() { + + timeoutTrainingMilliHours_ = 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.v1.TrainingConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.TrainingConfig) + private static final com.google.cloud.aiplatform.v1.TrainingConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.TrainingConfig(); + } + + public static com.google.cloud.aiplatform.v1.TrainingConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TrainingConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TrainingConfig(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.v1.TrainingConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TrainingConfigOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TrainingConfigOrBuilder.java new file mode 100644 index 000000000..b689a45d6 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TrainingConfigOrBuilder.java @@ -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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/data_labeling_job.proto + +package com.google.cloud.aiplatform.v1; + +public interface TrainingConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.TrainingConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The timeout hours for the CMLE training job, expressed in milli hours
+   * i.e. 1,000 value in this field means 1 hour.
+   * 
+ * + * int64 timeout_training_milli_hours = 1; + * + * @return The timeoutTrainingMilliHours. + */ + long getTimeoutTrainingMilliHours(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TrainingPipeline.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TrainingPipeline.java new file mode 100644 index 000000000..b36a9f5e3 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TrainingPipeline.java @@ -0,0 +1,4794 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/training_pipeline.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * The TrainingPipeline orchestrates tasks associated with training a Model. It
+ * always executes the training task, and optionally may also
+ * export data from AI Platform's Dataset which becomes the training input,
+ * [upload][google.cloud.aiplatform.v1.ModelService.UploadModel] the Model to AI Platform, and evaluate the
+ * Model.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.TrainingPipeline} + */ +public final class TrainingPipeline extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.TrainingPipeline) + TrainingPipelineOrBuilder { + private static final long serialVersionUID = 0L; + // Use TrainingPipeline.newBuilder() to construct. + private TrainingPipeline(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TrainingPipeline() { + name_ = ""; + displayName_ = ""; + trainingTaskDefinition_ = ""; + state_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TrainingPipeline(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TrainingPipeline( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 26: + { + com.google.cloud.aiplatform.v1.InputDataConfig.Builder subBuilder = null; + if (inputDataConfig_ != null) { + subBuilder = inputDataConfig_.toBuilder(); + } + inputDataConfig_ = + input.readMessage( + com.google.cloud.aiplatform.v1.InputDataConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(inputDataConfig_); + inputDataConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + trainingTaskDefinition_ = s; + break; + } + case 42: + { + com.google.protobuf.Value.Builder subBuilder = null; + if (trainingTaskInputs_ != null) { + subBuilder = trainingTaskInputs_.toBuilder(); + } + trainingTaskInputs_ = + input.readMessage(com.google.protobuf.Value.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(trainingTaskInputs_); + trainingTaskInputs_ = subBuilder.buildPartial(); + } + + break; + } + case 50: + { + com.google.protobuf.Value.Builder subBuilder = null; + if (trainingTaskMetadata_ != null) { + subBuilder = trainingTaskMetadata_.toBuilder(); + } + trainingTaskMetadata_ = + input.readMessage(com.google.protobuf.Value.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(trainingTaskMetadata_); + trainingTaskMetadata_ = subBuilder.buildPartial(); + } + + break; + } + case 58: + { + com.google.cloud.aiplatform.v1.Model.Builder subBuilder = null; + if (modelToUpload_ != null) { + subBuilder = modelToUpload_.toBuilder(); + } + modelToUpload_ = + input.readMessage( + com.google.cloud.aiplatform.v1.Model.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(modelToUpload_); + modelToUpload_ = subBuilder.buildPartial(); + } + + break; + } + case 72: + { + int rawValue = input.readEnum(); + + state_ = rawValue; + break; + } + case 82: + { + com.google.rpc.Status.Builder subBuilder = null; + if (error_ != null) { + subBuilder = error_.toBuilder(); + } + error_ = input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(error_); + error_ = subBuilder.buildPartial(); + } + + break; + } + case 90: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 98: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (startTime_ != null) { + subBuilder = startTime_.toBuilder(); + } + startTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(startTime_); + startTime_ = subBuilder.buildPartial(); + } + + break; + } + case 106: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (endTime_ != null) { + subBuilder = endTime_.toBuilder(); + } + endTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(endTime_); + endTime_ = subBuilder.buildPartial(); + } + + break; + } + case 114: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + case 122: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + labels_ = + com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); + break; + } + case 146: + { + com.google.cloud.aiplatform.v1.EncryptionSpec.Builder subBuilder = null; + if (encryptionSpec_ != null) { + subBuilder = encryptionSpec_.toBuilder(); + } + encryptionSpec_ = + input.readMessage( + com.google.cloud.aiplatform.v1.EncryptionSpec.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(encryptionSpec_); + encryptionSpec_ = 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.v1.TrainingPipelineProto + .internal_static_google_cloud_aiplatform_v1_TrainingPipeline_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 15: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.TrainingPipelineProto + .internal_static_google_cloud_aiplatform_v1_TrainingPipeline_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.TrainingPipeline.class, + com.google.cloud.aiplatform.v1.TrainingPipeline.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Output only. Resource name of the TrainingPipeline.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Resource name of the TrainingPipeline.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * Required. The user-defined name of this TrainingPipeline.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+   * Required. The user-defined name of this TrainingPipeline.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 INPUT_DATA_CONFIG_FIELD_NUMBER = 3; + private com.google.cloud.aiplatform.v1.InputDataConfig inputDataConfig_; + /** + * + * + *
+   * Specifies AI Platform owned input data that may be used for training the
+   * Model. The TrainingPipeline's [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition] should make
+   * clear whether this config is used and if there are any special requirements
+   * on how it should be filled. If nothing about this config is mentioned in
+   * the [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition], then it should be assumed that the
+   * TrainingPipeline does not depend on this configuration.
+   * 
+ * + * .google.cloud.aiplatform.v1.InputDataConfig input_data_config = 3; + * + * @return Whether the inputDataConfig field is set. + */ + @java.lang.Override + public boolean hasInputDataConfig() { + return inputDataConfig_ != null; + } + /** + * + * + *
+   * Specifies AI Platform owned input data that may be used for training the
+   * Model. The TrainingPipeline's [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition] should make
+   * clear whether this config is used and if there are any special requirements
+   * on how it should be filled. If nothing about this config is mentioned in
+   * the [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition], then it should be assumed that the
+   * TrainingPipeline does not depend on this configuration.
+   * 
+ * + * .google.cloud.aiplatform.v1.InputDataConfig input_data_config = 3; + * + * @return The inputDataConfig. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.InputDataConfig getInputDataConfig() { + return inputDataConfig_ == null + ? com.google.cloud.aiplatform.v1.InputDataConfig.getDefaultInstance() + : inputDataConfig_; + } + /** + * + * + *
+   * Specifies AI Platform owned input data that may be used for training the
+   * Model. The TrainingPipeline's [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition] should make
+   * clear whether this config is used and if there are any special requirements
+   * on how it should be filled. If nothing about this config is mentioned in
+   * the [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition], then it should be assumed that the
+   * TrainingPipeline does not depend on this configuration.
+   * 
+ * + * .google.cloud.aiplatform.v1.InputDataConfig input_data_config = 3; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.InputDataConfigOrBuilder getInputDataConfigOrBuilder() { + return getInputDataConfig(); + } + + public static final int TRAINING_TASK_DEFINITION_FIELD_NUMBER = 4; + private volatile java.lang.Object trainingTaskDefinition_; + /** + * + * + *
+   * Required. A Google Cloud Storage path to the YAML file that defines the training task
+   * which is responsible for producing the model artifact, and may also include
+   * additional auxiliary work.
+   * The definition files that can be used here are found in
+   * gs://google-cloud-aiplatform/schema/trainingjob/definition/.
+   * Note: The URI given on output will be immutable and probably different,
+   * including the URI scheme, than the one given on input. The output URI will
+   * point to a location where the user only has a read access.
+   * 
+ * + * string training_task_definition = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The trainingTaskDefinition. + */ + @java.lang.Override + public java.lang.String getTrainingTaskDefinition() { + java.lang.Object ref = trainingTaskDefinition_; + 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(); + trainingTaskDefinition_ = s; + return s; + } + } + /** + * + * + *
+   * Required. A Google Cloud Storage path to the YAML file that defines the training task
+   * which is responsible for producing the model artifact, and may also include
+   * additional auxiliary work.
+   * The definition files that can be used here are found in
+   * gs://google-cloud-aiplatform/schema/trainingjob/definition/.
+   * Note: The URI given on output will be immutable and probably different,
+   * including the URI scheme, than the one given on input. The output URI will
+   * point to a location where the user only has a read access.
+   * 
+ * + * string training_task_definition = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for trainingTaskDefinition. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTrainingTaskDefinitionBytes() { + java.lang.Object ref = trainingTaskDefinition_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + trainingTaskDefinition_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TRAINING_TASK_INPUTS_FIELD_NUMBER = 5; + private com.google.protobuf.Value trainingTaskInputs_; + /** + * + * + *
+   * Required. The training task's parameter(s), as specified in the
+   * [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition]'s `inputs`.
+   * 
+ * + * + * .google.protobuf.Value training_task_inputs = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the trainingTaskInputs field is set. + */ + @java.lang.Override + public boolean hasTrainingTaskInputs() { + return trainingTaskInputs_ != null; + } + /** + * + * + *
+   * Required. The training task's parameter(s), as specified in the
+   * [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition]'s `inputs`.
+   * 
+ * + * + * .google.protobuf.Value training_task_inputs = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The trainingTaskInputs. + */ + @java.lang.Override + public com.google.protobuf.Value getTrainingTaskInputs() { + return trainingTaskInputs_ == null + ? com.google.protobuf.Value.getDefaultInstance() + : trainingTaskInputs_; + } + /** + * + * + *
+   * Required. The training task's parameter(s), as specified in the
+   * [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition]'s `inputs`.
+   * 
+ * + * + * .google.protobuf.Value training_task_inputs = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.ValueOrBuilder getTrainingTaskInputsOrBuilder() { + return getTrainingTaskInputs(); + } + + public static final int TRAINING_TASK_METADATA_FIELD_NUMBER = 6; + private com.google.protobuf.Value trainingTaskMetadata_; + /** + * + * + *
+   * Output only. The metadata information as specified in the [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition]'s
+   * `metadata`. This metadata is an auxiliary runtime and final information
+   * about the training task. While the pipeline is running this information is
+   * populated only at a best effort basis. Only present if the
+   * pipeline's [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition] contains `metadata` object.
+   * 
+ * + * + * .google.protobuf.Value training_task_metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the trainingTaskMetadata field is set. + */ + @java.lang.Override + public boolean hasTrainingTaskMetadata() { + return trainingTaskMetadata_ != null; + } + /** + * + * + *
+   * Output only. The metadata information as specified in the [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition]'s
+   * `metadata`. This metadata is an auxiliary runtime and final information
+   * about the training task. While the pipeline is running this information is
+   * populated only at a best effort basis. Only present if the
+   * pipeline's [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition] contains `metadata` object.
+   * 
+ * + * + * .google.protobuf.Value training_task_metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The trainingTaskMetadata. + */ + @java.lang.Override + public com.google.protobuf.Value getTrainingTaskMetadata() { + return trainingTaskMetadata_ == null + ? com.google.protobuf.Value.getDefaultInstance() + : trainingTaskMetadata_; + } + /** + * + * + *
+   * Output only. The metadata information as specified in the [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition]'s
+   * `metadata`. This metadata is an auxiliary runtime and final information
+   * about the training task. While the pipeline is running this information is
+   * populated only at a best effort basis. Only present if the
+   * pipeline's [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition] contains `metadata` object.
+   * 
+ * + * + * .google.protobuf.Value training_task_metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.ValueOrBuilder getTrainingTaskMetadataOrBuilder() { + return getTrainingTaskMetadata(); + } + + public static final int MODEL_TO_UPLOAD_FIELD_NUMBER = 7; + private com.google.cloud.aiplatform.v1.Model modelToUpload_; + /** + * + * + *
+   * Describes the Model that may be uploaded (via [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel])
+   * by this TrainingPipeline. The TrainingPipeline's
+   * [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition] should make clear whether this Model
+   * description should be populated, and if there are any special requirements
+   * regarding how it should be filled. If nothing is mentioned in the
+   * [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition], then it should be assumed that this field
+   * should not be filled and the training task either uploads the Model without
+   * a need of this information, or that training task does not support
+   * uploading a Model as part of the pipeline.
+   * When the Pipeline's state becomes `PIPELINE_STATE_SUCCEEDED` and
+   * the trained Model had been uploaded into AI Platform, then the
+   * model_to_upload's resource [name][google.cloud.aiplatform.v1.Model.name] is populated. The Model
+   * is always uploaded into the Project and Location in which this pipeline
+   * is.
+   * 
+ * + * .google.cloud.aiplatform.v1.Model model_to_upload = 7; + * + * @return Whether the modelToUpload field is set. + */ + @java.lang.Override + public boolean hasModelToUpload() { + return modelToUpload_ != null; + } + /** + * + * + *
+   * Describes the Model that may be uploaded (via [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel])
+   * by this TrainingPipeline. The TrainingPipeline's
+   * [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition] should make clear whether this Model
+   * description should be populated, and if there are any special requirements
+   * regarding how it should be filled. If nothing is mentioned in the
+   * [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition], then it should be assumed that this field
+   * should not be filled and the training task either uploads the Model without
+   * a need of this information, or that training task does not support
+   * uploading a Model as part of the pipeline.
+   * When the Pipeline's state becomes `PIPELINE_STATE_SUCCEEDED` and
+   * the trained Model had been uploaded into AI Platform, then the
+   * model_to_upload's resource [name][google.cloud.aiplatform.v1.Model.name] is populated. The Model
+   * is always uploaded into the Project and Location in which this pipeline
+   * is.
+   * 
+ * + * .google.cloud.aiplatform.v1.Model model_to_upload = 7; + * + * @return The modelToUpload. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.Model getModelToUpload() { + return modelToUpload_ == null + ? com.google.cloud.aiplatform.v1.Model.getDefaultInstance() + : modelToUpload_; + } + /** + * + * + *
+   * Describes the Model that may be uploaded (via [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel])
+   * by this TrainingPipeline. The TrainingPipeline's
+   * [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition] should make clear whether this Model
+   * description should be populated, and if there are any special requirements
+   * regarding how it should be filled. If nothing is mentioned in the
+   * [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition], then it should be assumed that this field
+   * should not be filled and the training task either uploads the Model without
+   * a need of this information, or that training task does not support
+   * uploading a Model as part of the pipeline.
+   * When the Pipeline's state becomes `PIPELINE_STATE_SUCCEEDED` and
+   * the trained Model had been uploaded into AI Platform, then the
+   * model_to_upload's resource [name][google.cloud.aiplatform.v1.Model.name] is populated. The Model
+   * is always uploaded into the Project and Location in which this pipeline
+   * is.
+   * 
+ * + * .google.cloud.aiplatform.v1.Model model_to_upload = 7; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ModelOrBuilder getModelToUploadOrBuilder() { + return getModelToUpload(); + } + + public static final int STATE_FIELD_NUMBER = 9; + private int state_; + /** + * + * + *
+   * Output only. The detailed state of the pipeline.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.PipelineState state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * Output only. The detailed state of the pipeline.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.PipelineState state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.PipelineState getState() { + @SuppressWarnings("deprecation") + com.google.cloud.aiplatform.v1.PipelineState result = + com.google.cloud.aiplatform.v1.PipelineState.valueOf(state_); + return result == null ? com.google.cloud.aiplatform.v1.PipelineState.UNRECOGNIZED : result; + } + + public static final int ERROR_FIELD_NUMBER = 10; + private com.google.rpc.Status error_; + /** + * + * + *
+   * Output only. Only populated when the pipeline's state is `PIPELINE_STATE_FAILED` or
+   * `PIPELINE_STATE_CANCELLED`.
+   * 
+ * + * .google.rpc.Status error = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the error field is set. + */ + @java.lang.Override + public boolean hasError() { + return error_ != null; + } + /** + * + * + *
+   * Output only. Only populated when the pipeline's state is `PIPELINE_STATE_FAILED` or
+   * `PIPELINE_STATE_CANCELLED`.
+   * 
+ * + * .google.rpc.Status error = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The error. + */ + @java.lang.Override + public com.google.rpc.Status getError() { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } + /** + * + * + *
+   * Output only. Only populated when the pipeline's state is `PIPELINE_STATE_FAILED` or
+   * `PIPELINE_STATE_CANCELLED`.
+   * 
+ * + * .google.rpc.Status error = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + return getError(); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 11; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. Time when the TrainingPipeline was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. Time when the TrainingPipeline was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. Time when the TrainingPipeline was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int START_TIME_FIELD_NUMBER = 12; + private com.google.protobuf.Timestamp startTime_; + /** + * + * + *
+   * Output only. Time when the TrainingPipeline for the first time entered the
+   * `PIPELINE_STATE_RUNNING` state.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return startTime_ != null; + } + /** + * + * + *
+   * Output only. Time when the TrainingPipeline for the first time entered the
+   * `PIPELINE_STATE_RUNNING` state.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + /** + * + * + *
+   * Output only. Time when the TrainingPipeline for the first time entered the
+   * `PIPELINE_STATE_RUNNING` state.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return getStartTime(); + } + + public static final int END_TIME_FIELD_NUMBER = 13; + private com.google.protobuf.Timestamp endTime_; + /** + * + * + *
+   * Output only. Time when the TrainingPipeline entered any of the following states:
+   * `PIPELINE_STATE_SUCCEEDED`, `PIPELINE_STATE_FAILED`,
+   * `PIPELINE_STATE_CANCELLED`.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + * + * + *
+   * Output only. Time when the TrainingPipeline entered any of the following states:
+   * `PIPELINE_STATE_SUCCEEDED`, `PIPELINE_STATE_FAILED`,
+   * `PIPELINE_STATE_CANCELLED`.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + * + * + *
+   * Output only. Time when the TrainingPipeline entered any of the following states:
+   * `PIPELINE_STATE_SUCCEEDED`, `PIPELINE_STATE_FAILED`,
+   * `PIPELINE_STATE_CANCELLED`.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return getEndTime(); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 14; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. Time when the TrainingPipeline was most recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. Time when the TrainingPipeline was most recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. Time when the TrainingPipeline was most recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + public static final int LABELS_FIELD_NUMBER = 15; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.aiplatform.v1.TrainingPipelineProto + .internal_static_google_cloud_aiplatform_v1_TrainingPipeline_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * The labels with user-defined metadata to organize TrainingPipelines.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 15; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * The labels with user-defined metadata to organize TrainingPipelines.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 15; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * The labels with user-defined metadata to organize TrainingPipelines.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 15; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * The labels with user-defined metadata to organize TrainingPipelines.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 15; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int ENCRYPTION_SPEC_FIELD_NUMBER = 18; + private com.google.cloud.aiplatform.v1.EncryptionSpec encryptionSpec_; + /** + * + * + *
+   * Customer-managed encryption key spec for a TrainingPipeline. If set, this
+   * TrainingPipeline will be secured by this key.
+   * Note: Model trained by this TrainingPipeline is also secured by this key if
+   * [model_to_upload][google.cloud.aiplatform.v1.TrainingPipeline.encryption_spec] is not set separately.
+   * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 18; + * + * @return Whether the encryptionSpec field is set. + */ + @java.lang.Override + public boolean hasEncryptionSpec() { + return encryptionSpec_ != null; + } + /** + * + * + *
+   * Customer-managed encryption key spec for a TrainingPipeline. If set, this
+   * TrainingPipeline will be secured by this key.
+   * Note: Model trained by this TrainingPipeline is also secured by this key if
+   * [model_to_upload][google.cloud.aiplatform.v1.TrainingPipeline.encryption_spec] is not set separately.
+   * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 18; + * + * @return The encryptionSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.EncryptionSpec getEncryptionSpec() { + return encryptionSpec_ == null + ? com.google.cloud.aiplatform.v1.EncryptionSpec.getDefaultInstance() + : encryptionSpec_; + } + /** + * + * + *
+   * Customer-managed encryption key spec for a TrainingPipeline. If set, this
+   * TrainingPipeline will be secured by this key.
+   * Note: Model trained by this TrainingPipeline is also secured by this key if
+   * [model_to_upload][google.cloud.aiplatform.v1.TrainingPipeline.encryption_spec] is not set separately.
+   * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 18; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.EncryptionSpecOrBuilder getEncryptionSpecOrBuilder() { + return getEncryptionSpec(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + if (inputDataConfig_ != null) { + output.writeMessage(3, getInputDataConfig()); + } + if (!getTrainingTaskDefinitionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, trainingTaskDefinition_); + } + if (trainingTaskInputs_ != null) { + output.writeMessage(5, getTrainingTaskInputs()); + } + if (trainingTaskMetadata_ != null) { + output.writeMessage(6, getTrainingTaskMetadata()); + } + if (modelToUpload_ != null) { + output.writeMessage(7, getModelToUpload()); + } + if (state_ + != com.google.cloud.aiplatform.v1.PipelineState.PIPELINE_STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(9, state_); + } + if (error_ != null) { + output.writeMessage(10, getError()); + } + if (createTime_ != null) { + output.writeMessage(11, getCreateTime()); + } + if (startTime_ != null) { + output.writeMessage(12, getStartTime()); + } + if (endTime_ != null) { + output.writeMessage(13, getEndTime()); + } + if (updateTime_ != null) { + output.writeMessage(14, getUpdateTime()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 15); + if (encryptionSpec_ != null) { + output.writeMessage(18, getEncryptionSpec()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + if (inputDataConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getInputDataConfig()); + } + if (!getTrainingTaskDefinitionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, trainingTaskDefinition_); + } + if (trainingTaskInputs_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getTrainingTaskInputs()); + } + if (trainingTaskMetadata_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(6, getTrainingTaskMetadata()); + } + if (modelToUpload_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getModelToUpload()); + } + if (state_ + != com.google.cloud.aiplatform.v1.PipelineState.PIPELINE_STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(9, state_); + } + if (error_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getError()); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getCreateTime()); + } + if (startTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getStartTime()); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getEndTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, getUpdateTime()); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(15, labels__); + } + if (encryptionSpec_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(18, getEncryptionSpec()); + } + 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.v1.TrainingPipeline)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.TrainingPipeline other = + (com.google.cloud.aiplatform.v1.TrainingPipeline) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (hasInputDataConfig() != other.hasInputDataConfig()) return false; + if (hasInputDataConfig()) { + if (!getInputDataConfig().equals(other.getInputDataConfig())) return false; + } + if (!getTrainingTaskDefinition().equals(other.getTrainingTaskDefinition())) return false; + if (hasTrainingTaskInputs() != other.hasTrainingTaskInputs()) return false; + if (hasTrainingTaskInputs()) { + if (!getTrainingTaskInputs().equals(other.getTrainingTaskInputs())) return false; + } + if (hasTrainingTaskMetadata() != other.hasTrainingTaskMetadata()) return false; + if (hasTrainingTaskMetadata()) { + if (!getTrainingTaskMetadata().equals(other.getTrainingTaskMetadata())) return false; + } + if (hasModelToUpload() != other.hasModelToUpload()) return false; + if (hasModelToUpload()) { + if (!getModelToUpload().equals(other.getModelToUpload())) return false; + } + if (state_ != other.state_) return false; + if (hasError() != other.hasError()) return false; + if (hasError()) { + if (!getError().equals(other.getError())) return false; + } + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime().equals(other.getStartTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (hasEncryptionSpec() != other.hasEncryptionSpec()) return false; + if (hasEncryptionSpec()) { + if (!getEncryptionSpec().equals(other.getEncryptionSpec())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + if (hasInputDataConfig()) { + hash = (37 * hash) + INPUT_DATA_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getInputDataConfig().hashCode(); + } + hash = (37 * hash) + TRAINING_TASK_DEFINITION_FIELD_NUMBER; + hash = (53 * hash) + getTrainingTaskDefinition().hashCode(); + if (hasTrainingTaskInputs()) { + hash = (37 * hash) + TRAINING_TASK_INPUTS_FIELD_NUMBER; + hash = (53 * hash) + getTrainingTaskInputs().hashCode(); + } + if (hasTrainingTaskMetadata()) { + hash = (37 * hash) + TRAINING_TASK_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getTrainingTaskMetadata().hashCode(); + } + if (hasModelToUpload()) { + hash = (37 * hash) + MODEL_TO_UPLOAD_FIELD_NUMBER; + hash = (53 * hash) + getModelToUpload().hashCode(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + if (hasError()) { + hash = (37 * hash) + ERROR_FIELD_NUMBER; + hash = (53 * hash) + getError().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + if (hasEncryptionSpec()) { + hash = (37 * hash) + ENCRYPTION_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getEncryptionSpec().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.TrainingPipeline parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.TrainingPipeline 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.v1.TrainingPipeline parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.TrainingPipeline 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.v1.TrainingPipeline parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.TrainingPipeline parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.TrainingPipeline parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.TrainingPipeline 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.v1.TrainingPipeline parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.TrainingPipeline 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.v1.TrainingPipeline parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.TrainingPipeline 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.v1.TrainingPipeline 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 TrainingPipeline orchestrates tasks associated with training a Model. It
+   * always executes the training task, and optionally may also
+   * export data from AI Platform's Dataset which becomes the training input,
+   * [upload][google.cloud.aiplatform.v1.ModelService.UploadModel] the Model to AI Platform, and evaluate the
+   * Model.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.TrainingPipeline} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.TrainingPipeline) + com.google.cloud.aiplatform.v1.TrainingPipelineOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.TrainingPipelineProto + .internal_static_google_cloud_aiplatform_v1_TrainingPipeline_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 15: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 15: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.TrainingPipelineProto + .internal_static_google_cloud_aiplatform_v1_TrainingPipeline_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.TrainingPipeline.class, + com.google.cloud.aiplatform.v1.TrainingPipeline.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.TrainingPipeline.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + displayName_ = ""; + + if (inputDataConfigBuilder_ == null) { + inputDataConfig_ = null; + } else { + inputDataConfig_ = null; + inputDataConfigBuilder_ = null; + } + trainingTaskDefinition_ = ""; + + if (trainingTaskInputsBuilder_ == null) { + trainingTaskInputs_ = null; + } else { + trainingTaskInputs_ = null; + trainingTaskInputsBuilder_ = null; + } + if (trainingTaskMetadataBuilder_ == null) { + trainingTaskMetadata_ = null; + } else { + trainingTaskMetadata_ = null; + trainingTaskMetadataBuilder_ = null; + } + if (modelToUploadBuilder_ == null) { + modelToUpload_ = null; + } else { + modelToUpload_ = null; + modelToUploadBuilder_ = null; + } + state_ = 0; + + if (errorBuilder_ == null) { + error_ = null; + } else { + error_ = null; + errorBuilder_ = null; + } + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (startTimeBuilder_ == null) { + startTime_ = null; + } else { + startTime_ = null; + startTimeBuilder_ = null; + } + if (endTimeBuilder_ == null) { + endTime_ = null; + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + internalGetMutableLabels().clear(); + if (encryptionSpecBuilder_ == null) { + encryptionSpec_ = null; + } else { + encryptionSpec_ = null; + encryptionSpecBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.TrainingPipelineProto + .internal_static_google_cloud_aiplatform_v1_TrainingPipeline_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.TrainingPipeline getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.TrainingPipeline.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.TrainingPipeline build() { + com.google.cloud.aiplatform.v1.TrainingPipeline result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.TrainingPipeline buildPartial() { + com.google.cloud.aiplatform.v1.TrainingPipeline result = + new com.google.cloud.aiplatform.v1.TrainingPipeline(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.displayName_ = displayName_; + if (inputDataConfigBuilder_ == null) { + result.inputDataConfig_ = inputDataConfig_; + } else { + result.inputDataConfig_ = inputDataConfigBuilder_.build(); + } + result.trainingTaskDefinition_ = trainingTaskDefinition_; + if (trainingTaskInputsBuilder_ == null) { + result.trainingTaskInputs_ = trainingTaskInputs_; + } else { + result.trainingTaskInputs_ = trainingTaskInputsBuilder_.build(); + } + if (trainingTaskMetadataBuilder_ == null) { + result.trainingTaskMetadata_ = trainingTaskMetadata_; + } else { + result.trainingTaskMetadata_ = trainingTaskMetadataBuilder_.build(); + } + if (modelToUploadBuilder_ == null) { + result.modelToUpload_ = modelToUpload_; + } else { + result.modelToUpload_ = modelToUploadBuilder_.build(); + } + result.state_ = state_; + if (errorBuilder_ == null) { + result.error_ = error_; + } else { + result.error_ = errorBuilder_.build(); + } + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (startTimeBuilder_ == null) { + result.startTime_ = startTime_; + } else { + result.startTime_ = startTimeBuilder_.build(); + } + if (endTimeBuilder_ == null) { + result.endTime_ = endTime_; + } else { + result.endTime_ = endTimeBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + if (encryptionSpecBuilder_ == null) { + result.encryptionSpec_ = encryptionSpec_; + } else { + result.encryptionSpec_ = encryptionSpecBuilder_.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.v1.TrainingPipeline) { + return mergeFrom((com.google.cloud.aiplatform.v1.TrainingPipeline) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.TrainingPipeline other) { + if (other == com.google.cloud.aiplatform.v1.TrainingPipeline.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (other.hasInputDataConfig()) { + mergeInputDataConfig(other.getInputDataConfig()); + } + if (!other.getTrainingTaskDefinition().isEmpty()) { + trainingTaskDefinition_ = other.trainingTaskDefinition_; + onChanged(); + } + if (other.hasTrainingTaskInputs()) { + mergeTrainingTaskInputs(other.getTrainingTaskInputs()); + } + if (other.hasTrainingTaskMetadata()) { + mergeTrainingTaskMetadata(other.getTrainingTaskMetadata()); + } + if (other.hasModelToUpload()) { + mergeModelToUpload(other.getModelToUpload()); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.hasError()) { + mergeError(other.getError()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + if (other.hasEncryptionSpec()) { + mergeEncryptionSpec(other.getEncryptionSpec()); + } + 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.v1.TrainingPipeline parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.aiplatform.v1.TrainingPipeline) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. Resource name of the TrainingPipeline.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Resource name of the TrainingPipeline.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Resource name of the TrainingPipeline.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Resource name of the TrainingPipeline.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Resource name of the TrainingPipeline.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Required. The user-defined name of this TrainingPipeline.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+     * Required. The user-defined name of this TrainingPipeline.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+     * Required. The user-defined name of this TrainingPipeline.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + /** + * + * + *
+     * Required. The user-defined name of this TrainingPipeline.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The user-defined name of this TrainingPipeline.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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.cloud.aiplatform.v1.InputDataConfig inputDataConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.InputDataConfig, + com.google.cloud.aiplatform.v1.InputDataConfig.Builder, + com.google.cloud.aiplatform.v1.InputDataConfigOrBuilder> + inputDataConfigBuilder_; + /** + * + * + *
+     * Specifies AI Platform owned input data that may be used for training the
+     * Model. The TrainingPipeline's [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition] should make
+     * clear whether this config is used and if there are any special requirements
+     * on how it should be filled. If nothing about this config is mentioned in
+     * the [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition], then it should be assumed that the
+     * TrainingPipeline does not depend on this configuration.
+     * 
+ * + * .google.cloud.aiplatform.v1.InputDataConfig input_data_config = 3; + * + * @return Whether the inputDataConfig field is set. + */ + public boolean hasInputDataConfig() { + return inputDataConfigBuilder_ != null || inputDataConfig_ != null; + } + /** + * + * + *
+     * Specifies AI Platform owned input data that may be used for training the
+     * Model. The TrainingPipeline's [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition] should make
+     * clear whether this config is used and if there are any special requirements
+     * on how it should be filled. If nothing about this config is mentioned in
+     * the [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition], then it should be assumed that the
+     * TrainingPipeline does not depend on this configuration.
+     * 
+ * + * .google.cloud.aiplatform.v1.InputDataConfig input_data_config = 3; + * + * @return The inputDataConfig. + */ + public com.google.cloud.aiplatform.v1.InputDataConfig getInputDataConfig() { + if (inputDataConfigBuilder_ == null) { + return inputDataConfig_ == null + ? com.google.cloud.aiplatform.v1.InputDataConfig.getDefaultInstance() + : inputDataConfig_; + } else { + return inputDataConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Specifies AI Platform owned input data that may be used for training the
+     * Model. The TrainingPipeline's [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition] should make
+     * clear whether this config is used and if there are any special requirements
+     * on how it should be filled. If nothing about this config is mentioned in
+     * the [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition], then it should be assumed that the
+     * TrainingPipeline does not depend on this configuration.
+     * 
+ * + * .google.cloud.aiplatform.v1.InputDataConfig input_data_config = 3; + */ + public Builder setInputDataConfig(com.google.cloud.aiplatform.v1.InputDataConfig value) { + if (inputDataConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + inputDataConfig_ = value; + onChanged(); + } else { + inputDataConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Specifies AI Platform owned input data that may be used for training the
+     * Model. The TrainingPipeline's [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition] should make
+     * clear whether this config is used and if there are any special requirements
+     * on how it should be filled. If nothing about this config is mentioned in
+     * the [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition], then it should be assumed that the
+     * TrainingPipeline does not depend on this configuration.
+     * 
+ * + * .google.cloud.aiplatform.v1.InputDataConfig input_data_config = 3; + */ + public Builder setInputDataConfig( + com.google.cloud.aiplatform.v1.InputDataConfig.Builder builderForValue) { + if (inputDataConfigBuilder_ == null) { + inputDataConfig_ = builderForValue.build(); + onChanged(); + } else { + inputDataConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Specifies AI Platform owned input data that may be used for training the
+     * Model. The TrainingPipeline's [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition] should make
+     * clear whether this config is used and if there are any special requirements
+     * on how it should be filled. If nothing about this config is mentioned in
+     * the [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition], then it should be assumed that the
+     * TrainingPipeline does not depend on this configuration.
+     * 
+ * + * .google.cloud.aiplatform.v1.InputDataConfig input_data_config = 3; + */ + public Builder mergeInputDataConfig(com.google.cloud.aiplatform.v1.InputDataConfig value) { + if (inputDataConfigBuilder_ == null) { + if (inputDataConfig_ != null) { + inputDataConfig_ = + com.google.cloud.aiplatform.v1.InputDataConfig.newBuilder(inputDataConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + inputDataConfig_ = value; + } + onChanged(); + } else { + inputDataConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Specifies AI Platform owned input data that may be used for training the
+     * Model. The TrainingPipeline's [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition] should make
+     * clear whether this config is used and if there are any special requirements
+     * on how it should be filled. If nothing about this config is mentioned in
+     * the [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition], then it should be assumed that the
+     * TrainingPipeline does not depend on this configuration.
+     * 
+ * + * .google.cloud.aiplatform.v1.InputDataConfig input_data_config = 3; + */ + public Builder clearInputDataConfig() { + if (inputDataConfigBuilder_ == null) { + inputDataConfig_ = null; + onChanged(); + } else { + inputDataConfig_ = null; + inputDataConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Specifies AI Platform owned input data that may be used for training the
+     * Model. The TrainingPipeline's [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition] should make
+     * clear whether this config is used and if there are any special requirements
+     * on how it should be filled. If nothing about this config is mentioned in
+     * the [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition], then it should be assumed that the
+     * TrainingPipeline does not depend on this configuration.
+     * 
+ * + * .google.cloud.aiplatform.v1.InputDataConfig input_data_config = 3; + */ + public com.google.cloud.aiplatform.v1.InputDataConfig.Builder getInputDataConfigBuilder() { + + onChanged(); + return getInputDataConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Specifies AI Platform owned input data that may be used for training the
+     * Model. The TrainingPipeline's [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition] should make
+     * clear whether this config is used and if there are any special requirements
+     * on how it should be filled. If nothing about this config is mentioned in
+     * the [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition], then it should be assumed that the
+     * TrainingPipeline does not depend on this configuration.
+     * 
+ * + * .google.cloud.aiplatform.v1.InputDataConfig input_data_config = 3; + */ + public com.google.cloud.aiplatform.v1.InputDataConfigOrBuilder getInputDataConfigOrBuilder() { + if (inputDataConfigBuilder_ != null) { + return inputDataConfigBuilder_.getMessageOrBuilder(); + } else { + return inputDataConfig_ == null + ? com.google.cloud.aiplatform.v1.InputDataConfig.getDefaultInstance() + : inputDataConfig_; + } + } + /** + * + * + *
+     * Specifies AI Platform owned input data that may be used for training the
+     * Model. The TrainingPipeline's [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition] should make
+     * clear whether this config is used and if there are any special requirements
+     * on how it should be filled. If nothing about this config is mentioned in
+     * the [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition], then it should be assumed that the
+     * TrainingPipeline does not depend on this configuration.
+     * 
+ * + * .google.cloud.aiplatform.v1.InputDataConfig input_data_config = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.InputDataConfig, + com.google.cloud.aiplatform.v1.InputDataConfig.Builder, + com.google.cloud.aiplatform.v1.InputDataConfigOrBuilder> + getInputDataConfigFieldBuilder() { + if (inputDataConfigBuilder_ == null) { + inputDataConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.InputDataConfig, + com.google.cloud.aiplatform.v1.InputDataConfig.Builder, + com.google.cloud.aiplatform.v1.InputDataConfigOrBuilder>( + getInputDataConfig(), getParentForChildren(), isClean()); + inputDataConfig_ = null; + } + return inputDataConfigBuilder_; + } + + private java.lang.Object trainingTaskDefinition_ = ""; + /** + * + * + *
+     * Required. A Google Cloud Storage path to the YAML file that defines the training task
+     * which is responsible for producing the model artifact, and may also include
+     * additional auxiliary work.
+     * The definition files that can be used here are found in
+     * gs://google-cloud-aiplatform/schema/trainingjob/definition/.
+     * Note: The URI given on output will be immutable and probably different,
+     * including the URI scheme, than the one given on input. The output URI will
+     * point to a location where the user only has a read access.
+     * 
+ * + * string training_task_definition = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The trainingTaskDefinition. + */ + public java.lang.String getTrainingTaskDefinition() { + java.lang.Object ref = trainingTaskDefinition_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + trainingTaskDefinition_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. A Google Cloud Storage path to the YAML file that defines the training task
+     * which is responsible for producing the model artifact, and may also include
+     * additional auxiliary work.
+     * The definition files that can be used here are found in
+     * gs://google-cloud-aiplatform/schema/trainingjob/definition/.
+     * Note: The URI given on output will be immutable and probably different,
+     * including the URI scheme, than the one given on input. The output URI will
+     * point to a location where the user only has a read access.
+     * 
+ * + * string training_task_definition = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for trainingTaskDefinition. + */ + public com.google.protobuf.ByteString getTrainingTaskDefinitionBytes() { + java.lang.Object ref = trainingTaskDefinition_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + trainingTaskDefinition_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. A Google Cloud Storage path to the YAML file that defines the training task
+     * which is responsible for producing the model artifact, and may also include
+     * additional auxiliary work.
+     * The definition files that can be used here are found in
+     * gs://google-cloud-aiplatform/schema/trainingjob/definition/.
+     * Note: The URI given on output will be immutable and probably different,
+     * including the URI scheme, than the one given on input. The output URI will
+     * point to a location where the user only has a read access.
+     * 
+ * + * string training_task_definition = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The trainingTaskDefinition to set. + * @return This builder for chaining. + */ + public Builder setTrainingTaskDefinition(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + trainingTaskDefinition_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A Google Cloud Storage path to the YAML file that defines the training task
+     * which is responsible for producing the model artifact, and may also include
+     * additional auxiliary work.
+     * The definition files that can be used here are found in
+     * gs://google-cloud-aiplatform/schema/trainingjob/definition/.
+     * Note: The URI given on output will be immutable and probably different,
+     * including the URI scheme, than the one given on input. The output URI will
+     * point to a location where the user only has a read access.
+     * 
+ * + * string training_task_definition = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearTrainingTaskDefinition() { + + trainingTaskDefinition_ = getDefaultInstance().getTrainingTaskDefinition(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A Google Cloud Storage path to the YAML file that defines the training task
+     * which is responsible for producing the model artifact, and may also include
+     * additional auxiliary work.
+     * The definition files that can be used here are found in
+     * gs://google-cloud-aiplatform/schema/trainingjob/definition/.
+     * Note: The URI given on output will be immutable and probably different,
+     * including the URI scheme, than the one given on input. The output URI will
+     * point to a location where the user only has a read access.
+     * 
+ * + * string training_task_definition = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for trainingTaskDefinition to set. + * @return This builder for chaining. + */ + public Builder setTrainingTaskDefinitionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + trainingTaskDefinition_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Value trainingTaskInputs_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Value, + com.google.protobuf.Value.Builder, + com.google.protobuf.ValueOrBuilder> + trainingTaskInputsBuilder_; + /** + * + * + *
+     * Required. The training task's parameter(s), as specified in the
+     * [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition]'s `inputs`.
+     * 
+ * + * + * .google.protobuf.Value training_task_inputs = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the trainingTaskInputs field is set. + */ + public boolean hasTrainingTaskInputs() { + return trainingTaskInputsBuilder_ != null || trainingTaskInputs_ != null; + } + /** + * + * + *
+     * Required. The training task's parameter(s), as specified in the
+     * [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition]'s `inputs`.
+     * 
+ * + * + * .google.protobuf.Value training_task_inputs = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The trainingTaskInputs. + */ + public com.google.protobuf.Value getTrainingTaskInputs() { + if (trainingTaskInputsBuilder_ == null) { + return trainingTaskInputs_ == null + ? com.google.protobuf.Value.getDefaultInstance() + : trainingTaskInputs_; + } else { + return trainingTaskInputsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The training task's parameter(s), as specified in the
+     * [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition]'s `inputs`.
+     * 
+ * + * + * .google.protobuf.Value training_task_inputs = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTrainingTaskInputs(com.google.protobuf.Value value) { + if (trainingTaskInputsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + trainingTaskInputs_ = value; + onChanged(); + } else { + trainingTaskInputsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The training task's parameter(s), as specified in the
+     * [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition]'s `inputs`.
+     * 
+ * + * + * .google.protobuf.Value training_task_inputs = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTrainingTaskInputs(com.google.protobuf.Value.Builder builderForValue) { + if (trainingTaskInputsBuilder_ == null) { + trainingTaskInputs_ = builderForValue.build(); + onChanged(); + } else { + trainingTaskInputsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The training task's parameter(s), as specified in the
+     * [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition]'s `inputs`.
+     * 
+ * + * + * .google.protobuf.Value training_task_inputs = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeTrainingTaskInputs(com.google.protobuf.Value value) { + if (trainingTaskInputsBuilder_ == null) { + if (trainingTaskInputs_ != null) { + trainingTaskInputs_ = + com.google.protobuf.Value.newBuilder(trainingTaskInputs_) + .mergeFrom(value) + .buildPartial(); + } else { + trainingTaskInputs_ = value; + } + onChanged(); + } else { + trainingTaskInputsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The training task's parameter(s), as specified in the
+     * [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition]'s `inputs`.
+     * 
+ * + * + * .google.protobuf.Value training_task_inputs = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearTrainingTaskInputs() { + if (trainingTaskInputsBuilder_ == null) { + trainingTaskInputs_ = null; + onChanged(); + } else { + trainingTaskInputs_ = null; + trainingTaskInputsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The training task's parameter(s), as specified in the
+     * [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition]'s `inputs`.
+     * 
+ * + * + * .google.protobuf.Value training_task_inputs = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.Value.Builder getTrainingTaskInputsBuilder() { + + onChanged(); + return getTrainingTaskInputsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The training task's parameter(s), as specified in the
+     * [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition]'s `inputs`.
+     * 
+ * + * + * .google.protobuf.Value training_task_inputs = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.ValueOrBuilder getTrainingTaskInputsOrBuilder() { + if (trainingTaskInputsBuilder_ != null) { + return trainingTaskInputsBuilder_.getMessageOrBuilder(); + } else { + return trainingTaskInputs_ == null + ? com.google.protobuf.Value.getDefaultInstance() + : trainingTaskInputs_; + } + } + /** + * + * + *
+     * Required. The training task's parameter(s), as specified in the
+     * [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition]'s `inputs`.
+     * 
+ * + * + * .google.protobuf.Value training_task_inputs = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Value, + com.google.protobuf.Value.Builder, + com.google.protobuf.ValueOrBuilder> + getTrainingTaskInputsFieldBuilder() { + if (trainingTaskInputsBuilder_ == null) { + trainingTaskInputsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Value, + com.google.protobuf.Value.Builder, + com.google.protobuf.ValueOrBuilder>( + getTrainingTaskInputs(), getParentForChildren(), isClean()); + trainingTaskInputs_ = null; + } + return trainingTaskInputsBuilder_; + } + + private com.google.protobuf.Value trainingTaskMetadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Value, + com.google.protobuf.Value.Builder, + com.google.protobuf.ValueOrBuilder> + trainingTaskMetadataBuilder_; + /** + * + * + *
+     * Output only. The metadata information as specified in the [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition]'s
+     * `metadata`. This metadata is an auxiliary runtime and final information
+     * about the training task. While the pipeline is running this information is
+     * populated only at a best effort basis. Only present if the
+     * pipeline's [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition] contains `metadata` object.
+     * 
+ * + * + * .google.protobuf.Value training_task_metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the trainingTaskMetadata field is set. + */ + public boolean hasTrainingTaskMetadata() { + return trainingTaskMetadataBuilder_ != null || trainingTaskMetadata_ != null; + } + /** + * + * + *
+     * Output only. The metadata information as specified in the [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition]'s
+     * `metadata`. This metadata is an auxiliary runtime and final information
+     * about the training task. While the pipeline is running this information is
+     * populated only at a best effort basis. Only present if the
+     * pipeline's [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition] contains `metadata` object.
+     * 
+ * + * + * .google.protobuf.Value training_task_metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The trainingTaskMetadata. + */ + public com.google.protobuf.Value getTrainingTaskMetadata() { + if (trainingTaskMetadataBuilder_ == null) { + return trainingTaskMetadata_ == null + ? com.google.protobuf.Value.getDefaultInstance() + : trainingTaskMetadata_; + } else { + return trainingTaskMetadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The metadata information as specified in the [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition]'s
+     * `metadata`. This metadata is an auxiliary runtime and final information
+     * about the training task. While the pipeline is running this information is
+     * populated only at a best effort basis. Only present if the
+     * pipeline's [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition] contains `metadata` object.
+     * 
+ * + * + * .google.protobuf.Value training_task_metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setTrainingTaskMetadata(com.google.protobuf.Value value) { + if (trainingTaskMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + trainingTaskMetadata_ = value; + onChanged(); + } else { + trainingTaskMetadataBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The metadata information as specified in the [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition]'s
+     * `metadata`. This metadata is an auxiliary runtime and final information
+     * about the training task. While the pipeline is running this information is
+     * populated only at a best effort basis. Only present if the
+     * pipeline's [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition] contains `metadata` object.
+     * 
+ * + * + * .google.protobuf.Value training_task_metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setTrainingTaskMetadata(com.google.protobuf.Value.Builder builderForValue) { + if (trainingTaskMetadataBuilder_ == null) { + trainingTaskMetadata_ = builderForValue.build(); + onChanged(); + } else { + trainingTaskMetadataBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The metadata information as specified in the [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition]'s
+     * `metadata`. This metadata is an auxiliary runtime and final information
+     * about the training task. While the pipeline is running this information is
+     * populated only at a best effort basis. Only present if the
+     * pipeline's [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition] contains `metadata` object.
+     * 
+ * + * + * .google.protobuf.Value training_task_metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeTrainingTaskMetadata(com.google.protobuf.Value value) { + if (trainingTaskMetadataBuilder_ == null) { + if (trainingTaskMetadata_ != null) { + trainingTaskMetadata_ = + com.google.protobuf.Value.newBuilder(trainingTaskMetadata_) + .mergeFrom(value) + .buildPartial(); + } else { + trainingTaskMetadata_ = value; + } + onChanged(); + } else { + trainingTaskMetadataBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The metadata information as specified in the [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition]'s
+     * `metadata`. This metadata is an auxiliary runtime and final information
+     * about the training task. While the pipeline is running this information is
+     * populated only at a best effort basis. Only present if the
+     * pipeline's [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition] contains `metadata` object.
+     * 
+ * + * + * .google.protobuf.Value training_task_metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearTrainingTaskMetadata() { + if (trainingTaskMetadataBuilder_ == null) { + trainingTaskMetadata_ = null; + onChanged(); + } else { + trainingTaskMetadata_ = null; + trainingTaskMetadataBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The metadata information as specified in the [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition]'s
+     * `metadata`. This metadata is an auxiliary runtime and final information
+     * about the training task. While the pipeline is running this information is
+     * populated only at a best effort basis. Only present if the
+     * pipeline's [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition] contains `metadata` object.
+     * 
+ * + * + * .google.protobuf.Value training_task_metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Value.Builder getTrainingTaskMetadataBuilder() { + + onChanged(); + return getTrainingTaskMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The metadata information as specified in the [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition]'s
+     * `metadata`. This metadata is an auxiliary runtime and final information
+     * about the training task. While the pipeline is running this information is
+     * populated only at a best effort basis. Only present if the
+     * pipeline's [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition] contains `metadata` object.
+     * 
+ * + * + * .google.protobuf.Value training_task_metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.ValueOrBuilder getTrainingTaskMetadataOrBuilder() { + if (trainingTaskMetadataBuilder_ != null) { + return trainingTaskMetadataBuilder_.getMessageOrBuilder(); + } else { + return trainingTaskMetadata_ == null + ? com.google.protobuf.Value.getDefaultInstance() + : trainingTaskMetadata_; + } + } + /** + * + * + *
+     * Output only. The metadata information as specified in the [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition]'s
+     * `metadata`. This metadata is an auxiliary runtime and final information
+     * about the training task. While the pipeline is running this information is
+     * populated only at a best effort basis. Only present if the
+     * pipeline's [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition] contains `metadata` object.
+     * 
+ * + * + * .google.protobuf.Value training_task_metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Value, + com.google.protobuf.Value.Builder, + com.google.protobuf.ValueOrBuilder> + getTrainingTaskMetadataFieldBuilder() { + if (trainingTaskMetadataBuilder_ == null) { + trainingTaskMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Value, + com.google.protobuf.Value.Builder, + com.google.protobuf.ValueOrBuilder>( + getTrainingTaskMetadata(), getParentForChildren(), isClean()); + trainingTaskMetadata_ = null; + } + return trainingTaskMetadataBuilder_; + } + + private com.google.cloud.aiplatform.v1.Model modelToUpload_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.Model, + com.google.cloud.aiplatform.v1.Model.Builder, + com.google.cloud.aiplatform.v1.ModelOrBuilder> + modelToUploadBuilder_; + /** + * + * + *
+     * Describes the Model that may be uploaded (via [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel])
+     * by this TrainingPipeline. The TrainingPipeline's
+     * [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition] should make clear whether this Model
+     * description should be populated, and if there are any special requirements
+     * regarding how it should be filled. If nothing is mentioned in the
+     * [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition], then it should be assumed that this field
+     * should not be filled and the training task either uploads the Model without
+     * a need of this information, or that training task does not support
+     * uploading a Model as part of the pipeline.
+     * When the Pipeline's state becomes `PIPELINE_STATE_SUCCEEDED` and
+     * the trained Model had been uploaded into AI Platform, then the
+     * model_to_upload's resource [name][google.cloud.aiplatform.v1.Model.name] is populated. The Model
+     * is always uploaded into the Project and Location in which this pipeline
+     * is.
+     * 
+ * + * .google.cloud.aiplatform.v1.Model model_to_upload = 7; + * + * @return Whether the modelToUpload field is set. + */ + public boolean hasModelToUpload() { + return modelToUploadBuilder_ != null || modelToUpload_ != null; + } + /** + * + * + *
+     * Describes the Model that may be uploaded (via [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel])
+     * by this TrainingPipeline. The TrainingPipeline's
+     * [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition] should make clear whether this Model
+     * description should be populated, and if there are any special requirements
+     * regarding how it should be filled. If nothing is mentioned in the
+     * [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition], then it should be assumed that this field
+     * should not be filled and the training task either uploads the Model without
+     * a need of this information, or that training task does not support
+     * uploading a Model as part of the pipeline.
+     * When the Pipeline's state becomes `PIPELINE_STATE_SUCCEEDED` and
+     * the trained Model had been uploaded into AI Platform, then the
+     * model_to_upload's resource [name][google.cloud.aiplatform.v1.Model.name] is populated. The Model
+     * is always uploaded into the Project and Location in which this pipeline
+     * is.
+     * 
+ * + * .google.cloud.aiplatform.v1.Model model_to_upload = 7; + * + * @return The modelToUpload. + */ + public com.google.cloud.aiplatform.v1.Model getModelToUpload() { + if (modelToUploadBuilder_ == null) { + return modelToUpload_ == null + ? com.google.cloud.aiplatform.v1.Model.getDefaultInstance() + : modelToUpload_; + } else { + return modelToUploadBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Describes the Model that may be uploaded (via [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel])
+     * by this TrainingPipeline. The TrainingPipeline's
+     * [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition] should make clear whether this Model
+     * description should be populated, and if there are any special requirements
+     * regarding how it should be filled. If nothing is mentioned in the
+     * [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition], then it should be assumed that this field
+     * should not be filled and the training task either uploads the Model without
+     * a need of this information, or that training task does not support
+     * uploading a Model as part of the pipeline.
+     * When the Pipeline's state becomes `PIPELINE_STATE_SUCCEEDED` and
+     * the trained Model had been uploaded into AI Platform, then the
+     * model_to_upload's resource [name][google.cloud.aiplatform.v1.Model.name] is populated. The Model
+     * is always uploaded into the Project and Location in which this pipeline
+     * is.
+     * 
+ * + * .google.cloud.aiplatform.v1.Model model_to_upload = 7; + */ + public Builder setModelToUpload(com.google.cloud.aiplatform.v1.Model value) { + if (modelToUploadBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + modelToUpload_ = value; + onChanged(); + } else { + modelToUploadBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Describes the Model that may be uploaded (via [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel])
+     * by this TrainingPipeline. The TrainingPipeline's
+     * [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition] should make clear whether this Model
+     * description should be populated, and if there are any special requirements
+     * regarding how it should be filled. If nothing is mentioned in the
+     * [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition], then it should be assumed that this field
+     * should not be filled and the training task either uploads the Model without
+     * a need of this information, or that training task does not support
+     * uploading a Model as part of the pipeline.
+     * When the Pipeline's state becomes `PIPELINE_STATE_SUCCEEDED` and
+     * the trained Model had been uploaded into AI Platform, then the
+     * model_to_upload's resource [name][google.cloud.aiplatform.v1.Model.name] is populated. The Model
+     * is always uploaded into the Project and Location in which this pipeline
+     * is.
+     * 
+ * + * .google.cloud.aiplatform.v1.Model model_to_upload = 7; + */ + public Builder setModelToUpload(com.google.cloud.aiplatform.v1.Model.Builder builderForValue) { + if (modelToUploadBuilder_ == null) { + modelToUpload_ = builderForValue.build(); + onChanged(); + } else { + modelToUploadBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Describes the Model that may be uploaded (via [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel])
+     * by this TrainingPipeline. The TrainingPipeline's
+     * [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition] should make clear whether this Model
+     * description should be populated, and if there are any special requirements
+     * regarding how it should be filled. If nothing is mentioned in the
+     * [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition], then it should be assumed that this field
+     * should not be filled and the training task either uploads the Model without
+     * a need of this information, or that training task does not support
+     * uploading a Model as part of the pipeline.
+     * When the Pipeline's state becomes `PIPELINE_STATE_SUCCEEDED` and
+     * the trained Model had been uploaded into AI Platform, then the
+     * model_to_upload's resource [name][google.cloud.aiplatform.v1.Model.name] is populated. The Model
+     * is always uploaded into the Project and Location in which this pipeline
+     * is.
+     * 
+ * + * .google.cloud.aiplatform.v1.Model model_to_upload = 7; + */ + public Builder mergeModelToUpload(com.google.cloud.aiplatform.v1.Model value) { + if (modelToUploadBuilder_ == null) { + if (modelToUpload_ != null) { + modelToUpload_ = + com.google.cloud.aiplatform.v1.Model.newBuilder(modelToUpload_) + .mergeFrom(value) + .buildPartial(); + } else { + modelToUpload_ = value; + } + onChanged(); + } else { + modelToUploadBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Describes the Model that may be uploaded (via [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel])
+     * by this TrainingPipeline. The TrainingPipeline's
+     * [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition] should make clear whether this Model
+     * description should be populated, and if there are any special requirements
+     * regarding how it should be filled. If nothing is mentioned in the
+     * [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition], then it should be assumed that this field
+     * should not be filled and the training task either uploads the Model without
+     * a need of this information, or that training task does not support
+     * uploading a Model as part of the pipeline.
+     * When the Pipeline's state becomes `PIPELINE_STATE_SUCCEEDED` and
+     * the trained Model had been uploaded into AI Platform, then the
+     * model_to_upload's resource [name][google.cloud.aiplatform.v1.Model.name] is populated. The Model
+     * is always uploaded into the Project and Location in which this pipeline
+     * is.
+     * 
+ * + * .google.cloud.aiplatform.v1.Model model_to_upload = 7; + */ + public Builder clearModelToUpload() { + if (modelToUploadBuilder_ == null) { + modelToUpload_ = null; + onChanged(); + } else { + modelToUpload_ = null; + modelToUploadBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Describes the Model that may be uploaded (via [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel])
+     * by this TrainingPipeline. The TrainingPipeline's
+     * [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition] should make clear whether this Model
+     * description should be populated, and if there are any special requirements
+     * regarding how it should be filled. If nothing is mentioned in the
+     * [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition], then it should be assumed that this field
+     * should not be filled and the training task either uploads the Model without
+     * a need of this information, or that training task does not support
+     * uploading a Model as part of the pipeline.
+     * When the Pipeline's state becomes `PIPELINE_STATE_SUCCEEDED` and
+     * the trained Model had been uploaded into AI Platform, then the
+     * model_to_upload's resource [name][google.cloud.aiplatform.v1.Model.name] is populated. The Model
+     * is always uploaded into the Project and Location in which this pipeline
+     * is.
+     * 
+ * + * .google.cloud.aiplatform.v1.Model model_to_upload = 7; + */ + public com.google.cloud.aiplatform.v1.Model.Builder getModelToUploadBuilder() { + + onChanged(); + return getModelToUploadFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Describes the Model that may be uploaded (via [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel])
+     * by this TrainingPipeline. The TrainingPipeline's
+     * [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition] should make clear whether this Model
+     * description should be populated, and if there are any special requirements
+     * regarding how it should be filled. If nothing is mentioned in the
+     * [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition], then it should be assumed that this field
+     * should not be filled and the training task either uploads the Model without
+     * a need of this information, or that training task does not support
+     * uploading a Model as part of the pipeline.
+     * When the Pipeline's state becomes `PIPELINE_STATE_SUCCEEDED` and
+     * the trained Model had been uploaded into AI Platform, then the
+     * model_to_upload's resource [name][google.cloud.aiplatform.v1.Model.name] is populated. The Model
+     * is always uploaded into the Project and Location in which this pipeline
+     * is.
+     * 
+ * + * .google.cloud.aiplatform.v1.Model model_to_upload = 7; + */ + public com.google.cloud.aiplatform.v1.ModelOrBuilder getModelToUploadOrBuilder() { + if (modelToUploadBuilder_ != null) { + return modelToUploadBuilder_.getMessageOrBuilder(); + } else { + return modelToUpload_ == null + ? com.google.cloud.aiplatform.v1.Model.getDefaultInstance() + : modelToUpload_; + } + } + /** + * + * + *
+     * Describes the Model that may be uploaded (via [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel])
+     * by this TrainingPipeline. The TrainingPipeline's
+     * [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition] should make clear whether this Model
+     * description should be populated, and if there are any special requirements
+     * regarding how it should be filled. If nothing is mentioned in the
+     * [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition], then it should be assumed that this field
+     * should not be filled and the training task either uploads the Model without
+     * a need of this information, or that training task does not support
+     * uploading a Model as part of the pipeline.
+     * When the Pipeline's state becomes `PIPELINE_STATE_SUCCEEDED` and
+     * the trained Model had been uploaded into AI Platform, then the
+     * model_to_upload's resource [name][google.cloud.aiplatform.v1.Model.name] is populated. The Model
+     * is always uploaded into the Project and Location in which this pipeline
+     * is.
+     * 
+ * + * .google.cloud.aiplatform.v1.Model model_to_upload = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.Model, + com.google.cloud.aiplatform.v1.Model.Builder, + com.google.cloud.aiplatform.v1.ModelOrBuilder> + getModelToUploadFieldBuilder() { + if (modelToUploadBuilder_ == null) { + modelToUploadBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.Model, + com.google.cloud.aiplatform.v1.Model.Builder, + com.google.cloud.aiplatform.v1.ModelOrBuilder>( + getModelToUpload(), getParentForChildren(), isClean()); + modelToUpload_ = null; + } + return modelToUploadBuilder_; + } + + private int state_ = 0; + /** + * + * + *
+     * Output only. The detailed state of the pipeline.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.PipelineState state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Output only. The detailed state of the pipeline.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.PipelineState state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + + state_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The detailed state of the pipeline.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.PipelineState state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.PipelineState getState() { + @SuppressWarnings("deprecation") + com.google.cloud.aiplatform.v1.PipelineState result = + com.google.cloud.aiplatform.v1.PipelineState.valueOf(state_); + return result == null ? com.google.cloud.aiplatform.v1.PipelineState.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Output only. The detailed state of the pipeline.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.PipelineState state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.aiplatform.v1.PipelineState value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The detailed state of the pipeline.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.PipelineState state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + + state_ = 0; + onChanged(); + return this; + } + + private com.google.rpc.Status error_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + errorBuilder_; + /** + * + * + *
+     * Output only. Only populated when the pipeline's state is `PIPELINE_STATE_FAILED` or
+     * `PIPELINE_STATE_CANCELLED`.
+     * 
+ * + * .google.rpc.Status error = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the error field is set. + */ + public boolean hasError() { + return errorBuilder_ != null || error_ != null; + } + /** + * + * + *
+     * Output only. Only populated when the pipeline's state is `PIPELINE_STATE_FAILED` or
+     * `PIPELINE_STATE_CANCELLED`.
+     * 
+ * + * .google.rpc.Status error = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The error. + */ + public com.google.rpc.Status getError() { + if (errorBuilder_ == null) { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } else { + return errorBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Only populated when the pipeline's state is `PIPELINE_STATE_FAILED` or
+     * `PIPELINE_STATE_CANCELLED`.
+     * 
+ * + * .google.rpc.Status error = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + error_ = value; + onChanged(); + } else { + errorBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Only populated when the pipeline's state is `PIPELINE_STATE_FAILED` or
+     * `PIPELINE_STATE_CANCELLED`.
+     * 
+ * + * .google.rpc.Status error = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setError(com.google.rpc.Status.Builder builderForValue) { + if (errorBuilder_ == null) { + error_ = builderForValue.build(); + onChanged(); + } else { + errorBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Only populated when the pipeline's state is `PIPELINE_STATE_FAILED` or
+     * `PIPELINE_STATE_CANCELLED`.
+     * 
+ * + * .google.rpc.Status error = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (error_ != null) { + error_ = com.google.rpc.Status.newBuilder(error_).mergeFrom(value).buildPartial(); + } else { + error_ = value; + } + onChanged(); + } else { + errorBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Only populated when the pipeline's state is `PIPELINE_STATE_FAILED` or
+     * `PIPELINE_STATE_CANCELLED`.
+     * 
+ * + * .google.rpc.Status error = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearError() { + if (errorBuilder_ == null) { + error_ = null; + onChanged(); + } else { + error_ = null; + errorBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Only populated when the pipeline's state is `PIPELINE_STATE_FAILED` or
+     * `PIPELINE_STATE_CANCELLED`.
+     * 
+ * + * .google.rpc.Status error = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.rpc.Status.Builder getErrorBuilder() { + + onChanged(); + return getErrorFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Only populated when the pipeline's state is `PIPELINE_STATE_FAILED` or
+     * `PIPELINE_STATE_CANCELLED`.
+     * 
+ * + * .google.rpc.Status error = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + if (errorBuilder_ != null) { + return errorBuilder_.getMessageOrBuilder(); + } else { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } + } + /** + * + * + *
+     * Output only. Only populated when the pipeline's state is `PIPELINE_STATE_FAILED` or
+     * `PIPELINE_STATE_CANCELLED`.
+     * 
+ * + * .google.rpc.Status error = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getErrorFieldBuilder() { + if (errorBuilder_ == null) { + errorBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, + com.google.rpc.Status.Builder, + com.google.rpc.StatusOrBuilder>(getError(), getParentForChildren(), isClean()); + error_ = null; + } + return errorBuilder_; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. Time when the TrainingPipeline was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * Output only. Time when the TrainingPipeline was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time when the TrainingPipeline was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the TrainingPipeline was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the TrainingPipeline was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the TrainingPipeline was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the TrainingPipeline was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time when the TrainingPipeline was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. Time when the TrainingPipeline was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + startTimeBuilder_; + /** + * + * + *
+     * Output only. Time when the TrainingPipeline for the first time entered the
+     * `PIPELINE_STATE_RUNNING` state.
+     * 
+ * + * + * .google.protobuf.Timestamp start_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return startTimeBuilder_ != null || startTime_ != null; + } + /** + * + * + *
+     * Output only. Time when the TrainingPipeline for the first time entered the
+     * `PIPELINE_STATE_RUNNING` state.
+     * 
+ * + * + * .google.protobuf.Timestamp start_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time when the TrainingPipeline for the first time entered the
+     * `PIPELINE_STATE_RUNNING` state.
+     * 
+ * + * + * .google.protobuf.Timestamp start_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + onChanged(); + } else { + startTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the TrainingPipeline for the first time entered the
+     * `PIPELINE_STATE_RUNNING` state.
+     * 
+ * + * + * .google.protobuf.Timestamp start_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + onChanged(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the TrainingPipeline for the first time entered the
+     * `PIPELINE_STATE_RUNNING` state.
+     * 
+ * + * + * .google.protobuf.Timestamp start_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (startTime_ != null) { + startTime_ = + com.google.protobuf.Timestamp.newBuilder(startTime_).mergeFrom(value).buildPartial(); + } else { + startTime_ = value; + } + onChanged(); + } else { + startTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the TrainingPipeline for the first time entered the
+     * `PIPELINE_STATE_RUNNING` state.
+     * 
+ * + * + * .google.protobuf.Timestamp start_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearStartTime() { + if (startTimeBuilder_ == null) { + startTime_ = null; + onChanged(); + } else { + startTime_ = null; + startTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the TrainingPipeline for the first time entered the
+     * `PIPELINE_STATE_RUNNING` state.
+     * 
+ * + * + * .google.protobuf.Timestamp start_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + + onChanged(); + return getStartTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time when the TrainingPipeline for the first time entered the
+     * `PIPELINE_STATE_RUNNING` state.
+     * 
+ * + * + * .google.protobuf.Timestamp start_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + } + /** + * + * + *
+     * Output only. Time when the TrainingPipeline for the first time entered the
+     * `PIPELINE_STATE_RUNNING` state.
+     * 
+ * + * + * .google.protobuf.Timestamp start_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getStartTime(), getParentForChildren(), isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + /** + * + * + *
+     * Output only. Time when the TrainingPipeline entered any of the following states:
+     * `PIPELINE_STATE_SUCCEEDED`, `PIPELINE_STATE_FAILED`,
+     * `PIPELINE_STATE_CANCELLED`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return endTimeBuilder_ != null || endTime_ != null; + } + /** + * + * + *
+     * Output only. Time when the TrainingPipeline entered any of the following states:
+     * `PIPELINE_STATE_SUCCEEDED`, `PIPELINE_STATE_FAILED`,
+     * `PIPELINE_STATE_CANCELLED`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time when the TrainingPipeline entered any of the following states:
+     * `PIPELINE_STATE_SUCCEEDED`, `PIPELINE_STATE_FAILED`,
+     * `PIPELINE_STATE_CANCELLED`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + onChanged(); + } else { + endTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the TrainingPipeline entered any of the following states:
+     * `PIPELINE_STATE_SUCCEEDED`, `PIPELINE_STATE_FAILED`,
+     * `PIPELINE_STATE_CANCELLED`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + onChanged(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the TrainingPipeline entered any of the following states:
+     * `PIPELINE_STATE_SUCCEEDED`, `PIPELINE_STATE_FAILED`,
+     * `PIPELINE_STATE_CANCELLED`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (endTime_ != null) { + endTime_ = + com.google.protobuf.Timestamp.newBuilder(endTime_).mergeFrom(value).buildPartial(); + } else { + endTime_ = value; + } + onChanged(); + } else { + endTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the TrainingPipeline entered any of the following states:
+     * `PIPELINE_STATE_SUCCEEDED`, `PIPELINE_STATE_FAILED`,
+     * `PIPELINE_STATE_CANCELLED`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearEndTime() { + if (endTimeBuilder_ == null) { + endTime_ = null; + onChanged(); + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the TrainingPipeline entered any of the following states:
+     * `PIPELINE_STATE_SUCCEEDED`, `PIPELINE_STATE_FAILED`,
+     * `PIPELINE_STATE_CANCELLED`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time when the TrainingPipeline entered any of the following states:
+     * `PIPELINE_STATE_SUCCEEDED`, `PIPELINE_STATE_FAILED`,
+     * `PIPELINE_STATE_CANCELLED`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + * + * + *
+     * Output only. Time when the TrainingPipeline entered any of the following states:
+     * `PIPELINE_STATE_SUCCEEDED`, `PIPELINE_STATE_FAILED`,
+     * `PIPELINE_STATE_CANCELLED`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. Time when the TrainingPipeline was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + * + * + *
+     * Output only. Time when the TrainingPipeline was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time when the TrainingPipeline was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the TrainingPipeline was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the TrainingPipeline was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the TrainingPipeline was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the TrainingPipeline was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time when the TrainingPipeline was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. Time when the TrainingPipeline was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + onChanged(); + ; + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * The labels with user-defined metadata to organize TrainingPipelines.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 15; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * The labels with user-defined metadata to organize TrainingPipelines.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 15; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * The labels with user-defined metadata to organize TrainingPipelines.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 15; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * The labels with user-defined metadata to organize TrainingPipelines.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 15; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * The labels with user-defined metadata to organize TrainingPipelines.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 15; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * The labels with user-defined metadata to organize TrainingPipelines.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 15; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * The labels with user-defined metadata to organize TrainingPipelines.
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 15; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + return this; + } + + private com.google.cloud.aiplatform.v1.EncryptionSpec encryptionSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.EncryptionSpec, + com.google.cloud.aiplatform.v1.EncryptionSpec.Builder, + com.google.cloud.aiplatform.v1.EncryptionSpecOrBuilder> + encryptionSpecBuilder_; + /** + * + * + *
+     * Customer-managed encryption key spec for a TrainingPipeline. If set, this
+     * TrainingPipeline will be secured by this key.
+     * Note: Model trained by this TrainingPipeline is also secured by this key if
+     * [model_to_upload][google.cloud.aiplatform.v1.TrainingPipeline.encryption_spec] is not set separately.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 18; + * + * @return Whether the encryptionSpec field is set. + */ + public boolean hasEncryptionSpec() { + return encryptionSpecBuilder_ != null || encryptionSpec_ != null; + } + /** + * + * + *
+     * Customer-managed encryption key spec for a TrainingPipeline. If set, this
+     * TrainingPipeline will be secured by this key.
+     * Note: Model trained by this TrainingPipeline is also secured by this key if
+     * [model_to_upload][google.cloud.aiplatform.v1.TrainingPipeline.encryption_spec] is not set separately.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 18; + * + * @return The encryptionSpec. + */ + public com.google.cloud.aiplatform.v1.EncryptionSpec getEncryptionSpec() { + if (encryptionSpecBuilder_ == null) { + return encryptionSpec_ == null + ? com.google.cloud.aiplatform.v1.EncryptionSpec.getDefaultInstance() + : encryptionSpec_; + } else { + return encryptionSpecBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Customer-managed encryption key spec for a TrainingPipeline. If set, this
+     * TrainingPipeline will be secured by this key.
+     * Note: Model trained by this TrainingPipeline is also secured by this key if
+     * [model_to_upload][google.cloud.aiplatform.v1.TrainingPipeline.encryption_spec] is not set separately.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 18; + */ + public Builder setEncryptionSpec(com.google.cloud.aiplatform.v1.EncryptionSpec value) { + if (encryptionSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + encryptionSpec_ = value; + onChanged(); + } else { + encryptionSpecBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Customer-managed encryption key spec for a TrainingPipeline. If set, this
+     * TrainingPipeline will be secured by this key.
+     * Note: Model trained by this TrainingPipeline is also secured by this key if
+     * [model_to_upload][google.cloud.aiplatform.v1.TrainingPipeline.encryption_spec] is not set separately.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 18; + */ + public Builder setEncryptionSpec( + com.google.cloud.aiplatform.v1.EncryptionSpec.Builder builderForValue) { + if (encryptionSpecBuilder_ == null) { + encryptionSpec_ = builderForValue.build(); + onChanged(); + } else { + encryptionSpecBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Customer-managed encryption key spec for a TrainingPipeline. If set, this
+     * TrainingPipeline will be secured by this key.
+     * Note: Model trained by this TrainingPipeline is also secured by this key if
+     * [model_to_upload][google.cloud.aiplatform.v1.TrainingPipeline.encryption_spec] is not set separately.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 18; + */ + public Builder mergeEncryptionSpec(com.google.cloud.aiplatform.v1.EncryptionSpec value) { + if (encryptionSpecBuilder_ == null) { + if (encryptionSpec_ != null) { + encryptionSpec_ = + com.google.cloud.aiplatform.v1.EncryptionSpec.newBuilder(encryptionSpec_) + .mergeFrom(value) + .buildPartial(); + } else { + encryptionSpec_ = value; + } + onChanged(); + } else { + encryptionSpecBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Customer-managed encryption key spec for a TrainingPipeline. If set, this
+     * TrainingPipeline will be secured by this key.
+     * Note: Model trained by this TrainingPipeline is also secured by this key if
+     * [model_to_upload][google.cloud.aiplatform.v1.TrainingPipeline.encryption_spec] is not set separately.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 18; + */ + public Builder clearEncryptionSpec() { + if (encryptionSpecBuilder_ == null) { + encryptionSpec_ = null; + onChanged(); + } else { + encryptionSpec_ = null; + encryptionSpecBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Customer-managed encryption key spec for a TrainingPipeline. If set, this
+     * TrainingPipeline will be secured by this key.
+     * Note: Model trained by this TrainingPipeline is also secured by this key if
+     * [model_to_upload][google.cloud.aiplatform.v1.TrainingPipeline.encryption_spec] is not set separately.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 18; + */ + public com.google.cloud.aiplatform.v1.EncryptionSpec.Builder getEncryptionSpecBuilder() { + + onChanged(); + return getEncryptionSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Customer-managed encryption key spec for a TrainingPipeline. If set, this
+     * TrainingPipeline will be secured by this key.
+     * Note: Model trained by this TrainingPipeline is also secured by this key if
+     * [model_to_upload][google.cloud.aiplatform.v1.TrainingPipeline.encryption_spec] is not set separately.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 18; + */ + public com.google.cloud.aiplatform.v1.EncryptionSpecOrBuilder getEncryptionSpecOrBuilder() { + if (encryptionSpecBuilder_ != null) { + return encryptionSpecBuilder_.getMessageOrBuilder(); + } else { + return encryptionSpec_ == null + ? com.google.cloud.aiplatform.v1.EncryptionSpec.getDefaultInstance() + : encryptionSpec_; + } + } + /** + * + * + *
+     * Customer-managed encryption key spec for a TrainingPipeline. If set, this
+     * TrainingPipeline will be secured by this key.
+     * Note: Model trained by this TrainingPipeline is also secured by this key if
+     * [model_to_upload][google.cloud.aiplatform.v1.TrainingPipeline.encryption_spec] is not set separately.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 18; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.EncryptionSpec, + com.google.cloud.aiplatform.v1.EncryptionSpec.Builder, + com.google.cloud.aiplatform.v1.EncryptionSpecOrBuilder> + getEncryptionSpecFieldBuilder() { + if (encryptionSpecBuilder_ == null) { + encryptionSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.EncryptionSpec, + com.google.cloud.aiplatform.v1.EncryptionSpec.Builder, + com.google.cloud.aiplatform.v1.EncryptionSpecOrBuilder>( + getEncryptionSpec(), getParentForChildren(), isClean()); + encryptionSpec_ = null; + } + return encryptionSpecBuilder_; + } + + @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.v1.TrainingPipeline) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.TrainingPipeline) + private static final com.google.cloud.aiplatform.v1.TrainingPipeline DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.TrainingPipeline(); + } + + public static com.google.cloud.aiplatform.v1.TrainingPipeline getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TrainingPipeline parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TrainingPipeline(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.v1.TrainingPipeline getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TrainingPipelineName.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TrainingPipelineName.java new file mode 100644 index 000000000..2d48eecad --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TrainingPipelineName.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.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class TrainingPipelineName implements ResourceName { + 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; + } + + public String getLocation() { + return location; + } + + public String getTrainingPipeline() { + return trainingPipeline; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static TrainingPipelineName of(String project, String location, String trainingPipeline) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setTrainingPipeline(trainingPipeline) + .build(); + } + + public static String format(String project, String location, String trainingPipeline) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setTrainingPipeline(trainingPipeline) + .build() + .toString(); + } + + public static TrainingPipelineName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + 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")); + } + + 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 (TrainingPipelineName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String 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(); + 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(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_TRAINING_PIPELINE.instantiate( + "project", project, "location", location, "training_pipeline", trainingPipeline); + } + + @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; + } + + public String getLocation() { + return location; + } + + public String getTrainingPipeline() { + return trainingPipeline; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setTrainingPipeline(String trainingPipeline) { + this.trainingPipeline = trainingPipeline; + return this; + } + + private Builder(TrainingPipelineName trainingPipelineName) { + project = trainingPipelineName.project; + location = trainingPipelineName.location; + trainingPipeline = trainingPipelineName.trainingPipeline; + } + + public TrainingPipelineName build() { + return new TrainingPipelineName(this); + } + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TrainingPipelineOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TrainingPipelineOrBuilder.java new file mode 100644 index 000000000..374c3ffcb --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TrainingPipelineOrBuilder.java @@ -0,0 +1,681 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/training_pipeline.proto + +package com.google.cloud.aiplatform.v1; + +public interface TrainingPipelineOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.TrainingPipeline) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Resource name of the TrainingPipeline.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. Resource name of the TrainingPipeline.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The user-defined name of this TrainingPipeline.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Required. The user-defined name of this TrainingPipeline.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Specifies AI Platform owned input data that may be used for training the
+   * Model. The TrainingPipeline's [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition] should make
+   * clear whether this config is used and if there are any special requirements
+   * on how it should be filled. If nothing about this config is mentioned in
+   * the [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition], then it should be assumed that the
+   * TrainingPipeline does not depend on this configuration.
+   * 
+ * + * .google.cloud.aiplatform.v1.InputDataConfig input_data_config = 3; + * + * @return Whether the inputDataConfig field is set. + */ + boolean hasInputDataConfig(); + /** + * + * + *
+   * Specifies AI Platform owned input data that may be used for training the
+   * Model. The TrainingPipeline's [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition] should make
+   * clear whether this config is used and if there are any special requirements
+   * on how it should be filled. If nothing about this config is mentioned in
+   * the [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition], then it should be assumed that the
+   * TrainingPipeline does not depend on this configuration.
+   * 
+ * + * .google.cloud.aiplatform.v1.InputDataConfig input_data_config = 3; + * + * @return The inputDataConfig. + */ + com.google.cloud.aiplatform.v1.InputDataConfig getInputDataConfig(); + /** + * + * + *
+   * Specifies AI Platform owned input data that may be used for training the
+   * Model. The TrainingPipeline's [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition] should make
+   * clear whether this config is used and if there are any special requirements
+   * on how it should be filled. If nothing about this config is mentioned in
+   * the [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition], then it should be assumed that the
+   * TrainingPipeline does not depend on this configuration.
+   * 
+ * + * .google.cloud.aiplatform.v1.InputDataConfig input_data_config = 3; + */ + com.google.cloud.aiplatform.v1.InputDataConfigOrBuilder getInputDataConfigOrBuilder(); + + /** + * + * + *
+   * Required. A Google Cloud Storage path to the YAML file that defines the training task
+   * which is responsible for producing the model artifact, and may also include
+   * additional auxiliary work.
+   * The definition files that can be used here are found in
+   * gs://google-cloud-aiplatform/schema/trainingjob/definition/.
+   * Note: The URI given on output will be immutable and probably different,
+   * including the URI scheme, than the one given on input. The output URI will
+   * point to a location where the user only has a read access.
+   * 
+ * + * string training_task_definition = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The trainingTaskDefinition. + */ + java.lang.String getTrainingTaskDefinition(); + /** + * + * + *
+   * Required. A Google Cloud Storage path to the YAML file that defines the training task
+   * which is responsible for producing the model artifact, and may also include
+   * additional auxiliary work.
+   * The definition files that can be used here are found in
+   * gs://google-cloud-aiplatform/schema/trainingjob/definition/.
+   * Note: The URI given on output will be immutable and probably different,
+   * including the URI scheme, than the one given on input. The output URI will
+   * point to a location where the user only has a read access.
+   * 
+ * + * string training_task_definition = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for trainingTaskDefinition. + */ + com.google.protobuf.ByteString getTrainingTaskDefinitionBytes(); + + /** + * + * + *
+   * Required. The training task's parameter(s), as specified in the
+   * [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition]'s `inputs`.
+   * 
+ * + * + * .google.protobuf.Value training_task_inputs = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the trainingTaskInputs field is set. + */ + boolean hasTrainingTaskInputs(); + /** + * + * + *
+   * Required. The training task's parameter(s), as specified in the
+   * [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition]'s `inputs`.
+   * 
+ * + * + * .google.protobuf.Value training_task_inputs = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The trainingTaskInputs. + */ + com.google.protobuf.Value getTrainingTaskInputs(); + /** + * + * + *
+   * Required. The training task's parameter(s), as specified in the
+   * [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition]'s `inputs`.
+   * 
+ * + * + * .google.protobuf.Value training_task_inputs = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.ValueOrBuilder getTrainingTaskInputsOrBuilder(); + + /** + * + * + *
+   * Output only. The metadata information as specified in the [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition]'s
+   * `metadata`. This metadata is an auxiliary runtime and final information
+   * about the training task. While the pipeline is running this information is
+   * populated only at a best effort basis. Only present if the
+   * pipeline's [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition] contains `metadata` object.
+   * 
+ * + * + * .google.protobuf.Value training_task_metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the trainingTaskMetadata field is set. + */ + boolean hasTrainingTaskMetadata(); + /** + * + * + *
+   * Output only. The metadata information as specified in the [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition]'s
+   * `metadata`. This metadata is an auxiliary runtime and final information
+   * about the training task. While the pipeline is running this information is
+   * populated only at a best effort basis. Only present if the
+   * pipeline's [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition] contains `metadata` object.
+   * 
+ * + * + * .google.protobuf.Value training_task_metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The trainingTaskMetadata. + */ + com.google.protobuf.Value getTrainingTaskMetadata(); + /** + * + * + *
+   * Output only. The metadata information as specified in the [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition]'s
+   * `metadata`. This metadata is an auxiliary runtime and final information
+   * about the training task. While the pipeline is running this information is
+   * populated only at a best effort basis. Only present if the
+   * pipeline's [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition] contains `metadata` object.
+   * 
+ * + * + * .google.protobuf.Value training_task_metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.ValueOrBuilder getTrainingTaskMetadataOrBuilder(); + + /** + * + * + *
+   * Describes the Model that may be uploaded (via [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel])
+   * by this TrainingPipeline. The TrainingPipeline's
+   * [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition] should make clear whether this Model
+   * description should be populated, and if there are any special requirements
+   * regarding how it should be filled. If nothing is mentioned in the
+   * [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition], then it should be assumed that this field
+   * should not be filled and the training task either uploads the Model without
+   * a need of this information, or that training task does not support
+   * uploading a Model as part of the pipeline.
+   * When the Pipeline's state becomes `PIPELINE_STATE_SUCCEEDED` and
+   * the trained Model had been uploaded into AI Platform, then the
+   * model_to_upload's resource [name][google.cloud.aiplatform.v1.Model.name] is populated. The Model
+   * is always uploaded into the Project and Location in which this pipeline
+   * is.
+   * 
+ * + * .google.cloud.aiplatform.v1.Model model_to_upload = 7; + * + * @return Whether the modelToUpload field is set. + */ + boolean hasModelToUpload(); + /** + * + * + *
+   * Describes the Model that may be uploaded (via [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel])
+   * by this TrainingPipeline. The TrainingPipeline's
+   * [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition] should make clear whether this Model
+   * description should be populated, and if there are any special requirements
+   * regarding how it should be filled. If nothing is mentioned in the
+   * [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition], then it should be assumed that this field
+   * should not be filled and the training task either uploads the Model without
+   * a need of this information, or that training task does not support
+   * uploading a Model as part of the pipeline.
+   * When the Pipeline's state becomes `PIPELINE_STATE_SUCCEEDED` and
+   * the trained Model had been uploaded into AI Platform, then the
+   * model_to_upload's resource [name][google.cloud.aiplatform.v1.Model.name] is populated. The Model
+   * is always uploaded into the Project and Location in which this pipeline
+   * is.
+   * 
+ * + * .google.cloud.aiplatform.v1.Model model_to_upload = 7; + * + * @return The modelToUpload. + */ + com.google.cloud.aiplatform.v1.Model getModelToUpload(); + /** + * + * + *
+   * Describes the Model that may be uploaded (via [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel])
+   * by this TrainingPipeline. The TrainingPipeline's
+   * [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition] should make clear whether this Model
+   * description should be populated, and if there are any special requirements
+   * regarding how it should be filled. If nothing is mentioned in the
+   * [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition], then it should be assumed that this field
+   * should not be filled and the training task either uploads the Model without
+   * a need of this information, or that training task does not support
+   * uploading a Model as part of the pipeline.
+   * When the Pipeline's state becomes `PIPELINE_STATE_SUCCEEDED` and
+   * the trained Model had been uploaded into AI Platform, then the
+   * model_to_upload's resource [name][google.cloud.aiplatform.v1.Model.name] is populated. The Model
+   * is always uploaded into the Project and Location in which this pipeline
+   * is.
+   * 
+ * + * .google.cloud.aiplatform.v1.Model model_to_upload = 7; + */ + com.google.cloud.aiplatform.v1.ModelOrBuilder getModelToUploadOrBuilder(); + + /** + * + * + *
+   * Output only. The detailed state of the pipeline.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.PipelineState state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Output only. The detailed state of the pipeline.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.PipelineState state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.aiplatform.v1.PipelineState getState(); + + /** + * + * + *
+   * Output only. Only populated when the pipeline's state is `PIPELINE_STATE_FAILED` or
+   * `PIPELINE_STATE_CANCELLED`.
+   * 
+ * + * .google.rpc.Status error = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the error field is set. + */ + boolean hasError(); + /** + * + * + *
+   * Output only. Only populated when the pipeline's state is `PIPELINE_STATE_FAILED` or
+   * `PIPELINE_STATE_CANCELLED`.
+   * 
+ * + * .google.rpc.Status error = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The error. + */ + com.google.rpc.Status getError(); + /** + * + * + *
+   * Output only. Only populated when the pipeline's state is `PIPELINE_STATE_FAILED` or
+   * `PIPELINE_STATE_CANCELLED`.
+   * 
+ * + * .google.rpc.Status error = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.rpc.StatusOrBuilder getErrorOrBuilder(); + + /** + * + * + *
+   * Output only. Time when the TrainingPipeline was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Time when the TrainingPipeline was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Time when the TrainingPipeline was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Time when the TrainingPipeline for the first time entered the
+   * `PIPELINE_STATE_RUNNING` state.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + /** + * + * + *
+   * Output only. Time when the TrainingPipeline for the first time entered the
+   * `PIPELINE_STATE_RUNNING` state.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + /** + * + * + *
+   * Output only. Time when the TrainingPipeline for the first time entered the
+   * `PIPELINE_STATE_RUNNING` state.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Time when the TrainingPipeline entered any of the following states:
+   * `PIPELINE_STATE_SUCCEEDED`, `PIPELINE_STATE_FAILED`,
+   * `PIPELINE_STATE_CANCELLED`.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + * + * + *
+   * Output only. Time when the TrainingPipeline entered any of the following states:
+   * `PIPELINE_STATE_SUCCEEDED`, `PIPELINE_STATE_FAILED`,
+   * `PIPELINE_STATE_CANCELLED`.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + * + * + *
+   * Output only. Time when the TrainingPipeline entered any of the following states:
+   * `PIPELINE_STATE_SUCCEEDED`, `PIPELINE_STATE_FAILED`,
+   * `PIPELINE_STATE_CANCELLED`.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Time when the TrainingPipeline was most recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. Time when the TrainingPipeline was most recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. Time when the TrainingPipeline was most recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * The labels with user-defined metadata to organize TrainingPipelines.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 15; + */ + int getLabelsCount(); + /** + * + * + *
+   * The labels with user-defined metadata to organize TrainingPipelines.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 15; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * The labels with user-defined metadata to organize TrainingPipelines.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 15; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * The labels with user-defined metadata to organize TrainingPipelines.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 15; + */ + java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * The labels with user-defined metadata to organize TrainingPipelines.
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 15; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Customer-managed encryption key spec for a TrainingPipeline. If set, this
+   * TrainingPipeline will be secured by this key.
+   * Note: Model trained by this TrainingPipeline is also secured by this key if
+   * [model_to_upload][google.cloud.aiplatform.v1.TrainingPipeline.encryption_spec] is not set separately.
+   * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 18; + * + * @return Whether the encryptionSpec field is set. + */ + boolean hasEncryptionSpec(); + /** + * + * + *
+   * Customer-managed encryption key spec for a TrainingPipeline. If set, this
+   * TrainingPipeline will be secured by this key.
+   * Note: Model trained by this TrainingPipeline is also secured by this key if
+   * [model_to_upload][google.cloud.aiplatform.v1.TrainingPipeline.encryption_spec] is not set separately.
+   * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 18; + * + * @return The encryptionSpec. + */ + com.google.cloud.aiplatform.v1.EncryptionSpec getEncryptionSpec(); + /** + * + * + *
+   * Customer-managed encryption key spec for a TrainingPipeline. If set, this
+   * TrainingPipeline will be secured by this key.
+   * Note: Model trained by this TrainingPipeline is also secured by this key if
+   * [model_to_upload][google.cloud.aiplatform.v1.TrainingPipeline.encryption_spec] is not set separately.
+   * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 18; + */ + com.google.cloud.aiplatform.v1.EncryptionSpecOrBuilder getEncryptionSpecOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TrainingPipelineProto.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TrainingPipelineProto.java new file mode 100644 index 000000000..7340a3bd9 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TrainingPipelineProto.java @@ -0,0 +1,253 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/training_pipeline.proto + +package com.google.cloud.aiplatform.v1; + +public final class TrainingPipelineProto { + private TrainingPipelineProto() {} + + 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_v1_TrainingPipeline_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_TrainingPipeline_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_TrainingPipeline_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_TrainingPipeline_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_InputDataConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_InputDataConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_FractionSplit_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_FractionSplit_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_FilterSplit_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_FilterSplit_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_PredefinedSplit_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_PredefinedSplit_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_TimestampSplit_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_TimestampSplit_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n2google/cloud/aiplatform/v1/training_pi" + + "peline.proto\022\032google.cloud.aiplatform.v1" + + "\032\037google/api/field_behavior.proto\032\031googl" + + "e/api/resource.proto\0320google/cloud/aipla" + + "tform/v1/encryption_spec.proto\032#google/c" + + "loud/aiplatform/v1/io.proto\0322google/clou" + + "d/aiplatform/v1/machine_resources.proto\032" + + "?google/cloud/aiplatform/v1/manual_batch" + + "_tuning_parameters.proto\032&google/cloud/a" + + "iplatform/v1/model.proto\032/google/cloud/a" + + "iplatform/v1/pipeline_state.proto\032\034googl" + + "e/protobuf/struct.proto\032\037google/protobuf" + + "/timestamp.proto\032\027google/rpc/status.prot" + + "o\032\034google/api/annotations.proto\"\334\007\n\020Trai" + + "ningPipeline\022\021\n\004name\030\001 \001(\tB\003\340A\003\022\031\n\014displ" + + "ay_name\030\002 \001(\tB\003\340A\002\022F\n\021input_data_config\030" + + "\003 \001(\0132+.google.cloud.aiplatform.v1.Input" + + "DataConfig\022%\n\030training_task_definition\030\004" + + " \001(\tB\003\340A\002\0229\n\024training_task_inputs\030\005 \001(\0132" + + "\026.google.protobuf.ValueB\003\340A\002\022;\n\026training" + + "_task_metadata\030\006 \001(\0132\026.google.protobuf.V" + + "alueB\003\340A\003\022:\n\017model_to_upload\030\007 \001(\0132!.goo" + + "gle.cloud.aiplatform.v1.Model\022=\n\005state\030\t" + + " \001(\0162).google.cloud.aiplatform.v1.Pipeli" + + "neStateB\003\340A\003\022&\n\005error\030\n \001(\0132\022.google.rpc" + + ".StatusB\003\340A\003\0224\n\013create_time\030\013 \001(\0132\032.goog" + + "le.protobuf.TimestampB\003\340A\003\0223\n\nstart_time" + + "\030\014 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022" + + "1\n\010end_time\030\r \001(\0132\032.google.protobuf.Time" + + "stampB\003\340A\003\0224\n\013update_time\030\016 \001(\0132\032.google" + + ".protobuf.TimestampB\003\340A\003\022H\n\006labels\030\017 \003(\013" + + "28.google.cloud.aiplatform.v1.TrainingPi" + + "peline.LabelsEntry\022C\n\017encryption_spec\030\022 " + + "\001(\0132*.google.cloud.aiplatform.v1.Encrypt" + + "ionSpec\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005v" + + "alue\030\002 \001(\t:\0028\001:~\352A{\n*aiplatform.googleap" + + "is.com/TrainingPipeline\022Mprojects/{proje" + + "ct}/locations/{location}/trainingPipelin" + + "es/{training_pipeline}\"\253\004\n\017InputDataConf" + + "ig\022C\n\016fraction_split\030\002 \001(\0132).google.clou" + + "d.aiplatform.v1.FractionSplitH\000\022?\n\014filte" + + "r_split\030\003 \001(\0132\'.google.cloud.aiplatform." + + "v1.FilterSplitH\000\022G\n\020predefined_split\030\004 \001" + + "(\0132+.google.cloud.aiplatform.v1.Predefin" + + "edSplitH\000\022E\n\017timestamp_split\030\005 \001(\0132*.goo" + + "gle.cloud.aiplatform.v1.TimestampSplitH\000" + + "\022E\n\017gcs_destination\030\010 \001(\0132*.google.cloud" + + ".aiplatform.v1.GcsDestinationH\001\022O\n\024bigqu" + + "ery_destination\030\n \001(\0132/.google.cloud.aip" + + "latform.v1.BigQueryDestinationH\001\022\027\n\ndata" + + "set_id\030\001 \001(\tB\003\340A\002\022\032\n\022annotations_filter\030" + + "\006 \001(\t\022\035\n\025annotation_schema_uri\030\t \001(\tB\007\n\005" + + "splitB\r\n\013destination\"^\n\rFractionSplit\022\031\n" + + "\021training_fraction\030\001 \001(\001\022\033\n\023validation_f" + + "raction\030\002 \001(\001\022\025\n\rtest_fraction\030\003 \001(\001\"e\n\013" + + "FilterSplit\022\034\n\017training_filter\030\001 \001(\tB\003\340A" + + "\002\022\036\n\021validation_filter\030\002 \001(\tB\003\340A\002\022\030\n\013tes" + + "t_filter\030\003 \001(\tB\003\340A\002\"#\n\017PredefinedSplit\022\020" + + "\n\003key\030\001 \001(\tB\003\340A\002\"q\n\016TimestampSplit\022\031\n\021tr" + + "aining_fraction\030\001 \001(\001\022\033\n\023validation_frac" + + "tion\030\002 \001(\001\022\025\n\rtest_fraction\030\003 \001(\001\022\020\n\003key" + + "\030\004 \001(\tB\003\340A\002B\177\n\036com.google.cloud.aiplatfo" + + "rm.v1B\025TrainingPipelineProtoP\001ZDgoogle.g" + + "olang.org/genproto/googleapis/cloud/aipl" + + "atform/v1;aiplatformb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.aiplatform.v1.EncryptionSpecProto.getDescriptor(), + com.google.cloud.aiplatform.v1.IoProto.getDescriptor(), + com.google.cloud.aiplatform.v1.MachineResourcesProto.getDescriptor(), + com.google.cloud.aiplatform.v1.ManualBatchTuningParametersProto.getDescriptor(), + com.google.cloud.aiplatform.v1.ModelProto.getDescriptor(), + com.google.cloud.aiplatform.v1.PipelineStateProto.getDescriptor(), + com.google.protobuf.StructProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.rpc.StatusProto.getDescriptor(), + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1_TrainingPipeline_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_TrainingPipeline_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_TrainingPipeline_descriptor, + new java.lang.String[] { + "Name", + "DisplayName", + "InputDataConfig", + "TrainingTaskDefinition", + "TrainingTaskInputs", + "TrainingTaskMetadata", + "ModelToUpload", + "State", + "Error", + "CreateTime", + "StartTime", + "EndTime", + "UpdateTime", + "Labels", + "EncryptionSpec", + }); + internal_static_google_cloud_aiplatform_v1_TrainingPipeline_LabelsEntry_descriptor = + internal_static_google_cloud_aiplatform_v1_TrainingPipeline_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_aiplatform_v1_TrainingPipeline_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_TrainingPipeline_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_aiplatform_v1_InputDataConfig_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_aiplatform_v1_InputDataConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_InputDataConfig_descriptor, + new java.lang.String[] { + "FractionSplit", + "FilterSplit", + "PredefinedSplit", + "TimestampSplit", + "GcsDestination", + "BigqueryDestination", + "DatasetId", + "AnnotationsFilter", + "AnnotationSchemaUri", + "Split", + "Destination", + }); + internal_static_google_cloud_aiplatform_v1_FractionSplit_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_aiplatform_v1_FractionSplit_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_FractionSplit_descriptor, + new java.lang.String[] { + "TrainingFraction", "ValidationFraction", "TestFraction", + }); + internal_static_google_cloud_aiplatform_v1_FilterSplit_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_aiplatform_v1_FilterSplit_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_FilterSplit_descriptor, + new java.lang.String[] { + "TrainingFilter", "ValidationFilter", "TestFilter", + }); + internal_static_google_cloud_aiplatform_v1_PredefinedSplit_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_aiplatform_v1_PredefinedSplit_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_PredefinedSplit_descriptor, + new java.lang.String[] { + "Key", + }); + internal_static_google_cloud_aiplatform_v1_TimestampSplit_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_aiplatform_v1_TimestampSplit_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_TimestampSplit_descriptor, + new java.lang.String[] { + "TrainingFraction", "ValidationFraction", "TestFraction", "Key", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.aiplatform.v1.EncryptionSpecProto.getDescriptor(); + com.google.cloud.aiplatform.v1.IoProto.getDescriptor(); + com.google.cloud.aiplatform.v1.MachineResourcesProto.getDescriptor(); + com.google.cloud.aiplatform.v1.ManualBatchTuningParametersProto.getDescriptor(); + com.google.cloud.aiplatform.v1.ModelProto.getDescriptor(); + com.google.cloud.aiplatform.v1.PipelineStateProto.getDescriptor(); + com.google.protobuf.StructProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.rpc.StatusProto.getDescriptor(); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/Trial.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/Trial.java new file mode 100644 index 000000000..0c276de45 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/Trial.java @@ -0,0 +1,3653 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/study.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * A message representing a Trial. A Trial contains a unique set of Parameters
+ * that has been or will be evaluated, along with the objective metrics got by
+ * running the Trial.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.Trial} + */ +public final class Trial extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.Trial) + TrialOrBuilder { + private static final long serialVersionUID = 0L; + // Use Trial.newBuilder() to construct. + private Trial(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Trial() { + id_ = ""; + state_ = 0; + parameters_ = java.util.Collections.emptyList(); + customJob_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Trial(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Trial( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + id_ = s; + break; + } + case 24: + { + int rawValue = input.readEnum(); + + state_ = rawValue; + break; + } + case 34: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + parameters_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + parameters_.add( + input.readMessage( + com.google.cloud.aiplatform.v1.Trial.Parameter.parser(), extensionRegistry)); + break; + } + case 42: + { + com.google.cloud.aiplatform.v1.Measurement.Builder subBuilder = null; + if (finalMeasurement_ != null) { + subBuilder = finalMeasurement_.toBuilder(); + } + finalMeasurement_ = + input.readMessage( + com.google.cloud.aiplatform.v1.Measurement.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(finalMeasurement_); + finalMeasurement_ = subBuilder.buildPartial(); + } + + break; + } + case 58: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (startTime_ != null) { + subBuilder = startTime_.toBuilder(); + } + startTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(startTime_); + startTime_ = subBuilder.buildPartial(); + } + + break; + } + case 66: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (endTime_ != null) { + subBuilder = endTime_.toBuilder(); + } + endTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(endTime_); + endTime_ = subBuilder.buildPartial(); + } + + break; + } + case 90: + { + java.lang.String s = input.readStringRequireUtf8(); + + customJob_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + parameters_ = java.util.Collections.unmodifiableList(parameters_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_Trial_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_Trial_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.Trial.class, + com.google.cloud.aiplatform.v1.Trial.Builder.class); + } + + /** + * + * + *
+   * Describes a Trial state.
+   * 
+ * + * Protobuf enum {@code google.cloud.aiplatform.v1.Trial.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The Trial state is unspecified.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * Indicates that a specific Trial has been requested, but it has not yet
+     * been suggested by the service.
+     * 
+ * + * REQUESTED = 1; + */ + REQUESTED(1), + /** + * + * + *
+     * Indicates that the Trial has been suggested.
+     * 
+ * + * ACTIVE = 2; + */ + ACTIVE(2), + /** + * + * + *
+     * Indicates that the Trial should stop according to the service.
+     * 
+ * + * STOPPING = 3; + */ + STOPPING(3), + /** + * + * + *
+     * Indicates that the Trial is completed successfully.
+     * 
+ * + * SUCCEEDED = 4; + */ + SUCCEEDED(4), + /** + * + * + *
+     * Indicates that the Trial should not be attempted again.
+     * The service will set a Trial to INFEASIBLE when it's done but missing
+     * the final_measurement.
+     * 
+ * + * INFEASIBLE = 5; + */ + INFEASIBLE(5), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The Trial state is unspecified.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Indicates that a specific Trial has been requested, but it has not yet
+     * been suggested by the service.
+     * 
+ * + * REQUESTED = 1; + */ + public static final int REQUESTED_VALUE = 1; + /** + * + * + *
+     * Indicates that the Trial has been suggested.
+     * 
+ * + * ACTIVE = 2; + */ + public static final int ACTIVE_VALUE = 2; + /** + * + * + *
+     * Indicates that the Trial should stop according to the service.
+     * 
+ * + * STOPPING = 3; + */ + public static final int STOPPING_VALUE = 3; + /** + * + * + *
+     * Indicates that the Trial is completed successfully.
+     * 
+ * + * SUCCEEDED = 4; + */ + public static final int SUCCEEDED_VALUE = 4; + /** + * + * + *
+     * Indicates that the Trial should not be attempted again.
+     * The service will set a Trial to INFEASIBLE when it's done but missing
+     * the final_measurement.
+     * 
+ * + * INFEASIBLE = 5; + */ + public static final int INFEASIBLE_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 State 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 State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return REQUESTED; + case 2: + return ACTIVE; + case 3: + return STOPPING; + case 4: + return SUCCEEDED; + case 5: + return INFEASIBLE; + 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 State findValueByNumber(int number) { + return State.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.v1.Trial.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State 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 State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.aiplatform.v1.Trial.State) + } + + public interface ParameterOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.Trial.Parameter) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Output only. The ID of the parameter. The parameter should be defined in
+     * [StudySpec's Parameters][google.cloud.aiplatform.v1.StudySpec.parameters].
+     * 
+ * + * string parameter_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The parameterId. + */ + java.lang.String getParameterId(); + /** + * + * + *
+     * Output only. The ID of the parameter. The parameter should be defined in
+     * [StudySpec's Parameters][google.cloud.aiplatform.v1.StudySpec.parameters].
+     * 
+ * + * string parameter_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for parameterId. + */ + com.google.protobuf.ByteString getParameterIdBytes(); + + /** + * + * + *
+     * Output only. The value of the parameter.
+     * `number_value` will be set if a parameter defined in StudySpec is
+     * in type 'INTEGER', 'DOUBLE' or 'DISCRETE'.
+     * `string_value` will be set if a parameter defined in StudySpec is
+     * in type 'CATEGORICAL'.
+     * 
+ * + * .google.protobuf.Value value = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the value field is set. + */ + boolean hasValue(); + /** + * + * + *
+     * Output only. The value of the parameter.
+     * `number_value` will be set if a parameter defined in StudySpec is
+     * in type 'INTEGER', 'DOUBLE' or 'DISCRETE'.
+     * `string_value` will be set if a parameter defined in StudySpec is
+     * in type 'CATEGORICAL'.
+     * 
+ * + * .google.protobuf.Value value = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The value. + */ + com.google.protobuf.Value getValue(); + /** + * + * + *
+     * Output only. The value of the parameter.
+     * `number_value` will be set if a parameter defined in StudySpec is
+     * in type 'INTEGER', 'DOUBLE' or 'DISCRETE'.
+     * `string_value` will be set if a parameter defined in StudySpec is
+     * in type 'CATEGORICAL'.
+     * 
+ * + * .google.protobuf.Value value = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.ValueOrBuilder getValueOrBuilder(); + } + /** + * + * + *
+   * A message representing a parameter to be tuned.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.Trial.Parameter} + */ + public static final class Parameter extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.Trial.Parameter) + ParameterOrBuilder { + private static final long serialVersionUID = 0L; + // Use Parameter.newBuilder() to construct. + private Parameter(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Parameter() { + parameterId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Parameter(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Parameter( + 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(); + + parameterId_ = s; + break; + } + case 18: + { + com.google.protobuf.Value.Builder subBuilder = null; + if (value_ != null) { + subBuilder = value_.toBuilder(); + } + value_ = input.readMessage(com.google.protobuf.Value.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(value_); + value_ = 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.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_Trial_Parameter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_Trial_Parameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.Trial.Parameter.class, + com.google.cloud.aiplatform.v1.Trial.Parameter.Builder.class); + } + + public static final int PARAMETER_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object parameterId_; + /** + * + * + *
+     * Output only. The ID of the parameter. The parameter should be defined in
+     * [StudySpec's Parameters][google.cloud.aiplatform.v1.StudySpec.parameters].
+     * 
+ * + * string parameter_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The parameterId. + */ + @java.lang.Override + public java.lang.String getParameterId() { + java.lang.Object ref = parameterId_; + 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(); + parameterId_ = s; + return s; + } + } + /** + * + * + *
+     * Output only. The ID of the parameter. The parameter should be defined in
+     * [StudySpec's Parameters][google.cloud.aiplatform.v1.StudySpec.parameters].
+     * 
+ * + * string parameter_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for parameterId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParameterIdBytes() { + java.lang.Object ref = parameterId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parameterId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALUE_FIELD_NUMBER = 2; + private com.google.protobuf.Value value_; + /** + * + * + *
+     * Output only. The value of the parameter.
+     * `number_value` will be set if a parameter defined in StudySpec is
+     * in type 'INTEGER', 'DOUBLE' or 'DISCRETE'.
+     * `string_value` will be set if a parameter defined in StudySpec is
+     * in type 'CATEGORICAL'.
+     * 
+ * + * .google.protobuf.Value value = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the value field is set. + */ + @java.lang.Override + public boolean hasValue() { + return value_ != null; + } + /** + * + * + *
+     * Output only. The value of the parameter.
+     * `number_value` will be set if a parameter defined in StudySpec is
+     * in type 'INTEGER', 'DOUBLE' or 'DISCRETE'.
+     * `string_value` will be set if a parameter defined in StudySpec is
+     * in type 'CATEGORICAL'.
+     * 
+ * + * .google.protobuf.Value value = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The value. + */ + @java.lang.Override + public com.google.protobuf.Value getValue() { + return value_ == null ? com.google.protobuf.Value.getDefaultInstance() : value_; + } + /** + * + * + *
+     * Output only. The value of the parameter.
+     * `number_value` will be set if a parameter defined in StudySpec is
+     * in type 'INTEGER', 'DOUBLE' or 'DISCRETE'.
+     * `string_value` will be set if a parameter defined in StudySpec is
+     * in type 'CATEGORICAL'.
+     * 
+ * + * .google.protobuf.Value value = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.ValueOrBuilder getValueOrBuilder() { + return getValue(); + } + + 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 (!getParameterIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parameterId_); + } + if (value_ != null) { + output.writeMessage(2, getValue()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParameterIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parameterId_); + } + if (value_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getValue()); + } + 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.v1.Trial.Parameter)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.Trial.Parameter other = + (com.google.cloud.aiplatform.v1.Trial.Parameter) obj; + + if (!getParameterId().equals(other.getParameterId())) return false; + if (hasValue() != other.hasValue()) return false; + if (hasValue()) { + if (!getValue().equals(other.getValue())) 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) + PARAMETER_ID_FIELD_NUMBER; + hash = (53 * hash) + getParameterId().hashCode(); + if (hasValue()) { + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.Trial.Parameter parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.Trial.Parameter 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.v1.Trial.Parameter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.Trial.Parameter 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.v1.Trial.Parameter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.Trial.Parameter parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.Trial.Parameter parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.Trial.Parameter 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.v1.Trial.Parameter parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.Trial.Parameter 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.v1.Trial.Parameter parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.Trial.Parameter 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.v1.Trial.Parameter 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 message representing a parameter to be tuned.
+     * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.Trial.Parameter} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.Trial.Parameter) + com.google.cloud.aiplatform.v1.Trial.ParameterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_Trial_Parameter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_Trial_Parameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.Trial.Parameter.class, + com.google.cloud.aiplatform.v1.Trial.Parameter.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.Trial.Parameter.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(); + parameterId_ = ""; + + if (valueBuilder_ == null) { + value_ = null; + } else { + value_ = null; + valueBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_Trial_Parameter_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.Trial.Parameter getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.Trial.Parameter.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.Trial.Parameter build() { + com.google.cloud.aiplatform.v1.Trial.Parameter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.Trial.Parameter buildPartial() { + com.google.cloud.aiplatform.v1.Trial.Parameter result = + new com.google.cloud.aiplatform.v1.Trial.Parameter(this); + result.parameterId_ = parameterId_; + if (valueBuilder_ == null) { + result.value_ = value_; + } else { + result.value_ = valueBuilder_.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.v1.Trial.Parameter) { + return mergeFrom((com.google.cloud.aiplatform.v1.Trial.Parameter) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.Trial.Parameter other) { + if (other == com.google.cloud.aiplatform.v1.Trial.Parameter.getDefaultInstance()) + return this; + if (!other.getParameterId().isEmpty()) { + parameterId_ = other.parameterId_; + onChanged(); + } + if (other.hasValue()) { + mergeValue(other.getValue()); + } + 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.v1.Trial.Parameter parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.aiplatform.v1.Trial.Parameter) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parameterId_ = ""; + /** + * + * + *
+       * Output only. The ID of the parameter. The parameter should be defined in
+       * [StudySpec's Parameters][google.cloud.aiplatform.v1.StudySpec.parameters].
+       * 
+ * + * string parameter_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The parameterId. + */ + public java.lang.String getParameterId() { + java.lang.Object ref = parameterId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parameterId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Output only. The ID of the parameter. The parameter should be defined in
+       * [StudySpec's Parameters][google.cloud.aiplatform.v1.StudySpec.parameters].
+       * 
+ * + * string parameter_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for parameterId. + */ + public com.google.protobuf.ByteString getParameterIdBytes() { + java.lang.Object ref = parameterId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parameterId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Output only. The ID of the parameter. The parameter should be defined in
+       * [StudySpec's Parameters][google.cloud.aiplatform.v1.StudySpec.parameters].
+       * 
+ * + * string parameter_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The parameterId to set. + * @return This builder for chaining. + */ + public Builder setParameterId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parameterId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. The ID of the parameter. The parameter should be defined in
+       * [StudySpec's Parameters][google.cloud.aiplatform.v1.StudySpec.parameters].
+       * 
+ * + * string parameter_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearParameterId() { + + parameterId_ = getDefaultInstance().getParameterId(); + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. The ID of the parameter. The parameter should be defined in
+       * [StudySpec's Parameters][google.cloud.aiplatform.v1.StudySpec.parameters].
+       * 
+ * + * string parameter_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for parameterId to set. + * @return This builder for chaining. + */ + public Builder setParameterIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parameterId_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Value value_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Value, + com.google.protobuf.Value.Builder, + com.google.protobuf.ValueOrBuilder> + valueBuilder_; + /** + * + * + *
+       * Output only. The value of the parameter.
+       * `number_value` will be set if a parameter defined in StudySpec is
+       * in type 'INTEGER', 'DOUBLE' or 'DISCRETE'.
+       * `string_value` will be set if a parameter defined in StudySpec is
+       * in type 'CATEGORICAL'.
+       * 
+ * + * .google.protobuf.Value value = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the value field is set. + */ + public boolean hasValue() { + return valueBuilder_ != null || value_ != null; + } + /** + * + * + *
+       * Output only. The value of the parameter.
+       * `number_value` will be set if a parameter defined in StudySpec is
+       * in type 'INTEGER', 'DOUBLE' or 'DISCRETE'.
+       * `string_value` will be set if a parameter defined in StudySpec is
+       * in type 'CATEGORICAL'.
+       * 
+ * + * .google.protobuf.Value value = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The value. + */ + public com.google.protobuf.Value getValue() { + if (valueBuilder_ == null) { + return value_ == null ? com.google.protobuf.Value.getDefaultInstance() : value_; + } else { + return valueBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Output only. The value of the parameter.
+       * `number_value` will be set if a parameter defined in StudySpec is
+       * in type 'INTEGER', 'DOUBLE' or 'DISCRETE'.
+       * `string_value` will be set if a parameter defined in StudySpec is
+       * in type 'CATEGORICAL'.
+       * 
+ * + * .google.protobuf.Value value = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setValue(com.google.protobuf.Value value) { + if (valueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + onChanged(); + } else { + valueBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Output only. The value of the parameter.
+       * `number_value` will be set if a parameter defined in StudySpec is
+       * in type 'INTEGER', 'DOUBLE' or 'DISCRETE'.
+       * `string_value` will be set if a parameter defined in StudySpec is
+       * in type 'CATEGORICAL'.
+       * 
+ * + * .google.protobuf.Value value = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setValue(com.google.protobuf.Value.Builder builderForValue) { + if (valueBuilder_ == null) { + value_ = builderForValue.build(); + onChanged(); + } else { + valueBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Output only. The value of the parameter.
+       * `number_value` will be set if a parameter defined in StudySpec is
+       * in type 'INTEGER', 'DOUBLE' or 'DISCRETE'.
+       * `string_value` will be set if a parameter defined in StudySpec is
+       * in type 'CATEGORICAL'.
+       * 
+ * + * .google.protobuf.Value value = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeValue(com.google.protobuf.Value value) { + if (valueBuilder_ == null) { + if (value_ != null) { + value_ = com.google.protobuf.Value.newBuilder(value_).mergeFrom(value).buildPartial(); + } else { + value_ = value; + } + onChanged(); + } else { + valueBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Output only. The value of the parameter.
+       * `number_value` will be set if a parameter defined in StudySpec is
+       * in type 'INTEGER', 'DOUBLE' or 'DISCRETE'.
+       * `string_value` will be set if a parameter defined in StudySpec is
+       * in type 'CATEGORICAL'.
+       * 
+ * + * .google.protobuf.Value value = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearValue() { + if (valueBuilder_ == null) { + value_ = null; + onChanged(); + } else { + value_ = null; + valueBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Output only. The value of the parameter.
+       * `number_value` will be set if a parameter defined in StudySpec is
+       * in type 'INTEGER', 'DOUBLE' or 'DISCRETE'.
+       * `string_value` will be set if a parameter defined in StudySpec is
+       * in type 'CATEGORICAL'.
+       * 
+ * + * .google.protobuf.Value value = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Value.Builder getValueBuilder() { + + onChanged(); + return getValueFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Output only. The value of the parameter.
+       * `number_value` will be set if a parameter defined in StudySpec is
+       * in type 'INTEGER', 'DOUBLE' or 'DISCRETE'.
+       * `string_value` will be set if a parameter defined in StudySpec is
+       * in type 'CATEGORICAL'.
+       * 
+ * + * .google.protobuf.Value value = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.ValueOrBuilder getValueOrBuilder() { + if (valueBuilder_ != null) { + return valueBuilder_.getMessageOrBuilder(); + } else { + return value_ == null ? com.google.protobuf.Value.getDefaultInstance() : value_; + } + } + /** + * + * + *
+       * Output only. The value of the parameter.
+       * `number_value` will be set if a parameter defined in StudySpec is
+       * in type 'INTEGER', 'DOUBLE' or 'DISCRETE'.
+       * `string_value` will be set if a parameter defined in StudySpec is
+       * in type 'CATEGORICAL'.
+       * 
+ * + * .google.protobuf.Value value = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Value, + com.google.protobuf.Value.Builder, + com.google.protobuf.ValueOrBuilder> + getValueFieldBuilder() { + if (valueBuilder_ == null) { + valueBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Value, + com.google.protobuf.Value.Builder, + com.google.protobuf.ValueOrBuilder>( + getValue(), getParentForChildren(), isClean()); + value_ = null; + } + return valueBuilder_; + } + + @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.v1.Trial.Parameter) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.Trial.Parameter) + private static final com.google.cloud.aiplatform.v1.Trial.Parameter DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.Trial.Parameter(); + } + + public static com.google.cloud.aiplatform.v1.Trial.Parameter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Parameter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Parameter(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.v1.Trial.Parameter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int ID_FIELD_NUMBER = 2; + private volatile java.lang.Object id_; + /** + * + * + *
+   * Output only. The identifier of the Trial assigned by the service.
+   * 
+ * + * string id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + /** + * + * + *
+   * Output only. The identifier of the Trial assigned by the service.
+   * 
+ * + * string id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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 STATE_FIELD_NUMBER = 3; + private int state_; + /** + * + * + *
+   * Output only. The detailed state of the Trial.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.Trial.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * Output only. The detailed state of the Trial.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.Trial.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.Trial.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.aiplatform.v1.Trial.State result = + com.google.cloud.aiplatform.v1.Trial.State.valueOf(state_); + return result == null ? com.google.cloud.aiplatform.v1.Trial.State.UNRECOGNIZED : result; + } + + public static final int PARAMETERS_FIELD_NUMBER = 4; + private java.util.List parameters_; + /** + * + * + *
+   * Output only. The parameters of the Trial.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Trial.Parameter parameters = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List getParametersList() { + return parameters_; + } + /** + * + * + *
+   * Output only. The parameters of the Trial.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Trial.Parameter parameters = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getParametersOrBuilderList() { + return parameters_; + } + /** + * + * + *
+   * Output only. The parameters of the Trial.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Trial.Parameter parameters = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getParametersCount() { + return parameters_.size(); + } + /** + * + * + *
+   * Output only. The parameters of the Trial.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Trial.Parameter parameters = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.Trial.Parameter getParameters(int index) { + return parameters_.get(index); + } + /** + * + * + *
+   * Output only. The parameters of the Trial.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Trial.Parameter parameters = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.Trial.ParameterOrBuilder getParametersOrBuilder(int index) { + return parameters_.get(index); + } + + public static final int FINAL_MEASUREMENT_FIELD_NUMBER = 5; + private com.google.cloud.aiplatform.v1.Measurement finalMeasurement_; + /** + * + * + *
+   * Output only. The final measurement containing the objective value.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.Measurement final_measurement = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the finalMeasurement field is set. + */ + @java.lang.Override + public boolean hasFinalMeasurement() { + return finalMeasurement_ != null; + } + /** + * + * + *
+   * Output only. The final measurement containing the objective value.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.Measurement final_measurement = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The finalMeasurement. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.Measurement getFinalMeasurement() { + return finalMeasurement_ == null + ? com.google.cloud.aiplatform.v1.Measurement.getDefaultInstance() + : finalMeasurement_; + } + /** + * + * + *
+   * Output only. The final measurement containing the objective value.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.Measurement final_measurement = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.MeasurementOrBuilder getFinalMeasurementOrBuilder() { + return getFinalMeasurement(); + } + + public static final int START_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp startTime_; + /** + * + * + *
+   * Output only. Time when the Trial was started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return startTime_ != null; + } + /** + * + * + *
+   * Output only. Time when the Trial was started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + /** + * + * + *
+   * Output only. Time when the Trial was started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return getStartTime(); + } + + public static final int END_TIME_FIELD_NUMBER = 8; + private com.google.protobuf.Timestamp endTime_; + /** + * + * + *
+   * Output only. Time when the Trial's status changed to `SUCCEEDED` or `INFEASIBLE`.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + * + * + *
+   * Output only. Time when the Trial's status changed to `SUCCEEDED` or `INFEASIBLE`.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + * + * + *
+   * Output only. Time when the Trial's status changed to `SUCCEEDED` or `INFEASIBLE`.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return getEndTime(); + } + + public static final int CUSTOM_JOB_FIELD_NUMBER = 11; + private volatile java.lang.Object customJob_; + /** + * + * + *
+   * Output only. The CustomJob name linked to the Trial.
+   * It's set for a HyperparameterTuningJob's Trial.
+   * 
+ * + * + * string custom_job = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The customJob. + */ + @java.lang.Override + public java.lang.String getCustomJob() { + java.lang.Object ref = customJob_; + 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(); + customJob_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The CustomJob name linked to the Trial.
+   * It's set for a HyperparameterTuningJob's Trial.
+   * 
+ * + * + * string custom_job = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for customJob. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCustomJobBytes() { + java.lang.Object ref = customJob_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + customJob_ = 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 (!getIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, id_); + } + if (state_ != com.google.cloud.aiplatform.v1.Trial.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(3, state_); + } + for (int i = 0; i < parameters_.size(); i++) { + output.writeMessage(4, parameters_.get(i)); + } + if (finalMeasurement_ != null) { + output.writeMessage(5, getFinalMeasurement()); + } + if (startTime_ != null) { + output.writeMessage(7, getStartTime()); + } + if (endTime_ != null) { + output.writeMessage(8, getEndTime()); + } + if (!getCustomJobBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 11, customJob_); + } + 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(2, id_); + } + if (state_ != com.google.cloud.aiplatform.v1.Trial.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, state_); + } + for (int i = 0; i < parameters_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, parameters_.get(i)); + } + if (finalMeasurement_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getFinalMeasurement()); + } + if (startTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getStartTime()); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getEndTime()); + } + if (!getCustomJobBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, customJob_); + } + 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.v1.Trial)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.Trial other = (com.google.cloud.aiplatform.v1.Trial) obj; + + if (!getId().equals(other.getId())) return false; + if (state_ != other.state_) return false; + if (!getParametersList().equals(other.getParametersList())) return false; + if (hasFinalMeasurement() != other.hasFinalMeasurement()) return false; + if (hasFinalMeasurement()) { + if (!getFinalMeasurement().equals(other.getFinalMeasurement())) return false; + } + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime().equals(other.getStartTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (!getCustomJob().equals(other.getCustomJob())) 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) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + if (getParametersCount() > 0) { + hash = (37 * hash) + PARAMETERS_FIELD_NUMBER; + hash = (53 * hash) + getParametersList().hashCode(); + } + if (hasFinalMeasurement()) { + hash = (37 * hash) + FINAL_MEASUREMENT_FIELD_NUMBER; + hash = (53 * hash) + getFinalMeasurement().hashCode(); + } + if (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (37 * hash) + CUSTOM_JOB_FIELD_NUMBER; + hash = (53 * hash) + getCustomJob().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.Trial parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.Trial 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.v1.Trial parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.Trial 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.v1.Trial parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.Trial parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.Trial parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.Trial 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.v1.Trial parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.Trial 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.v1.Trial parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.Trial 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.v1.Trial 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 message representing a Trial. A Trial contains a unique set of Parameters
+   * that has been or will be evaluated, along with the objective metrics got by
+   * running the Trial.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.Trial} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.Trial) + com.google.cloud.aiplatform.v1.TrialOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_Trial_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_Trial_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.Trial.class, + com.google.cloud.aiplatform.v1.Trial.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.Trial.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getParametersFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + id_ = ""; + + state_ = 0; + + if (parametersBuilder_ == null) { + parameters_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + parametersBuilder_.clear(); + } + if (finalMeasurementBuilder_ == null) { + finalMeasurement_ = null; + } else { + finalMeasurement_ = null; + finalMeasurementBuilder_ = null; + } + if (startTimeBuilder_ == null) { + startTime_ = null; + } else { + startTime_ = null; + startTimeBuilder_ = null; + } + if (endTimeBuilder_ == null) { + endTime_ = null; + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + customJob_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_Trial_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.Trial getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.Trial.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.Trial build() { + com.google.cloud.aiplatform.v1.Trial result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.Trial buildPartial() { + com.google.cloud.aiplatform.v1.Trial result = new com.google.cloud.aiplatform.v1.Trial(this); + int from_bitField0_ = bitField0_; + result.id_ = id_; + result.state_ = state_; + if (parametersBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + parameters_ = java.util.Collections.unmodifiableList(parameters_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.parameters_ = parameters_; + } else { + result.parameters_ = parametersBuilder_.build(); + } + if (finalMeasurementBuilder_ == null) { + result.finalMeasurement_ = finalMeasurement_; + } else { + result.finalMeasurement_ = finalMeasurementBuilder_.build(); + } + if (startTimeBuilder_ == null) { + result.startTime_ = startTime_; + } else { + result.startTime_ = startTimeBuilder_.build(); + } + if (endTimeBuilder_ == null) { + result.endTime_ = endTime_; + } else { + result.endTime_ = endTimeBuilder_.build(); + } + result.customJob_ = customJob_; + 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.v1.Trial) { + return mergeFrom((com.google.cloud.aiplatform.v1.Trial) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.Trial other) { + if (other == com.google.cloud.aiplatform.v1.Trial.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (parametersBuilder_ == null) { + if (!other.parameters_.isEmpty()) { + if (parameters_.isEmpty()) { + parameters_ = other.parameters_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureParametersIsMutable(); + parameters_.addAll(other.parameters_); + } + onChanged(); + } + } else { + if (!other.parameters_.isEmpty()) { + if (parametersBuilder_.isEmpty()) { + parametersBuilder_.dispose(); + parametersBuilder_ = null; + parameters_ = other.parameters_; + bitField0_ = (bitField0_ & ~0x00000001); + parametersBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getParametersFieldBuilder() + : null; + } else { + parametersBuilder_.addAllMessages(other.parameters_); + } + } + } + if (other.hasFinalMeasurement()) { + mergeFinalMeasurement(other.getFinalMeasurement()); + } + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (!other.getCustomJob().isEmpty()) { + customJob_ = other.customJob_; + 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.v1.Trial parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.aiplatform.v1.Trial) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + * + * + *
+     * Output only. The identifier of the Trial assigned by the service.
+     * 
+ * + * string id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + /** + * + * + *
+     * Output only. The identifier of the Trial assigned by the service.
+     * 
+ * + * string id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + /** + * + * + *
+     * Output only. The identifier of the Trial assigned by the service.
+     * 
+ * + * string id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + /** + * + * + *
+     * Output only. The identifier of the Trial assigned by the service.
+     * 
+ * + * string id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearId() { + + id_ = getDefaultInstance().getId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The identifier of the Trial assigned by the service.
+     * 
+ * + * string id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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 int state_ = 0; + /** + * + * + *
+     * Output only. The detailed state of the Trial.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Trial.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Output only. The detailed state of the Trial.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Trial.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + + state_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The detailed state of the Trial.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Trial.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.Trial.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.aiplatform.v1.Trial.State result = + com.google.cloud.aiplatform.v1.Trial.State.valueOf(state_); + return result == null ? com.google.cloud.aiplatform.v1.Trial.State.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Output only. The detailed state of the Trial.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Trial.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.aiplatform.v1.Trial.State value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The detailed state of the Trial.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Trial.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + + state_ = 0; + onChanged(); + return this; + } + + private java.util.List parameters_ = + java.util.Collections.emptyList(); + + private void ensureParametersIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + parameters_ = + new java.util.ArrayList(parameters_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.Trial.Parameter, + com.google.cloud.aiplatform.v1.Trial.Parameter.Builder, + com.google.cloud.aiplatform.v1.Trial.ParameterOrBuilder> + parametersBuilder_; + + /** + * + * + *
+     * Output only. The parameters of the Trial.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Trial.Parameter parameters = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List getParametersList() { + if (parametersBuilder_ == null) { + return java.util.Collections.unmodifiableList(parameters_); + } else { + return parametersBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Output only. The parameters of the Trial.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Trial.Parameter parameters = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getParametersCount() { + if (parametersBuilder_ == null) { + return parameters_.size(); + } else { + return parametersBuilder_.getCount(); + } + } + /** + * + * + *
+     * Output only. The parameters of the Trial.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Trial.Parameter parameters = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.Trial.Parameter getParameters(int index) { + if (parametersBuilder_ == null) { + return parameters_.get(index); + } else { + return parametersBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Output only. The parameters of the Trial.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Trial.Parameter parameters = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setParameters(int index, com.google.cloud.aiplatform.v1.Trial.Parameter value) { + if (parametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureParametersIsMutable(); + parameters_.set(index, value); + onChanged(); + } else { + parametersBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. The parameters of the Trial.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Trial.Parameter parameters = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setParameters( + int index, com.google.cloud.aiplatform.v1.Trial.Parameter.Builder builderForValue) { + if (parametersBuilder_ == null) { + ensureParametersIsMutable(); + parameters_.set(index, builderForValue.build()); + onChanged(); + } else { + parametersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. The parameters of the Trial.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Trial.Parameter parameters = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addParameters(com.google.cloud.aiplatform.v1.Trial.Parameter value) { + if (parametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureParametersIsMutable(); + parameters_.add(value); + onChanged(); + } else { + parametersBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Output only. The parameters of the Trial.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Trial.Parameter parameters = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addParameters(int index, com.google.cloud.aiplatform.v1.Trial.Parameter value) { + if (parametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureParametersIsMutable(); + parameters_.add(index, value); + onChanged(); + } else { + parametersBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. The parameters of the Trial.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Trial.Parameter parameters = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addParameters( + com.google.cloud.aiplatform.v1.Trial.Parameter.Builder builderForValue) { + if (parametersBuilder_ == null) { + ensureParametersIsMutable(); + parameters_.add(builderForValue.build()); + onChanged(); + } else { + parametersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. The parameters of the Trial.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Trial.Parameter parameters = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addParameters( + int index, com.google.cloud.aiplatform.v1.Trial.Parameter.Builder builderForValue) { + if (parametersBuilder_ == null) { + ensureParametersIsMutable(); + parameters_.add(index, builderForValue.build()); + onChanged(); + } else { + parametersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. The parameters of the Trial.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Trial.Parameter parameters = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllParameters( + java.lang.Iterable values) { + if (parametersBuilder_ == null) { + ensureParametersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, parameters_); + onChanged(); + } else { + parametersBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Output only. The parameters of the Trial.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Trial.Parameter parameters = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearParameters() { + if (parametersBuilder_ == null) { + parameters_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + parametersBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. The parameters of the Trial.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Trial.Parameter parameters = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeParameters(int index) { + if (parametersBuilder_ == null) { + ensureParametersIsMutable(); + parameters_.remove(index); + onChanged(); + } else { + parametersBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Output only. The parameters of the Trial.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Trial.Parameter parameters = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.Trial.Parameter.Builder getParametersBuilder(int index) { + return getParametersFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Output only. The parameters of the Trial.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Trial.Parameter parameters = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.Trial.ParameterOrBuilder getParametersOrBuilder( + int index) { + if (parametersBuilder_ == null) { + return parameters_.get(index); + } else { + return parametersBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Output only. The parameters of the Trial.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Trial.Parameter parameters = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getParametersOrBuilderList() { + if (parametersBuilder_ != null) { + return parametersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(parameters_); + } + } + /** + * + * + *
+     * Output only. The parameters of the Trial.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Trial.Parameter parameters = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.Trial.Parameter.Builder addParametersBuilder() { + return getParametersFieldBuilder() + .addBuilder(com.google.cloud.aiplatform.v1.Trial.Parameter.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. The parameters of the Trial.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Trial.Parameter parameters = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.Trial.Parameter.Builder addParametersBuilder(int index) { + return getParametersFieldBuilder() + .addBuilder(index, com.google.cloud.aiplatform.v1.Trial.Parameter.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. The parameters of the Trial.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Trial.Parameter parameters = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getParametersBuilderList() { + return getParametersFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.Trial.Parameter, + com.google.cloud.aiplatform.v1.Trial.Parameter.Builder, + com.google.cloud.aiplatform.v1.Trial.ParameterOrBuilder> + getParametersFieldBuilder() { + if (parametersBuilder_ == null) { + parametersBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.Trial.Parameter, + com.google.cloud.aiplatform.v1.Trial.Parameter.Builder, + com.google.cloud.aiplatform.v1.Trial.ParameterOrBuilder>( + parameters_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + parameters_ = null; + } + return parametersBuilder_; + } + + private com.google.cloud.aiplatform.v1.Measurement finalMeasurement_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.Measurement, + com.google.cloud.aiplatform.v1.Measurement.Builder, + com.google.cloud.aiplatform.v1.MeasurementOrBuilder> + finalMeasurementBuilder_; + /** + * + * + *
+     * Output only. The final measurement containing the objective value.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Measurement final_measurement = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the finalMeasurement field is set. + */ + public boolean hasFinalMeasurement() { + return finalMeasurementBuilder_ != null || finalMeasurement_ != null; + } + /** + * + * + *
+     * Output only. The final measurement containing the objective value.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Measurement final_measurement = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The finalMeasurement. + */ + public com.google.cloud.aiplatform.v1.Measurement getFinalMeasurement() { + if (finalMeasurementBuilder_ == null) { + return finalMeasurement_ == null + ? com.google.cloud.aiplatform.v1.Measurement.getDefaultInstance() + : finalMeasurement_; + } else { + return finalMeasurementBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The final measurement containing the objective value.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Measurement final_measurement = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setFinalMeasurement(com.google.cloud.aiplatform.v1.Measurement value) { + if (finalMeasurementBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + finalMeasurement_ = value; + onChanged(); + } else { + finalMeasurementBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The final measurement containing the objective value.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Measurement final_measurement = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setFinalMeasurement( + com.google.cloud.aiplatform.v1.Measurement.Builder builderForValue) { + if (finalMeasurementBuilder_ == null) { + finalMeasurement_ = builderForValue.build(); + onChanged(); + } else { + finalMeasurementBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The final measurement containing the objective value.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Measurement final_measurement = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeFinalMeasurement(com.google.cloud.aiplatform.v1.Measurement value) { + if (finalMeasurementBuilder_ == null) { + if (finalMeasurement_ != null) { + finalMeasurement_ = + com.google.cloud.aiplatform.v1.Measurement.newBuilder(finalMeasurement_) + .mergeFrom(value) + .buildPartial(); + } else { + finalMeasurement_ = value; + } + onChanged(); + } else { + finalMeasurementBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The final measurement containing the objective value.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Measurement final_measurement = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearFinalMeasurement() { + if (finalMeasurementBuilder_ == null) { + finalMeasurement_ = null; + onChanged(); + } else { + finalMeasurement_ = null; + finalMeasurementBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The final measurement containing the objective value.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Measurement final_measurement = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.Measurement.Builder getFinalMeasurementBuilder() { + + onChanged(); + return getFinalMeasurementFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The final measurement containing the objective value.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Measurement final_measurement = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.MeasurementOrBuilder getFinalMeasurementOrBuilder() { + if (finalMeasurementBuilder_ != null) { + return finalMeasurementBuilder_.getMessageOrBuilder(); + } else { + return finalMeasurement_ == null + ? com.google.cloud.aiplatform.v1.Measurement.getDefaultInstance() + : finalMeasurement_; + } + } + /** + * + * + *
+     * Output only. The final measurement containing the objective value.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Measurement final_measurement = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.Measurement, + com.google.cloud.aiplatform.v1.Measurement.Builder, + com.google.cloud.aiplatform.v1.MeasurementOrBuilder> + getFinalMeasurementFieldBuilder() { + if (finalMeasurementBuilder_ == null) { + finalMeasurementBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.Measurement, + com.google.cloud.aiplatform.v1.Measurement.Builder, + com.google.cloud.aiplatform.v1.MeasurementOrBuilder>( + getFinalMeasurement(), getParentForChildren(), isClean()); + finalMeasurement_ = null; + } + return finalMeasurementBuilder_; + } + + private com.google.protobuf.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + startTimeBuilder_; + /** + * + * + *
+     * Output only. Time when the Trial was started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return startTimeBuilder_ != null || startTime_ != null; + } + /** + * + * + *
+     * Output only. Time when the Trial was started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time when the Trial was started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + onChanged(); + } else { + startTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the Trial was started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + onChanged(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the Trial was started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (startTime_ != null) { + startTime_ = + com.google.protobuf.Timestamp.newBuilder(startTime_).mergeFrom(value).buildPartial(); + } else { + startTime_ = value; + } + onChanged(); + } else { + startTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the Trial was started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearStartTime() { + if (startTimeBuilder_ == null) { + startTime_ = null; + onChanged(); + } else { + startTime_ = null; + startTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the Trial was started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + + onChanged(); + return getStartTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time when the Trial was started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + } + /** + * + * + *
+     * Output only. Time when the Trial was started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getStartTime(), getParentForChildren(), isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + /** + * + * + *
+     * Output only. Time when the Trial's status changed to `SUCCEEDED` or `INFEASIBLE`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return endTimeBuilder_ != null || endTime_ != null; + } + /** + * + * + *
+     * Output only. Time when the Trial's status changed to `SUCCEEDED` or `INFEASIBLE`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time when the Trial's status changed to `SUCCEEDED` or `INFEASIBLE`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + onChanged(); + } else { + endTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the Trial's status changed to `SUCCEEDED` or `INFEASIBLE`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + onChanged(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the Trial's status changed to `SUCCEEDED` or `INFEASIBLE`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (endTime_ != null) { + endTime_ = + com.google.protobuf.Timestamp.newBuilder(endTime_).mergeFrom(value).buildPartial(); + } else { + endTime_ = value; + } + onChanged(); + } else { + endTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the Trial's status changed to `SUCCEEDED` or `INFEASIBLE`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearEndTime() { + if (endTimeBuilder_ == null) { + endTime_ = null; + onChanged(); + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Time when the Trial's status changed to `SUCCEEDED` or `INFEASIBLE`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time when the Trial's status changed to `SUCCEEDED` or `INFEASIBLE`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + * + * + *
+     * Output only. Time when the Trial's status changed to `SUCCEEDED` or `INFEASIBLE`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private java.lang.Object customJob_ = ""; + /** + * + * + *
+     * Output only. The CustomJob name linked to the Trial.
+     * It's set for a HyperparameterTuningJob's Trial.
+     * 
+ * + * + * string custom_job = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The customJob. + */ + public java.lang.String getCustomJob() { + java.lang.Object ref = customJob_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + customJob_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The CustomJob name linked to the Trial.
+     * It's set for a HyperparameterTuningJob's Trial.
+     * 
+ * + * + * string custom_job = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for customJob. + */ + public com.google.protobuf.ByteString getCustomJobBytes() { + java.lang.Object ref = customJob_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + customJob_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The CustomJob name linked to the Trial.
+     * It's set for a HyperparameterTuningJob's Trial.
+     * 
+ * + * + * string custom_job = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The customJob to set. + * @return This builder for chaining. + */ + public Builder setCustomJob(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + customJob_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The CustomJob name linked to the Trial.
+     * It's set for a HyperparameterTuningJob's Trial.
+     * 
+ * + * + * string custom_job = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearCustomJob() { + + customJob_ = getDefaultInstance().getCustomJob(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The CustomJob name linked to the Trial.
+     * It's set for a HyperparameterTuningJob's Trial.
+     * 
+ * + * + * string custom_job = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for customJob to set. + * @return This builder for chaining. + */ + public Builder setCustomJobBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + customJob_ = 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.v1.Trial) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.Trial) + private static final com.google.cloud.aiplatform.v1.Trial DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.Trial(); + } + + public static com.google.cloud.aiplatform.v1.Trial getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Trial parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Trial(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.v1.Trial getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TrialName.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TrialName.java new file mode 100644 index 000000000..ab0a89628 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TrialName.java @@ -0,0 +1,257 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class TrialName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_STUDY_TRIAL = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/studies/{study}/trials/{trial}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String study; + private final String trial; + + @Deprecated + protected TrialName() { + project = null; + location = null; + study = null; + trial = null; + } + + private TrialName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + study = Preconditions.checkNotNull(builder.getStudy()); + trial = Preconditions.checkNotNull(builder.getTrial()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getStudy() { + return study; + } + + public String getTrial() { + return trial; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static TrialName of(String project, String location, String study, String trial) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setStudy(study) + .setTrial(trial) + .build(); + } + + public static String format(String project, String location, String study, String trial) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setStudy(study) + .setTrial(trial) + .build() + .toString(); + } + + public static TrialName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_STUDY_TRIAL.validatedMatch( + formattedString, "TrialName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("study"), + matchMap.get("trial")); + } + + 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 (TrialName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_STUDY_TRIAL.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 (location != null) { + fieldMapBuilder.put("location", location); + } + if (study != null) { + fieldMapBuilder.put("study", study); + } + if (trial != null) { + fieldMapBuilder.put("trial", trial); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_STUDY_TRIAL.instantiate( + "project", project, "location", location, "study", study, "trial", trial); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + TrialName that = ((TrialName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.study, that.study) + && Objects.equals(this.trial, that.trial); + } + 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(study); + h *= 1000003; + h ^= Objects.hashCode(trial); + return h; + } + + /** Builder for projects/{project}/locations/{location}/studies/{study}/trials/{trial}. */ + public static class Builder { + private String project; + private String location; + private String study; + private String trial; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getStudy() { + return study; + } + + public String getTrial() { + return trial; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setStudy(String study) { + this.study = study; + return this; + } + + public Builder setTrial(String trial) { + this.trial = trial; + return this; + } + + private Builder(TrialName trialName) { + project = trialName.project; + location = trialName.location; + study = trialName.study; + trial = trialName.trial; + } + + public TrialName build() { + return new TrialName(this); + } + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TrialOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TrialOrBuilder.java new file mode 100644 index 000000000..e4e6d8d84 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/TrialOrBuilder.java @@ -0,0 +1,289 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/study.proto + +package com.google.cloud.aiplatform.v1; + +public interface TrialOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.Trial) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The identifier of the Trial assigned by the service.
+   * 
+ * + * string id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The id. + */ + java.lang.String getId(); + /** + * + * + *
+   * Output only. The identifier of the Trial assigned by the service.
+   * 
+ * + * string id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for id. + */ + com.google.protobuf.ByteString getIdBytes(); + + /** + * + * + *
+   * Output only. The detailed state of the Trial.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.Trial.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Output only. The detailed state of the Trial.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.Trial.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.aiplatform.v1.Trial.State getState(); + + /** + * + * + *
+   * Output only. The parameters of the Trial.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Trial.Parameter parameters = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getParametersList(); + /** + * + * + *
+   * Output only. The parameters of the Trial.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Trial.Parameter parameters = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1.Trial.Parameter getParameters(int index); + /** + * + * + *
+   * Output only. The parameters of the Trial.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Trial.Parameter parameters = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getParametersCount(); + /** + * + * + *
+   * Output only. The parameters of the Trial.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Trial.Parameter parameters = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getParametersOrBuilderList(); + /** + * + * + *
+   * Output only. The parameters of the Trial.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.Trial.Parameter parameters = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1.Trial.ParameterOrBuilder getParametersOrBuilder(int index); + + /** + * + * + *
+   * Output only. The final measurement containing the objective value.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.Measurement final_measurement = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the finalMeasurement field is set. + */ + boolean hasFinalMeasurement(); + /** + * + * + *
+   * Output only. The final measurement containing the objective value.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.Measurement final_measurement = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The finalMeasurement. + */ + com.google.cloud.aiplatform.v1.Measurement getFinalMeasurement(); + /** + * + * + *
+   * Output only. The final measurement containing the objective value.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.Measurement final_measurement = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1.MeasurementOrBuilder getFinalMeasurementOrBuilder(); + + /** + * + * + *
+   * Output only. Time when the Trial was started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + /** + * + * + *
+   * Output only. Time when the Trial was started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + /** + * + * + *
+   * Output only. Time when the Trial was started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Time when the Trial's status changed to `SUCCEEDED` or `INFEASIBLE`.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + * + * + *
+   * Output only. Time when the Trial's status changed to `SUCCEEDED` or `INFEASIBLE`.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + * + * + *
+   * Output only. Time when the Trial's status changed to `SUCCEEDED` or `INFEASIBLE`.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The CustomJob name linked to the Trial.
+   * It's set for a HyperparameterTuningJob's Trial.
+   * 
+ * + * + * string custom_job = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The customJob. + */ + java.lang.String getCustomJob(); + /** + * + * + *
+   * Output only. The CustomJob name linked to the Trial.
+   * It's set for a HyperparameterTuningJob's Trial.
+   * 
+ * + * + * string custom_job = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for customJob. + */ + com.google.protobuf.ByteString getCustomJobBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UndeployModelOperationMetadata.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UndeployModelOperationMetadata.java new file mode 100644 index 000000000..653fb1873 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UndeployModelOperationMetadata.java @@ -0,0 +1,746 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/endpoint_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Runtime operation information for [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.UndeployModelOperationMetadata} + */ +public final class UndeployModelOperationMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.UndeployModelOperationMetadata) + UndeployModelOperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use UndeployModelOperationMetadata.newBuilder() to construct. + private UndeployModelOperationMetadata( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UndeployModelOperationMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UndeployModelOperationMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UndeployModelOperationMetadata( + 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.v1.GenericOperationMetadata.Builder subBuilder = null; + if (genericMetadata_ != null) { + subBuilder = genericMetadata_.toBuilder(); + } + genericMetadata_ = + input.readMessage( + com.google.cloud.aiplatform.v1.GenericOperationMetadata.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(genericMetadata_); + genericMetadata_ = 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.v1.EndpointServiceProto + .internal_static_google_cloud_aiplatform_v1_UndeployModelOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.EndpointServiceProto + .internal_static_google_cloud_aiplatform_v1_UndeployModelOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.UndeployModelOperationMetadata.class, + com.google.cloud.aiplatform.v1.UndeployModelOperationMetadata.Builder.class); + } + + public static final int GENERIC_METADATA_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1.GenericOperationMetadata genericMetadata_; + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + @java.lang.Override + public boolean hasGenericMetadata() { + return genericMetadata_ != null; + } + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata() { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder() { + return getGenericMetadata(); + } + + 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 (genericMetadata_ != null) { + output.writeMessage(1, getGenericMetadata()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (genericMetadata_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getGenericMetadata()); + } + 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.v1.UndeployModelOperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.UndeployModelOperationMetadata other = + (com.google.cloud.aiplatform.v1.UndeployModelOperationMetadata) obj; + + if (hasGenericMetadata() != other.hasGenericMetadata()) return false; + if (hasGenericMetadata()) { + if (!getGenericMetadata().equals(other.getGenericMetadata())) 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 (hasGenericMetadata()) { + hash = (37 * hash) + GENERIC_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getGenericMetadata().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.UndeployModelOperationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UndeployModelOperationMetadata 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.v1.UndeployModelOperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UndeployModelOperationMetadata 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.v1.UndeployModelOperationMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UndeployModelOperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UndeployModelOperationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UndeployModelOperationMetadata 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.v1.UndeployModelOperationMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UndeployModelOperationMetadata 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.v1.UndeployModelOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UndeployModelOperationMetadata 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.v1.UndeployModelOperationMetadata 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; + } + /** + * + * + *
+   * Runtime operation information for [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.UndeployModelOperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.UndeployModelOperationMetadata) + com.google.cloud.aiplatform.v1.UndeployModelOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.EndpointServiceProto + .internal_static_google_cloud_aiplatform_v1_UndeployModelOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.EndpointServiceProto + .internal_static_google_cloud_aiplatform_v1_UndeployModelOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.UndeployModelOperationMetadata.class, + com.google.cloud.aiplatform.v1.UndeployModelOperationMetadata.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.UndeployModelOperationMetadata.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 (genericMetadataBuilder_ == null) { + genericMetadata_ = null; + } else { + genericMetadata_ = null; + genericMetadataBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.EndpointServiceProto + .internal_static_google_cloud_aiplatform_v1_UndeployModelOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UndeployModelOperationMetadata + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.UndeployModelOperationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UndeployModelOperationMetadata build() { + com.google.cloud.aiplatform.v1.UndeployModelOperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UndeployModelOperationMetadata buildPartial() { + com.google.cloud.aiplatform.v1.UndeployModelOperationMetadata result = + new com.google.cloud.aiplatform.v1.UndeployModelOperationMetadata(this); + if (genericMetadataBuilder_ == null) { + result.genericMetadata_ = genericMetadata_; + } else { + result.genericMetadata_ = genericMetadataBuilder_.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.v1.UndeployModelOperationMetadata) { + return mergeFrom((com.google.cloud.aiplatform.v1.UndeployModelOperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.UndeployModelOperationMetadata other) { + if (other + == com.google.cloud.aiplatform.v1.UndeployModelOperationMetadata.getDefaultInstance()) + return this; + if (other.hasGenericMetadata()) { + mergeGenericMetadata(other.getGenericMetadata()); + } + 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.v1.UndeployModelOperationMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.UndeployModelOperationMetadata) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.aiplatform.v1.GenericOperationMetadata genericMetadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder> + genericMetadataBuilder_; + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + public boolean hasGenericMetadata() { + return genericMetadataBuilder_ != null || genericMetadata_ != null; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata() { + if (genericMetadataBuilder_ == null) { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } else { + return genericMetadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder setGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata value) { + if (genericMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + genericMetadata_ = value; + onChanged(); + } else { + genericMetadataBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder setGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder builderForValue) { + if (genericMetadataBuilder_ == null) { + genericMetadata_ = builderForValue.build(); + onChanged(); + } else { + genericMetadataBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder mergeGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata value) { + if (genericMetadataBuilder_ == null) { + if (genericMetadata_ != null) { + genericMetadata_ = + com.google.cloud.aiplatform.v1.GenericOperationMetadata.newBuilder(genericMetadata_) + .mergeFrom(value) + .buildPartial(); + } else { + genericMetadata_ = value; + } + onChanged(); + } else { + genericMetadataBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder clearGenericMetadata() { + if (genericMetadataBuilder_ == null) { + genericMetadata_ = null; + onChanged(); + } else { + genericMetadata_ = null; + genericMetadataBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder + getGenericMetadataBuilder() { + + onChanged(); + return getGenericMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder() { + if (genericMetadataBuilder_ != null) { + return genericMetadataBuilder_.getMessageOrBuilder(); + } else { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder> + getGenericMetadataFieldBuilder() { + if (genericMetadataBuilder_ == null) { + genericMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder>( + getGenericMetadata(), getParentForChildren(), isClean()); + genericMetadata_ = null; + } + return genericMetadataBuilder_; + } + + @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.v1.UndeployModelOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.UndeployModelOperationMetadata) + private static final com.google.cloud.aiplatform.v1.UndeployModelOperationMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.UndeployModelOperationMetadata(); + } + + public static com.google.cloud.aiplatform.v1.UndeployModelOperationMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UndeployModelOperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UndeployModelOperationMetadata(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.v1.UndeployModelOperationMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UndeployModelOperationMetadataOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UndeployModelOperationMetadataOrBuilder.java new file mode 100644 index 000000000..e7f1a2449 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UndeployModelOperationMetadataOrBuilder.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/v1/endpoint_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface UndeployModelOperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.UndeployModelOperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + boolean hasGenericMetadata(); + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata(); + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder getGenericMetadataOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UndeployModelRequest.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UndeployModelRequest.java new file mode 100644 index 000000000..271b6dc61 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UndeployModelRequest.java @@ -0,0 +1,1237 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/endpoint_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.UndeployModelRequest} + */ +public final class UndeployModelRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.UndeployModelRequest) + UndeployModelRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UndeployModelRequest.newBuilder() to construct. + private UndeployModelRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UndeployModelRequest() { + endpoint_ = ""; + deployedModelId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UndeployModelRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UndeployModelRequest( + 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(); + + endpoint_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + deployedModelId_ = s; + break; + } + case 26: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + trafficSplit_ = + com.google.protobuf.MapField.newMapField( + TrafficSplitDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry trafficSplit__ = + input.readMessage( + TrafficSplitDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + trafficSplit_.getMutableMap().put(trafficSplit__.getKey(), trafficSplit__.getValue()); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.EndpointServiceProto + .internal_static_google_cloud_aiplatform_v1_UndeployModelRequest_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 3: + return internalGetTrafficSplit(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.EndpointServiceProto + .internal_static_google_cloud_aiplatform_v1_UndeployModelRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.UndeployModelRequest.class, + com.google.cloud.aiplatform.v1.UndeployModelRequest.Builder.class); + } + + public static final int ENDPOINT_FIELD_NUMBER = 1; + private volatile java.lang.Object endpoint_; + /** + * + * + *
+   * Required. The name of the Endpoint resource from which to undeploy a Model.
+   * Format:
+   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+   * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The endpoint. + */ + @java.lang.Override + public java.lang.String getEndpoint() { + java.lang.Object ref = endpoint_; + 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(); + endpoint_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the Endpoint resource from which to undeploy a Model.
+   * Format:
+   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+   * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for endpoint. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEndpointBytes() { + java.lang.Object ref = endpoint_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + endpoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEPLOYED_MODEL_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object deployedModelId_; + /** + * + * + *
+   * Required. The ID of the DeployedModel to be undeployed from the Endpoint.
+   * 
+ * + * string deployed_model_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The deployedModelId. + */ + @java.lang.Override + public java.lang.String getDeployedModelId() { + java.lang.Object ref = deployedModelId_; + 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(); + deployedModelId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The ID of the DeployedModel to be undeployed from the Endpoint.
+   * 
+ * + * string deployed_model_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for deployedModelId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDeployedModelIdBytes() { + java.lang.Object ref = deployedModelId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + deployedModelId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TRAFFIC_SPLIT_FIELD_NUMBER = 3; + + private static final class TrafficSplitDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.aiplatform.v1.EndpointServiceProto + .internal_static_google_cloud_aiplatform_v1_UndeployModelRequest_TrafficSplitEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.INT32, + 0); + } + + private com.google.protobuf.MapField trafficSplit_; + + private com.google.protobuf.MapField + internalGetTrafficSplit() { + if (trafficSplit_ == null) { + return com.google.protobuf.MapField.emptyMapField( + TrafficSplitDefaultEntryHolder.defaultEntry); + } + return trafficSplit_; + } + + public int getTrafficSplitCount() { + return internalGetTrafficSplit().getMap().size(); + } + /** + * + * + *
+   * If this field is provided, then the Endpoint's
+   * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be overwritten with it. If
+   * last DeployedModel is being undeployed from the Endpoint, the
+   * [Endpoint.traffic_split] will always end up empty when this call returns.
+   * A DeployedModel will be successfully undeployed only if it doesn't have
+   * any traffic assigned to it when this method executes, or if this field
+   * unassigns any traffic to it.
+   * 
+ * + * map<string, int32> traffic_split = 3; + */ + @java.lang.Override + public boolean containsTrafficSplit(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetTrafficSplit().getMap().containsKey(key); + } + /** Use {@link #getTrafficSplitMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getTrafficSplit() { + return getTrafficSplitMap(); + } + /** + * + * + *
+   * If this field is provided, then the Endpoint's
+   * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be overwritten with it. If
+   * last DeployedModel is being undeployed from the Endpoint, the
+   * [Endpoint.traffic_split] will always end up empty when this call returns.
+   * A DeployedModel will be successfully undeployed only if it doesn't have
+   * any traffic assigned to it when this method executes, or if this field
+   * unassigns any traffic to it.
+   * 
+ * + * map<string, int32> traffic_split = 3; + */ + @java.lang.Override + public java.util.Map getTrafficSplitMap() { + return internalGetTrafficSplit().getMap(); + } + /** + * + * + *
+   * If this field is provided, then the Endpoint's
+   * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be overwritten with it. If
+   * last DeployedModel is being undeployed from the Endpoint, the
+   * [Endpoint.traffic_split] will always end up empty when this call returns.
+   * A DeployedModel will be successfully undeployed only if it doesn't have
+   * any traffic assigned to it when this method executes, or if this field
+   * unassigns any traffic to it.
+   * 
+ * + * map<string, int32> traffic_split = 3; + */ + @java.lang.Override + public int getTrafficSplitOrDefault(java.lang.String key, int defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetTrafficSplit().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * If this field is provided, then the Endpoint's
+   * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be overwritten with it. If
+   * last DeployedModel is being undeployed from the Endpoint, the
+   * [Endpoint.traffic_split] will always end up empty when this call returns.
+   * A DeployedModel will be successfully undeployed only if it doesn't have
+   * any traffic assigned to it when this method executes, or if this field
+   * unassigns any traffic to it.
+   * 
+ * + * map<string, int32> traffic_split = 3; + */ + @java.lang.Override + public int getTrafficSplitOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetTrafficSplit().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getEndpointBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, endpoint_); + } + if (!getDeployedModelIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, deployedModelId_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetTrafficSplit(), TrafficSplitDefaultEntryHolder.defaultEntry, 3); + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getEndpointBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, endpoint_); + } + if (!getDeployedModelIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, deployedModelId_); + } + for (java.util.Map.Entry entry : + internalGetTrafficSplit().getMap().entrySet()) { + com.google.protobuf.MapEntry trafficSplit__ = + TrafficSplitDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, trafficSplit__); + } + 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.v1.UndeployModelRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.UndeployModelRequest other = + (com.google.cloud.aiplatform.v1.UndeployModelRequest) obj; + + if (!getEndpoint().equals(other.getEndpoint())) return false; + if (!getDeployedModelId().equals(other.getDeployedModelId())) return false; + if (!internalGetTrafficSplit().equals(other.internalGetTrafficSplit())) 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) + ENDPOINT_FIELD_NUMBER; + hash = (53 * hash) + getEndpoint().hashCode(); + hash = (37 * hash) + DEPLOYED_MODEL_ID_FIELD_NUMBER; + hash = (53 * hash) + getDeployedModelId().hashCode(); + if (!internalGetTrafficSplit().getMap().isEmpty()) { + hash = (37 * hash) + TRAFFIC_SPLIT_FIELD_NUMBER; + hash = (53 * hash) + internalGetTrafficSplit().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.UndeployModelRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UndeployModelRequest 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.v1.UndeployModelRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UndeployModelRequest 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.v1.UndeployModelRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UndeployModelRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UndeployModelRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UndeployModelRequest 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.v1.UndeployModelRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UndeployModelRequest 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.v1.UndeployModelRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UndeployModelRequest 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.v1.UndeployModelRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.UndeployModelRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.UndeployModelRequest) + com.google.cloud.aiplatform.v1.UndeployModelRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.EndpointServiceProto + .internal_static_google_cloud_aiplatform_v1_UndeployModelRequest_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 3: + return internalGetTrafficSplit(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 3: + return internalGetMutableTrafficSplit(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.EndpointServiceProto + .internal_static_google_cloud_aiplatform_v1_UndeployModelRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.UndeployModelRequest.class, + com.google.cloud.aiplatform.v1.UndeployModelRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.UndeployModelRequest.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(); + endpoint_ = ""; + + deployedModelId_ = ""; + + internalGetMutableTrafficSplit().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.EndpointServiceProto + .internal_static_google_cloud_aiplatform_v1_UndeployModelRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UndeployModelRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.UndeployModelRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UndeployModelRequest build() { + com.google.cloud.aiplatform.v1.UndeployModelRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UndeployModelRequest buildPartial() { + com.google.cloud.aiplatform.v1.UndeployModelRequest result = + new com.google.cloud.aiplatform.v1.UndeployModelRequest(this); + int from_bitField0_ = bitField0_; + result.endpoint_ = endpoint_; + result.deployedModelId_ = deployedModelId_; + result.trafficSplit_ = internalGetTrafficSplit(); + result.trafficSplit_.makeImmutable(); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.UndeployModelRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.UndeployModelRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.UndeployModelRequest other) { + if (other == com.google.cloud.aiplatform.v1.UndeployModelRequest.getDefaultInstance()) + return this; + if (!other.getEndpoint().isEmpty()) { + endpoint_ = other.endpoint_; + onChanged(); + } + if (!other.getDeployedModelId().isEmpty()) { + deployedModelId_ = other.deployedModelId_; + onChanged(); + } + internalGetMutableTrafficSplit().mergeFrom(other.internalGetTrafficSplit()); + 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.v1.UndeployModelRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.UndeployModelRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object endpoint_ = ""; + /** + * + * + *
+     * Required. The name of the Endpoint resource from which to undeploy a Model.
+     * Format:
+     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+     * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The endpoint. + */ + public java.lang.String getEndpoint() { + java.lang.Object ref = endpoint_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpoint_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the Endpoint resource from which to undeploy a Model.
+     * Format:
+     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+     * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for endpoint. + */ + public com.google.protobuf.ByteString getEndpointBytes() { + java.lang.Object ref = endpoint_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + endpoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the Endpoint resource from which to undeploy a Model.
+     * Format:
+     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+     * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The endpoint to set. + * @return This builder for chaining. + */ + public Builder setEndpoint(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + endpoint_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the Endpoint resource from which to undeploy a Model.
+     * Format:
+     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+     * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearEndpoint() { + + endpoint_ = getDefaultInstance().getEndpoint(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the Endpoint resource from which to undeploy a Model.
+     * Format:
+     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+     * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for endpoint to set. + * @return This builder for chaining. + */ + public Builder setEndpointBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + endpoint_ = value; + onChanged(); + return this; + } + + private java.lang.Object deployedModelId_ = ""; + /** + * + * + *
+     * Required. The ID of the DeployedModel to be undeployed from the Endpoint.
+     * 
+ * + * string deployed_model_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The deployedModelId. + */ + public java.lang.String getDeployedModelId() { + java.lang.Object ref = deployedModelId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deployedModelId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The ID of the DeployedModel to be undeployed from the Endpoint.
+     * 
+ * + * string deployed_model_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for deployedModelId. + */ + public com.google.protobuf.ByteString getDeployedModelIdBytes() { + java.lang.Object ref = deployedModelId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + deployedModelId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The ID of the DeployedModel to be undeployed from the Endpoint.
+     * 
+ * + * string deployed_model_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The deployedModelId to set. + * @return This builder for chaining. + */ + public Builder setDeployedModelId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + deployedModelId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The ID of the DeployedModel to be undeployed from the Endpoint.
+     * 
+ * + * string deployed_model_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDeployedModelId() { + + deployedModelId_ = getDefaultInstance().getDeployedModelId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The ID of the DeployedModel to be undeployed from the Endpoint.
+     * 
+ * + * string deployed_model_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for deployedModelId to set. + * @return This builder for chaining. + */ + public Builder setDeployedModelIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + deployedModelId_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.MapField trafficSplit_; + + private com.google.protobuf.MapField + internalGetTrafficSplit() { + if (trafficSplit_ == null) { + return com.google.protobuf.MapField.emptyMapField( + TrafficSplitDefaultEntryHolder.defaultEntry); + } + return trafficSplit_; + } + + private com.google.protobuf.MapField + internalGetMutableTrafficSplit() { + onChanged(); + ; + if (trafficSplit_ == null) { + trafficSplit_ = + com.google.protobuf.MapField.newMapField(TrafficSplitDefaultEntryHolder.defaultEntry); + } + if (!trafficSplit_.isMutable()) { + trafficSplit_ = trafficSplit_.copy(); + } + return trafficSplit_; + } + + public int getTrafficSplitCount() { + return internalGetTrafficSplit().getMap().size(); + } + /** + * + * + *
+     * If this field is provided, then the Endpoint's
+     * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be overwritten with it. If
+     * last DeployedModel is being undeployed from the Endpoint, the
+     * [Endpoint.traffic_split] will always end up empty when this call returns.
+     * A DeployedModel will be successfully undeployed only if it doesn't have
+     * any traffic assigned to it when this method executes, or if this field
+     * unassigns any traffic to it.
+     * 
+ * + * map<string, int32> traffic_split = 3; + */ + @java.lang.Override + public boolean containsTrafficSplit(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetTrafficSplit().getMap().containsKey(key); + } + /** Use {@link #getTrafficSplitMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getTrafficSplit() { + return getTrafficSplitMap(); + } + /** + * + * + *
+     * If this field is provided, then the Endpoint's
+     * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be overwritten with it. If
+     * last DeployedModel is being undeployed from the Endpoint, the
+     * [Endpoint.traffic_split] will always end up empty when this call returns.
+     * A DeployedModel will be successfully undeployed only if it doesn't have
+     * any traffic assigned to it when this method executes, or if this field
+     * unassigns any traffic to it.
+     * 
+ * + * map<string, int32> traffic_split = 3; + */ + @java.lang.Override + public java.util.Map getTrafficSplitMap() { + return internalGetTrafficSplit().getMap(); + } + /** + * + * + *
+     * If this field is provided, then the Endpoint's
+     * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be overwritten with it. If
+     * last DeployedModel is being undeployed from the Endpoint, the
+     * [Endpoint.traffic_split] will always end up empty when this call returns.
+     * A DeployedModel will be successfully undeployed only if it doesn't have
+     * any traffic assigned to it when this method executes, or if this field
+     * unassigns any traffic to it.
+     * 
+ * + * map<string, int32> traffic_split = 3; + */ + @java.lang.Override + public int getTrafficSplitOrDefault(java.lang.String key, int defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetTrafficSplit().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * If this field is provided, then the Endpoint's
+     * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be overwritten with it. If
+     * last DeployedModel is being undeployed from the Endpoint, the
+     * [Endpoint.traffic_split] will always end up empty when this call returns.
+     * A DeployedModel will be successfully undeployed only if it doesn't have
+     * any traffic assigned to it when this method executes, or if this field
+     * unassigns any traffic to it.
+     * 
+ * + * map<string, int32> traffic_split = 3; + */ + @java.lang.Override + public int getTrafficSplitOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetTrafficSplit().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearTrafficSplit() { + internalGetMutableTrafficSplit().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * If this field is provided, then the Endpoint's
+     * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be overwritten with it. If
+     * last DeployedModel is being undeployed from the Endpoint, the
+     * [Endpoint.traffic_split] will always end up empty when this call returns.
+     * A DeployedModel will be successfully undeployed only if it doesn't have
+     * any traffic assigned to it when this method executes, or if this field
+     * unassigns any traffic to it.
+     * 
+ * + * map<string, int32> traffic_split = 3; + */ + public Builder removeTrafficSplit(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableTrafficSplit().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableTrafficSplit() { + return internalGetMutableTrafficSplit().getMutableMap(); + } + /** + * + * + *
+     * If this field is provided, then the Endpoint's
+     * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be overwritten with it. If
+     * last DeployedModel is being undeployed from the Endpoint, the
+     * [Endpoint.traffic_split] will always end up empty when this call returns.
+     * A DeployedModel will be successfully undeployed only if it doesn't have
+     * any traffic assigned to it when this method executes, or if this field
+     * unassigns any traffic to it.
+     * 
+ * + * map<string, int32> traffic_split = 3; + */ + public Builder putTrafficSplit(java.lang.String key, int value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + + internalGetMutableTrafficSplit().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * If this field is provided, then the Endpoint's
+     * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be overwritten with it. If
+     * last DeployedModel is being undeployed from the Endpoint, the
+     * [Endpoint.traffic_split] will always end up empty when this call returns.
+     * A DeployedModel will be successfully undeployed only if it doesn't have
+     * any traffic assigned to it when this method executes, or if this field
+     * unassigns any traffic to it.
+     * 
+ * + * map<string, int32> traffic_split = 3; + */ + public Builder putAllTrafficSplit(java.util.Map values) { + internalGetMutableTrafficSplit().getMutableMap().putAll(values); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.UndeployModelRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.UndeployModelRequest) + private static final com.google.cloud.aiplatform.v1.UndeployModelRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.UndeployModelRequest(); + } + + public static com.google.cloud.aiplatform.v1.UndeployModelRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UndeployModelRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UndeployModelRequest(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.v1.UndeployModelRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UndeployModelRequestOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UndeployModelRequestOrBuilder.java new file mode 100644 index 000000000..72faca9b1 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UndeployModelRequestOrBuilder.java @@ -0,0 +1,167 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/endpoint_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface UndeployModelRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.UndeployModelRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the Endpoint resource from which to undeploy a Model.
+   * Format:
+   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+   * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The endpoint. + */ + java.lang.String getEndpoint(); + /** + * + * + *
+   * Required. The name of the Endpoint resource from which to undeploy a Model.
+   * Format:
+   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+   * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for endpoint. + */ + com.google.protobuf.ByteString getEndpointBytes(); + + /** + * + * + *
+   * Required. The ID of the DeployedModel to be undeployed from the Endpoint.
+   * 
+ * + * string deployed_model_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The deployedModelId. + */ + java.lang.String getDeployedModelId(); + /** + * + * + *
+   * Required. The ID of the DeployedModel to be undeployed from the Endpoint.
+   * 
+ * + * string deployed_model_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for deployedModelId. + */ + com.google.protobuf.ByteString getDeployedModelIdBytes(); + + /** + * + * + *
+   * If this field is provided, then the Endpoint's
+   * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be overwritten with it. If
+   * last DeployedModel is being undeployed from the Endpoint, the
+   * [Endpoint.traffic_split] will always end up empty when this call returns.
+   * A DeployedModel will be successfully undeployed only if it doesn't have
+   * any traffic assigned to it when this method executes, or if this field
+   * unassigns any traffic to it.
+   * 
+ * + * map<string, int32> traffic_split = 3; + */ + int getTrafficSplitCount(); + /** + * + * + *
+   * If this field is provided, then the Endpoint's
+   * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be overwritten with it. If
+   * last DeployedModel is being undeployed from the Endpoint, the
+   * [Endpoint.traffic_split] will always end up empty when this call returns.
+   * A DeployedModel will be successfully undeployed only if it doesn't have
+   * any traffic assigned to it when this method executes, or if this field
+   * unassigns any traffic to it.
+   * 
+ * + * map<string, int32> traffic_split = 3; + */ + boolean containsTrafficSplit(java.lang.String key); + /** Use {@link #getTrafficSplitMap()} instead. */ + @java.lang.Deprecated + java.util.Map getTrafficSplit(); + /** + * + * + *
+   * If this field is provided, then the Endpoint's
+   * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be overwritten with it. If
+   * last DeployedModel is being undeployed from the Endpoint, the
+   * [Endpoint.traffic_split] will always end up empty when this call returns.
+   * A DeployedModel will be successfully undeployed only if it doesn't have
+   * any traffic assigned to it when this method executes, or if this field
+   * unassigns any traffic to it.
+   * 
+ * + * map<string, int32> traffic_split = 3; + */ + java.util.Map getTrafficSplitMap(); + /** + * + * + *
+   * If this field is provided, then the Endpoint's
+   * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be overwritten with it. If
+   * last DeployedModel is being undeployed from the Endpoint, the
+   * [Endpoint.traffic_split] will always end up empty when this call returns.
+   * A DeployedModel will be successfully undeployed only if it doesn't have
+   * any traffic assigned to it when this method executes, or if this field
+   * unassigns any traffic to it.
+   * 
+ * + * map<string, int32> traffic_split = 3; + */ + int getTrafficSplitOrDefault(java.lang.String key, int defaultValue); + /** + * + * + *
+   * If this field is provided, then the Endpoint's
+   * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be overwritten with it. If
+   * last DeployedModel is being undeployed from the Endpoint, the
+   * [Endpoint.traffic_split] will always end up empty when this call returns.
+   * A DeployedModel will be successfully undeployed only if it doesn't have
+   * any traffic assigned to it when this method executes, or if this field
+   * unassigns any traffic to it.
+   * 
+ * + * map<string, int32> traffic_split = 3; + */ + int getTrafficSplitOrThrow(java.lang.String key); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UndeployModelResponse.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UndeployModelResponse.java new file mode 100644 index 000000000..219222a70 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UndeployModelResponse.java @@ -0,0 +1,456 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/endpoint_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Response message for [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.UndeployModelResponse} + */ +public final class UndeployModelResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.UndeployModelResponse) + UndeployModelResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use UndeployModelResponse.newBuilder() to construct. + private UndeployModelResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UndeployModelResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UndeployModelResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UndeployModelResponse( + 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.v1.EndpointServiceProto + .internal_static_google_cloud_aiplatform_v1_UndeployModelResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.EndpointServiceProto + .internal_static_google_cloud_aiplatform_v1_UndeployModelResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.UndeployModelResponse.class, + com.google.cloud.aiplatform.v1.UndeployModelResponse.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.v1.UndeployModelResponse)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.UndeployModelResponse other = + (com.google.cloud.aiplatform.v1.UndeployModelResponse) 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.v1.UndeployModelResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UndeployModelResponse 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.v1.UndeployModelResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UndeployModelResponse 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.v1.UndeployModelResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UndeployModelResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UndeployModelResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UndeployModelResponse 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.v1.UndeployModelResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UndeployModelResponse 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.v1.UndeployModelResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UndeployModelResponse 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.v1.UndeployModelResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.UndeployModelResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.UndeployModelResponse) + com.google.cloud.aiplatform.v1.UndeployModelResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.EndpointServiceProto + .internal_static_google_cloud_aiplatform_v1_UndeployModelResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.EndpointServiceProto + .internal_static_google_cloud_aiplatform_v1_UndeployModelResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.UndeployModelResponse.class, + com.google.cloud.aiplatform.v1.UndeployModelResponse.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.UndeployModelResponse.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.v1.EndpointServiceProto + .internal_static_google_cloud_aiplatform_v1_UndeployModelResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UndeployModelResponse getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.UndeployModelResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UndeployModelResponse build() { + com.google.cloud.aiplatform.v1.UndeployModelResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UndeployModelResponse buildPartial() { + com.google.cloud.aiplatform.v1.UndeployModelResponse result = + new com.google.cloud.aiplatform.v1.UndeployModelResponse(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.v1.UndeployModelResponse) { + return mergeFrom((com.google.cloud.aiplatform.v1.UndeployModelResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.UndeployModelResponse other) { + if (other == com.google.cloud.aiplatform.v1.UndeployModelResponse.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.v1.UndeployModelResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.UndeployModelResponse) 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.v1.UndeployModelResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.UndeployModelResponse) + private static final com.google.cloud.aiplatform.v1.UndeployModelResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.UndeployModelResponse(); + } + + public static com.google.cloud.aiplatform.v1.UndeployModelResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UndeployModelResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UndeployModelResponse(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.v1.UndeployModelResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UndeployModelResponseOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UndeployModelResponseOrBuilder.java new file mode 100644 index 000000000..f7b6b4eec --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UndeployModelResponseOrBuilder.java @@ -0,0 +1,24 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/endpoint_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface UndeployModelResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.UndeployModelResponse) + com.google.protobuf.MessageOrBuilder {} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateDatasetRequest.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateDatasetRequest.java new file mode 100644 index 000000000..2dd4843b2 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateDatasetRequest.java @@ -0,0 +1,1113 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/dataset_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for [DatasetService.UpdateDataset][google.cloud.aiplatform.v1.DatasetService.UpdateDataset].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.UpdateDatasetRequest} + */ +public final class UpdateDatasetRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.UpdateDatasetRequest) + UpdateDatasetRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateDatasetRequest.newBuilder() to construct. + private UpdateDatasetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateDatasetRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateDatasetRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateDatasetRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + 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.v1.Dataset.Builder subBuilder = null; + if (dataset_ != null) { + subBuilder = dataset_.toBuilder(); + } + dataset_ = + input.readMessage( + com.google.cloud.aiplatform.v1.Dataset.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(dataset_); + dataset_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (updateMask_ != null) { + subBuilder = updateMask_.toBuilder(); + } + updateMask_ = + input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateMask_); + updateMask_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_UpdateDatasetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_UpdateDatasetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.UpdateDatasetRequest.class, + com.google.cloud.aiplatform.v1.UpdateDatasetRequest.Builder.class); + } + + public static final int DATASET_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1.Dataset dataset_; + /** + * + * + *
+   * Required. The Dataset which replaces the resource on the server.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.Dataset dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the dataset field is set. + */ + @java.lang.Override + public boolean hasDataset() { + return dataset_ != null; + } + /** + * + * + *
+   * Required. The Dataset which replaces the resource on the server.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.Dataset dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dataset. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.Dataset getDataset() { + return dataset_ == null + ? com.google.cloud.aiplatform.v1.Dataset.getDefaultInstance() + : dataset_; + } + /** + * + * + *
+   * Required. The Dataset which replaces the resource on the server.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.Dataset dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.DatasetOrBuilder getDatasetOrBuilder() { + return getDataset(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Required. The update mask applies to the resource.
+   * For the `FieldMask` definition, see
+   * [FieldMask](https://tinyurl.com/protobufs/google.protobuf#fieldmask).
+   * Updatable fields:
+   *   * `display_name`
+   *   * `description`
+   *   * `labels`
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Required. The update mask applies to the resource.
+   * For the `FieldMask` definition, see
+   * [FieldMask](https://tinyurl.com/protobufs/google.protobuf#fieldmask).
+   * Updatable fields:
+   *   * `display_name`
+   *   * `description`
+   *   * `labels`
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Required. The update mask applies to the resource.
+   * For the `FieldMask` definition, see
+   * [FieldMask](https://tinyurl.com/protobufs/google.protobuf#fieldmask).
+   * Updatable fields:
+   *   * `display_name`
+   *   * `description`
+   *   * `labels`
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (dataset_ != null) { + output.writeMessage(1, getDataset()); + } + if (updateMask_ != null) { + output.writeMessage(2, getUpdateMask()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (dataset_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getDataset()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.UpdateDatasetRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.UpdateDatasetRequest other = + (com.google.cloud.aiplatform.v1.UpdateDatasetRequest) obj; + + if (hasDataset() != other.hasDataset()) return false; + if (hasDataset()) { + if (!getDataset().equals(other.getDataset())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasDataset()) { + hash = (37 * hash) + DATASET_FIELD_NUMBER; + hash = (53 * hash) + getDataset().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.UpdateDatasetRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UpdateDatasetRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UpdateDatasetRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UpdateDatasetRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UpdateDatasetRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UpdateDatasetRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UpdateDatasetRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UpdateDatasetRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UpdateDatasetRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UpdateDatasetRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UpdateDatasetRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UpdateDatasetRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1.UpdateDatasetRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [DatasetService.UpdateDataset][google.cloud.aiplatform.v1.DatasetService.UpdateDataset].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.UpdateDatasetRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.UpdateDatasetRequest) + com.google.cloud.aiplatform.v1.UpdateDatasetRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_UpdateDatasetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_UpdateDatasetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.UpdateDatasetRequest.class, + com.google.cloud.aiplatform.v1.UpdateDatasetRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.UpdateDatasetRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (datasetBuilder_ == null) { + dataset_ = null; + } else { + dataset_ = null; + datasetBuilder_ = null; + } + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.DatasetServiceProto + .internal_static_google_cloud_aiplatform_v1_UpdateDatasetRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UpdateDatasetRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.UpdateDatasetRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UpdateDatasetRequest build() { + com.google.cloud.aiplatform.v1.UpdateDatasetRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UpdateDatasetRequest buildPartial() { + com.google.cloud.aiplatform.v1.UpdateDatasetRequest result = + new com.google.cloud.aiplatform.v1.UpdateDatasetRequest(this); + if (datasetBuilder_ == null) { + result.dataset_ = dataset_; + } else { + result.dataset_ = datasetBuilder_.build(); + } + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.UpdateDatasetRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.UpdateDatasetRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.UpdateDatasetRequest other) { + if (other == com.google.cloud.aiplatform.v1.UpdateDatasetRequest.getDefaultInstance()) + return this; + if (other.hasDataset()) { + mergeDataset(other.getDataset()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.aiplatform.v1.UpdateDatasetRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.UpdateDatasetRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.aiplatform.v1.Dataset dataset_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.Dataset, + com.google.cloud.aiplatform.v1.Dataset.Builder, + com.google.cloud.aiplatform.v1.DatasetOrBuilder> + datasetBuilder_; + /** + * + * + *
+     * Required. The Dataset which replaces the resource on the server.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Dataset dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the dataset field is set. + */ + public boolean hasDataset() { + return datasetBuilder_ != null || dataset_ != null; + } + /** + * + * + *
+     * Required. The Dataset which replaces the resource on the server.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Dataset dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dataset. + */ + public com.google.cloud.aiplatform.v1.Dataset getDataset() { + if (datasetBuilder_ == null) { + return dataset_ == null + ? com.google.cloud.aiplatform.v1.Dataset.getDefaultInstance() + : dataset_; + } else { + return datasetBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The Dataset which replaces the resource on the server.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Dataset dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDataset(com.google.cloud.aiplatform.v1.Dataset value) { + if (datasetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dataset_ = value; + onChanged(); + } else { + datasetBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The Dataset which replaces the resource on the server.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Dataset dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDataset(com.google.cloud.aiplatform.v1.Dataset.Builder builderForValue) { + if (datasetBuilder_ == null) { + dataset_ = builderForValue.build(); + onChanged(); + } else { + datasetBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The Dataset which replaces the resource on the server.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Dataset dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeDataset(com.google.cloud.aiplatform.v1.Dataset value) { + if (datasetBuilder_ == null) { + if (dataset_ != null) { + dataset_ = + com.google.cloud.aiplatform.v1.Dataset.newBuilder(dataset_) + .mergeFrom(value) + .buildPartial(); + } else { + dataset_ = value; + } + onChanged(); + } else { + datasetBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The Dataset which replaces the resource on the server.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Dataset dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearDataset() { + if (datasetBuilder_ == null) { + dataset_ = null; + onChanged(); + } else { + dataset_ = null; + datasetBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The Dataset which replaces the resource on the server.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Dataset dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.Dataset.Builder getDatasetBuilder() { + + onChanged(); + return getDatasetFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The Dataset which replaces the resource on the server.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Dataset dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.DatasetOrBuilder getDatasetOrBuilder() { + if (datasetBuilder_ != null) { + return datasetBuilder_.getMessageOrBuilder(); + } else { + return dataset_ == null + ? com.google.cloud.aiplatform.v1.Dataset.getDefaultInstance() + : dataset_; + } + } + /** + * + * + *
+     * Required. The Dataset which replaces the resource on the server.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Dataset dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.Dataset, + com.google.cloud.aiplatform.v1.Dataset.Builder, + com.google.cloud.aiplatform.v1.DatasetOrBuilder> + getDatasetFieldBuilder() { + if (datasetBuilder_ == null) { + datasetBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.Dataset, + com.google.cloud.aiplatform.v1.Dataset.Builder, + com.google.cloud.aiplatform.v1.DatasetOrBuilder>( + getDataset(), getParentForChildren(), isClean()); + dataset_ = null; + } + return datasetBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * Required. The update mask applies to the resource.
+     * For the `FieldMask` definition, see
+     * [FieldMask](https://tinyurl.com/protobufs/google.protobuf#fieldmask).
+     * Updatable fields:
+     *   * `display_name`
+     *   * `description`
+     *   * `labels`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + * + * + *
+     * Required. The update mask applies to the resource.
+     * For the `FieldMask` definition, see
+     * [FieldMask](https://tinyurl.com/protobufs/google.protobuf#fieldmask).
+     * Updatable fields:
+     *   * `display_name`
+     *   * `description`
+     *   * `labels`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The update mask applies to the resource.
+     * For the `FieldMask` definition, see
+     * [FieldMask](https://tinyurl.com/protobufs/google.protobuf#fieldmask).
+     * Updatable fields:
+     *   * `display_name`
+     *   * `description`
+     *   * `labels`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The update mask applies to the resource.
+     * For the `FieldMask` definition, see
+     * [FieldMask](https://tinyurl.com/protobufs/google.protobuf#fieldmask).
+     * Updatable fields:
+     *   * `display_name`
+     *   * `description`
+     *   * `labels`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The update mask applies to the resource.
+     * For the `FieldMask` definition, see
+     * [FieldMask](https://tinyurl.com/protobufs/google.protobuf#fieldmask).
+     * Updatable fields:
+     *   * `display_name`
+     *   * `description`
+     *   * `labels`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The update mask applies to the resource.
+     * For the `FieldMask` definition, see
+     * [FieldMask](https://tinyurl.com/protobufs/google.protobuf#fieldmask).
+     * Updatable fields:
+     *   * `display_name`
+     *   * `description`
+     *   * `labels`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The update mask applies to the resource.
+     * For the `FieldMask` definition, see
+     * [FieldMask](https://tinyurl.com/protobufs/google.protobuf#fieldmask).
+     * Updatable fields:
+     *   * `display_name`
+     *   * `description`
+     *   * `labels`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The update mask applies to the resource.
+     * For the `FieldMask` definition, see
+     * [FieldMask](https://tinyurl.com/protobufs/google.protobuf#fieldmask).
+     * Updatable fields:
+     *   * `display_name`
+     *   * `description`
+     *   * `labels`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Required. The update mask applies to the resource.
+     * For the `FieldMask` definition, see
+     * [FieldMask](https://tinyurl.com/protobufs/google.protobuf#fieldmask).
+     * Updatable fields:
+     *   * `display_name`
+     *   * `description`
+     *   * `labels`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.UpdateDatasetRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.UpdateDatasetRequest) + private static final com.google.cloud.aiplatform.v1.UpdateDatasetRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.UpdateDatasetRequest(); + } + + public static com.google.cloud.aiplatform.v1.UpdateDatasetRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateDatasetRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateDatasetRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UpdateDatasetRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateDatasetRequestOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateDatasetRequestOrBuilder.java new file mode 100644 index 000000000..83ebde2b1 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateDatasetRequestOrBuilder.java @@ -0,0 +1,122 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/dataset_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface UpdateDatasetRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.UpdateDatasetRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The Dataset which replaces the resource on the server.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.Dataset dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the dataset field is set. + */ + boolean hasDataset(); + /** + * + * + *
+   * Required. The Dataset which replaces the resource on the server.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.Dataset dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dataset. + */ + com.google.cloud.aiplatform.v1.Dataset getDataset(); + /** + * + * + *
+   * Required. The Dataset which replaces the resource on the server.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.Dataset dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1.DatasetOrBuilder getDatasetOrBuilder(); + + /** + * + * + *
+   * Required. The update mask applies to the resource.
+   * For the `FieldMask` definition, see
+   * [FieldMask](https://tinyurl.com/protobufs/google.protobuf#fieldmask).
+   * Updatable fields:
+   *   * `display_name`
+   *   * `description`
+   *   * `labels`
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Required. The update mask applies to the resource.
+   * For the `FieldMask` definition, see
+   * [FieldMask](https://tinyurl.com/protobufs/google.protobuf#fieldmask).
+   * Updatable fields:
+   *   * `display_name`
+   *   * `description`
+   *   * `labels`
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Required. The update mask applies to the resource.
+   * For the `FieldMask` definition, see
+   * [FieldMask](https://tinyurl.com/protobufs/google.protobuf#fieldmask).
+   * Updatable fields:
+   *   * `display_name`
+   *   * `description`
+   *   * `labels`
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateEndpointRequest.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateEndpointRequest.java new file mode 100644 index 000000000..70f11891f --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateEndpointRequest.java @@ -0,0 +1,1065 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/endpoint_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for [EndpointService.UpdateEndpoint][google.cloud.aiplatform.v1.EndpointService.UpdateEndpoint].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.UpdateEndpointRequest} + */ +public final class UpdateEndpointRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.UpdateEndpointRequest) + UpdateEndpointRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateEndpointRequest.newBuilder() to construct. + private UpdateEndpointRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateEndpointRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateEndpointRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateEndpointRequest( + 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.v1.Endpoint.Builder subBuilder = null; + if (endpoint_ != null) { + subBuilder = endpoint_.toBuilder(); + } + endpoint_ = + input.readMessage( + com.google.cloud.aiplatform.v1.Endpoint.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(endpoint_); + endpoint_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (updateMask_ != null) { + subBuilder = updateMask_.toBuilder(); + } + updateMask_ = + input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateMask_); + updateMask_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.EndpointServiceProto + .internal_static_google_cloud_aiplatform_v1_UpdateEndpointRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.EndpointServiceProto + .internal_static_google_cloud_aiplatform_v1_UpdateEndpointRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.UpdateEndpointRequest.class, + com.google.cloud.aiplatform.v1.UpdateEndpointRequest.Builder.class); + } + + public static final int ENDPOINT_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1.Endpoint endpoint_; + /** + * + * + *
+   * Required. The Endpoint which replaces the resource on the server.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.Endpoint endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the endpoint field is set. + */ + @java.lang.Override + public boolean hasEndpoint() { + return endpoint_ != null; + } + /** + * + * + *
+   * Required. The Endpoint which replaces the resource on the server.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.Endpoint endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The endpoint. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.Endpoint getEndpoint() { + return endpoint_ == null + ? com.google.cloud.aiplatform.v1.Endpoint.getDefaultInstance() + : endpoint_; + } + /** + * + * + *
+   * Required. The Endpoint which replaces the resource on the server.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.Endpoint endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.EndpointOrBuilder getEndpointOrBuilder() { + return getEndpoint(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Required. The update mask applies to the resource.
+   * See
+   * [FieldMask](https://tinyurl.com/protobufs/google.protobuf#fieldmask).
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Required. The update mask applies to the resource.
+   * See
+   * [FieldMask](https://tinyurl.com/protobufs/google.protobuf#fieldmask).
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Required. The update mask applies to the resource.
+   * See
+   * [FieldMask](https://tinyurl.com/protobufs/google.protobuf#fieldmask).
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (endpoint_ != null) { + output.writeMessage(1, getEndpoint()); + } + if (updateMask_ != null) { + output.writeMessage(2, getUpdateMask()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (endpoint_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getEndpoint()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.UpdateEndpointRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.UpdateEndpointRequest other = + (com.google.cloud.aiplatform.v1.UpdateEndpointRequest) obj; + + if (hasEndpoint() != other.hasEndpoint()) return false; + if (hasEndpoint()) { + if (!getEndpoint().equals(other.getEndpoint())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasEndpoint()) { + hash = (37 * hash) + ENDPOINT_FIELD_NUMBER; + hash = (53 * hash) + getEndpoint().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.UpdateEndpointRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UpdateEndpointRequest 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.v1.UpdateEndpointRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UpdateEndpointRequest 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.v1.UpdateEndpointRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UpdateEndpointRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UpdateEndpointRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UpdateEndpointRequest 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.v1.UpdateEndpointRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UpdateEndpointRequest 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.v1.UpdateEndpointRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UpdateEndpointRequest 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.v1.UpdateEndpointRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [EndpointService.UpdateEndpoint][google.cloud.aiplatform.v1.EndpointService.UpdateEndpoint].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.UpdateEndpointRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.UpdateEndpointRequest) + com.google.cloud.aiplatform.v1.UpdateEndpointRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.EndpointServiceProto + .internal_static_google_cloud_aiplatform_v1_UpdateEndpointRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.EndpointServiceProto + .internal_static_google_cloud_aiplatform_v1_UpdateEndpointRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.UpdateEndpointRequest.class, + com.google.cloud.aiplatform.v1.UpdateEndpointRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.UpdateEndpointRequest.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 (endpointBuilder_ == null) { + endpoint_ = null; + } else { + endpoint_ = null; + endpointBuilder_ = null; + } + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.EndpointServiceProto + .internal_static_google_cloud_aiplatform_v1_UpdateEndpointRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UpdateEndpointRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.UpdateEndpointRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UpdateEndpointRequest build() { + com.google.cloud.aiplatform.v1.UpdateEndpointRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UpdateEndpointRequest buildPartial() { + com.google.cloud.aiplatform.v1.UpdateEndpointRequest result = + new com.google.cloud.aiplatform.v1.UpdateEndpointRequest(this); + if (endpointBuilder_ == null) { + result.endpoint_ = endpoint_; + } else { + result.endpoint_ = endpointBuilder_.build(); + } + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.UpdateEndpointRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.UpdateEndpointRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.UpdateEndpointRequest other) { + if (other == com.google.cloud.aiplatform.v1.UpdateEndpointRequest.getDefaultInstance()) + return this; + if (other.hasEndpoint()) { + mergeEndpoint(other.getEndpoint()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.aiplatform.v1.UpdateEndpointRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.UpdateEndpointRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.aiplatform.v1.Endpoint endpoint_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.Endpoint, + com.google.cloud.aiplatform.v1.Endpoint.Builder, + com.google.cloud.aiplatform.v1.EndpointOrBuilder> + endpointBuilder_; + /** + * + * + *
+     * Required. The Endpoint which replaces the resource on the server.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Endpoint endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the endpoint field is set. + */ + public boolean hasEndpoint() { + return endpointBuilder_ != null || endpoint_ != null; + } + /** + * + * + *
+     * Required. The Endpoint which replaces the resource on the server.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Endpoint endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The endpoint. + */ + public com.google.cloud.aiplatform.v1.Endpoint getEndpoint() { + if (endpointBuilder_ == null) { + return endpoint_ == null + ? com.google.cloud.aiplatform.v1.Endpoint.getDefaultInstance() + : endpoint_; + } else { + return endpointBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The Endpoint which replaces the resource on the server.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Endpoint endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setEndpoint(com.google.cloud.aiplatform.v1.Endpoint value) { + if (endpointBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endpoint_ = value; + onChanged(); + } else { + endpointBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The Endpoint which replaces the resource on the server.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Endpoint endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setEndpoint(com.google.cloud.aiplatform.v1.Endpoint.Builder builderForValue) { + if (endpointBuilder_ == null) { + endpoint_ = builderForValue.build(); + onChanged(); + } else { + endpointBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The Endpoint which replaces the resource on the server.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Endpoint endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeEndpoint(com.google.cloud.aiplatform.v1.Endpoint value) { + if (endpointBuilder_ == null) { + if (endpoint_ != null) { + endpoint_ = + com.google.cloud.aiplatform.v1.Endpoint.newBuilder(endpoint_) + .mergeFrom(value) + .buildPartial(); + } else { + endpoint_ = value; + } + onChanged(); + } else { + endpointBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The Endpoint which replaces the resource on the server.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Endpoint endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearEndpoint() { + if (endpointBuilder_ == null) { + endpoint_ = null; + onChanged(); + } else { + endpoint_ = null; + endpointBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The Endpoint which replaces the resource on the server.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Endpoint endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.Endpoint.Builder getEndpointBuilder() { + + onChanged(); + return getEndpointFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The Endpoint which replaces the resource on the server.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Endpoint endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.EndpointOrBuilder getEndpointOrBuilder() { + if (endpointBuilder_ != null) { + return endpointBuilder_.getMessageOrBuilder(); + } else { + return endpoint_ == null + ? com.google.cloud.aiplatform.v1.Endpoint.getDefaultInstance() + : endpoint_; + } + } + /** + * + * + *
+     * Required. The Endpoint which replaces the resource on the server.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Endpoint endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.Endpoint, + com.google.cloud.aiplatform.v1.Endpoint.Builder, + com.google.cloud.aiplatform.v1.EndpointOrBuilder> + getEndpointFieldBuilder() { + if (endpointBuilder_ == null) { + endpointBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.Endpoint, + com.google.cloud.aiplatform.v1.Endpoint.Builder, + com.google.cloud.aiplatform.v1.EndpointOrBuilder>( + getEndpoint(), getParentForChildren(), isClean()); + endpoint_ = null; + } + return endpointBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * Required. The update mask applies to the resource.
+     * See
+     * [FieldMask](https://tinyurl.com/protobufs/google.protobuf#fieldmask).
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + * + * + *
+     * Required. The update mask applies to the resource.
+     * See
+     * [FieldMask](https://tinyurl.com/protobufs/google.protobuf#fieldmask).
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The update mask applies to the resource.
+     * See
+     * [FieldMask](https://tinyurl.com/protobufs/google.protobuf#fieldmask).
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The update mask applies to the resource.
+     * See
+     * [FieldMask](https://tinyurl.com/protobufs/google.protobuf#fieldmask).
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The update mask applies to the resource.
+     * See
+     * [FieldMask](https://tinyurl.com/protobufs/google.protobuf#fieldmask).
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The update mask applies to the resource.
+     * See
+     * [FieldMask](https://tinyurl.com/protobufs/google.protobuf#fieldmask).
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The update mask applies to the resource.
+     * See
+     * [FieldMask](https://tinyurl.com/protobufs/google.protobuf#fieldmask).
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The update mask applies to the resource.
+     * See
+     * [FieldMask](https://tinyurl.com/protobufs/google.protobuf#fieldmask).
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Required. The update mask applies to the resource.
+     * See
+     * [FieldMask](https://tinyurl.com/protobufs/google.protobuf#fieldmask).
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.UpdateEndpointRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.UpdateEndpointRequest) + private static final com.google.cloud.aiplatform.v1.UpdateEndpointRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.UpdateEndpointRequest(); + } + + public static com.google.cloud.aiplatform.v1.UpdateEndpointRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateEndpointRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateEndpointRequest(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.v1.UpdateEndpointRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateEndpointRequestOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateEndpointRequestOrBuilder.java new file mode 100644 index 000000000..b6d586a46 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateEndpointRequestOrBuilder.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/v1/endpoint_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface UpdateEndpointRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.UpdateEndpointRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The Endpoint which replaces the resource on the server.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.Endpoint endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the endpoint field is set. + */ + boolean hasEndpoint(); + /** + * + * + *
+   * Required. The Endpoint which replaces the resource on the server.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.Endpoint endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The endpoint. + */ + com.google.cloud.aiplatform.v1.Endpoint getEndpoint(); + /** + * + * + *
+   * Required. The Endpoint which replaces the resource on the server.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.Endpoint endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1.EndpointOrBuilder getEndpointOrBuilder(); + + /** + * + * + *
+   * Required. The update mask applies to the resource.
+   * See
+   * [FieldMask](https://tinyurl.com/protobufs/google.protobuf#fieldmask).
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Required. The update mask applies to the resource.
+   * See
+   * [FieldMask](https://tinyurl.com/protobufs/google.protobuf#fieldmask).
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Required. The update mask applies to the resource.
+   * See
+   * [FieldMask](https://tinyurl.com/protobufs/google.protobuf#fieldmask).
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateModelRequest.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateModelRequest.java new file mode 100644 index 000000000..cfd088171 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateModelRequest.java @@ -0,0 +1,1047 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/model_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for [ModelService.UpdateModel][google.cloud.aiplatform.v1.ModelService.UpdateModel].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.UpdateModelRequest} + */ +public final class UpdateModelRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.UpdateModelRequest) + UpdateModelRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateModelRequest.newBuilder() to construct. + private UpdateModelRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateModelRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateModelRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateModelRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + 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.v1.Model.Builder subBuilder = null; + if (model_ != null) { + subBuilder = model_.toBuilder(); + } + model_ = + input.readMessage( + com.google.cloud.aiplatform.v1.Model.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(model_); + model_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (updateMask_ != null) { + subBuilder = updateMask_.toBuilder(); + } + updateMask_ = + input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateMask_); + updateMask_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_UpdateModelRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_UpdateModelRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.UpdateModelRequest.class, + com.google.cloud.aiplatform.v1.UpdateModelRequest.Builder.class); + } + + public static final int MODEL_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1.Model model_; + /** + * + * + *
+   * Required. The Model which replaces the resource on the server.
+   * 
+ * + * .google.cloud.aiplatform.v1.Model model = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the model field is set. + */ + @java.lang.Override + public boolean hasModel() { + return model_ != null; + } + /** + * + * + *
+   * Required. The Model which replaces the resource on the server.
+   * 
+ * + * .google.cloud.aiplatform.v1.Model model = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The model. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.Model getModel() { + return model_ == null ? com.google.cloud.aiplatform.v1.Model.getDefaultInstance() : model_; + } + /** + * + * + *
+   * Required. The Model which replaces the resource on the server.
+   * 
+ * + * .google.cloud.aiplatform.v1.Model model = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ModelOrBuilder getModelOrBuilder() { + return getModel(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Required. The update mask applies to the resource.
+   * For the `FieldMask` definition, see
+   * [FieldMask](https://tinyurl.com/protobufs/google.protobuf#fieldmask).
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Required. The update mask applies to the resource.
+   * For the `FieldMask` definition, see
+   * [FieldMask](https://tinyurl.com/protobufs/google.protobuf#fieldmask).
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Required. The update mask applies to the resource.
+   * For the `FieldMask` definition, see
+   * [FieldMask](https://tinyurl.com/protobufs/google.protobuf#fieldmask).
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (model_ != null) { + output.writeMessage(1, getModel()); + } + if (updateMask_ != null) { + output.writeMessage(2, getUpdateMask()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (model_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getModel()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.UpdateModelRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.UpdateModelRequest other = + (com.google.cloud.aiplatform.v1.UpdateModelRequest) obj; + + if (hasModel() != other.hasModel()) return false; + if (hasModel()) { + if (!getModel().equals(other.getModel())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasModel()) { + hash = (37 * hash) + MODEL_FIELD_NUMBER; + hash = (53 * hash) + getModel().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.UpdateModelRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UpdateModelRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UpdateModelRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UpdateModelRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UpdateModelRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UpdateModelRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UpdateModelRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UpdateModelRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UpdateModelRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UpdateModelRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UpdateModelRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UpdateModelRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1.UpdateModelRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [ModelService.UpdateModel][google.cloud.aiplatform.v1.ModelService.UpdateModel].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.UpdateModelRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.UpdateModelRequest) + com.google.cloud.aiplatform.v1.UpdateModelRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_UpdateModelRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_UpdateModelRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.UpdateModelRequest.class, + com.google.cloud.aiplatform.v1.UpdateModelRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.UpdateModelRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (modelBuilder_ == null) { + model_ = null; + } else { + model_ = null; + modelBuilder_ = null; + } + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_UpdateModelRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UpdateModelRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.UpdateModelRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UpdateModelRequest build() { + com.google.cloud.aiplatform.v1.UpdateModelRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UpdateModelRequest buildPartial() { + com.google.cloud.aiplatform.v1.UpdateModelRequest result = + new com.google.cloud.aiplatform.v1.UpdateModelRequest(this); + if (modelBuilder_ == null) { + result.model_ = model_; + } else { + result.model_ = modelBuilder_.build(); + } + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.UpdateModelRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.UpdateModelRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.UpdateModelRequest other) { + if (other == com.google.cloud.aiplatform.v1.UpdateModelRequest.getDefaultInstance()) + return this; + if (other.hasModel()) { + mergeModel(other.getModel()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.aiplatform.v1.UpdateModelRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.UpdateModelRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.aiplatform.v1.Model model_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.Model, + com.google.cloud.aiplatform.v1.Model.Builder, + com.google.cloud.aiplatform.v1.ModelOrBuilder> + modelBuilder_; + /** + * + * + *
+     * Required. The Model which replaces the resource on the server.
+     * 
+ * + * .google.cloud.aiplatform.v1.Model model = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the model field is set. + */ + public boolean hasModel() { + return modelBuilder_ != null || model_ != null; + } + /** + * + * + *
+     * Required. The Model which replaces the resource on the server.
+     * 
+ * + * .google.cloud.aiplatform.v1.Model model = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The model. + */ + public com.google.cloud.aiplatform.v1.Model getModel() { + if (modelBuilder_ == null) { + return model_ == null ? com.google.cloud.aiplatform.v1.Model.getDefaultInstance() : model_; + } else { + return modelBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The Model which replaces the resource on the server.
+     * 
+ * + * .google.cloud.aiplatform.v1.Model model = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setModel(com.google.cloud.aiplatform.v1.Model value) { + if (modelBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + model_ = value; + onChanged(); + } else { + modelBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The Model which replaces the resource on the server.
+     * 
+ * + * .google.cloud.aiplatform.v1.Model model = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setModel(com.google.cloud.aiplatform.v1.Model.Builder builderForValue) { + if (modelBuilder_ == null) { + model_ = builderForValue.build(); + onChanged(); + } else { + modelBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The Model which replaces the resource on the server.
+     * 
+ * + * .google.cloud.aiplatform.v1.Model model = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeModel(com.google.cloud.aiplatform.v1.Model value) { + if (modelBuilder_ == null) { + if (model_ != null) { + model_ = + com.google.cloud.aiplatform.v1.Model.newBuilder(model_) + .mergeFrom(value) + .buildPartial(); + } else { + model_ = value; + } + onChanged(); + } else { + modelBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The Model which replaces the resource on the server.
+     * 
+ * + * .google.cloud.aiplatform.v1.Model model = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearModel() { + if (modelBuilder_ == null) { + model_ = null; + onChanged(); + } else { + model_ = null; + modelBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The Model which replaces the resource on the server.
+     * 
+ * + * .google.cloud.aiplatform.v1.Model model = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.Model.Builder getModelBuilder() { + + onChanged(); + return getModelFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The Model which replaces the resource on the server.
+     * 
+ * + * .google.cloud.aiplatform.v1.Model model = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.ModelOrBuilder getModelOrBuilder() { + if (modelBuilder_ != null) { + return modelBuilder_.getMessageOrBuilder(); + } else { + return model_ == null ? com.google.cloud.aiplatform.v1.Model.getDefaultInstance() : model_; + } + } + /** + * + * + *
+     * Required. The Model which replaces the resource on the server.
+     * 
+ * + * .google.cloud.aiplatform.v1.Model model = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.Model, + com.google.cloud.aiplatform.v1.Model.Builder, + com.google.cloud.aiplatform.v1.ModelOrBuilder> + getModelFieldBuilder() { + if (modelBuilder_ == null) { + modelBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.Model, + com.google.cloud.aiplatform.v1.Model.Builder, + com.google.cloud.aiplatform.v1.ModelOrBuilder>( + getModel(), getParentForChildren(), isClean()); + model_ = null; + } + return modelBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * Required. The update mask applies to the resource.
+     * For the `FieldMask` definition, see
+     * [FieldMask](https://tinyurl.com/protobufs/google.protobuf#fieldmask).
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + * + * + *
+     * Required. The update mask applies to the resource.
+     * For the `FieldMask` definition, see
+     * [FieldMask](https://tinyurl.com/protobufs/google.protobuf#fieldmask).
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The update mask applies to the resource.
+     * For the `FieldMask` definition, see
+     * [FieldMask](https://tinyurl.com/protobufs/google.protobuf#fieldmask).
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The update mask applies to the resource.
+     * For the `FieldMask` definition, see
+     * [FieldMask](https://tinyurl.com/protobufs/google.protobuf#fieldmask).
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The update mask applies to the resource.
+     * For the `FieldMask` definition, see
+     * [FieldMask](https://tinyurl.com/protobufs/google.protobuf#fieldmask).
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The update mask applies to the resource.
+     * For the `FieldMask` definition, see
+     * [FieldMask](https://tinyurl.com/protobufs/google.protobuf#fieldmask).
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The update mask applies to the resource.
+     * For the `FieldMask` definition, see
+     * [FieldMask](https://tinyurl.com/protobufs/google.protobuf#fieldmask).
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The update mask applies to the resource.
+     * For the `FieldMask` definition, see
+     * [FieldMask](https://tinyurl.com/protobufs/google.protobuf#fieldmask).
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Required. The update mask applies to the resource.
+     * For the `FieldMask` definition, see
+     * [FieldMask](https://tinyurl.com/protobufs/google.protobuf#fieldmask).
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.UpdateModelRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.UpdateModelRequest) + private static final com.google.cloud.aiplatform.v1.UpdateModelRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.UpdateModelRequest(); + } + + public static com.google.cloud.aiplatform.v1.UpdateModelRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateModelRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateModelRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UpdateModelRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateModelRequestOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateModelRequestOrBuilder.java new file mode 100644 index 000000000..4ae443ccc --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateModelRequestOrBuilder.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/v1/model_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface UpdateModelRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.UpdateModelRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The Model which replaces the resource on the server.
+   * 
+ * + * .google.cloud.aiplatform.v1.Model model = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the model field is set. + */ + boolean hasModel(); + /** + * + * + *
+   * Required. The Model which replaces the resource on the server.
+   * 
+ * + * .google.cloud.aiplatform.v1.Model model = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The model. + */ + com.google.cloud.aiplatform.v1.Model getModel(); + /** + * + * + *
+   * Required. The Model which replaces the resource on the server.
+   * 
+ * + * .google.cloud.aiplatform.v1.Model model = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1.ModelOrBuilder getModelOrBuilder(); + + /** + * + * + *
+   * Required. The update mask applies to the resource.
+   * For the `FieldMask` definition, see
+   * [FieldMask](https://tinyurl.com/protobufs/google.protobuf#fieldmask).
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Required. The update mask applies to the resource.
+   * For the `FieldMask` definition, see
+   * [FieldMask](https://tinyurl.com/protobufs/google.protobuf#fieldmask).
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Required. The update mask applies to the resource.
+   * For the `FieldMask` definition, see
+   * [FieldMask](https://tinyurl.com/protobufs/google.protobuf#fieldmask).
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateSpecialistPoolOperationMetadata.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateSpecialistPoolOperationMetadata.java new file mode 100644 index 000000000..be373f9a7 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateSpecialistPoolOperationMetadata.java @@ -0,0 +1,964 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/specialist_pool_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Runtime operation metadata for
+ * [SpecialistPoolService.UpdateSpecialistPool][google.cloud.aiplatform.v1.SpecialistPoolService.UpdateSpecialistPool].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.UpdateSpecialistPoolOperationMetadata} + */ +public final class UpdateSpecialistPoolOperationMetadata + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.UpdateSpecialistPoolOperationMetadata) + UpdateSpecialistPoolOperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateSpecialistPoolOperationMetadata.newBuilder() to construct. + private UpdateSpecialistPoolOperationMetadata( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateSpecialistPoolOperationMetadata() { + specialistPool_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateSpecialistPoolOperationMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateSpecialistPoolOperationMetadata( + 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(); + + specialistPool_ = s; + break; + } + case 18: + { + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder subBuilder = null; + if (genericMetadata_ != null) { + subBuilder = genericMetadata_.toBuilder(); + } + genericMetadata_ = + input.readMessage( + com.google.cloud.aiplatform.v1.GenericOperationMetadata.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(genericMetadata_); + genericMetadata_ = 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.v1.SpecialistPoolServiceProto + .internal_static_google_cloud_aiplatform_v1_UpdateSpecialistPoolOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.SpecialistPoolServiceProto + .internal_static_google_cloud_aiplatform_v1_UpdateSpecialistPoolOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.UpdateSpecialistPoolOperationMetadata.class, + com.google.cloud.aiplatform.v1.UpdateSpecialistPoolOperationMetadata.Builder.class); + } + + public static final int SPECIALIST_POOL_FIELD_NUMBER = 1; + private volatile java.lang.Object specialistPool_; + /** + * + * + *
+   * Output only. The name of the SpecialistPool to which the specialists are being added.
+   * Format:
+   * `projects/{project_id}/locations/{location_id}/specialistPools/{specialist_pool}`
+   * 
+ * + * + * string specialist_pool = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The specialistPool. + */ + @java.lang.Override + public java.lang.String getSpecialistPool() { + java.lang.Object ref = specialistPool_; + 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(); + specialistPool_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The name of the SpecialistPool to which the specialists are being added.
+   * Format:
+   * `projects/{project_id}/locations/{location_id}/specialistPools/{specialist_pool}`
+   * 
+ * + * + * string specialist_pool = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for specialistPool. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSpecialistPoolBytes() { + java.lang.Object ref = specialistPool_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + specialistPool_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GENERIC_METADATA_FIELD_NUMBER = 2; + private com.google.cloud.aiplatform.v1.GenericOperationMetadata genericMetadata_; + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 2; + * + * @return Whether the genericMetadata field is set. + */ + @java.lang.Override + public boolean hasGenericMetadata() { + return genericMetadata_ != null; + } + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 2; + * + * @return The genericMetadata. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata() { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 2; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder() { + return getGenericMetadata(); + } + + 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 (!getSpecialistPoolBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, specialistPool_); + } + if (genericMetadata_ != null) { + output.writeMessage(2, getGenericMetadata()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getSpecialistPoolBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, specialistPool_); + } + if (genericMetadata_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getGenericMetadata()); + } + 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.v1.UpdateSpecialistPoolOperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.UpdateSpecialistPoolOperationMetadata other = + (com.google.cloud.aiplatform.v1.UpdateSpecialistPoolOperationMetadata) obj; + + if (!getSpecialistPool().equals(other.getSpecialistPool())) return false; + if (hasGenericMetadata() != other.hasGenericMetadata()) return false; + if (hasGenericMetadata()) { + if (!getGenericMetadata().equals(other.getGenericMetadata())) 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) + SPECIALIST_POOL_FIELD_NUMBER; + hash = (53 * hash) + getSpecialistPool().hashCode(); + if (hasGenericMetadata()) { + hash = (37 * hash) + GENERIC_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getGenericMetadata().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.UpdateSpecialistPoolOperationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UpdateSpecialistPoolOperationMetadata 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.v1.UpdateSpecialistPoolOperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UpdateSpecialistPoolOperationMetadata 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.v1.UpdateSpecialistPoolOperationMetadata parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UpdateSpecialistPoolOperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UpdateSpecialistPoolOperationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UpdateSpecialistPoolOperationMetadata 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.v1.UpdateSpecialistPoolOperationMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UpdateSpecialistPoolOperationMetadata + 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.v1.UpdateSpecialistPoolOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UpdateSpecialistPoolOperationMetadata 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.v1.UpdateSpecialistPoolOperationMetadata 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; + } + /** + * + * + *
+   * Runtime operation metadata for
+   * [SpecialistPoolService.UpdateSpecialistPool][google.cloud.aiplatform.v1.SpecialistPoolService.UpdateSpecialistPool].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.UpdateSpecialistPoolOperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.UpdateSpecialistPoolOperationMetadata) + com.google.cloud.aiplatform.v1.UpdateSpecialistPoolOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.SpecialistPoolServiceProto + .internal_static_google_cloud_aiplatform_v1_UpdateSpecialistPoolOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.SpecialistPoolServiceProto + .internal_static_google_cloud_aiplatform_v1_UpdateSpecialistPoolOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.UpdateSpecialistPoolOperationMetadata.class, + com.google.cloud.aiplatform.v1.UpdateSpecialistPoolOperationMetadata.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.UpdateSpecialistPoolOperationMetadata.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(); + specialistPool_ = ""; + + if (genericMetadataBuilder_ == null) { + genericMetadata_ = null; + } else { + genericMetadata_ = null; + genericMetadataBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.SpecialistPoolServiceProto + .internal_static_google_cloud_aiplatform_v1_UpdateSpecialistPoolOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UpdateSpecialistPoolOperationMetadata + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.UpdateSpecialistPoolOperationMetadata + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UpdateSpecialistPoolOperationMetadata build() { + com.google.cloud.aiplatform.v1.UpdateSpecialistPoolOperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UpdateSpecialistPoolOperationMetadata buildPartial() { + com.google.cloud.aiplatform.v1.UpdateSpecialistPoolOperationMetadata result = + new com.google.cloud.aiplatform.v1.UpdateSpecialistPoolOperationMetadata(this); + result.specialistPool_ = specialistPool_; + if (genericMetadataBuilder_ == null) { + result.genericMetadata_ = genericMetadata_; + } else { + result.genericMetadata_ = genericMetadataBuilder_.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.v1.UpdateSpecialistPoolOperationMetadata) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.UpdateSpecialistPoolOperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.UpdateSpecialistPoolOperationMetadata other) { + if (other + == com.google.cloud.aiplatform.v1.UpdateSpecialistPoolOperationMetadata + .getDefaultInstance()) return this; + if (!other.getSpecialistPool().isEmpty()) { + specialistPool_ = other.specialistPool_; + onChanged(); + } + if (other.hasGenericMetadata()) { + mergeGenericMetadata(other.getGenericMetadata()); + } + 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.v1.UpdateSpecialistPoolOperationMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.UpdateSpecialistPoolOperationMetadata) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object specialistPool_ = ""; + /** + * + * + *
+     * Output only. The name of the SpecialistPool to which the specialists are being added.
+     * Format:
+     * `projects/{project_id}/locations/{location_id}/specialistPools/{specialist_pool}`
+     * 
+ * + * + * string specialist_pool = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The specialistPool. + */ + public java.lang.String getSpecialistPool() { + java.lang.Object ref = specialistPool_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + specialistPool_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The name of the SpecialistPool to which the specialists are being added.
+     * Format:
+     * `projects/{project_id}/locations/{location_id}/specialistPools/{specialist_pool}`
+     * 
+ * + * + * string specialist_pool = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for specialistPool. + */ + public com.google.protobuf.ByteString getSpecialistPoolBytes() { + java.lang.Object ref = specialistPool_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + specialistPool_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The name of the SpecialistPool to which the specialists are being added.
+     * Format:
+     * `projects/{project_id}/locations/{location_id}/specialistPools/{specialist_pool}`
+     * 
+ * + * + * string specialist_pool = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The specialistPool to set. + * @return This builder for chaining. + */ + public Builder setSpecialistPool(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + specialistPool_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The name of the SpecialistPool to which the specialists are being added.
+     * Format:
+     * `projects/{project_id}/locations/{location_id}/specialistPools/{specialist_pool}`
+     * 
+ * + * + * string specialist_pool = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearSpecialistPool() { + + specialistPool_ = getDefaultInstance().getSpecialistPool(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The name of the SpecialistPool to which the specialists are being added.
+     * Format:
+     * `projects/{project_id}/locations/{location_id}/specialistPools/{specialist_pool}`
+     * 
+ * + * + * string specialist_pool = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for specialistPool to set. + * @return This builder for chaining. + */ + public Builder setSpecialistPoolBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + specialistPool_ = value; + onChanged(); + return this; + } + + private com.google.cloud.aiplatform.v1.GenericOperationMetadata genericMetadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder> + genericMetadataBuilder_; + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 2; + * + * @return Whether the genericMetadata field is set. + */ + public boolean hasGenericMetadata() { + return genericMetadataBuilder_ != null || genericMetadata_ != null; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 2; + * + * @return The genericMetadata. + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata() { + if (genericMetadataBuilder_ == null) { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } else { + return genericMetadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 2; + */ + public Builder setGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata value) { + if (genericMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + genericMetadata_ = value; + onChanged(); + } else { + genericMetadataBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 2; + */ + public Builder setGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder builderForValue) { + if (genericMetadataBuilder_ == null) { + genericMetadata_ = builderForValue.build(); + onChanged(); + } else { + genericMetadataBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 2; + */ + public Builder mergeGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata value) { + if (genericMetadataBuilder_ == null) { + if (genericMetadata_ != null) { + genericMetadata_ = + com.google.cloud.aiplatform.v1.GenericOperationMetadata.newBuilder(genericMetadata_) + .mergeFrom(value) + .buildPartial(); + } else { + genericMetadata_ = value; + } + onChanged(); + } else { + genericMetadataBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 2; + */ + public Builder clearGenericMetadata() { + if (genericMetadataBuilder_ == null) { + genericMetadata_ = null; + onChanged(); + } else { + genericMetadata_ = null; + genericMetadataBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 2; + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder + getGenericMetadataBuilder() { + + onChanged(); + return getGenericMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 2; + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder() { + if (genericMetadataBuilder_ != null) { + return genericMetadataBuilder_.getMessageOrBuilder(); + } else { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder> + getGenericMetadataFieldBuilder() { + if (genericMetadataBuilder_ == null) { + genericMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder>( + getGenericMetadata(), getParentForChildren(), isClean()); + genericMetadata_ = null; + } + return genericMetadataBuilder_; + } + + @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.v1.UpdateSpecialistPoolOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.UpdateSpecialistPoolOperationMetadata) + private static final com.google.cloud.aiplatform.v1.UpdateSpecialistPoolOperationMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.UpdateSpecialistPoolOperationMetadata(); + } + + public static com.google.cloud.aiplatform.v1.UpdateSpecialistPoolOperationMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateSpecialistPoolOperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateSpecialistPoolOperationMetadata(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.v1.UpdateSpecialistPoolOperationMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateSpecialistPoolOperationMetadataOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateSpecialistPoolOperationMetadataOrBuilder.java new file mode 100644 index 000000000..7bb43d713 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateSpecialistPoolOperationMetadataOrBuilder.java @@ -0,0 +1,93 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/specialist_pool_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface UpdateSpecialistPoolOperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.UpdateSpecialistPoolOperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The name of the SpecialistPool to which the specialists are being added.
+   * Format:
+   * `projects/{project_id}/locations/{location_id}/specialistPools/{specialist_pool}`
+   * 
+ * + * + * string specialist_pool = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The specialistPool. + */ + java.lang.String getSpecialistPool(); + /** + * + * + *
+   * Output only. The name of the SpecialistPool to which the specialists are being added.
+   * Format:
+   * `projects/{project_id}/locations/{location_id}/specialistPools/{specialist_pool}`
+   * 
+ * + * + * string specialist_pool = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for specialistPool. + */ + com.google.protobuf.ByteString getSpecialistPoolBytes(); + + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 2; + * + * @return Whether the genericMetadata field is set. + */ + boolean hasGenericMetadata(); + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 2; + * + * @return The genericMetadata. + */ + com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata(); + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 2; + */ + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder getGenericMetadataOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateSpecialistPoolRequest.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateSpecialistPoolRequest.java new file mode 100644 index 000000000..618f1dede --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateSpecialistPoolRequest.java @@ -0,0 +1,1043 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/specialist_pool_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for [SpecialistPoolService.UpdateSpecialistPool][google.cloud.aiplatform.v1.SpecialistPoolService.UpdateSpecialistPool].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.UpdateSpecialistPoolRequest} + */ +public final class UpdateSpecialistPoolRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.UpdateSpecialistPoolRequest) + UpdateSpecialistPoolRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateSpecialistPoolRequest.newBuilder() to construct. + private UpdateSpecialistPoolRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateSpecialistPoolRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateSpecialistPoolRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateSpecialistPoolRequest( + 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.v1.SpecialistPool.Builder subBuilder = null; + if (specialistPool_ != null) { + subBuilder = specialistPool_.toBuilder(); + } + specialistPool_ = + input.readMessage( + com.google.cloud.aiplatform.v1.SpecialistPool.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(specialistPool_); + specialistPool_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (updateMask_ != null) { + subBuilder = updateMask_.toBuilder(); + } + updateMask_ = + input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateMask_); + updateMask_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.SpecialistPoolServiceProto + .internal_static_google_cloud_aiplatform_v1_UpdateSpecialistPoolRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.SpecialistPoolServiceProto + .internal_static_google_cloud_aiplatform_v1_UpdateSpecialistPoolRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.UpdateSpecialistPoolRequest.class, + com.google.cloud.aiplatform.v1.UpdateSpecialistPoolRequest.Builder.class); + } + + public static final int SPECIALIST_POOL_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1.SpecialistPool specialistPool_; + /** + * + * + *
+   * Required. The SpecialistPool which replaces the resource on the server.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.SpecialistPool specialist_pool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the specialistPool field is set. + */ + @java.lang.Override + public boolean hasSpecialistPool() { + return specialistPool_ != null; + } + /** + * + * + *
+   * Required. The SpecialistPool which replaces the resource on the server.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.SpecialistPool specialist_pool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The specialistPool. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.SpecialistPool getSpecialistPool() { + return specialistPool_ == null + ? com.google.cloud.aiplatform.v1.SpecialistPool.getDefaultInstance() + : specialistPool_; + } + /** + * + * + *
+   * Required. The SpecialistPool which replaces the resource on the server.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.SpecialistPool specialist_pool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.SpecialistPoolOrBuilder getSpecialistPoolOrBuilder() { + return getSpecialistPool(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Required. The update mask applies to the resource.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Required. The update mask applies to the resource.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Required. The update mask applies to the resource.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (specialistPool_ != null) { + output.writeMessage(1, getSpecialistPool()); + } + if (updateMask_ != null) { + output.writeMessage(2, getUpdateMask()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (specialistPool_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getSpecialistPool()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.UpdateSpecialistPoolRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.UpdateSpecialistPoolRequest other = + (com.google.cloud.aiplatform.v1.UpdateSpecialistPoolRequest) obj; + + if (hasSpecialistPool() != other.hasSpecialistPool()) return false; + if (hasSpecialistPool()) { + if (!getSpecialistPool().equals(other.getSpecialistPool())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasSpecialistPool()) { + hash = (37 * hash) + SPECIALIST_POOL_FIELD_NUMBER; + hash = (53 * hash) + getSpecialistPool().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.UpdateSpecialistPoolRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UpdateSpecialistPoolRequest 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.v1.UpdateSpecialistPoolRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UpdateSpecialistPoolRequest 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.v1.UpdateSpecialistPoolRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UpdateSpecialistPoolRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UpdateSpecialistPoolRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UpdateSpecialistPoolRequest 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.v1.UpdateSpecialistPoolRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UpdateSpecialistPoolRequest 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.v1.UpdateSpecialistPoolRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UpdateSpecialistPoolRequest 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.v1.UpdateSpecialistPoolRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [SpecialistPoolService.UpdateSpecialistPool][google.cloud.aiplatform.v1.SpecialistPoolService.UpdateSpecialistPool].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.UpdateSpecialistPoolRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.UpdateSpecialistPoolRequest) + com.google.cloud.aiplatform.v1.UpdateSpecialistPoolRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.SpecialistPoolServiceProto + .internal_static_google_cloud_aiplatform_v1_UpdateSpecialistPoolRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.SpecialistPoolServiceProto + .internal_static_google_cloud_aiplatform_v1_UpdateSpecialistPoolRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.UpdateSpecialistPoolRequest.class, + com.google.cloud.aiplatform.v1.UpdateSpecialistPoolRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.UpdateSpecialistPoolRequest.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 (specialistPoolBuilder_ == null) { + specialistPool_ = null; + } else { + specialistPool_ = null; + specialistPoolBuilder_ = null; + } + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.SpecialistPoolServiceProto + .internal_static_google_cloud_aiplatform_v1_UpdateSpecialistPoolRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UpdateSpecialistPoolRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.UpdateSpecialistPoolRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UpdateSpecialistPoolRequest build() { + com.google.cloud.aiplatform.v1.UpdateSpecialistPoolRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UpdateSpecialistPoolRequest buildPartial() { + com.google.cloud.aiplatform.v1.UpdateSpecialistPoolRequest result = + new com.google.cloud.aiplatform.v1.UpdateSpecialistPoolRequest(this); + if (specialistPoolBuilder_ == null) { + result.specialistPool_ = specialistPool_; + } else { + result.specialistPool_ = specialistPoolBuilder_.build(); + } + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.UpdateSpecialistPoolRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.UpdateSpecialistPoolRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.UpdateSpecialistPoolRequest other) { + if (other == com.google.cloud.aiplatform.v1.UpdateSpecialistPoolRequest.getDefaultInstance()) + return this; + if (other.hasSpecialistPool()) { + mergeSpecialistPool(other.getSpecialistPool()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.aiplatform.v1.UpdateSpecialistPoolRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.UpdateSpecialistPoolRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.aiplatform.v1.SpecialistPool specialistPool_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.SpecialistPool, + com.google.cloud.aiplatform.v1.SpecialistPool.Builder, + com.google.cloud.aiplatform.v1.SpecialistPoolOrBuilder> + specialistPoolBuilder_; + /** + * + * + *
+     * Required. The SpecialistPool which replaces the resource on the server.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.SpecialistPool specialist_pool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the specialistPool field is set. + */ + public boolean hasSpecialistPool() { + return specialistPoolBuilder_ != null || specialistPool_ != null; + } + /** + * + * + *
+     * Required. The SpecialistPool which replaces the resource on the server.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.SpecialistPool specialist_pool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The specialistPool. + */ + public com.google.cloud.aiplatform.v1.SpecialistPool getSpecialistPool() { + if (specialistPoolBuilder_ == null) { + return specialistPool_ == null + ? com.google.cloud.aiplatform.v1.SpecialistPool.getDefaultInstance() + : specialistPool_; + } else { + return specialistPoolBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The SpecialistPool which replaces the resource on the server.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.SpecialistPool specialist_pool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSpecialistPool(com.google.cloud.aiplatform.v1.SpecialistPool value) { + if (specialistPoolBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + specialistPool_ = value; + onChanged(); + } else { + specialistPoolBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The SpecialistPool which replaces the resource on the server.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.SpecialistPool specialist_pool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSpecialistPool( + com.google.cloud.aiplatform.v1.SpecialistPool.Builder builderForValue) { + if (specialistPoolBuilder_ == null) { + specialistPool_ = builderForValue.build(); + onChanged(); + } else { + specialistPoolBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The SpecialistPool which replaces the resource on the server.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.SpecialistPool specialist_pool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeSpecialistPool(com.google.cloud.aiplatform.v1.SpecialistPool value) { + if (specialistPoolBuilder_ == null) { + if (specialistPool_ != null) { + specialistPool_ = + com.google.cloud.aiplatform.v1.SpecialistPool.newBuilder(specialistPool_) + .mergeFrom(value) + .buildPartial(); + } else { + specialistPool_ = value; + } + onChanged(); + } else { + specialistPoolBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The SpecialistPool which replaces the resource on the server.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.SpecialistPool specialist_pool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearSpecialistPool() { + if (specialistPoolBuilder_ == null) { + specialistPool_ = null; + onChanged(); + } else { + specialistPool_ = null; + specialistPoolBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The SpecialistPool which replaces the resource on the server.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.SpecialistPool specialist_pool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.SpecialistPool.Builder getSpecialistPoolBuilder() { + + onChanged(); + return getSpecialistPoolFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The SpecialistPool which replaces the resource on the server.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.SpecialistPool specialist_pool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.SpecialistPoolOrBuilder getSpecialistPoolOrBuilder() { + if (specialistPoolBuilder_ != null) { + return specialistPoolBuilder_.getMessageOrBuilder(); + } else { + return specialistPool_ == null + ? com.google.cloud.aiplatform.v1.SpecialistPool.getDefaultInstance() + : specialistPool_; + } + } + /** + * + * + *
+     * Required. The SpecialistPool which replaces the resource on the server.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.SpecialistPool specialist_pool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.SpecialistPool, + com.google.cloud.aiplatform.v1.SpecialistPool.Builder, + com.google.cloud.aiplatform.v1.SpecialistPoolOrBuilder> + getSpecialistPoolFieldBuilder() { + if (specialistPoolBuilder_ == null) { + specialistPoolBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.SpecialistPool, + com.google.cloud.aiplatform.v1.SpecialistPool.Builder, + com.google.cloud.aiplatform.v1.SpecialistPoolOrBuilder>( + getSpecialistPool(), getParentForChildren(), isClean()); + specialistPool_ = null; + } + return specialistPoolBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * Required. The update mask applies to the resource.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + * + * + *
+     * Required. The update mask applies to the resource.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The update mask applies to the resource.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The update mask applies to the resource.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The update mask applies to the resource.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The update mask applies to the resource.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The update mask applies to the resource.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The update mask applies to the resource.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Required. The update mask applies to the resource.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.UpdateSpecialistPoolRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.UpdateSpecialistPoolRequest) + private static final com.google.cloud.aiplatform.v1.UpdateSpecialistPoolRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.UpdateSpecialistPoolRequest(); + } + + public static com.google.cloud.aiplatform.v1.UpdateSpecialistPoolRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateSpecialistPoolRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateSpecialistPoolRequest(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.v1.UpdateSpecialistPoolRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateSpecialistPoolRequestOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateSpecialistPoolRequestOrBuilder.java new file mode 100644 index 000000000..fe771cfa7 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpdateSpecialistPoolRequestOrBuilder.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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/specialist_pool_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface UpdateSpecialistPoolRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.UpdateSpecialistPoolRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The SpecialistPool which replaces the resource on the server.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.SpecialistPool specialist_pool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the specialistPool field is set. + */ + boolean hasSpecialistPool(); + /** + * + * + *
+   * Required. The SpecialistPool which replaces the resource on the server.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.SpecialistPool specialist_pool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The specialistPool. + */ + com.google.cloud.aiplatform.v1.SpecialistPool getSpecialistPool(); + /** + * + * + *
+   * Required. The SpecialistPool which replaces the resource on the server.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.SpecialistPool specialist_pool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1.SpecialistPoolOrBuilder getSpecialistPoolOrBuilder(); + + /** + * + * + *
+   * Required. The update mask applies to the resource.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Required. The update mask applies to the resource.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Required. The update mask applies to the resource.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UploadModelOperationMetadata.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UploadModelOperationMetadata.java new file mode 100644 index 000000000..f64dd4e81 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UploadModelOperationMetadata.java @@ -0,0 +1,741 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/model_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Details of [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel] operation.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.UploadModelOperationMetadata} + */ +public final class UploadModelOperationMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.UploadModelOperationMetadata) + UploadModelOperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use UploadModelOperationMetadata.newBuilder() to construct. + private UploadModelOperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UploadModelOperationMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UploadModelOperationMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UploadModelOperationMetadata( + 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.v1.GenericOperationMetadata.Builder subBuilder = null; + if (genericMetadata_ != null) { + subBuilder = genericMetadata_.toBuilder(); + } + genericMetadata_ = + input.readMessage( + com.google.cloud.aiplatform.v1.GenericOperationMetadata.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(genericMetadata_); + genericMetadata_ = 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.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_UploadModelOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_UploadModelOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.UploadModelOperationMetadata.class, + com.google.cloud.aiplatform.v1.UploadModelOperationMetadata.Builder.class); + } + + public static final int GENERIC_METADATA_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1.GenericOperationMetadata genericMetadata_; + /** + * + * + *
+   * The common part of the operation metadata.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + @java.lang.Override + public boolean hasGenericMetadata() { + return genericMetadata_ != null; + } + /** + * + * + *
+   * The common part of the operation metadata.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata() { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + /** + * + * + *
+   * The common part of the operation metadata.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder() { + return getGenericMetadata(); + } + + 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 (genericMetadata_ != null) { + output.writeMessage(1, getGenericMetadata()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (genericMetadata_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getGenericMetadata()); + } + 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.v1.UploadModelOperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.UploadModelOperationMetadata other = + (com.google.cloud.aiplatform.v1.UploadModelOperationMetadata) obj; + + if (hasGenericMetadata() != other.hasGenericMetadata()) return false; + if (hasGenericMetadata()) { + if (!getGenericMetadata().equals(other.getGenericMetadata())) 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 (hasGenericMetadata()) { + hash = (37 * hash) + GENERIC_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getGenericMetadata().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.UploadModelOperationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UploadModelOperationMetadata 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.v1.UploadModelOperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UploadModelOperationMetadata 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.v1.UploadModelOperationMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UploadModelOperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UploadModelOperationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UploadModelOperationMetadata 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.v1.UploadModelOperationMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UploadModelOperationMetadata 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.v1.UploadModelOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UploadModelOperationMetadata 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.v1.UploadModelOperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Details of [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel] operation.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.UploadModelOperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.UploadModelOperationMetadata) + com.google.cloud.aiplatform.v1.UploadModelOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_UploadModelOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_UploadModelOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.UploadModelOperationMetadata.class, + com.google.cloud.aiplatform.v1.UploadModelOperationMetadata.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.UploadModelOperationMetadata.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 (genericMetadataBuilder_ == null) { + genericMetadata_ = null; + } else { + genericMetadata_ = null; + genericMetadataBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_UploadModelOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UploadModelOperationMetadata getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.UploadModelOperationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UploadModelOperationMetadata build() { + com.google.cloud.aiplatform.v1.UploadModelOperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UploadModelOperationMetadata buildPartial() { + com.google.cloud.aiplatform.v1.UploadModelOperationMetadata result = + new com.google.cloud.aiplatform.v1.UploadModelOperationMetadata(this); + if (genericMetadataBuilder_ == null) { + result.genericMetadata_ = genericMetadata_; + } else { + result.genericMetadata_ = genericMetadataBuilder_.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.v1.UploadModelOperationMetadata) { + return mergeFrom((com.google.cloud.aiplatform.v1.UploadModelOperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.UploadModelOperationMetadata other) { + if (other == com.google.cloud.aiplatform.v1.UploadModelOperationMetadata.getDefaultInstance()) + return this; + if (other.hasGenericMetadata()) { + mergeGenericMetadata(other.getGenericMetadata()); + } + 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.v1.UploadModelOperationMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.UploadModelOperationMetadata) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.aiplatform.v1.GenericOperationMetadata genericMetadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder> + genericMetadataBuilder_; + /** + * + * + *
+     * The common part of the operation metadata.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + public boolean hasGenericMetadata() { + return genericMetadataBuilder_ != null || genericMetadata_ != null; + } + /** + * + * + *
+     * The common part of the operation metadata.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata() { + if (genericMetadataBuilder_ == null) { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } else { + return genericMetadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The common part of the operation metadata.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder setGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata value) { + if (genericMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + genericMetadata_ = value; + onChanged(); + } else { + genericMetadataBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The common part of the operation metadata.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder setGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder builderForValue) { + if (genericMetadataBuilder_ == null) { + genericMetadata_ = builderForValue.build(); + onChanged(); + } else { + genericMetadataBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The common part of the operation metadata.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder mergeGenericMetadata( + com.google.cloud.aiplatform.v1.GenericOperationMetadata value) { + if (genericMetadataBuilder_ == null) { + if (genericMetadata_ != null) { + genericMetadata_ = + com.google.cloud.aiplatform.v1.GenericOperationMetadata.newBuilder(genericMetadata_) + .mergeFrom(value) + .buildPartial(); + } else { + genericMetadata_ = value; + } + onChanged(); + } else { + genericMetadataBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The common part of the operation metadata.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder clearGenericMetadata() { + if (genericMetadataBuilder_ == null) { + genericMetadata_ = null; + onChanged(); + } else { + genericMetadata_ = null; + genericMetadataBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The common part of the operation metadata.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder + getGenericMetadataBuilder() { + + onChanged(); + return getGenericMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The common part of the operation metadata.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder() { + if (genericMetadataBuilder_ != null) { + return genericMetadataBuilder_.getMessageOrBuilder(); + } else { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + } + /** + * + * + *
+     * The common part of the operation metadata.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder> + getGenericMetadataFieldBuilder() { + if (genericMetadataBuilder_ == null) { + genericMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder>( + getGenericMetadata(), getParentForChildren(), isClean()); + genericMetadata_ = null; + } + return genericMetadataBuilder_; + } + + @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.v1.UploadModelOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.UploadModelOperationMetadata) + private static final com.google.cloud.aiplatform.v1.UploadModelOperationMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.UploadModelOperationMetadata(); + } + + public static com.google.cloud.aiplatform.v1.UploadModelOperationMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UploadModelOperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UploadModelOperationMetadata(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.v1.UploadModelOperationMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UploadModelOperationMetadataOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UploadModelOperationMetadataOrBuilder.java new file mode 100644 index 000000000..d21d80a45 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UploadModelOperationMetadataOrBuilder.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/v1/model_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface UploadModelOperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.UploadModelOperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The common part of the operation metadata.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + boolean hasGenericMetadata(); + /** + * + * + *
+   * The common part of the operation metadata.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata(); + /** + * + * + *
+   * The common part of the operation metadata.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + com.google.cloud.aiplatform.v1.GenericOperationMetadataOrBuilder getGenericMetadataOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UploadModelRequest.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UploadModelRequest.java new file mode 100644 index 000000000..77b0b176b --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UploadModelRequest.java @@ -0,0 +1,940 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/model_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.UploadModelRequest} + */ +public final class UploadModelRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.UploadModelRequest) + UploadModelRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UploadModelRequest.newBuilder() to construct. + private UploadModelRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UploadModelRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UploadModelRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UploadModelRequest( + 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(); + + parent_ = s; + break; + } + case 18: + { + com.google.cloud.aiplatform.v1.Model.Builder subBuilder = null; + if (model_ != null) { + subBuilder = model_.toBuilder(); + } + model_ = + input.readMessage( + com.google.cloud.aiplatform.v1.Model.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(model_); + model_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_UploadModelRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_UploadModelRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.UploadModelRequest.class, + com.google.cloud.aiplatform.v1.UploadModelRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The resource name of the Location into which to upload the Model.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the Location into which to upload the Model.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MODEL_FIELD_NUMBER = 2; + private com.google.cloud.aiplatform.v1.Model model_; + /** + * + * + *
+   * Required. The Model to create.
+   * 
+ * + * .google.cloud.aiplatform.v1.Model model = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the model field is set. + */ + @java.lang.Override + public boolean hasModel() { + return model_ != null; + } + /** + * + * + *
+   * Required. The Model to create.
+   * 
+ * + * .google.cloud.aiplatform.v1.Model model = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The model. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.Model getModel() { + return model_ == null ? com.google.cloud.aiplatform.v1.Model.getDefaultInstance() : model_; + } + /** + * + * + *
+   * Required. The Model to create.
+   * 
+ * + * .google.cloud.aiplatform.v1.Model model = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ModelOrBuilder getModelOrBuilder() { + return getModel(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (model_ != null) { + output.writeMessage(2, getModel()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (model_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getModel()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1.UploadModelRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.UploadModelRequest other = + (com.google.cloud.aiplatform.v1.UploadModelRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasModel() != other.hasModel()) return false; + if (hasModel()) { + if (!getModel().equals(other.getModel())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasModel()) { + hash = (37 * hash) + MODEL_FIELD_NUMBER; + hash = (53 * hash) + getModel().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.UploadModelRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UploadModelRequest 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.v1.UploadModelRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UploadModelRequest 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.v1.UploadModelRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UploadModelRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UploadModelRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UploadModelRequest 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.v1.UploadModelRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UploadModelRequest 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.v1.UploadModelRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UploadModelRequest 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.v1.UploadModelRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.UploadModelRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.UploadModelRequest) + com.google.cloud.aiplatform.v1.UploadModelRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_UploadModelRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_UploadModelRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.UploadModelRequest.class, + com.google.cloud.aiplatform.v1.UploadModelRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.UploadModelRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (modelBuilder_ == null) { + model_ = null; + } else { + model_ = null; + modelBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_UploadModelRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UploadModelRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.UploadModelRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UploadModelRequest build() { + com.google.cloud.aiplatform.v1.UploadModelRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UploadModelRequest buildPartial() { + com.google.cloud.aiplatform.v1.UploadModelRequest result = + new com.google.cloud.aiplatform.v1.UploadModelRequest(this); + result.parent_ = parent_; + if (modelBuilder_ == null) { + result.model_ = model_; + } else { + result.model_ = modelBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1.UploadModelRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.UploadModelRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.UploadModelRequest other) { + if (other == com.google.cloud.aiplatform.v1.UploadModelRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasModel()) { + mergeModel(other.getModel()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.aiplatform.v1.UploadModelRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.UploadModelRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the Location into which to upload the Model.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Location into which to upload the Model.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Location into which to upload the Model.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Location into which to upload the Model.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Location into which to upload the Model.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.cloud.aiplatform.v1.Model model_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.Model, + com.google.cloud.aiplatform.v1.Model.Builder, + com.google.cloud.aiplatform.v1.ModelOrBuilder> + modelBuilder_; + /** + * + * + *
+     * Required. The Model to create.
+     * 
+ * + * .google.cloud.aiplatform.v1.Model model = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the model field is set. + */ + public boolean hasModel() { + return modelBuilder_ != null || model_ != null; + } + /** + * + * + *
+     * Required. The Model to create.
+     * 
+ * + * .google.cloud.aiplatform.v1.Model model = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The model. + */ + public com.google.cloud.aiplatform.v1.Model getModel() { + if (modelBuilder_ == null) { + return model_ == null ? com.google.cloud.aiplatform.v1.Model.getDefaultInstance() : model_; + } else { + return modelBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The Model to create.
+     * 
+ * + * .google.cloud.aiplatform.v1.Model model = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setModel(com.google.cloud.aiplatform.v1.Model value) { + if (modelBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + model_ = value; + onChanged(); + } else { + modelBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The Model to create.
+     * 
+ * + * .google.cloud.aiplatform.v1.Model model = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setModel(com.google.cloud.aiplatform.v1.Model.Builder builderForValue) { + if (modelBuilder_ == null) { + model_ = builderForValue.build(); + onChanged(); + } else { + modelBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The Model to create.
+     * 
+ * + * .google.cloud.aiplatform.v1.Model model = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeModel(com.google.cloud.aiplatform.v1.Model value) { + if (modelBuilder_ == null) { + if (model_ != null) { + model_ = + com.google.cloud.aiplatform.v1.Model.newBuilder(model_) + .mergeFrom(value) + .buildPartial(); + } else { + model_ = value; + } + onChanged(); + } else { + modelBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The Model to create.
+     * 
+ * + * .google.cloud.aiplatform.v1.Model model = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearModel() { + if (modelBuilder_ == null) { + model_ = null; + onChanged(); + } else { + model_ = null; + modelBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The Model to create.
+     * 
+ * + * .google.cloud.aiplatform.v1.Model model = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.Model.Builder getModelBuilder() { + + onChanged(); + return getModelFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The Model to create.
+     * 
+ * + * .google.cloud.aiplatform.v1.Model model = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.ModelOrBuilder getModelOrBuilder() { + if (modelBuilder_ != null) { + return modelBuilder_.getMessageOrBuilder(); + } else { + return model_ == null ? com.google.cloud.aiplatform.v1.Model.getDefaultInstance() : model_; + } + } + /** + * + * + *
+     * Required. The Model to create.
+     * 
+ * + * .google.cloud.aiplatform.v1.Model model = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.Model, + com.google.cloud.aiplatform.v1.Model.Builder, + com.google.cloud.aiplatform.v1.ModelOrBuilder> + getModelFieldBuilder() { + if (modelBuilder_ == null) { + modelBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.Model, + com.google.cloud.aiplatform.v1.Model.Builder, + com.google.cloud.aiplatform.v1.ModelOrBuilder>( + getModel(), getParentForChildren(), isClean()); + model_ = null; + } + return modelBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.UploadModelRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.UploadModelRequest) + private static final com.google.cloud.aiplatform.v1.UploadModelRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.UploadModelRequest(); + } + + public static com.google.cloud.aiplatform.v1.UploadModelRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UploadModelRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UploadModelRequest(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.v1.UploadModelRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UploadModelRequestOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UploadModelRequestOrBuilder.java new file mode 100644 index 000000000..52778884c --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UploadModelRequestOrBuilder.java @@ -0,0 +1,94 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/model_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface UploadModelRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.UploadModelRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the Location into which to upload the Model.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of the Location into which to upload the Model.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The Model to create.
+   * 
+ * + * .google.cloud.aiplatform.v1.Model model = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the model field is set. + */ + boolean hasModel(); + /** + * + * + *
+   * Required. The Model to create.
+   * 
+ * + * .google.cloud.aiplatform.v1.Model model = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The model. + */ + com.google.cloud.aiplatform.v1.Model getModel(); + /** + * + * + *
+   * Required. The Model to create.
+   * 
+ * + * .google.cloud.aiplatform.v1.Model model = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1.ModelOrBuilder getModelOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UploadModelResponse.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UploadModelResponse.java new file mode 100644 index 000000000..6a6a3f210 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UploadModelResponse.java @@ -0,0 +1,643 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/model_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Response message of [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel] operation.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.UploadModelResponse} + */ +public final class UploadModelResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.UploadModelResponse) + UploadModelResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use UploadModelResponse.newBuilder() to construct. + private UploadModelResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UploadModelResponse() { + model_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UploadModelResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UploadModelResponse( + 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(); + + model_ = 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.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_UploadModelResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_UploadModelResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.UploadModelResponse.class, + com.google.cloud.aiplatform.v1.UploadModelResponse.Builder.class); + } + + public static final int MODEL_FIELD_NUMBER = 1; + private volatile java.lang.Object model_; + /** + * + * + *
+   * The name of the uploaded Model resource.
+   * Format: `projects/{project}/locations/{location}/models/{model}`
+   * 
+ * + * string model = 1 [(.google.api.resource_reference) = { ... } + * + * @return The model. + */ + @java.lang.Override + public java.lang.String getModel() { + java.lang.Object ref = model_; + 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(); + model_ = s; + return s; + } + } + /** + * + * + *
+   * The name of the uploaded Model resource.
+   * Format: `projects/{project}/locations/{location}/models/{model}`
+   * 
+ * + * string model = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for model. + */ + @java.lang.Override + public com.google.protobuf.ByteString getModelBytes() { + java.lang.Object ref = model_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + model_ = 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 (!getModelBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, model_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getModelBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, model_); + } + 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.v1.UploadModelResponse)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.UploadModelResponse other = + (com.google.cloud.aiplatform.v1.UploadModelResponse) obj; + + if (!getModel().equals(other.getModel())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MODEL_FIELD_NUMBER; + hash = (53 * hash) + getModel().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.UploadModelResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UploadModelResponse 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.v1.UploadModelResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UploadModelResponse 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.v1.UploadModelResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UploadModelResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UploadModelResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UploadModelResponse 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.v1.UploadModelResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UploadModelResponse 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.v1.UploadModelResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UploadModelResponse 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.v1.UploadModelResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message of [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel] operation.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.UploadModelResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.UploadModelResponse) + com.google.cloud.aiplatform.v1.UploadModelResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_UploadModelResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_UploadModelResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.UploadModelResponse.class, + com.google.cloud.aiplatform.v1.UploadModelResponse.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.UploadModelResponse.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(); + model_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_UploadModelResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UploadModelResponse getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.UploadModelResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UploadModelResponse build() { + com.google.cloud.aiplatform.v1.UploadModelResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UploadModelResponse buildPartial() { + com.google.cloud.aiplatform.v1.UploadModelResponse result = + new com.google.cloud.aiplatform.v1.UploadModelResponse(this); + result.model_ = model_; + 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.v1.UploadModelResponse) { + return mergeFrom((com.google.cloud.aiplatform.v1.UploadModelResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.UploadModelResponse other) { + if (other == com.google.cloud.aiplatform.v1.UploadModelResponse.getDefaultInstance()) + return this; + if (!other.getModel().isEmpty()) { + model_ = other.model_; + 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.v1.UploadModelResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.UploadModelResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object model_ = ""; + /** + * + * + *
+     * The name of the uploaded Model resource.
+     * Format: `projects/{project}/locations/{location}/models/{model}`
+     * 
+ * + * string model = 1 [(.google.api.resource_reference) = { ... } + * + * @return The model. + */ + public java.lang.String getModel() { + java.lang.Object ref = model_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + model_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of the uploaded Model resource.
+     * Format: `projects/{project}/locations/{location}/models/{model}`
+     * 
+ * + * string model = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for model. + */ + public com.google.protobuf.ByteString getModelBytes() { + java.lang.Object ref = model_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + model_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of the uploaded Model resource.
+     * Format: `projects/{project}/locations/{location}/models/{model}`
+     * 
+ * + * string model = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The model to set. + * @return This builder for chaining. + */ + public Builder setModel(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + model_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the uploaded Model resource.
+     * Format: `projects/{project}/locations/{location}/models/{model}`
+     * 
+ * + * string model = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearModel() { + + model_ = getDefaultInstance().getModel(); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the uploaded Model resource.
+     * Format: `projects/{project}/locations/{location}/models/{model}`
+     * 
+ * + * string model = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for model to set. + * @return This builder for chaining. + */ + public Builder setModelBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + model_ = 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.v1.UploadModelResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.UploadModelResponse) + private static final com.google.cloud.aiplatform.v1.UploadModelResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.UploadModelResponse(); + } + + public static com.google.cloud.aiplatform.v1.UploadModelResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UploadModelResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UploadModelResponse(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.v1.UploadModelResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UploadModelResponseOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UploadModelResponseOrBuilder.java new file mode 100644 index 000000000..9f76d41ff --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UploadModelResponseOrBuilder.java @@ -0,0 +1,52 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/model_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface UploadModelResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.UploadModelResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The name of the uploaded Model resource.
+   * Format: `projects/{project}/locations/{location}/models/{model}`
+   * 
+ * + * string model = 1 [(.google.api.resource_reference) = { ... } + * + * @return The model. + */ + java.lang.String getModel(); + /** + * + * + *
+   * The name of the uploaded Model resource.
+   * Format: `projects/{project}/locations/{location}/models/{model}`
+   * 
+ * + * string model = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for model. + */ + com.google.protobuf.ByteString getModelBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UserActionReference.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UserActionReference.java new file mode 100644 index 000000000..622b9acb1 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UserActionReference.java @@ -0,0 +1,1176 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/user_action_reference.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * References an API call. It contains more information about long running
+ * operation and Jobs that are triggered by the API call.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.UserActionReference} + */ +public final class UserActionReference extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.UserActionReference) + UserActionReferenceOrBuilder { + private static final long serialVersionUID = 0L; + // Use UserActionReference.newBuilder() to construct. + private UserActionReference(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UserActionReference() { + method_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UserActionReference(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UserActionReference( + 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(); + referenceCase_ = 1; + reference_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + referenceCase_ = 2; + reference_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + method_ = 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.v1.UserActionReferenceProto + .internal_static_google_cloud_aiplatform_v1_UserActionReference_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.UserActionReferenceProto + .internal_static_google_cloud_aiplatform_v1_UserActionReference_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.UserActionReference.class, + com.google.cloud.aiplatform.v1.UserActionReference.Builder.class); + } + + private int referenceCase_ = 0; + private java.lang.Object reference_; + + public enum ReferenceCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + OPERATION(1), + DATA_LABELING_JOB(2), + REFERENCE_NOT_SET(0); + private final int value; + + private ReferenceCase(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 ReferenceCase valueOf(int value) { + return forNumber(value); + } + + public static ReferenceCase forNumber(int value) { + switch (value) { + case 1: + return OPERATION; + case 2: + return DATA_LABELING_JOB; + case 0: + return REFERENCE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ReferenceCase getReferenceCase() { + return ReferenceCase.forNumber(referenceCase_); + } + + public static final int OPERATION_FIELD_NUMBER = 1; + /** + * + * + *
+   * For API calls that return a long running operation.
+   * Resource name of the long running operation.
+   * Format:
+   * 'projects/{project}/locations/{location}/operations/{operation}'
+   * 
+ * + * string operation = 1; + * + * @return The operation. + */ + public java.lang.String getOperation() { + java.lang.Object ref = ""; + if (referenceCase_ == 1) { + ref = reference_; + } + 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(); + if (referenceCase_ == 1) { + reference_ = s; + } + return s; + } + } + /** + * + * + *
+   * For API calls that return a long running operation.
+   * Resource name of the long running operation.
+   * Format:
+   * 'projects/{project}/locations/{location}/operations/{operation}'
+   * 
+ * + * string operation = 1; + * + * @return The bytes for operation. + */ + public com.google.protobuf.ByteString getOperationBytes() { + java.lang.Object ref = ""; + if (referenceCase_ == 1) { + ref = reference_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (referenceCase_ == 1) { + reference_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATA_LABELING_JOB_FIELD_NUMBER = 2; + /** + * + * + *
+   * For API calls that start a LabelingJob.
+   * Resource name of the LabelingJob.
+   * Format:
+   * 'projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}'
+   * 
+ * + * string data_labeling_job = 2; + * + * @return The dataLabelingJob. + */ + public java.lang.String getDataLabelingJob() { + java.lang.Object ref = ""; + if (referenceCase_ == 2) { + ref = reference_; + } + 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(); + if (referenceCase_ == 2) { + reference_ = s; + } + return s; + } + } + /** + * + * + *
+   * For API calls that start a LabelingJob.
+   * Resource name of the LabelingJob.
+   * Format:
+   * 'projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}'
+   * 
+ * + * string data_labeling_job = 2; + * + * @return The bytes for dataLabelingJob. + */ + public com.google.protobuf.ByteString getDataLabelingJobBytes() { + java.lang.Object ref = ""; + if (referenceCase_ == 2) { + ref = reference_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (referenceCase_ == 2) { + reference_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int METHOD_FIELD_NUMBER = 3; + private volatile java.lang.Object method_; + /** + * + * + *
+   * The method name of the API call. For example,
+   * "/google.cloud.aiplatform.v1alpha1.DatasetService.CreateDataset"
+   * 
+ * + * string method = 3; + * + * @return The method. + */ + @java.lang.Override + public java.lang.String getMethod() { + java.lang.Object ref = method_; + 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(); + method_ = s; + return s; + } + } + /** + * + * + *
+   * The method name of the API call. For example,
+   * "/google.cloud.aiplatform.v1alpha1.DatasetService.CreateDataset"
+   * 
+ * + * string method = 3; + * + * @return The bytes for method. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMethodBytes() { + java.lang.Object ref = method_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + method_ = 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 (referenceCase_ == 1) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, reference_); + } + if (referenceCase_ == 2) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, reference_); + } + if (!getMethodBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, method_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (referenceCase_ == 1) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, reference_); + } + if (referenceCase_ == 2) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, reference_); + } + if (!getMethodBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, method_); + } + 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.v1.UserActionReference)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.UserActionReference other = + (com.google.cloud.aiplatform.v1.UserActionReference) obj; + + if (!getMethod().equals(other.getMethod())) return false; + if (!getReferenceCase().equals(other.getReferenceCase())) return false; + switch (referenceCase_) { + case 1: + if (!getOperation().equals(other.getOperation())) return false; + break; + case 2: + if (!getDataLabelingJob().equals(other.getDataLabelingJob())) 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) + METHOD_FIELD_NUMBER; + hash = (53 * hash) + getMethod().hashCode(); + switch (referenceCase_) { + case 1: + hash = (37 * hash) + OPERATION_FIELD_NUMBER; + hash = (53 * hash) + getOperation().hashCode(); + break; + case 2: + hash = (37 * hash) + DATA_LABELING_JOB_FIELD_NUMBER; + hash = (53 * hash) + getDataLabelingJob().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.UserActionReference parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UserActionReference 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.v1.UserActionReference parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UserActionReference 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.v1.UserActionReference parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UserActionReference parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.UserActionReference parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UserActionReference 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.v1.UserActionReference parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UserActionReference 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.v1.UserActionReference parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UserActionReference 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.v1.UserActionReference 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; + } + /** + * + * + *
+   * References an API call. It contains more information about long running
+   * operation and Jobs that are triggered by the API call.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.UserActionReference} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.UserActionReference) + com.google.cloud.aiplatform.v1.UserActionReferenceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.UserActionReferenceProto + .internal_static_google_cloud_aiplatform_v1_UserActionReference_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.UserActionReferenceProto + .internal_static_google_cloud_aiplatform_v1_UserActionReference_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.UserActionReference.class, + com.google.cloud.aiplatform.v1.UserActionReference.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.UserActionReference.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(); + method_ = ""; + + referenceCase_ = 0; + reference_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.UserActionReferenceProto + .internal_static_google_cloud_aiplatform_v1_UserActionReference_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UserActionReference getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.UserActionReference.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UserActionReference build() { + com.google.cloud.aiplatform.v1.UserActionReference result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UserActionReference buildPartial() { + com.google.cloud.aiplatform.v1.UserActionReference result = + new com.google.cloud.aiplatform.v1.UserActionReference(this); + if (referenceCase_ == 1) { + result.reference_ = reference_; + } + if (referenceCase_ == 2) { + result.reference_ = reference_; + } + result.method_ = method_; + result.referenceCase_ = referenceCase_; + 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.v1.UserActionReference) { + return mergeFrom((com.google.cloud.aiplatform.v1.UserActionReference) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.UserActionReference other) { + if (other == com.google.cloud.aiplatform.v1.UserActionReference.getDefaultInstance()) + return this; + if (!other.getMethod().isEmpty()) { + method_ = other.method_; + onChanged(); + } + switch (other.getReferenceCase()) { + case OPERATION: + { + referenceCase_ = 1; + reference_ = other.reference_; + onChanged(); + break; + } + case DATA_LABELING_JOB: + { + referenceCase_ = 2; + reference_ = other.reference_; + onChanged(); + break; + } + case REFERENCE_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.v1.UserActionReference parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.UserActionReference) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int referenceCase_ = 0; + private java.lang.Object reference_; + + public ReferenceCase getReferenceCase() { + return ReferenceCase.forNumber(referenceCase_); + } + + public Builder clearReference() { + referenceCase_ = 0; + reference_ = null; + onChanged(); + return this; + } + + /** + * + * + *
+     * For API calls that return a long running operation.
+     * Resource name of the long running operation.
+     * Format:
+     * 'projects/{project}/locations/{location}/operations/{operation}'
+     * 
+ * + * string operation = 1; + * + * @return The operation. + */ + @java.lang.Override + public java.lang.String getOperation() { + java.lang.Object ref = ""; + if (referenceCase_ == 1) { + ref = reference_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (referenceCase_ == 1) { + reference_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * For API calls that return a long running operation.
+     * Resource name of the long running operation.
+     * Format:
+     * 'projects/{project}/locations/{location}/operations/{operation}'
+     * 
+ * + * string operation = 1; + * + * @return The bytes for operation. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOperationBytes() { + java.lang.Object ref = ""; + if (referenceCase_ == 1) { + ref = reference_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (referenceCase_ == 1) { + reference_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * For API calls that return a long running operation.
+     * Resource name of the long running operation.
+     * Format:
+     * 'projects/{project}/locations/{location}/operations/{operation}'
+     * 
+ * + * string operation = 1; + * + * @param value The operation to set. + * @return This builder for chaining. + */ + public Builder setOperation(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + referenceCase_ = 1; + reference_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * For API calls that return a long running operation.
+     * Resource name of the long running operation.
+     * Format:
+     * 'projects/{project}/locations/{location}/operations/{operation}'
+     * 
+ * + * string operation = 1; + * + * @return This builder for chaining. + */ + public Builder clearOperation() { + if (referenceCase_ == 1) { + referenceCase_ = 0; + reference_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * For API calls that return a long running operation.
+     * Resource name of the long running operation.
+     * Format:
+     * 'projects/{project}/locations/{location}/operations/{operation}'
+     * 
+ * + * string operation = 1; + * + * @param value The bytes for operation to set. + * @return This builder for chaining. + */ + public Builder setOperationBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + referenceCase_ = 1; + reference_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * For API calls that start a LabelingJob.
+     * Resource name of the LabelingJob.
+     * Format:
+     * 'projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}'
+     * 
+ * + * string data_labeling_job = 2; + * + * @return The dataLabelingJob. + */ + @java.lang.Override + public java.lang.String getDataLabelingJob() { + java.lang.Object ref = ""; + if (referenceCase_ == 2) { + ref = reference_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (referenceCase_ == 2) { + reference_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * For API calls that start a LabelingJob.
+     * Resource name of the LabelingJob.
+     * Format:
+     * 'projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}'
+     * 
+ * + * string data_labeling_job = 2; + * + * @return The bytes for dataLabelingJob. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDataLabelingJobBytes() { + java.lang.Object ref = ""; + if (referenceCase_ == 2) { + ref = reference_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (referenceCase_ == 2) { + reference_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * For API calls that start a LabelingJob.
+     * Resource name of the LabelingJob.
+     * Format:
+     * 'projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}'
+     * 
+ * + * string data_labeling_job = 2; + * + * @param value The dataLabelingJob to set. + * @return This builder for chaining. + */ + public Builder setDataLabelingJob(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + referenceCase_ = 2; + reference_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * For API calls that start a LabelingJob.
+     * Resource name of the LabelingJob.
+     * Format:
+     * 'projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}'
+     * 
+ * + * string data_labeling_job = 2; + * + * @return This builder for chaining. + */ + public Builder clearDataLabelingJob() { + if (referenceCase_ == 2) { + referenceCase_ = 0; + reference_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * For API calls that start a LabelingJob.
+     * Resource name of the LabelingJob.
+     * Format:
+     * 'projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}'
+     * 
+ * + * string data_labeling_job = 2; + * + * @param value The bytes for dataLabelingJob to set. + * @return This builder for chaining. + */ + public Builder setDataLabelingJobBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + referenceCase_ = 2; + reference_ = value; + onChanged(); + return this; + } + + private java.lang.Object method_ = ""; + /** + * + * + *
+     * The method name of the API call. For example,
+     * "/google.cloud.aiplatform.v1alpha1.DatasetService.CreateDataset"
+     * 
+ * + * string method = 3; + * + * @return The method. + */ + public java.lang.String getMethod() { + java.lang.Object ref = method_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + method_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The method name of the API call. For example,
+     * "/google.cloud.aiplatform.v1alpha1.DatasetService.CreateDataset"
+     * 
+ * + * string method = 3; + * + * @return The bytes for method. + */ + public com.google.protobuf.ByteString getMethodBytes() { + java.lang.Object ref = method_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + method_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The method name of the API call. For example,
+     * "/google.cloud.aiplatform.v1alpha1.DatasetService.CreateDataset"
+     * 
+ * + * string method = 3; + * + * @param value The method to set. + * @return This builder for chaining. + */ + public Builder setMethod(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + method_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The method name of the API call. For example,
+     * "/google.cloud.aiplatform.v1alpha1.DatasetService.CreateDataset"
+     * 
+ * + * string method = 3; + * + * @return This builder for chaining. + */ + public Builder clearMethod() { + + method_ = getDefaultInstance().getMethod(); + onChanged(); + return this; + } + /** + * + * + *
+     * The method name of the API call. For example,
+     * "/google.cloud.aiplatform.v1alpha1.DatasetService.CreateDataset"
+     * 
+ * + * string method = 3; + * + * @param value The bytes for method to set. + * @return This builder for chaining. + */ + public Builder setMethodBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + method_ = 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.v1.UserActionReference) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.UserActionReference) + private static final com.google.cloud.aiplatform.v1.UserActionReference DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.UserActionReference(); + } + + public static com.google.cloud.aiplatform.v1.UserActionReference getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UserActionReference parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UserActionReference(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.v1.UserActionReference getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UserActionReferenceOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UserActionReferenceOrBuilder.java new file mode 100644 index 000000000..9770e4d3a --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UserActionReferenceOrBuilder.java @@ -0,0 +1,116 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/user_action_reference.proto + +package com.google.cloud.aiplatform.v1; + +public interface UserActionReferenceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.UserActionReference) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * For API calls that return a long running operation.
+   * Resource name of the long running operation.
+   * Format:
+   * 'projects/{project}/locations/{location}/operations/{operation}'
+   * 
+ * + * string operation = 1; + * + * @return The operation. + */ + java.lang.String getOperation(); + /** + * + * + *
+   * For API calls that return a long running operation.
+   * Resource name of the long running operation.
+   * Format:
+   * 'projects/{project}/locations/{location}/operations/{operation}'
+   * 
+ * + * string operation = 1; + * + * @return The bytes for operation. + */ + com.google.protobuf.ByteString getOperationBytes(); + + /** + * + * + *
+   * For API calls that start a LabelingJob.
+   * Resource name of the LabelingJob.
+   * Format:
+   * 'projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}'
+   * 
+ * + * string data_labeling_job = 2; + * + * @return The dataLabelingJob. + */ + java.lang.String getDataLabelingJob(); + /** + * + * + *
+   * For API calls that start a LabelingJob.
+   * Resource name of the LabelingJob.
+   * Format:
+   * 'projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}'
+   * 
+ * + * string data_labeling_job = 2; + * + * @return The bytes for dataLabelingJob. + */ + com.google.protobuf.ByteString getDataLabelingJobBytes(); + + /** + * + * + *
+   * The method name of the API call. For example,
+   * "/google.cloud.aiplatform.v1alpha1.DatasetService.CreateDataset"
+   * 
+ * + * string method = 3; + * + * @return The method. + */ + java.lang.String getMethod(); + /** + * + * + *
+   * The method name of the API call. For example,
+   * "/google.cloud.aiplatform.v1alpha1.DatasetService.CreateDataset"
+   * 
+ * + * string method = 3; + * + * @return The bytes for method. + */ + com.google.protobuf.ByteString getMethodBytes(); + + public com.google.cloud.aiplatform.v1.UserActionReference.ReferenceCase getReferenceCase(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UserActionReferenceProto.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UserActionReferenceProto.java new file mode 100644 index 000000000..98d774580 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UserActionReferenceProto.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/v1/user_action_reference.proto + +package com.google.cloud.aiplatform.v1; + +public final class UserActionReferenceProto { + private UserActionReferenceProto() {} + + 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_v1_UserActionReference_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_UserActionReference_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n6google/cloud/aiplatform/v1/user_action" + + "_reference.proto\022\032google.cloud.aiplatfor" + + "m.v1\032\034google/api/annotations.proto\"d\n\023Us" + + "erActionReference\022\023\n\toperation\030\001 \001(\tH\000\022\033" + + "\n\021data_labeling_job\030\002 \001(\tH\000\022\016\n\006method\030\003 " + + "\001(\tB\013\n\treferenceB\202\001\n\036com.google.cloud.ai" + + "platform.v1B\030UserActionReferenceProtoP\001Z" + + "Dgoogle.golang.org/genproto/googleapis/c" + + "loud/aiplatform/v1;aiplatformb\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_v1_UserActionReference_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_UserActionReference_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_UserActionReference_descriptor, + new java.lang.String[] { + "Operation", "DataLabelingJob", "Method", "Reference", + }); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/VersionName.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/VersionName.java new file mode 100644 index 000000000..6b5952f31 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/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.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +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-v1/src/main/java/com/google/cloud/aiplatform/v1/WorkerPoolSpec.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/WorkerPoolSpec.java new file mode 100644 index 000000000..390d8dd35 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/WorkerPoolSpec.java @@ -0,0 +1,1809 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/custom_job.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Represents the spec of a worker pool in a job.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.WorkerPoolSpec} + */ +public final class WorkerPoolSpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.WorkerPoolSpec) + WorkerPoolSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use WorkerPoolSpec.newBuilder() to construct. + private WorkerPoolSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private WorkerPoolSpec() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new WorkerPoolSpec(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private WorkerPoolSpec( + 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.v1.MachineSpec.Builder subBuilder = null; + if (machineSpec_ != null) { + subBuilder = machineSpec_.toBuilder(); + } + machineSpec_ = + input.readMessage( + com.google.cloud.aiplatform.v1.MachineSpec.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(machineSpec_); + machineSpec_ = subBuilder.buildPartial(); + } + + break; + } + case 16: + { + replicaCount_ = input.readInt64(); + break; + } + case 42: + { + com.google.cloud.aiplatform.v1.DiskSpec.Builder subBuilder = null; + if (diskSpec_ != null) { + subBuilder = diskSpec_.toBuilder(); + } + diskSpec_ = + input.readMessage( + com.google.cloud.aiplatform.v1.DiskSpec.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(diskSpec_); + diskSpec_ = subBuilder.buildPartial(); + } + + break; + } + case 50: + { + com.google.cloud.aiplatform.v1.ContainerSpec.Builder subBuilder = null; + if (taskCase_ == 6) { + subBuilder = ((com.google.cloud.aiplatform.v1.ContainerSpec) task_).toBuilder(); + } + task_ = + input.readMessage( + com.google.cloud.aiplatform.v1.ContainerSpec.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.aiplatform.v1.ContainerSpec) task_); + task_ = subBuilder.buildPartial(); + } + taskCase_ = 6; + break; + } + case 58: + { + com.google.cloud.aiplatform.v1.PythonPackageSpec.Builder subBuilder = null; + if (taskCase_ == 7) { + subBuilder = ((com.google.cloud.aiplatform.v1.PythonPackageSpec) task_).toBuilder(); + } + task_ = + input.readMessage( + com.google.cloud.aiplatform.v1.PythonPackageSpec.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.aiplatform.v1.PythonPackageSpec) task_); + task_ = subBuilder.buildPartial(); + } + taskCase_ = 7; + 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.v1.CustomJobProto + .internal_static_google_cloud_aiplatform_v1_WorkerPoolSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.CustomJobProto + .internal_static_google_cloud_aiplatform_v1_WorkerPoolSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.WorkerPoolSpec.class, + com.google.cloud.aiplatform.v1.WorkerPoolSpec.Builder.class); + } + + private int taskCase_ = 0; + private java.lang.Object task_; + + public enum TaskCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + CONTAINER_SPEC(6), + PYTHON_PACKAGE_SPEC(7), + TASK_NOT_SET(0); + private final int value; + + private TaskCase(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 TaskCase valueOf(int value) { + return forNumber(value); + } + + public static TaskCase forNumber(int value) { + switch (value) { + case 6: + return CONTAINER_SPEC; + case 7: + return PYTHON_PACKAGE_SPEC; + case 0: + return TASK_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public TaskCase getTaskCase() { + return TaskCase.forNumber(taskCase_); + } + + public static final int CONTAINER_SPEC_FIELD_NUMBER = 6; + /** + * + * + *
+   * The custom container task.
+   * 
+ * + * .google.cloud.aiplatform.v1.ContainerSpec container_spec = 6; + * + * @return Whether the containerSpec field is set. + */ + @java.lang.Override + public boolean hasContainerSpec() { + return taskCase_ == 6; + } + /** + * + * + *
+   * The custom container task.
+   * 
+ * + * .google.cloud.aiplatform.v1.ContainerSpec container_spec = 6; + * + * @return The containerSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ContainerSpec getContainerSpec() { + if (taskCase_ == 6) { + return (com.google.cloud.aiplatform.v1.ContainerSpec) task_; + } + return com.google.cloud.aiplatform.v1.ContainerSpec.getDefaultInstance(); + } + /** + * + * + *
+   * The custom container task.
+   * 
+ * + * .google.cloud.aiplatform.v1.ContainerSpec container_spec = 6; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ContainerSpecOrBuilder getContainerSpecOrBuilder() { + if (taskCase_ == 6) { + return (com.google.cloud.aiplatform.v1.ContainerSpec) task_; + } + return com.google.cloud.aiplatform.v1.ContainerSpec.getDefaultInstance(); + } + + public static final int PYTHON_PACKAGE_SPEC_FIELD_NUMBER = 7; + /** + * + * + *
+   * The Python packaged task.
+   * 
+ * + * .google.cloud.aiplatform.v1.PythonPackageSpec python_package_spec = 7; + * + * @return Whether the pythonPackageSpec field is set. + */ + @java.lang.Override + public boolean hasPythonPackageSpec() { + return taskCase_ == 7; + } + /** + * + * + *
+   * The Python packaged task.
+   * 
+ * + * .google.cloud.aiplatform.v1.PythonPackageSpec python_package_spec = 7; + * + * @return The pythonPackageSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.PythonPackageSpec getPythonPackageSpec() { + if (taskCase_ == 7) { + return (com.google.cloud.aiplatform.v1.PythonPackageSpec) task_; + } + return com.google.cloud.aiplatform.v1.PythonPackageSpec.getDefaultInstance(); + } + /** + * + * + *
+   * The Python packaged task.
+   * 
+ * + * .google.cloud.aiplatform.v1.PythonPackageSpec python_package_spec = 7; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.PythonPackageSpecOrBuilder getPythonPackageSpecOrBuilder() { + if (taskCase_ == 7) { + return (com.google.cloud.aiplatform.v1.PythonPackageSpec) task_; + } + return com.google.cloud.aiplatform.v1.PythonPackageSpec.getDefaultInstance(); + } + + public static final int MACHINE_SPEC_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1.MachineSpec machineSpec_; + /** + * + * + *
+   * Optional. Immutable. The specification of a single machine.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the machineSpec field is set. + */ + @java.lang.Override + public boolean hasMachineSpec() { + return machineSpec_ != null; + } + /** + * + * + *
+   * Optional. Immutable. The specification of a single machine.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The machineSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.MachineSpec getMachineSpec() { + return machineSpec_ == null + ? com.google.cloud.aiplatform.v1.MachineSpec.getDefaultInstance() + : machineSpec_; + } + /** + * + * + *
+   * Optional. Immutable. The specification of a single machine.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.MachineSpecOrBuilder getMachineSpecOrBuilder() { + return getMachineSpec(); + } + + public static final int REPLICA_COUNT_FIELD_NUMBER = 2; + private long replicaCount_; + /** + * + * + *
+   * Optional. The number of worker replicas to use for this worker pool.
+   * 
+ * + * int64 replica_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The replicaCount. + */ + @java.lang.Override + public long getReplicaCount() { + return replicaCount_; + } + + public static final int DISK_SPEC_FIELD_NUMBER = 5; + private com.google.cloud.aiplatform.v1.DiskSpec diskSpec_; + /** + * + * + *
+   * Disk spec.
+   * 
+ * + * .google.cloud.aiplatform.v1.DiskSpec disk_spec = 5; + * + * @return Whether the diskSpec field is set. + */ + @java.lang.Override + public boolean hasDiskSpec() { + return diskSpec_ != null; + } + /** + * + * + *
+   * Disk spec.
+   * 
+ * + * .google.cloud.aiplatform.v1.DiskSpec disk_spec = 5; + * + * @return The diskSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.DiskSpec getDiskSpec() { + return diskSpec_ == null + ? com.google.cloud.aiplatform.v1.DiskSpec.getDefaultInstance() + : diskSpec_; + } + /** + * + * + *
+   * Disk spec.
+   * 
+ * + * .google.cloud.aiplatform.v1.DiskSpec disk_spec = 5; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.DiskSpecOrBuilder getDiskSpecOrBuilder() { + return getDiskSpec(); + } + + 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 (machineSpec_ != null) { + output.writeMessage(1, getMachineSpec()); + } + if (replicaCount_ != 0L) { + output.writeInt64(2, replicaCount_); + } + if (diskSpec_ != null) { + output.writeMessage(5, getDiskSpec()); + } + if (taskCase_ == 6) { + output.writeMessage(6, (com.google.cloud.aiplatform.v1.ContainerSpec) task_); + } + if (taskCase_ == 7) { + output.writeMessage(7, (com.google.cloud.aiplatform.v1.PythonPackageSpec) task_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (machineSpec_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getMachineSpec()); + } + if (replicaCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, replicaCount_); + } + if (diskSpec_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getDiskSpec()); + } + if (taskCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, (com.google.cloud.aiplatform.v1.ContainerSpec) task_); + } + if (taskCase_ == 7) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, (com.google.cloud.aiplatform.v1.PythonPackageSpec) task_); + } + 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.v1.WorkerPoolSpec)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.WorkerPoolSpec other = + (com.google.cloud.aiplatform.v1.WorkerPoolSpec) obj; + + if (hasMachineSpec() != other.hasMachineSpec()) return false; + if (hasMachineSpec()) { + if (!getMachineSpec().equals(other.getMachineSpec())) return false; + } + if (getReplicaCount() != other.getReplicaCount()) return false; + if (hasDiskSpec() != other.hasDiskSpec()) return false; + if (hasDiskSpec()) { + if (!getDiskSpec().equals(other.getDiskSpec())) return false; + } + if (!getTaskCase().equals(other.getTaskCase())) return false; + switch (taskCase_) { + case 6: + if (!getContainerSpec().equals(other.getContainerSpec())) return false; + break; + case 7: + if (!getPythonPackageSpec().equals(other.getPythonPackageSpec())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasMachineSpec()) { + hash = (37 * hash) + MACHINE_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getMachineSpec().hashCode(); + } + hash = (37 * hash) + REPLICA_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getReplicaCount()); + if (hasDiskSpec()) { + hash = (37 * hash) + DISK_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getDiskSpec().hashCode(); + } + switch (taskCase_) { + case 6: + hash = (37 * hash) + CONTAINER_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getContainerSpec().hashCode(); + break; + case 7: + hash = (37 * hash) + PYTHON_PACKAGE_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getPythonPackageSpec().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.WorkerPoolSpec parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.WorkerPoolSpec 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.v1.WorkerPoolSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.WorkerPoolSpec 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.v1.WorkerPoolSpec parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.WorkerPoolSpec parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.WorkerPoolSpec parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.WorkerPoolSpec 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.v1.WorkerPoolSpec parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.WorkerPoolSpec 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.v1.WorkerPoolSpec parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.WorkerPoolSpec 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.v1.WorkerPoolSpec 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 the spec of a worker pool in a job.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.WorkerPoolSpec} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.WorkerPoolSpec) + com.google.cloud.aiplatform.v1.WorkerPoolSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.CustomJobProto + .internal_static_google_cloud_aiplatform_v1_WorkerPoolSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.CustomJobProto + .internal_static_google_cloud_aiplatform_v1_WorkerPoolSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.WorkerPoolSpec.class, + com.google.cloud.aiplatform.v1.WorkerPoolSpec.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.WorkerPoolSpec.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 (machineSpecBuilder_ == null) { + machineSpec_ = null; + } else { + machineSpec_ = null; + machineSpecBuilder_ = null; + } + replicaCount_ = 0L; + + if (diskSpecBuilder_ == null) { + diskSpec_ = null; + } else { + diskSpec_ = null; + diskSpecBuilder_ = null; + } + taskCase_ = 0; + task_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.CustomJobProto + .internal_static_google_cloud_aiplatform_v1_WorkerPoolSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.WorkerPoolSpec getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.WorkerPoolSpec.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.WorkerPoolSpec build() { + com.google.cloud.aiplatform.v1.WorkerPoolSpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.WorkerPoolSpec buildPartial() { + com.google.cloud.aiplatform.v1.WorkerPoolSpec result = + new com.google.cloud.aiplatform.v1.WorkerPoolSpec(this); + if (taskCase_ == 6) { + if (containerSpecBuilder_ == null) { + result.task_ = task_; + } else { + result.task_ = containerSpecBuilder_.build(); + } + } + if (taskCase_ == 7) { + if (pythonPackageSpecBuilder_ == null) { + result.task_ = task_; + } else { + result.task_ = pythonPackageSpecBuilder_.build(); + } + } + if (machineSpecBuilder_ == null) { + result.machineSpec_ = machineSpec_; + } else { + result.machineSpec_ = machineSpecBuilder_.build(); + } + result.replicaCount_ = replicaCount_; + if (diskSpecBuilder_ == null) { + result.diskSpec_ = diskSpec_; + } else { + result.diskSpec_ = diskSpecBuilder_.build(); + } + result.taskCase_ = taskCase_; + 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.v1.WorkerPoolSpec) { + return mergeFrom((com.google.cloud.aiplatform.v1.WorkerPoolSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.WorkerPoolSpec other) { + if (other == com.google.cloud.aiplatform.v1.WorkerPoolSpec.getDefaultInstance()) return this; + if (other.hasMachineSpec()) { + mergeMachineSpec(other.getMachineSpec()); + } + if (other.getReplicaCount() != 0L) { + setReplicaCount(other.getReplicaCount()); + } + if (other.hasDiskSpec()) { + mergeDiskSpec(other.getDiskSpec()); + } + switch (other.getTaskCase()) { + case CONTAINER_SPEC: + { + mergeContainerSpec(other.getContainerSpec()); + break; + } + case PYTHON_PACKAGE_SPEC: + { + mergePythonPackageSpec(other.getPythonPackageSpec()); + break; + } + case TASK_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.v1.WorkerPoolSpec parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.aiplatform.v1.WorkerPoolSpec) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int taskCase_ = 0; + private java.lang.Object task_; + + public TaskCase getTaskCase() { + return TaskCase.forNumber(taskCase_); + } + + public Builder clearTask() { + taskCase_ = 0; + task_ = null; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.ContainerSpec, + com.google.cloud.aiplatform.v1.ContainerSpec.Builder, + com.google.cloud.aiplatform.v1.ContainerSpecOrBuilder> + containerSpecBuilder_; + /** + * + * + *
+     * The custom container task.
+     * 
+ * + * .google.cloud.aiplatform.v1.ContainerSpec container_spec = 6; + * + * @return Whether the containerSpec field is set. + */ + @java.lang.Override + public boolean hasContainerSpec() { + return taskCase_ == 6; + } + /** + * + * + *
+     * The custom container task.
+     * 
+ * + * .google.cloud.aiplatform.v1.ContainerSpec container_spec = 6; + * + * @return The containerSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ContainerSpec getContainerSpec() { + if (containerSpecBuilder_ == null) { + if (taskCase_ == 6) { + return (com.google.cloud.aiplatform.v1.ContainerSpec) task_; + } + return com.google.cloud.aiplatform.v1.ContainerSpec.getDefaultInstance(); + } else { + if (taskCase_ == 6) { + return containerSpecBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1.ContainerSpec.getDefaultInstance(); + } + } + /** + * + * + *
+     * The custom container task.
+     * 
+ * + * .google.cloud.aiplatform.v1.ContainerSpec container_spec = 6; + */ + public Builder setContainerSpec(com.google.cloud.aiplatform.v1.ContainerSpec value) { + if (containerSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + task_ = value; + onChanged(); + } else { + containerSpecBuilder_.setMessage(value); + } + taskCase_ = 6; + return this; + } + /** + * + * + *
+     * The custom container task.
+     * 
+ * + * .google.cloud.aiplatform.v1.ContainerSpec container_spec = 6; + */ + public Builder setContainerSpec( + com.google.cloud.aiplatform.v1.ContainerSpec.Builder builderForValue) { + if (containerSpecBuilder_ == null) { + task_ = builderForValue.build(); + onChanged(); + } else { + containerSpecBuilder_.setMessage(builderForValue.build()); + } + taskCase_ = 6; + return this; + } + /** + * + * + *
+     * The custom container task.
+     * 
+ * + * .google.cloud.aiplatform.v1.ContainerSpec container_spec = 6; + */ + public Builder mergeContainerSpec(com.google.cloud.aiplatform.v1.ContainerSpec value) { + if (containerSpecBuilder_ == null) { + if (taskCase_ == 6 + && task_ != com.google.cloud.aiplatform.v1.ContainerSpec.getDefaultInstance()) { + task_ = + com.google.cloud.aiplatform.v1.ContainerSpec.newBuilder( + (com.google.cloud.aiplatform.v1.ContainerSpec) task_) + .mergeFrom(value) + .buildPartial(); + } else { + task_ = value; + } + onChanged(); + } else { + if (taskCase_ == 6) { + containerSpecBuilder_.mergeFrom(value); + } + containerSpecBuilder_.setMessage(value); + } + taskCase_ = 6; + return this; + } + /** + * + * + *
+     * The custom container task.
+     * 
+ * + * .google.cloud.aiplatform.v1.ContainerSpec container_spec = 6; + */ + public Builder clearContainerSpec() { + if (containerSpecBuilder_ == null) { + if (taskCase_ == 6) { + taskCase_ = 0; + task_ = null; + onChanged(); + } + } else { + if (taskCase_ == 6) { + taskCase_ = 0; + task_ = null; + } + containerSpecBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The custom container task.
+     * 
+ * + * .google.cloud.aiplatform.v1.ContainerSpec container_spec = 6; + */ + public com.google.cloud.aiplatform.v1.ContainerSpec.Builder getContainerSpecBuilder() { + return getContainerSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The custom container task.
+     * 
+ * + * .google.cloud.aiplatform.v1.ContainerSpec container_spec = 6; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ContainerSpecOrBuilder getContainerSpecOrBuilder() { + if ((taskCase_ == 6) && (containerSpecBuilder_ != null)) { + return containerSpecBuilder_.getMessageOrBuilder(); + } else { + if (taskCase_ == 6) { + return (com.google.cloud.aiplatform.v1.ContainerSpec) task_; + } + return com.google.cloud.aiplatform.v1.ContainerSpec.getDefaultInstance(); + } + } + /** + * + * + *
+     * The custom container task.
+     * 
+ * + * .google.cloud.aiplatform.v1.ContainerSpec container_spec = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.ContainerSpec, + com.google.cloud.aiplatform.v1.ContainerSpec.Builder, + com.google.cloud.aiplatform.v1.ContainerSpecOrBuilder> + getContainerSpecFieldBuilder() { + if (containerSpecBuilder_ == null) { + if (!(taskCase_ == 6)) { + task_ = com.google.cloud.aiplatform.v1.ContainerSpec.getDefaultInstance(); + } + containerSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.ContainerSpec, + com.google.cloud.aiplatform.v1.ContainerSpec.Builder, + com.google.cloud.aiplatform.v1.ContainerSpecOrBuilder>( + (com.google.cloud.aiplatform.v1.ContainerSpec) task_, + getParentForChildren(), + isClean()); + task_ = null; + } + taskCase_ = 6; + onChanged(); + ; + return containerSpecBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.PythonPackageSpec, + com.google.cloud.aiplatform.v1.PythonPackageSpec.Builder, + com.google.cloud.aiplatform.v1.PythonPackageSpecOrBuilder> + pythonPackageSpecBuilder_; + /** + * + * + *
+     * The Python packaged task.
+     * 
+ * + * .google.cloud.aiplatform.v1.PythonPackageSpec python_package_spec = 7; + * + * @return Whether the pythonPackageSpec field is set. + */ + @java.lang.Override + public boolean hasPythonPackageSpec() { + return taskCase_ == 7; + } + /** + * + * + *
+     * The Python packaged task.
+     * 
+ * + * .google.cloud.aiplatform.v1.PythonPackageSpec python_package_spec = 7; + * + * @return The pythonPackageSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.PythonPackageSpec getPythonPackageSpec() { + if (pythonPackageSpecBuilder_ == null) { + if (taskCase_ == 7) { + return (com.google.cloud.aiplatform.v1.PythonPackageSpec) task_; + } + return com.google.cloud.aiplatform.v1.PythonPackageSpec.getDefaultInstance(); + } else { + if (taskCase_ == 7) { + return pythonPackageSpecBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1.PythonPackageSpec.getDefaultInstance(); + } + } + /** + * + * + *
+     * The Python packaged task.
+     * 
+ * + * .google.cloud.aiplatform.v1.PythonPackageSpec python_package_spec = 7; + */ + public Builder setPythonPackageSpec(com.google.cloud.aiplatform.v1.PythonPackageSpec value) { + if (pythonPackageSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + task_ = value; + onChanged(); + } else { + pythonPackageSpecBuilder_.setMessage(value); + } + taskCase_ = 7; + return this; + } + /** + * + * + *
+     * The Python packaged task.
+     * 
+ * + * .google.cloud.aiplatform.v1.PythonPackageSpec python_package_spec = 7; + */ + public Builder setPythonPackageSpec( + com.google.cloud.aiplatform.v1.PythonPackageSpec.Builder builderForValue) { + if (pythonPackageSpecBuilder_ == null) { + task_ = builderForValue.build(); + onChanged(); + } else { + pythonPackageSpecBuilder_.setMessage(builderForValue.build()); + } + taskCase_ = 7; + return this; + } + /** + * + * + *
+     * The Python packaged task.
+     * 
+ * + * .google.cloud.aiplatform.v1.PythonPackageSpec python_package_spec = 7; + */ + public Builder mergePythonPackageSpec(com.google.cloud.aiplatform.v1.PythonPackageSpec value) { + if (pythonPackageSpecBuilder_ == null) { + if (taskCase_ == 7 + && task_ != com.google.cloud.aiplatform.v1.PythonPackageSpec.getDefaultInstance()) { + task_ = + com.google.cloud.aiplatform.v1.PythonPackageSpec.newBuilder( + (com.google.cloud.aiplatform.v1.PythonPackageSpec) task_) + .mergeFrom(value) + .buildPartial(); + } else { + task_ = value; + } + onChanged(); + } else { + if (taskCase_ == 7) { + pythonPackageSpecBuilder_.mergeFrom(value); + } + pythonPackageSpecBuilder_.setMessage(value); + } + taskCase_ = 7; + return this; + } + /** + * + * + *
+     * The Python packaged task.
+     * 
+ * + * .google.cloud.aiplatform.v1.PythonPackageSpec python_package_spec = 7; + */ + public Builder clearPythonPackageSpec() { + if (pythonPackageSpecBuilder_ == null) { + if (taskCase_ == 7) { + taskCase_ = 0; + task_ = null; + onChanged(); + } + } else { + if (taskCase_ == 7) { + taskCase_ = 0; + task_ = null; + } + pythonPackageSpecBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The Python packaged task.
+     * 
+ * + * .google.cloud.aiplatform.v1.PythonPackageSpec python_package_spec = 7; + */ + public com.google.cloud.aiplatform.v1.PythonPackageSpec.Builder getPythonPackageSpecBuilder() { + return getPythonPackageSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The Python packaged task.
+     * 
+ * + * .google.cloud.aiplatform.v1.PythonPackageSpec python_package_spec = 7; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.PythonPackageSpecOrBuilder + getPythonPackageSpecOrBuilder() { + if ((taskCase_ == 7) && (pythonPackageSpecBuilder_ != null)) { + return pythonPackageSpecBuilder_.getMessageOrBuilder(); + } else { + if (taskCase_ == 7) { + return (com.google.cloud.aiplatform.v1.PythonPackageSpec) task_; + } + return com.google.cloud.aiplatform.v1.PythonPackageSpec.getDefaultInstance(); + } + } + /** + * + * + *
+     * The Python packaged task.
+     * 
+ * + * .google.cloud.aiplatform.v1.PythonPackageSpec python_package_spec = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.PythonPackageSpec, + com.google.cloud.aiplatform.v1.PythonPackageSpec.Builder, + com.google.cloud.aiplatform.v1.PythonPackageSpecOrBuilder> + getPythonPackageSpecFieldBuilder() { + if (pythonPackageSpecBuilder_ == null) { + if (!(taskCase_ == 7)) { + task_ = com.google.cloud.aiplatform.v1.PythonPackageSpec.getDefaultInstance(); + } + pythonPackageSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.PythonPackageSpec, + com.google.cloud.aiplatform.v1.PythonPackageSpec.Builder, + com.google.cloud.aiplatform.v1.PythonPackageSpecOrBuilder>( + (com.google.cloud.aiplatform.v1.PythonPackageSpec) task_, + getParentForChildren(), + isClean()); + task_ = null; + } + taskCase_ = 7; + onChanged(); + ; + return pythonPackageSpecBuilder_; + } + + private com.google.cloud.aiplatform.v1.MachineSpec machineSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.MachineSpec, + com.google.cloud.aiplatform.v1.MachineSpec.Builder, + com.google.cloud.aiplatform.v1.MachineSpecOrBuilder> + machineSpecBuilder_; + /** + * + * + *
+     * Optional. Immutable. The specification of a single machine.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the machineSpec field is set. + */ + public boolean hasMachineSpec() { + return machineSpecBuilder_ != null || machineSpec_ != null; + } + /** + * + * + *
+     * Optional. Immutable. The specification of a single machine.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The machineSpec. + */ + public com.google.cloud.aiplatform.v1.MachineSpec getMachineSpec() { + if (machineSpecBuilder_ == null) { + return machineSpec_ == null + ? com.google.cloud.aiplatform.v1.MachineSpec.getDefaultInstance() + : machineSpec_; + } else { + return machineSpecBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Immutable. The specification of a single machine.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder setMachineSpec(com.google.cloud.aiplatform.v1.MachineSpec value) { + if (machineSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + machineSpec_ = value; + onChanged(); + } else { + machineSpecBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Immutable. The specification of a single machine.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder setMachineSpec( + com.google.cloud.aiplatform.v1.MachineSpec.Builder builderForValue) { + if (machineSpecBuilder_ == null) { + machineSpec_ = builderForValue.build(); + onChanged(); + } else { + machineSpecBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. Immutable. The specification of a single machine.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder mergeMachineSpec(com.google.cloud.aiplatform.v1.MachineSpec value) { + if (machineSpecBuilder_ == null) { + if (machineSpec_ != null) { + machineSpec_ = + com.google.cloud.aiplatform.v1.MachineSpec.newBuilder(machineSpec_) + .mergeFrom(value) + .buildPartial(); + } else { + machineSpec_ = value; + } + onChanged(); + } else { + machineSpecBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Immutable. The specification of a single machine.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder clearMachineSpec() { + if (machineSpecBuilder_ == null) { + machineSpec_ = null; + onChanged(); + } else { + machineSpec_ = null; + machineSpecBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. Immutable. The specification of a single machine.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public com.google.cloud.aiplatform.v1.MachineSpec.Builder getMachineSpecBuilder() { + + onChanged(); + return getMachineSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Immutable. The specification of a single machine.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public com.google.cloud.aiplatform.v1.MachineSpecOrBuilder getMachineSpecOrBuilder() { + if (machineSpecBuilder_ != null) { + return machineSpecBuilder_.getMessageOrBuilder(); + } else { + return machineSpec_ == null + ? com.google.cloud.aiplatform.v1.MachineSpec.getDefaultInstance() + : machineSpec_; + } + } + /** + * + * + *
+     * Optional. Immutable. The specification of a single machine.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.MachineSpec, + com.google.cloud.aiplatform.v1.MachineSpec.Builder, + com.google.cloud.aiplatform.v1.MachineSpecOrBuilder> + getMachineSpecFieldBuilder() { + if (machineSpecBuilder_ == null) { + machineSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.MachineSpec, + com.google.cloud.aiplatform.v1.MachineSpec.Builder, + com.google.cloud.aiplatform.v1.MachineSpecOrBuilder>( + getMachineSpec(), getParentForChildren(), isClean()); + machineSpec_ = null; + } + return machineSpecBuilder_; + } + + private long replicaCount_; + /** + * + * + *
+     * Optional. The number of worker replicas to use for this worker pool.
+     * 
+ * + * int64 replica_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The replicaCount. + */ + @java.lang.Override + public long getReplicaCount() { + return replicaCount_; + } + /** + * + * + *
+     * Optional. The number of worker replicas to use for this worker pool.
+     * 
+ * + * int64 replica_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The replicaCount to set. + * @return This builder for chaining. + */ + public Builder setReplicaCount(long value) { + + replicaCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The number of worker replicas to use for this worker pool.
+     * 
+ * + * int64 replica_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearReplicaCount() { + + replicaCount_ = 0L; + onChanged(); + return this; + } + + private com.google.cloud.aiplatform.v1.DiskSpec diskSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.DiskSpec, + com.google.cloud.aiplatform.v1.DiskSpec.Builder, + com.google.cloud.aiplatform.v1.DiskSpecOrBuilder> + diskSpecBuilder_; + /** + * + * + *
+     * Disk spec.
+     * 
+ * + * .google.cloud.aiplatform.v1.DiskSpec disk_spec = 5; + * + * @return Whether the diskSpec field is set. + */ + public boolean hasDiskSpec() { + return diskSpecBuilder_ != null || diskSpec_ != null; + } + /** + * + * + *
+     * Disk spec.
+     * 
+ * + * .google.cloud.aiplatform.v1.DiskSpec disk_spec = 5; + * + * @return The diskSpec. + */ + public com.google.cloud.aiplatform.v1.DiskSpec getDiskSpec() { + if (diskSpecBuilder_ == null) { + return diskSpec_ == null + ? com.google.cloud.aiplatform.v1.DiskSpec.getDefaultInstance() + : diskSpec_; + } else { + return diskSpecBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Disk spec.
+     * 
+ * + * .google.cloud.aiplatform.v1.DiskSpec disk_spec = 5; + */ + public Builder setDiskSpec(com.google.cloud.aiplatform.v1.DiskSpec value) { + if (diskSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + diskSpec_ = value; + onChanged(); + } else { + diskSpecBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Disk spec.
+     * 
+ * + * .google.cloud.aiplatform.v1.DiskSpec disk_spec = 5; + */ + public Builder setDiskSpec(com.google.cloud.aiplatform.v1.DiskSpec.Builder builderForValue) { + if (diskSpecBuilder_ == null) { + diskSpec_ = builderForValue.build(); + onChanged(); + } else { + diskSpecBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Disk spec.
+     * 
+ * + * .google.cloud.aiplatform.v1.DiskSpec disk_spec = 5; + */ + public Builder mergeDiskSpec(com.google.cloud.aiplatform.v1.DiskSpec value) { + if (diskSpecBuilder_ == null) { + if (diskSpec_ != null) { + diskSpec_ = + com.google.cloud.aiplatform.v1.DiskSpec.newBuilder(diskSpec_) + .mergeFrom(value) + .buildPartial(); + } else { + diskSpec_ = value; + } + onChanged(); + } else { + diskSpecBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Disk spec.
+     * 
+ * + * .google.cloud.aiplatform.v1.DiskSpec disk_spec = 5; + */ + public Builder clearDiskSpec() { + if (diskSpecBuilder_ == null) { + diskSpec_ = null; + onChanged(); + } else { + diskSpec_ = null; + diskSpecBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Disk spec.
+     * 
+ * + * .google.cloud.aiplatform.v1.DiskSpec disk_spec = 5; + */ + public com.google.cloud.aiplatform.v1.DiskSpec.Builder getDiskSpecBuilder() { + + onChanged(); + return getDiskSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Disk spec.
+     * 
+ * + * .google.cloud.aiplatform.v1.DiskSpec disk_spec = 5; + */ + public com.google.cloud.aiplatform.v1.DiskSpecOrBuilder getDiskSpecOrBuilder() { + if (diskSpecBuilder_ != null) { + return diskSpecBuilder_.getMessageOrBuilder(); + } else { + return diskSpec_ == null + ? com.google.cloud.aiplatform.v1.DiskSpec.getDefaultInstance() + : diskSpec_; + } + } + /** + * + * + *
+     * Disk spec.
+     * 
+ * + * .google.cloud.aiplatform.v1.DiskSpec disk_spec = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.DiskSpec, + com.google.cloud.aiplatform.v1.DiskSpec.Builder, + com.google.cloud.aiplatform.v1.DiskSpecOrBuilder> + getDiskSpecFieldBuilder() { + if (diskSpecBuilder_ == null) { + diskSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.DiskSpec, + com.google.cloud.aiplatform.v1.DiskSpec.Builder, + com.google.cloud.aiplatform.v1.DiskSpecOrBuilder>( + getDiskSpec(), getParentForChildren(), isClean()); + diskSpec_ = null; + } + return diskSpecBuilder_; + } + + @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.v1.WorkerPoolSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.WorkerPoolSpec) + private static final com.google.cloud.aiplatform.v1.WorkerPoolSpec DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.WorkerPoolSpec(); + } + + public static com.google.cloud.aiplatform.v1.WorkerPoolSpec getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WorkerPoolSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new WorkerPoolSpec(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.v1.WorkerPoolSpec getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/WorkerPoolSpecOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/WorkerPoolSpecOrBuilder.java new file mode 100644 index 000000000..e303ba31e --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/WorkerPoolSpecOrBuilder.java @@ -0,0 +1,186 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/custom_job.proto + +package com.google.cloud.aiplatform.v1; + +public interface WorkerPoolSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.WorkerPoolSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The custom container task.
+   * 
+ * + * .google.cloud.aiplatform.v1.ContainerSpec container_spec = 6; + * + * @return Whether the containerSpec field is set. + */ + boolean hasContainerSpec(); + /** + * + * + *
+   * The custom container task.
+   * 
+ * + * .google.cloud.aiplatform.v1.ContainerSpec container_spec = 6; + * + * @return The containerSpec. + */ + com.google.cloud.aiplatform.v1.ContainerSpec getContainerSpec(); + /** + * + * + *
+   * The custom container task.
+   * 
+ * + * .google.cloud.aiplatform.v1.ContainerSpec container_spec = 6; + */ + com.google.cloud.aiplatform.v1.ContainerSpecOrBuilder getContainerSpecOrBuilder(); + + /** + * + * + *
+   * The Python packaged task.
+   * 
+ * + * .google.cloud.aiplatform.v1.PythonPackageSpec python_package_spec = 7; + * + * @return Whether the pythonPackageSpec field is set. + */ + boolean hasPythonPackageSpec(); + /** + * + * + *
+   * The Python packaged task.
+   * 
+ * + * .google.cloud.aiplatform.v1.PythonPackageSpec python_package_spec = 7; + * + * @return The pythonPackageSpec. + */ + com.google.cloud.aiplatform.v1.PythonPackageSpec getPythonPackageSpec(); + /** + * + * + *
+   * The Python packaged task.
+   * 
+ * + * .google.cloud.aiplatform.v1.PythonPackageSpec python_package_spec = 7; + */ + com.google.cloud.aiplatform.v1.PythonPackageSpecOrBuilder getPythonPackageSpecOrBuilder(); + + /** + * + * + *
+   * Optional. Immutable. The specification of a single machine.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the machineSpec field is set. + */ + boolean hasMachineSpec(); + /** + * + * + *
+   * Optional. Immutable. The specification of a single machine.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The machineSpec. + */ + com.google.cloud.aiplatform.v1.MachineSpec getMachineSpec(); + /** + * + * + *
+   * Optional. Immutable. The specification of a single machine.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + com.google.cloud.aiplatform.v1.MachineSpecOrBuilder getMachineSpecOrBuilder(); + + /** + * + * + *
+   * Optional. The number of worker replicas to use for this worker pool.
+   * 
+ * + * int64 replica_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The replicaCount. + */ + long getReplicaCount(); + + /** + * + * + *
+   * Disk spec.
+   * 
+ * + * .google.cloud.aiplatform.v1.DiskSpec disk_spec = 5; + * + * @return Whether the diskSpec field is set. + */ + boolean hasDiskSpec(); + /** + * + * + *
+   * Disk spec.
+   * 
+ * + * .google.cloud.aiplatform.v1.DiskSpec disk_spec = 5; + * + * @return The diskSpec. + */ + com.google.cloud.aiplatform.v1.DiskSpec getDiskSpec(); + /** + * + * + *
+   * Disk spec.
+   * 
+ * + * .google.cloud.aiplatform.v1.DiskSpec disk_spec = 5; + */ + com.google.cloud.aiplatform.v1.DiskSpecOrBuilder getDiskSpecOrBuilder(); + + public com.google.cloud.aiplatform.v1.WorkerPoolSpec.TaskCase getTaskCase(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/instance/ImageClassificationPredictionInstance.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/instance/ImageClassificationPredictionInstance.java new file mode 100644 index 000000000..9133cf14a --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/instance/ImageClassificationPredictionInstance.java @@ -0,0 +1,942 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/schema/predict/instance/image_classification.proto + +package com.google.cloud.aiplatform.v1.schema.predict.instance; + +/** + * + * + *
+ * Prediction input format for Image Classification.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1.schema.predict.instance.ImageClassificationPredictionInstance} + */ +public final class ImageClassificationPredictionInstance + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.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.v1.schema.predict.instance + .ImageClassificationPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_instance_ImageClassificationPredictionInstance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.predict.instance + .ImageClassificationPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_instance_ImageClassificationPredictionInstance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.predict.instance + .ImageClassificationPredictionInstance.class, + com.google.cloud.aiplatform.v1.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.v1.schema.predict.instance + .ImageClassificationPredictionInstance)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.schema.predict.instance.ImageClassificationPredictionInstance + other = + (com.google.cloud.aiplatform.v1.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.v1.schema.predict.instance + .ImageClassificationPredictionInstance + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.predict.instance + .ImageClassificationPredictionInstance + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.schema.predict.instance.ImageClassificationPredictionInstance} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.schema.predict.instance.ImageClassificationPredictionInstance) + com.google.cloud.aiplatform.v1.schema.predict.instance + .ImageClassificationPredictionInstanceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.schema.predict.instance + .ImageClassificationPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_instance_ImageClassificationPredictionInstance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.predict.instance + .ImageClassificationPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_instance_ImageClassificationPredictionInstance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.predict.instance + .ImageClassificationPredictionInstance.class, + com.google.cloud.aiplatform.v1.schema.predict.instance + .ImageClassificationPredictionInstance.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.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.v1.schema.predict.instance + .ImageClassificationPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_instance_ImageClassificationPredictionInstance_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.instance + .ImageClassificationPredictionInstance + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.schema.predict.instance + .ImageClassificationPredictionInstance.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.instance + .ImageClassificationPredictionInstance + build() { + com.google.cloud.aiplatform.v1.schema.predict.instance.ImageClassificationPredictionInstance + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.instance + .ImageClassificationPredictionInstance + buildPartial() { + com.google.cloud.aiplatform.v1.schema.predict.instance.ImageClassificationPredictionInstance + result = + new com.google.cloud.aiplatform.v1.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.v1.schema.predict.instance + .ImageClassificationPredictionInstance) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.schema.predict.instance + .ImageClassificationPredictionInstance) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.schema.predict.instance.ImageClassificationPredictionInstance + other) { + if (other + == com.google.cloud.aiplatform.v1.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.v1.schema.predict.instance.ImageClassificationPredictionInstance + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.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.v1.schema.predict.instance.ImageClassificationPredictionInstance) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.schema.predict.instance.ImageClassificationPredictionInstance) + private static final com.google.cloud.aiplatform.v1.schema.predict.instance + .ImageClassificationPredictionInstance + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.schema.predict.instance + .ImageClassificationPredictionInstance(); + } + + public static com.google.cloud.aiplatform.v1.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.v1.schema.predict.instance + .ImageClassificationPredictionInstance + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/instance/ImageClassificationPredictionInstanceOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/instance/ImageClassificationPredictionInstanceOrBuilder.java new file mode 100644 index 000000000..fc5226a2d --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/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/v1/schema/predict/instance/image_classification.proto + +package com.google.cloud.aiplatform.v1.schema.predict.instance; + +public interface ImageClassificationPredictionInstanceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.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-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/instance/ImageClassificationPredictionInstanceProto.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/instance/ImageClassificationPredictionInstanceProto.java new file mode 100644 index 000000000..decc0530a --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/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/v1/schema/predict/instance/image_classification.proto + +package com.google.cloud.aiplatform.v1.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_v1_schema_predict_instance_ImageClassificationPredictionInstance_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_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 = { + "\nMgoogle/cloud/aiplatform/v1/schema/pred" + + "ict/instance/image_classification.proto\022" + + "2google.cloud.aiplatform.v1.schema.predi" + + "ct.instance\032\034google/api/annotations.prot" + + "o\"K\n%ImageClassificationPredictionInstan" + + "ce\022\017\n\007content\030\001 \001(\t\022\021\n\tmime_type\030\002 \001(\tB\302" + + "\001\n6com.google.cloud.aiplatform.v1.schema" + + ".predict.instanceB*ImageClassificationPr" + + "edictionInstanceProtoP\001ZZgoogle.golang.o" + + "rg/genproto/googleapis/cloud/aiplatform/" + + "v1/schema/predict/instance;instanceb\006pro" + + "to3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1_schema_predict_instance_ImageClassificationPredictionInstance_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_schema_predict_instance_ImageClassificationPredictionInstance_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_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-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/instance/ImageObjectDetectionPredictionInstance.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/instance/ImageObjectDetectionPredictionInstance.java new file mode 100644 index 000000000..15ec49366 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/instance/ImageObjectDetectionPredictionInstance.java @@ -0,0 +1,943 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/schema/predict/instance/image_object_detection.proto + +package com.google.cloud.aiplatform.v1.schema.predict.instance; + +/** + * + * + *
+ * Prediction input format for Image Object Detection.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1.schema.predict.instance.ImageObjectDetectionPredictionInstance} + */ +public final class ImageObjectDetectionPredictionInstance + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.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.v1.schema.predict.instance + .ImageObjectDetectionPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_instance_ImageObjectDetectionPredictionInstance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.predict.instance + .ImageObjectDetectionPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_instance_ImageObjectDetectionPredictionInstance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.predict.instance + .ImageObjectDetectionPredictionInstance.class, + com.google.cloud.aiplatform.v1.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.v1.schema.predict.instance + .ImageObjectDetectionPredictionInstance)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.schema.predict.instance.ImageObjectDetectionPredictionInstance + other = + (com.google.cloud.aiplatform.v1.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.v1.schema.predict.instance + .ImageObjectDetectionPredictionInstance + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.predict.instance + .ImageObjectDetectionPredictionInstance + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.schema.predict.instance.ImageObjectDetectionPredictionInstance} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.schema.predict.instance.ImageObjectDetectionPredictionInstance) + com.google.cloud.aiplatform.v1.schema.predict.instance + .ImageObjectDetectionPredictionInstanceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.schema.predict.instance + .ImageObjectDetectionPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_instance_ImageObjectDetectionPredictionInstance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.predict.instance + .ImageObjectDetectionPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_instance_ImageObjectDetectionPredictionInstance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.predict.instance + .ImageObjectDetectionPredictionInstance.class, + com.google.cloud.aiplatform.v1.schema.predict.instance + .ImageObjectDetectionPredictionInstance.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.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.v1.schema.predict.instance + .ImageObjectDetectionPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_instance_ImageObjectDetectionPredictionInstance_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.instance + .ImageObjectDetectionPredictionInstance + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.schema.predict.instance + .ImageObjectDetectionPredictionInstance.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.instance + .ImageObjectDetectionPredictionInstance + build() { + com.google.cloud.aiplatform.v1.schema.predict.instance.ImageObjectDetectionPredictionInstance + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.instance + .ImageObjectDetectionPredictionInstance + buildPartial() { + com.google.cloud.aiplatform.v1.schema.predict.instance.ImageObjectDetectionPredictionInstance + result = + new com.google.cloud.aiplatform.v1.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.v1.schema.predict.instance + .ImageObjectDetectionPredictionInstance) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.schema.predict.instance + .ImageObjectDetectionPredictionInstance) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.schema.predict.instance + .ImageObjectDetectionPredictionInstance + other) { + if (other + == com.google.cloud.aiplatform.v1.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.v1.schema.predict.instance.ImageObjectDetectionPredictionInstance + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.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.v1.schema.predict.instance.ImageObjectDetectionPredictionInstance) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.schema.predict.instance.ImageObjectDetectionPredictionInstance) + private static final com.google.cloud.aiplatform.v1.schema.predict.instance + .ImageObjectDetectionPredictionInstance + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.schema.predict.instance + .ImageObjectDetectionPredictionInstance(); + } + + public static com.google.cloud.aiplatform.v1.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.v1.schema.predict.instance + .ImageObjectDetectionPredictionInstance + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/instance/ImageObjectDetectionPredictionInstanceOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/instance/ImageObjectDetectionPredictionInstanceOrBuilder.java new file mode 100644 index 000000000..33da17665 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/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/v1/schema/predict/instance/image_object_detection.proto + +package com.google.cloud.aiplatform.v1.schema.predict.instance; + +public interface ImageObjectDetectionPredictionInstanceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.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-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/instance/ImageObjectDetectionPredictionInstanceProto.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/instance/ImageObjectDetectionPredictionInstanceProto.java new file mode 100644 index 000000000..f1c73c2ba --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/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/v1/schema/predict/instance/image_object_detection.proto + +package com.google.cloud.aiplatform.v1.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_v1_schema_predict_instance_ImageObjectDetectionPredictionInstance_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_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 = { + "\nOgoogle/cloud/aiplatform/v1/schema/pred" + + "ict/instance/image_object_detection.prot" + + "o\0222google.cloud.aiplatform.v1.schema.pre" + + "dict.instance\032\034google/api/annotations.pr" + + "oto\"L\n&ImageObjectDetectionPredictionIns" + + "tance\022\017\n\007content\030\001 \001(\t\022\021\n\tmime_type\030\002 \001(" + + "\tB\303\001\n6com.google.cloud.aiplatform.v1.sch" + + "ema.predict.instanceB+ImageObjectDetecti" + + "onPredictionInstanceProtoP\001ZZgoogle.gola" + + "ng.org/genproto/googleapis/cloud/aiplatf" + + "orm/v1/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_v1_schema_predict_instance_ImageObjectDetectionPredictionInstance_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_schema_predict_instance_ImageObjectDetectionPredictionInstance_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_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-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/instance/ImageSegmentationPredictionInstance.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/instance/ImageSegmentationPredictionInstance.java new file mode 100644 index 000000000..46c90c91d --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/instance/ImageSegmentationPredictionInstance.java @@ -0,0 +1,906 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/schema/predict/instance/image_segmentation.proto + +package com.google.cloud.aiplatform.v1.schema.predict.instance; + +/** + * + * + *
+ * Prediction input format for Image Segmentation.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1.schema.predict.instance.ImageSegmentationPredictionInstance} + */ +public final class ImageSegmentationPredictionInstance + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.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.v1.schema.predict.instance + .ImageSegmentationPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_instance_ImageSegmentationPredictionInstance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.predict.instance + .ImageSegmentationPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_instance_ImageSegmentationPredictionInstance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.predict.instance + .ImageSegmentationPredictionInstance.class, + com.google.cloud.aiplatform.v1.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.v1.schema.predict.instance + .ImageSegmentationPredictionInstance)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.schema.predict.instance.ImageSegmentationPredictionInstance + other = + (com.google.cloud.aiplatform.v1.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.v1.schema.predict.instance + .ImageSegmentationPredictionInstance + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.predict.instance + .ImageSegmentationPredictionInstance + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.schema.predict.instance.ImageSegmentationPredictionInstance} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.schema.predict.instance.ImageSegmentationPredictionInstance) + com.google.cloud.aiplatform.v1.schema.predict.instance + .ImageSegmentationPredictionInstanceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.schema.predict.instance + .ImageSegmentationPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_instance_ImageSegmentationPredictionInstance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.predict.instance + .ImageSegmentationPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_instance_ImageSegmentationPredictionInstance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.predict.instance + .ImageSegmentationPredictionInstance.class, + com.google.cloud.aiplatform.v1.schema.predict.instance + .ImageSegmentationPredictionInstance.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.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.v1.schema.predict.instance + .ImageSegmentationPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_instance_ImageSegmentationPredictionInstance_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.instance + .ImageSegmentationPredictionInstance + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.schema.predict.instance + .ImageSegmentationPredictionInstance.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.instance + .ImageSegmentationPredictionInstance + build() { + com.google.cloud.aiplatform.v1.schema.predict.instance.ImageSegmentationPredictionInstance + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.instance + .ImageSegmentationPredictionInstance + buildPartial() { + com.google.cloud.aiplatform.v1.schema.predict.instance.ImageSegmentationPredictionInstance + result = + new com.google.cloud.aiplatform.v1.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.v1.schema.predict.instance + .ImageSegmentationPredictionInstance) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.schema.predict.instance + .ImageSegmentationPredictionInstance) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.schema.predict.instance.ImageSegmentationPredictionInstance + other) { + if (other + == com.google.cloud.aiplatform.v1.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.v1.schema.predict.instance.ImageSegmentationPredictionInstance + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.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.v1.schema.predict.instance.ImageSegmentationPredictionInstance) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.schema.predict.instance.ImageSegmentationPredictionInstance) + private static final com.google.cloud.aiplatform.v1.schema.predict.instance + .ImageSegmentationPredictionInstance + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.schema.predict.instance + .ImageSegmentationPredictionInstance(); + } + + public static com.google.cloud.aiplatform.v1.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.v1.schema.predict.instance.ImageSegmentationPredictionInstance + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/instance/ImageSegmentationPredictionInstanceOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/instance/ImageSegmentationPredictionInstanceOrBuilder.java new file mode 100644 index 000000000..51ea145e4 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/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/v1/schema/predict/instance/image_segmentation.proto + +package com.google.cloud.aiplatform.v1.schema.predict.instance; + +public interface ImageSegmentationPredictionInstanceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.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-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/instance/ImageSegmentationPredictionInstanceProto.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/instance/ImageSegmentationPredictionInstanceProto.java new file mode 100644 index 000000000..44a89ec9f --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/instance/ImageSegmentationPredictionInstanceProto.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/v1/schema/predict/instance/image_segmentation.proto + +package com.google.cloud.aiplatform.v1.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_v1_schema_predict_instance_ImageSegmentationPredictionInstance_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_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 = { + "\nKgoogle/cloud/aiplatform/v1/schema/pred" + + "ict/instance/image_segmentation.proto\0222g" + + "oogle.cloud.aiplatform.v1.schema.predict" + + ".instance\032\034google/api/annotations.proto\"" + + "I\n#ImageSegmentationPredictionInstance\022\017" + + "\n\007content\030\001 \001(\t\022\021\n\tmime_type\030\002 \001(\tB\300\001\n6c" + + "om.google.cloud.aiplatform.v1.schema.pre" + + "dict.instanceB(ImageSegmentationPredicti" + + "onInstanceProtoP\001ZZgoogle.golang.org/gen" + + "proto/googleapis/cloud/aiplatform/v1/sch" + + "ema/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_v1_schema_predict_instance_ImageSegmentationPredictionInstance_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_schema_predict_instance_ImageSegmentationPredictionInstance_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_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-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/instance/TextClassificationPredictionInstance.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/instance/TextClassificationPredictionInstance.java new file mode 100644 index 000000000..2bf33d9cd --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/instance/TextClassificationPredictionInstance.java @@ -0,0 +1,899 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/schema/predict/instance/text_classification.proto + +package com.google.cloud.aiplatform.v1.schema.predict.instance; + +/** + * + * + *
+ * Prediction input format for Text Classification.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1.schema.predict.instance.TextClassificationPredictionInstance} + */ +public final class TextClassificationPredictionInstance + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.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.v1.schema.predict.instance + .TextClassificationPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_instance_TextClassificationPredictionInstance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.predict.instance + .TextClassificationPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_instance_TextClassificationPredictionInstance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.predict.instance + .TextClassificationPredictionInstance.class, + com.google.cloud.aiplatform.v1.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.v1.schema.predict.instance + .TextClassificationPredictionInstance)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.schema.predict.instance.TextClassificationPredictionInstance + other = + (com.google.cloud.aiplatform.v1.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.v1.schema.predict.instance + .TextClassificationPredictionInstance + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.predict.instance + .TextClassificationPredictionInstance + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.schema.predict.instance.TextClassificationPredictionInstance} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.schema.predict.instance.TextClassificationPredictionInstance) + com.google.cloud.aiplatform.v1.schema.predict.instance + .TextClassificationPredictionInstanceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.schema.predict.instance + .TextClassificationPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_instance_TextClassificationPredictionInstance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.predict.instance + .TextClassificationPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_instance_TextClassificationPredictionInstance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.predict.instance + .TextClassificationPredictionInstance.class, + com.google.cloud.aiplatform.v1.schema.predict.instance + .TextClassificationPredictionInstance.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.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.v1.schema.predict.instance + .TextClassificationPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_instance_TextClassificationPredictionInstance_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.instance + .TextClassificationPredictionInstance + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.schema.predict.instance + .TextClassificationPredictionInstance.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.instance + .TextClassificationPredictionInstance + build() { + com.google.cloud.aiplatform.v1.schema.predict.instance.TextClassificationPredictionInstance + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.instance + .TextClassificationPredictionInstance + buildPartial() { + com.google.cloud.aiplatform.v1.schema.predict.instance.TextClassificationPredictionInstance + result = + new com.google.cloud.aiplatform.v1.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.v1.schema.predict.instance + .TextClassificationPredictionInstance) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.schema.predict.instance + .TextClassificationPredictionInstance) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.schema.predict.instance.TextClassificationPredictionInstance + other) { + if (other + == com.google.cloud.aiplatform.v1.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.v1.schema.predict.instance.TextClassificationPredictionInstance + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.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.v1.schema.predict.instance.TextClassificationPredictionInstance) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.schema.predict.instance.TextClassificationPredictionInstance) + private static final com.google.cloud.aiplatform.v1.schema.predict.instance + .TextClassificationPredictionInstance + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.schema.predict.instance + .TextClassificationPredictionInstance(); + } + + public static com.google.cloud.aiplatform.v1.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.v1.schema.predict.instance.TextClassificationPredictionInstance + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/instance/TextClassificationPredictionInstanceOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/instance/TextClassificationPredictionInstanceOrBuilder.java new file mode 100644 index 000000000..03b7b8442 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/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/v1/schema/predict/instance/text_classification.proto + +package com.google.cloud.aiplatform.v1.schema.predict.instance; + +public interface TextClassificationPredictionInstanceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.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-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/instance/TextClassificationPredictionInstanceProto.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/instance/TextClassificationPredictionInstanceProto.java new file mode 100644 index 000000000..f356bb7d3 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/instance/TextClassificationPredictionInstanceProto.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/v1/schema/predict/instance/text_classification.proto + +package com.google.cloud.aiplatform.v1.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_v1_schema_predict_instance_TextClassificationPredictionInstance_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_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 = { + "\nLgoogle/cloud/aiplatform/v1/schema/pred" + + "ict/instance/text_classification.proto\0222" + + "google.cloud.aiplatform.v1.schema.predic" + + "t.instance\032\034google/api/annotations.proto" + + "\"J\n$TextClassificationPredictionInstance" + + "\022\017\n\007content\030\001 \001(\t\022\021\n\tmime_type\030\002 \001(\tB\301\001\n" + + "6com.google.cloud.aiplatform.v1.schema.p" + + "redict.instanceB)TextClassificationPredi" + + "ctionInstanceProtoP\001ZZgoogle.golang.org/" + + "genproto/googleapis/cloud/aiplatform/v1/" + + "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_v1_schema_predict_instance_TextClassificationPredictionInstance_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_schema_predict_instance_TextClassificationPredictionInstance_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_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-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/instance/TextExtractionPredictionInstance.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/instance/TextExtractionPredictionInstance.java new file mode 100644 index 000000000..5554e5d20 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/instance/TextExtractionPredictionInstance.java @@ -0,0 +1,1098 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/schema/predict/instance/text_extraction.proto + +package com.google.cloud.aiplatform.v1.schema.predict.instance; + +/** + * + * + *
+ * Prediction input format for Text Extraction.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1.schema.predict.instance.TextExtractionPredictionInstance} + */ +public final class TextExtractionPredictionInstance extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.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.v1.schema.predict.instance + .TextExtractionPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_instance_TextExtractionPredictionInstance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.predict.instance + .TextExtractionPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_instance_TextExtractionPredictionInstance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.predict.instance.TextExtractionPredictionInstance + .class, + com.google.cloud.aiplatform.v1.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.v1.schema.predict.instance.TextExtractionPredictionInstance)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.schema.predict.instance.TextExtractionPredictionInstance other = + (com.google.cloud.aiplatform.v1.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.v1.schema.predict.instance + .TextExtractionPredictionInstance + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.predict.instance + .TextExtractionPredictionInstance + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.schema.predict.instance.TextExtractionPredictionInstance} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.schema.predict.instance.TextExtractionPredictionInstance) + com.google.cloud.aiplatform.v1.schema.predict.instance + .TextExtractionPredictionInstanceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.schema.predict.instance + .TextExtractionPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_instance_TextExtractionPredictionInstance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.predict.instance + .TextExtractionPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_instance_TextExtractionPredictionInstance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.predict.instance + .TextExtractionPredictionInstance.class, + com.google.cloud.aiplatform.v1.schema.predict.instance + .TextExtractionPredictionInstance.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.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.v1.schema.predict.instance + .TextExtractionPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_instance_TextExtractionPredictionInstance_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.instance.TextExtractionPredictionInstance + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.schema.predict.instance.TextExtractionPredictionInstance + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.instance.TextExtractionPredictionInstance + build() { + com.google.cloud.aiplatform.v1.schema.predict.instance.TextExtractionPredictionInstance + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.instance.TextExtractionPredictionInstance + buildPartial() { + com.google.cloud.aiplatform.v1.schema.predict.instance.TextExtractionPredictionInstance + result = + new com.google.cloud.aiplatform.v1.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.v1.schema.predict.instance.TextExtractionPredictionInstance) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.schema.predict.instance + .TextExtractionPredictionInstance) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.schema.predict.instance.TextExtractionPredictionInstance + other) { + if (other + == com.google.cloud.aiplatform.v1.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.v1.schema.predict.instance.TextExtractionPredictionInstance + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.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.v1.schema.predict.instance.TextExtractionPredictionInstance) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.schema.predict.instance.TextExtractionPredictionInstance) + private static final com.google.cloud.aiplatform.v1.schema.predict.instance + .TextExtractionPredictionInstance + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.schema.predict.instance + .TextExtractionPredictionInstance(); + } + + public static com.google.cloud.aiplatform.v1.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.v1.schema.predict.instance.TextExtractionPredictionInstance + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/instance/TextExtractionPredictionInstanceOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/instance/TextExtractionPredictionInstanceOrBuilder.java new file mode 100644 index 000000000..b8aeface9 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/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/v1/schema/predict/instance/text_extraction.proto + +package com.google.cloud.aiplatform.v1.schema.predict.instance; + +public interface TextExtractionPredictionInstanceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.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-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/instance/TextExtractionPredictionInstanceProto.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/instance/TextExtractionPredictionInstanceProto.java new file mode 100644 index 000000000..4b091b652 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/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/v1/schema/predict/instance/text_extraction.proto + +package com.google.cloud.aiplatform.v1.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_v1_schema_predict_instance_TextExtractionPredictionInstance_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_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 = { + "\nHgoogle/cloud/aiplatform/v1/schema/pred" + + "ict/instance/text_extraction.proto\0222goog" + + "le.cloud.aiplatform.v1.schema.predict.in" + + "stance\032\034google/api/annotations.proto\"S\n " + + "TextExtractionPredictionInstance\022\017\n\007cont" + + "ent\030\001 \001(\t\022\021\n\tmime_type\030\002 \001(\t\022\013\n\003key\030\003 \001(" + + "\tB\275\001\n6com.google.cloud.aiplatform.v1.sch" + + "ema.predict.instanceB%TextExtractionPred" + + "ictionInstanceProtoP\001ZZgoogle.golang.org" + + "/genproto/googleapis/cloud/aiplatform/v1" + + "/schema/predict/instance;instanceb\006proto" + + "3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1_schema_predict_instance_TextExtractionPredictionInstance_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_schema_predict_instance_TextExtractionPredictionInstance_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_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-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/instance/TextSentimentPredictionInstance.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/instance/TextSentimentPredictionInstance.java new file mode 100644 index 000000000..e7f80f18c --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/instance/TextSentimentPredictionInstance.java @@ -0,0 +1,889 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/schema/predict/instance/text_sentiment.proto + +package com.google.cloud.aiplatform.v1.schema.predict.instance; + +/** + * + * + *
+ * Prediction input format for Text Sentiment.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1.schema.predict.instance.TextSentimentPredictionInstance} + */ +public final class TextSentimentPredictionInstance extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.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.v1.schema.predict.instance + .TextSentimentPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_instance_TextSentimentPredictionInstance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.predict.instance + .TextSentimentPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_instance_TextSentimentPredictionInstance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.predict.instance.TextSentimentPredictionInstance + .class, + com.google.cloud.aiplatform.v1.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.v1.schema.predict.instance.TextSentimentPredictionInstance)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.schema.predict.instance.TextSentimentPredictionInstance other = + (com.google.cloud.aiplatform.v1.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.v1.schema.predict.instance + .TextSentimentPredictionInstance + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.predict.instance + .TextSentimentPredictionInstance + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.schema.predict.instance.TextSentimentPredictionInstance} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.schema.predict.instance.TextSentimentPredictionInstance) + com.google.cloud.aiplatform.v1.schema.predict.instance + .TextSentimentPredictionInstanceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.schema.predict.instance + .TextSentimentPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_instance_TextSentimentPredictionInstance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.predict.instance + .TextSentimentPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_instance_TextSentimentPredictionInstance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.predict.instance.TextSentimentPredictionInstance + .class, + com.google.cloud.aiplatform.v1.schema.predict.instance.TextSentimentPredictionInstance + .Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.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.v1.schema.predict.instance + .TextSentimentPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_instance_TextSentimentPredictionInstance_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.instance.TextSentimentPredictionInstance + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.schema.predict.instance.TextSentimentPredictionInstance + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.instance.TextSentimentPredictionInstance + build() { + com.google.cloud.aiplatform.v1.schema.predict.instance.TextSentimentPredictionInstance + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.instance.TextSentimentPredictionInstance + buildPartial() { + com.google.cloud.aiplatform.v1.schema.predict.instance.TextSentimentPredictionInstance + result = + new com.google.cloud.aiplatform.v1.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.v1.schema.predict.instance.TextSentimentPredictionInstance) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.schema.predict.instance.TextSentimentPredictionInstance) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.schema.predict.instance.TextSentimentPredictionInstance + other) { + if (other + == com.google.cloud.aiplatform.v1.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.v1.schema.predict.instance.TextSentimentPredictionInstance + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.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.v1.schema.predict.instance.TextSentimentPredictionInstance) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.schema.predict.instance.TextSentimentPredictionInstance) + private static final com.google.cloud.aiplatform.v1.schema.predict.instance + .TextSentimentPredictionInstance + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.schema.predict.instance + .TextSentimentPredictionInstance(); + } + + public static com.google.cloud.aiplatform.v1.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.v1.schema.predict.instance.TextSentimentPredictionInstance + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/instance/TextSentimentPredictionInstanceOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/instance/TextSentimentPredictionInstanceOrBuilder.java new file mode 100644 index 000000000..b46e02e24 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/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/v1/schema/predict/instance/text_sentiment.proto + +package com.google.cloud.aiplatform.v1.schema.predict.instance; + +public interface TextSentimentPredictionInstanceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.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-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/instance/TextSentimentPredictionInstanceProto.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/instance/TextSentimentPredictionInstanceProto.java new file mode 100644 index 000000000..3dc6da9bd --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/instance/TextSentimentPredictionInstanceProto.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/v1/schema/predict/instance/text_sentiment.proto + +package com.google.cloud.aiplatform.v1.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_v1_schema_predict_instance_TextSentimentPredictionInstance_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_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 = { + "\nGgoogle/cloud/aiplatform/v1/schema/pred" + + "ict/instance/text_sentiment.proto\0222googl" + + "e.cloud.aiplatform.v1.schema.predict.ins" + + "tance\032\034google/api/annotations.proto\"E\n\037T" + + "extSentimentPredictionInstance\022\017\n\007conten" + + "t\030\001 \001(\t\022\021\n\tmime_type\030\002 \001(\tB\274\001\n6com.googl" + + "e.cloud.aiplatform.v1.schema.predict.ins" + + "tanceB$TextSentimentPredictionInstancePr" + + "otoP\001ZZgoogle.golang.org/genproto/google" + + "apis/cloud/aiplatform/v1/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_v1_schema_predict_instance_TextSentimentPredictionInstance_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_schema_predict_instance_TextSentimentPredictionInstance_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_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-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/instance/VideoActionRecognitionPredictionInstance.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/instance/VideoActionRecognitionPredictionInstance.java new file mode 100644 index 000000000..a2c74a265 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/instance/VideoActionRecognitionPredictionInstance.java @@ -0,0 +1,1312 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/schema/predict/instance/video_action_recognition.proto + +package com.google.cloud.aiplatform.v1.schema.predict.instance; + +/** + * + * + *
+ * Prediction input format for Video Action Recognition.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1.schema.predict.instance.VideoActionRecognitionPredictionInstance} + */ +public final class VideoActionRecognitionPredictionInstance + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.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.v1.schema.predict.instance + .VideoActionRecognitionPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_instance_VideoActionRecognitionPredictionInstance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.predict.instance + .VideoActionRecognitionPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_instance_VideoActionRecognitionPredictionInstance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.predict.instance + .VideoActionRecognitionPredictionInstance.class, + com.google.cloud.aiplatform.v1.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 "inf" or "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 "inf" or "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.v1.schema.predict.instance + .VideoActionRecognitionPredictionInstance)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.schema.predict.instance.VideoActionRecognitionPredictionInstance + other = + (com.google.cloud.aiplatform.v1.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.v1.schema.predict.instance + .VideoActionRecognitionPredictionInstance + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.predict.instance + .VideoActionRecognitionPredictionInstance + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.schema.predict.instance.VideoActionRecognitionPredictionInstance} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.schema.predict.instance.VideoActionRecognitionPredictionInstance) + com.google.cloud.aiplatform.v1.schema.predict.instance + .VideoActionRecognitionPredictionInstanceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.schema.predict.instance + .VideoActionRecognitionPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_instance_VideoActionRecognitionPredictionInstance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.predict.instance + .VideoActionRecognitionPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_instance_VideoActionRecognitionPredictionInstance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.predict.instance + .VideoActionRecognitionPredictionInstance.class, + com.google.cloud.aiplatform.v1.schema.predict.instance + .VideoActionRecognitionPredictionInstance.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.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.v1.schema.predict.instance + .VideoActionRecognitionPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_instance_VideoActionRecognitionPredictionInstance_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.instance + .VideoActionRecognitionPredictionInstance + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.schema.predict.instance + .VideoActionRecognitionPredictionInstance.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.instance + .VideoActionRecognitionPredictionInstance + build() { + com.google.cloud.aiplatform.v1.schema.predict.instance + .VideoActionRecognitionPredictionInstance + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.instance + .VideoActionRecognitionPredictionInstance + buildPartial() { + com.google.cloud.aiplatform.v1.schema.predict.instance + .VideoActionRecognitionPredictionInstance + result = + new com.google.cloud.aiplatform.v1.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.v1.schema.predict.instance + .VideoActionRecognitionPredictionInstance) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.schema.predict.instance + .VideoActionRecognitionPredictionInstance) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.schema.predict.instance + .VideoActionRecognitionPredictionInstance + other) { + if (other + == com.google.cloud.aiplatform.v1.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.v1.schema.predict.instance + .VideoActionRecognitionPredictionInstance + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.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 "inf" or "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 "inf" or "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 "inf" or "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 "inf" or "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 "inf" or "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.v1.schema.predict.instance.VideoActionRecognitionPredictionInstance) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.schema.predict.instance.VideoActionRecognitionPredictionInstance) + private static final com.google.cloud.aiplatform.v1.schema.predict.instance + .VideoActionRecognitionPredictionInstance + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.schema.predict.instance + .VideoActionRecognitionPredictionInstance(); + } + + public static com.google.cloud.aiplatform.v1.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.v1.schema.predict.instance + .VideoActionRecognitionPredictionInstance + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/instance/VideoActionRecognitionPredictionInstanceOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/instance/VideoActionRecognitionPredictionInstanceOrBuilder.java new file mode 100644 index 000000000..6cdb5865b --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/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/v1/schema/predict/instance/video_action_recognition.proto + +package com.google.cloud.aiplatform.v1.schema.predict.instance; + +public interface VideoActionRecognitionPredictionInstanceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.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 "inf" or "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 "inf" or "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-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/instance/VideoActionRecognitionPredictionInstanceProto.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/instance/VideoActionRecognitionPredictionInstanceProto.java new file mode 100644 index 000000000..dccd4a2c2 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/instance/VideoActionRecognitionPredictionInstanceProto.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/v1/schema/predict/instance/video_action_recognition.proto + +package com.google.cloud.aiplatform.v1.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_v1_schema_predict_instance_VideoActionRecognitionPredictionInstance_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_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 = { + "\nQgoogle/cloud/aiplatform/v1/schema/pred" + + "ict/instance/video_action_recognition.pr" + + "oto\0222google.cloud.aiplatform.v1.schema.p" + + "redict.instance\032\034google/api/annotations." + + "proto\"\204\001\n(VideoActionRecognitionPredicti" + + "onInstance\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\020ti" + + "me_segment_end\030\004 \001(\tB\305\001\n6com.google.clou" + + "d.aiplatform.v1.schema.predict.instanceB" + + "-VideoActionRecognitionPredictionInstanc" + + "eProtoP\001ZZgoogle.golang.org/genproto/goo" + + "gleapis/cloud/aiplatform/v1/schema/predi" + + "ct/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_v1_schema_predict_instance_VideoActionRecognitionPredictionInstance_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_schema_predict_instance_VideoActionRecognitionPredictionInstance_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_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-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/instance/VideoClassificationPredictionInstance.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/instance/VideoClassificationPredictionInstance.java new file mode 100644 index 000000000..32eeaf6bf --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/instance/VideoClassificationPredictionInstance.java @@ -0,0 +1,1307 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/schema/predict/instance/video_classification.proto + +package com.google.cloud.aiplatform.v1.schema.predict.instance; + +/** + * + * + *
+ * Prediction input format for Video Classification.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1.schema.predict.instance.VideoClassificationPredictionInstance} + */ +public final class VideoClassificationPredictionInstance + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.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.v1.schema.predict.instance + .VideoClassificationPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_instance_VideoClassificationPredictionInstance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.predict.instance + .VideoClassificationPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_instance_VideoClassificationPredictionInstance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.predict.instance + .VideoClassificationPredictionInstance.class, + com.google.cloud.aiplatform.v1.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 "inf" or "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 "inf" or "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.v1.schema.predict.instance + .VideoClassificationPredictionInstance)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.schema.predict.instance.VideoClassificationPredictionInstance + other = + (com.google.cloud.aiplatform.v1.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.v1.schema.predict.instance + .VideoClassificationPredictionInstance + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.predict.instance + .VideoClassificationPredictionInstance + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.schema.predict.instance.VideoClassificationPredictionInstance} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.schema.predict.instance.VideoClassificationPredictionInstance) + com.google.cloud.aiplatform.v1.schema.predict.instance + .VideoClassificationPredictionInstanceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.schema.predict.instance + .VideoClassificationPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_instance_VideoClassificationPredictionInstance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.predict.instance + .VideoClassificationPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_instance_VideoClassificationPredictionInstance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.predict.instance + .VideoClassificationPredictionInstance.class, + com.google.cloud.aiplatform.v1.schema.predict.instance + .VideoClassificationPredictionInstance.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.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.v1.schema.predict.instance + .VideoClassificationPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_instance_VideoClassificationPredictionInstance_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.instance + .VideoClassificationPredictionInstance + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.schema.predict.instance + .VideoClassificationPredictionInstance.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.instance + .VideoClassificationPredictionInstance + build() { + com.google.cloud.aiplatform.v1.schema.predict.instance.VideoClassificationPredictionInstance + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.instance + .VideoClassificationPredictionInstance + buildPartial() { + com.google.cloud.aiplatform.v1.schema.predict.instance.VideoClassificationPredictionInstance + result = + new com.google.cloud.aiplatform.v1.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.v1.schema.predict.instance + .VideoClassificationPredictionInstance) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.schema.predict.instance + .VideoClassificationPredictionInstance) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.schema.predict.instance.VideoClassificationPredictionInstance + other) { + if (other + == com.google.cloud.aiplatform.v1.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.v1.schema.predict.instance.VideoClassificationPredictionInstance + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.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 "inf" or "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 "inf" or "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 "inf" or "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 "inf" or "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 "inf" or "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.v1.schema.predict.instance.VideoClassificationPredictionInstance) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.schema.predict.instance.VideoClassificationPredictionInstance) + private static final com.google.cloud.aiplatform.v1.schema.predict.instance + .VideoClassificationPredictionInstance + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.schema.predict.instance + .VideoClassificationPredictionInstance(); + } + + public static com.google.cloud.aiplatform.v1.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.v1.schema.predict.instance + .VideoClassificationPredictionInstance + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/instance/VideoClassificationPredictionInstanceOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/instance/VideoClassificationPredictionInstanceOrBuilder.java new file mode 100644 index 000000000..1d3e71732 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/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/v1/schema/predict/instance/video_classification.proto + +package com.google.cloud.aiplatform.v1.schema.predict.instance; + +public interface VideoClassificationPredictionInstanceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.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 "inf" or "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 "inf" or "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-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/instance/VideoClassificationPredictionInstanceProto.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/instance/VideoClassificationPredictionInstanceProto.java new file mode 100644 index 000000000..42258c2db --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/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/v1/schema/predict/instance/video_classification.proto + +package com.google.cloud.aiplatform.v1.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_v1_schema_predict_instance_VideoClassificationPredictionInstance_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_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 = { + "\nMgoogle/cloud/aiplatform/v1/schema/pred" + + "ict/instance/video_classification.proto\022" + + "2google.cloud.aiplatform.v1.schema.predi" + + "ct.instance\032\034google/api/annotations.prot" + + "o\"\201\001\n%VideoClassificationPredictionInsta" + + "nce\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_segm" + + "ent_end\030\004 \001(\tB\302\001\n6com.google.cloud.aipla" + + "tform.v1.schema.predict.instanceB*VideoC" + + "lassificationPredictionInstanceProtoP\001ZZ" + + "google.golang.org/genproto/googleapis/cl" + + "oud/aiplatform/v1/schema/predict/instanc" + + "e;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_v1_schema_predict_instance_VideoClassificationPredictionInstance_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_schema_predict_instance_VideoClassificationPredictionInstance_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_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-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/instance/VideoObjectTrackingPredictionInstance.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/instance/VideoObjectTrackingPredictionInstance.java new file mode 100644 index 000000000..daaca200c --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/instance/VideoObjectTrackingPredictionInstance.java @@ -0,0 +1,1307 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/schema/predict/instance/video_object_tracking.proto + +package com.google.cloud.aiplatform.v1.schema.predict.instance; + +/** + * + * + *
+ * Prediction input format for Video Object Tracking.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1.schema.predict.instance.VideoObjectTrackingPredictionInstance} + */ +public final class VideoObjectTrackingPredictionInstance + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.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.v1.schema.predict.instance + .VideoObjectTrackingPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_instance_VideoObjectTrackingPredictionInstance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.predict.instance + .VideoObjectTrackingPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_instance_VideoObjectTrackingPredictionInstance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.predict.instance + .VideoObjectTrackingPredictionInstance.class, + com.google.cloud.aiplatform.v1.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 "inf" or "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 "inf" or "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.v1.schema.predict.instance + .VideoObjectTrackingPredictionInstance)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.schema.predict.instance.VideoObjectTrackingPredictionInstance + other = + (com.google.cloud.aiplatform.v1.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.v1.schema.predict.instance + .VideoObjectTrackingPredictionInstance + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.predict.instance + .VideoObjectTrackingPredictionInstance + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.schema.predict.instance.VideoObjectTrackingPredictionInstance} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.schema.predict.instance.VideoObjectTrackingPredictionInstance) + com.google.cloud.aiplatform.v1.schema.predict.instance + .VideoObjectTrackingPredictionInstanceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.schema.predict.instance + .VideoObjectTrackingPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_instance_VideoObjectTrackingPredictionInstance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.predict.instance + .VideoObjectTrackingPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_instance_VideoObjectTrackingPredictionInstance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.predict.instance + .VideoObjectTrackingPredictionInstance.class, + com.google.cloud.aiplatform.v1.schema.predict.instance + .VideoObjectTrackingPredictionInstance.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.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.v1.schema.predict.instance + .VideoObjectTrackingPredictionInstanceProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_instance_VideoObjectTrackingPredictionInstance_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.instance + .VideoObjectTrackingPredictionInstance + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.schema.predict.instance + .VideoObjectTrackingPredictionInstance.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.instance + .VideoObjectTrackingPredictionInstance + build() { + com.google.cloud.aiplatform.v1.schema.predict.instance.VideoObjectTrackingPredictionInstance + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.instance + .VideoObjectTrackingPredictionInstance + buildPartial() { + com.google.cloud.aiplatform.v1.schema.predict.instance.VideoObjectTrackingPredictionInstance + result = + new com.google.cloud.aiplatform.v1.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.v1.schema.predict.instance + .VideoObjectTrackingPredictionInstance) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.schema.predict.instance + .VideoObjectTrackingPredictionInstance) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.schema.predict.instance.VideoObjectTrackingPredictionInstance + other) { + if (other + == com.google.cloud.aiplatform.v1.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.v1.schema.predict.instance.VideoObjectTrackingPredictionInstance + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.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 "inf" or "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 "inf" or "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 "inf" or "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 "inf" or "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 "inf" or "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.v1.schema.predict.instance.VideoObjectTrackingPredictionInstance) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.schema.predict.instance.VideoObjectTrackingPredictionInstance) + private static final com.google.cloud.aiplatform.v1.schema.predict.instance + .VideoObjectTrackingPredictionInstance + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.schema.predict.instance + .VideoObjectTrackingPredictionInstance(); + } + + public static com.google.cloud.aiplatform.v1.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.v1.schema.predict.instance + .VideoObjectTrackingPredictionInstance + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/instance/VideoObjectTrackingPredictionInstanceOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/instance/VideoObjectTrackingPredictionInstanceOrBuilder.java new file mode 100644 index 000000000..512b2ccbc --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/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/v1/schema/predict/instance/video_object_tracking.proto + +package com.google.cloud.aiplatform.v1.schema.predict.instance; + +public interface VideoObjectTrackingPredictionInstanceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.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 "inf" or "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 "inf" or "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-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/instance/VideoObjectTrackingPredictionInstanceProto.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/instance/VideoObjectTrackingPredictionInstanceProto.java new file mode 100644 index 000000000..244e9949b --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/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/v1/schema/predict/instance/video_object_tracking.proto + +package com.google.cloud.aiplatform.v1.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_v1_schema_predict_instance_VideoObjectTrackingPredictionInstance_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_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 = { + "\nNgoogle/cloud/aiplatform/v1/schema/pred" + + "ict/instance/video_object_tracking.proto" + + "\0222google.cloud.aiplatform.v1.schema.pred" + + "ict.instance\032\034google/api/annotations.pro" + + "to\"\201\001\n%VideoObjectTrackingPredictionInst" + + "ance\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_seg" + + "ment_end\030\004 \001(\tB\302\001\n6com.google.cloud.aipl" + + "atform.v1.schema.predict.instanceB*Video" + + "ObjectTrackingPredictionInstanceProtoP\001Z" + + "Zgoogle.golang.org/genproto/googleapis/c" + + "loud/aiplatform/v1/schema/predict/instan" + + "ce;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_v1_schema_predict_instance_VideoObjectTrackingPredictionInstance_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_schema_predict_instance_VideoObjectTrackingPredictionInstance_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_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-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/params/ImageClassificationPredictionParams.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/params/ImageClassificationPredictionParams.java new file mode 100644 index 000000000..94e6f30e2 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/params/ImageClassificationPredictionParams.java @@ -0,0 +1,713 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/schema/predict/params/image_classification.proto + +package com.google.cloud.aiplatform.v1.schema.predict.params; + +/** + * + * + *
+ * Prediction model parameters for Image Classification.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1.schema.predict.params.ImageClassificationPredictionParams} + */ +public final class ImageClassificationPredictionParams + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.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.v1.schema.predict.params + .ImageClassificationPredictionParamsProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_params_ImageClassificationPredictionParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.predict.params + .ImageClassificationPredictionParamsProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_params_ImageClassificationPredictionParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.predict.params.ImageClassificationPredictionParams + .class, + com.google.cloud.aiplatform.v1.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.v1.schema.predict.params.ImageClassificationPredictionParams)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.schema.predict.params.ImageClassificationPredictionParams other = + (com.google.cloud.aiplatform.v1.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.v1.schema.predict.params + .ImageClassificationPredictionParams + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.predict.params + .ImageClassificationPredictionParams + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.schema.predict.params.ImageClassificationPredictionParams} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.schema.predict.params.ImageClassificationPredictionParams) + com.google.cloud.aiplatform.v1.schema.predict.params + .ImageClassificationPredictionParamsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.schema.predict.params + .ImageClassificationPredictionParamsProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_params_ImageClassificationPredictionParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.predict.params + .ImageClassificationPredictionParamsProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_params_ImageClassificationPredictionParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.predict.params + .ImageClassificationPredictionParams.class, + com.google.cloud.aiplatform.v1.schema.predict.params + .ImageClassificationPredictionParams.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.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.v1.schema.predict.params + .ImageClassificationPredictionParamsProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_params_ImageClassificationPredictionParams_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.params.ImageClassificationPredictionParams + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.schema.predict.params + .ImageClassificationPredictionParams.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.params.ImageClassificationPredictionParams + build() { + com.google.cloud.aiplatform.v1.schema.predict.params.ImageClassificationPredictionParams + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.params.ImageClassificationPredictionParams + buildPartial() { + com.google.cloud.aiplatform.v1.schema.predict.params.ImageClassificationPredictionParams + result = + new com.google.cloud.aiplatform.v1.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.v1.schema.predict.params + .ImageClassificationPredictionParams) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.schema.predict.params + .ImageClassificationPredictionParams) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.schema.predict.params.ImageClassificationPredictionParams + other) { + if (other + == com.google.cloud.aiplatform.v1.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.v1.schema.predict.params.ImageClassificationPredictionParams + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.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.v1.schema.predict.params.ImageClassificationPredictionParams) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.schema.predict.params.ImageClassificationPredictionParams) + private static final com.google.cloud.aiplatform.v1.schema.predict.params + .ImageClassificationPredictionParams + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.schema.predict.params + .ImageClassificationPredictionParams(); + } + + public static com.google.cloud.aiplatform.v1.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.v1.schema.predict.params.ImageClassificationPredictionParams + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/params/ImageClassificationPredictionParamsOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/params/ImageClassificationPredictionParamsOrBuilder.java new file mode 100644 index 000000000..af64a4d20 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/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/v1/schema/predict/params/image_classification.proto + +package com.google.cloud.aiplatform.v1.schema.predict.params; + +public interface ImageClassificationPredictionParamsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.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-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/params/ImageClassificationPredictionParamsProto.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/params/ImageClassificationPredictionParamsProto.java new file mode 100644 index 000000000..a7ed538ce --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/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/v1/schema/predict/params/image_classification.proto + +package com.google.cloud.aiplatform.v1.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_v1_schema_predict_params_ImageClassificationPredictionParams_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_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 = { + "\nKgoogle/cloud/aiplatform/v1/schema/pred" + + "ict/params/image_classification.proto\0220g" + + "oogle.cloud.aiplatform.v1.schema.predict" + + ".params\032\034google/api/annotations.proto\"\\\n" + + "#ImageClassificationPredictionParams\022\034\n\024" + + "confidence_threshold\030\001 \001(\002\022\027\n\017max_predic" + + "tions\030\002 \001(\005B\272\001\n4com.google.cloud.aiplatf" + + "orm.v1.schema.predict.paramsB(ImageClass" + + "ificationPredictionParamsProtoP\001ZVgoogle" + + ".golang.org/genproto/googleapis/cloud/ai" + + "platform/v1/schema/predict/params;params" + + "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_v1_schema_predict_params_ImageClassificationPredictionParams_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_schema_predict_params_ImageClassificationPredictionParams_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_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-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/params/ImageObjectDetectionPredictionParams.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/params/ImageObjectDetectionPredictionParams.java new file mode 100644 index 000000000..38ec0465a --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/params/ImageObjectDetectionPredictionParams.java @@ -0,0 +1,716 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/schema/predict/params/image_object_detection.proto + +package com.google.cloud.aiplatform.v1.schema.predict.params; + +/** + * + * + *
+ * Prediction model parameters for Image Object Detection.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1.schema.predict.params.ImageObjectDetectionPredictionParams} + */ +public final class ImageObjectDetectionPredictionParams + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.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.v1.schema.predict.params + .ImageObjectDetectionPredictionParamsProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_params_ImageObjectDetectionPredictionParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.predict.params + .ImageObjectDetectionPredictionParamsProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_params_ImageObjectDetectionPredictionParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.predict.params + .ImageObjectDetectionPredictionParams.class, + com.google.cloud.aiplatform.v1.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.v1.schema.predict.params + .ImageObjectDetectionPredictionParams)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.schema.predict.params.ImageObjectDetectionPredictionParams + other = + (com.google.cloud.aiplatform.v1.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.v1.schema.predict.params + .ImageObjectDetectionPredictionParams + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.predict.params + .ImageObjectDetectionPredictionParams + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.schema.predict.params.ImageObjectDetectionPredictionParams} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.schema.predict.params.ImageObjectDetectionPredictionParams) + com.google.cloud.aiplatform.v1.schema.predict.params + .ImageObjectDetectionPredictionParamsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.schema.predict.params + .ImageObjectDetectionPredictionParamsProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_params_ImageObjectDetectionPredictionParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.predict.params + .ImageObjectDetectionPredictionParamsProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_params_ImageObjectDetectionPredictionParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.predict.params + .ImageObjectDetectionPredictionParams.class, + com.google.cloud.aiplatform.v1.schema.predict.params + .ImageObjectDetectionPredictionParams.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.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.v1.schema.predict.params + .ImageObjectDetectionPredictionParamsProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_params_ImageObjectDetectionPredictionParams_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.params.ImageObjectDetectionPredictionParams + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.schema.predict.params + .ImageObjectDetectionPredictionParams.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.params.ImageObjectDetectionPredictionParams + build() { + com.google.cloud.aiplatform.v1.schema.predict.params.ImageObjectDetectionPredictionParams + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.params.ImageObjectDetectionPredictionParams + buildPartial() { + com.google.cloud.aiplatform.v1.schema.predict.params.ImageObjectDetectionPredictionParams + result = + new com.google.cloud.aiplatform.v1.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.v1.schema.predict.params + .ImageObjectDetectionPredictionParams) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.schema.predict.params + .ImageObjectDetectionPredictionParams) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.schema.predict.params.ImageObjectDetectionPredictionParams + other) { + if (other + == com.google.cloud.aiplatform.v1.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.v1.schema.predict.params.ImageObjectDetectionPredictionParams + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.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.v1.schema.predict.params.ImageObjectDetectionPredictionParams) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.schema.predict.params.ImageObjectDetectionPredictionParams) + private static final com.google.cloud.aiplatform.v1.schema.predict.params + .ImageObjectDetectionPredictionParams + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.schema.predict.params + .ImageObjectDetectionPredictionParams(); + } + + public static com.google.cloud.aiplatform.v1.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.v1.schema.predict.params.ImageObjectDetectionPredictionParams + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/params/ImageObjectDetectionPredictionParamsOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/params/ImageObjectDetectionPredictionParamsOrBuilder.java new file mode 100644 index 000000000..4def70fb2 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/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/v1/schema/predict/params/image_object_detection.proto + +package com.google.cloud.aiplatform.v1.schema.predict.params; + +public interface ImageObjectDetectionPredictionParamsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.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-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/params/ImageObjectDetectionPredictionParamsProto.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/params/ImageObjectDetectionPredictionParamsProto.java new file mode 100644 index 000000000..579990018 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/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/v1/schema/predict/params/image_object_detection.proto + +package com.google.cloud.aiplatform.v1.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_v1_schema_predict_params_ImageObjectDetectionPredictionParams_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_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 = { + "\nMgoogle/cloud/aiplatform/v1/schema/pred" + + "ict/params/image_object_detection.proto\022" + + "0google.cloud.aiplatform.v1.schema.predi" + + "ct.params\032\034google/api/annotations.proto\"" + + "]\n$ImageObjectDetectionPredictionParams\022" + + "\034\n\024confidence_threshold\030\001 \001(\002\022\027\n\017max_pre" + + "dictions\030\002 \001(\005B\273\001\n4com.google.cloud.aipl" + + "atform.v1.schema.predict.paramsB)ImageOb" + + "jectDetectionPredictionParamsProtoP\001ZVgo" + + "ogle.golang.org/genproto/googleapis/clou" + + "d/aiplatform/v1/schema/predict/params;pa" + + "ramsb\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_v1_schema_predict_params_ImageObjectDetectionPredictionParams_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_schema_predict_params_ImageObjectDetectionPredictionParams_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_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-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/params/ImageSegmentationPredictionParams.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/params/ImageSegmentationPredictionParams.java new file mode 100644 index 000000000..02148026a --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/params/ImageSegmentationPredictionParams.java @@ -0,0 +1,619 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/schema/predict/params/image_segmentation.proto + +package com.google.cloud.aiplatform.v1.schema.predict.params; + +/** + * + * + *
+ * Prediction model parameters for Image Segmentation.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1.schema.predict.params.ImageSegmentationPredictionParams} + */ +public final class ImageSegmentationPredictionParams extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.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.v1.schema.predict.params + .ImageSegmentationPredictionParamsProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_params_ImageSegmentationPredictionParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.predict.params + .ImageSegmentationPredictionParamsProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_params_ImageSegmentationPredictionParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.predict.params.ImageSegmentationPredictionParams + .class, + com.google.cloud.aiplatform.v1.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.v1.schema.predict.params.ImageSegmentationPredictionParams)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.schema.predict.params.ImageSegmentationPredictionParams other = + (com.google.cloud.aiplatform.v1.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.v1.schema.predict.params + .ImageSegmentationPredictionParams + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.predict.params + .ImageSegmentationPredictionParams + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.schema.predict.params.ImageSegmentationPredictionParams} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.schema.predict.params.ImageSegmentationPredictionParams) + com.google.cloud.aiplatform.v1.schema.predict.params + .ImageSegmentationPredictionParamsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.schema.predict.params + .ImageSegmentationPredictionParamsProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_params_ImageSegmentationPredictionParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.predict.params + .ImageSegmentationPredictionParamsProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_params_ImageSegmentationPredictionParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.predict.params.ImageSegmentationPredictionParams + .class, + com.google.cloud.aiplatform.v1.schema.predict.params.ImageSegmentationPredictionParams + .Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.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.v1.schema.predict.params + .ImageSegmentationPredictionParamsProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_params_ImageSegmentationPredictionParams_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.params.ImageSegmentationPredictionParams + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.schema.predict.params.ImageSegmentationPredictionParams + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.params.ImageSegmentationPredictionParams + build() { + com.google.cloud.aiplatform.v1.schema.predict.params.ImageSegmentationPredictionParams + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.params.ImageSegmentationPredictionParams + buildPartial() { + com.google.cloud.aiplatform.v1.schema.predict.params.ImageSegmentationPredictionParams + result = + new com.google.cloud.aiplatform.v1.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.v1.schema.predict.params.ImageSegmentationPredictionParams) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.schema.predict.params.ImageSegmentationPredictionParams) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.schema.predict.params.ImageSegmentationPredictionParams + other) { + if (other + == com.google.cloud.aiplatform.v1.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.v1.schema.predict.params.ImageSegmentationPredictionParams + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.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.v1.schema.predict.params.ImageSegmentationPredictionParams) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.schema.predict.params.ImageSegmentationPredictionParams) + private static final com.google.cloud.aiplatform.v1.schema.predict.params + .ImageSegmentationPredictionParams + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.schema.predict.params + .ImageSegmentationPredictionParams(); + } + + public static com.google.cloud.aiplatform.v1.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.v1.schema.predict.params.ImageSegmentationPredictionParams + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/params/ImageSegmentationPredictionParamsOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/params/ImageSegmentationPredictionParamsOrBuilder.java new file mode 100644 index 000000000..03c1add45 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/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/v1/schema/predict/params/image_segmentation.proto + +package com.google.cloud.aiplatform.v1.schema.predict.params; + +public interface ImageSegmentationPredictionParamsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.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-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/params/ImageSegmentationPredictionParamsProto.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/params/ImageSegmentationPredictionParamsProto.java new file mode 100644 index 000000000..f081ae7ef --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/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/v1/schema/predict/params/image_segmentation.proto + +package com.google.cloud.aiplatform.v1.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_v1_schema_predict_params_ImageSegmentationPredictionParams_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_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 = { + "\nIgoogle/cloud/aiplatform/v1/schema/pred" + + "ict/params/image_segmentation.proto\0220goo" + + "gle.cloud.aiplatform.v1.schema.predict.p" + + "arams\032\034google/api/annotations.proto\"A\n!I" + + "mageSegmentationPredictionParams\022\034\n\024conf" + + "idence_threshold\030\001 \001(\002B\270\001\n4com.google.cl" + + "oud.aiplatform.v1.schema.predict.paramsB" + + "&ImageSegmentationPredictionParamsProtoP" + + "\001ZVgoogle.golang.org/genproto/googleapis" + + "/cloud/aiplatform/v1/schema/predict/para" + + "ms;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_v1_schema_predict_params_ImageSegmentationPredictionParams_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_schema_predict_params_ImageSegmentationPredictionParams_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_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-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/params/VideoActionRecognitionPredictionParams.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/params/VideoActionRecognitionPredictionParams.java new file mode 100644 index 000000000..29c781e7a --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/params/VideoActionRecognitionPredictionParams.java @@ -0,0 +1,719 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/schema/predict/params/video_action_recognition.proto + +package com.google.cloud.aiplatform.v1.schema.predict.params; + +/** + * + * + *
+ * Prediction model parameters for Video Action Recognition.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1.schema.predict.params.VideoActionRecognitionPredictionParams} + */ +public final class VideoActionRecognitionPredictionParams + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.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.v1.schema.predict.params + .VideoActionRecognitionPredictionParamsProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_params_VideoActionRecognitionPredictionParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.predict.params + .VideoActionRecognitionPredictionParamsProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_params_VideoActionRecognitionPredictionParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.predict.params + .VideoActionRecognitionPredictionParams.class, + com.google.cloud.aiplatform.v1.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.v1.schema.predict.params + .VideoActionRecognitionPredictionParams)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.schema.predict.params.VideoActionRecognitionPredictionParams + other = + (com.google.cloud.aiplatform.v1.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.v1.schema.predict.params + .VideoActionRecognitionPredictionParams + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.predict.params + .VideoActionRecognitionPredictionParams + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.schema.predict.params.VideoActionRecognitionPredictionParams} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.schema.predict.params.VideoActionRecognitionPredictionParams) + com.google.cloud.aiplatform.v1.schema.predict.params + .VideoActionRecognitionPredictionParamsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.schema.predict.params + .VideoActionRecognitionPredictionParamsProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_params_VideoActionRecognitionPredictionParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.predict.params + .VideoActionRecognitionPredictionParamsProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_params_VideoActionRecognitionPredictionParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.predict.params + .VideoActionRecognitionPredictionParams.class, + com.google.cloud.aiplatform.v1.schema.predict.params + .VideoActionRecognitionPredictionParams.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.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.v1.schema.predict.params + .VideoActionRecognitionPredictionParamsProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_params_VideoActionRecognitionPredictionParams_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.params + .VideoActionRecognitionPredictionParams + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.schema.predict.params + .VideoActionRecognitionPredictionParams.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.params + .VideoActionRecognitionPredictionParams + build() { + com.google.cloud.aiplatform.v1.schema.predict.params.VideoActionRecognitionPredictionParams + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.params + .VideoActionRecognitionPredictionParams + buildPartial() { + com.google.cloud.aiplatform.v1.schema.predict.params.VideoActionRecognitionPredictionParams + result = + new com.google.cloud.aiplatform.v1.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.v1.schema.predict.params + .VideoActionRecognitionPredictionParams) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.schema.predict.params + .VideoActionRecognitionPredictionParams) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.schema.predict.params.VideoActionRecognitionPredictionParams + other) { + if (other + == com.google.cloud.aiplatform.v1.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.v1.schema.predict.params.VideoActionRecognitionPredictionParams + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.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.v1.schema.predict.params.VideoActionRecognitionPredictionParams) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.schema.predict.params.VideoActionRecognitionPredictionParams) + private static final com.google.cloud.aiplatform.v1.schema.predict.params + .VideoActionRecognitionPredictionParams + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.schema.predict.params + .VideoActionRecognitionPredictionParams(); + } + + public static com.google.cloud.aiplatform.v1.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.v1.schema.predict.params.VideoActionRecognitionPredictionParams + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/params/VideoActionRecognitionPredictionParamsOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/params/VideoActionRecognitionPredictionParamsOrBuilder.java new file mode 100644 index 000000000..7a4fc1296 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/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/v1/schema/predict/params/video_action_recognition.proto + +package com.google.cloud.aiplatform.v1.schema.predict.params; + +public interface VideoActionRecognitionPredictionParamsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.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-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/params/VideoActionRecognitionPredictionParamsProto.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/params/VideoActionRecognitionPredictionParamsProto.java new file mode 100644 index 000000000..f686e3552 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/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/v1/schema/predict/params/video_action_recognition.proto + +package com.google.cloud.aiplatform.v1.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_v1_schema_predict_params_VideoActionRecognitionPredictionParams_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_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 = { + "\nOgoogle/cloud/aiplatform/v1/schema/pred" + + "ict/params/video_action_recognition.prot" + + "o\0220google.cloud.aiplatform.v1.schema.pre" + + "dict.params\032\034google/api/annotations.prot" + + "o\"_\n&VideoActionRecognitionPredictionPar" + + "ams\022\034\n\024confidence_threshold\030\001 \001(\002\022\027\n\017max" + + "_predictions\030\002 \001(\005B\275\001\n4com.google.cloud." + + "aiplatform.v1.schema.predict.paramsB+Vid" + + "eoActionRecognitionPredictionParamsProto" + + "P\001ZVgoogle.golang.org/genproto/googleapi" + + "s/cloud/aiplatform/v1/schema/predict/par" + + "ams;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_v1_schema_predict_params_VideoActionRecognitionPredictionParams_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_schema_predict_params_VideoActionRecognitionPredictionParams_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_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-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/params/VideoClassificationPredictionParams.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/params/VideoClassificationPredictionParams.java new file mode 100644 index 000000000..e1ab87ba2 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/params/VideoClassificationPredictionParams.java @@ -0,0 +1,1049 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/schema/predict/params/video_classification.proto + +package com.google.cloud.aiplatform.v1.schema.predict.params; + +/** + * + * + *
+ * Prediction model parameters for Video Classification.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1.schema.predict.params.VideoClassificationPredictionParams} + */ +public final class VideoClassificationPredictionParams + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.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.v1.schema.predict.params + .VideoClassificationPredictionParamsProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_params_VideoClassificationPredictionParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.predict.params + .VideoClassificationPredictionParamsProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_params_VideoClassificationPredictionParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.predict.params.VideoClassificationPredictionParams + .class, + com.google.cloud.aiplatform.v1.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.v1.schema.predict.params.VideoClassificationPredictionParams)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.schema.predict.params.VideoClassificationPredictionParams other = + (com.google.cloud.aiplatform.v1.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.v1.schema.predict.params + .VideoClassificationPredictionParams + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.predict.params + .VideoClassificationPredictionParams + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.schema.predict.params.VideoClassificationPredictionParams} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.schema.predict.params.VideoClassificationPredictionParams) + com.google.cloud.aiplatform.v1.schema.predict.params + .VideoClassificationPredictionParamsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.schema.predict.params + .VideoClassificationPredictionParamsProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_params_VideoClassificationPredictionParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.predict.params + .VideoClassificationPredictionParamsProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_params_VideoClassificationPredictionParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.predict.params + .VideoClassificationPredictionParams.class, + com.google.cloud.aiplatform.v1.schema.predict.params + .VideoClassificationPredictionParams.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.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.v1.schema.predict.params + .VideoClassificationPredictionParamsProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_params_VideoClassificationPredictionParams_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.params.VideoClassificationPredictionParams + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.schema.predict.params + .VideoClassificationPredictionParams.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.params.VideoClassificationPredictionParams + build() { + com.google.cloud.aiplatform.v1.schema.predict.params.VideoClassificationPredictionParams + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.params.VideoClassificationPredictionParams + buildPartial() { + com.google.cloud.aiplatform.v1.schema.predict.params.VideoClassificationPredictionParams + result = + new com.google.cloud.aiplatform.v1.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.v1.schema.predict.params + .VideoClassificationPredictionParams) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.schema.predict.params + .VideoClassificationPredictionParams) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.schema.predict.params.VideoClassificationPredictionParams + other) { + if (other + == com.google.cloud.aiplatform.v1.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.v1.schema.predict.params.VideoClassificationPredictionParams + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.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.v1.schema.predict.params.VideoClassificationPredictionParams) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.schema.predict.params.VideoClassificationPredictionParams) + private static final com.google.cloud.aiplatform.v1.schema.predict.params + .VideoClassificationPredictionParams + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.schema.predict.params + .VideoClassificationPredictionParams(); + } + + public static com.google.cloud.aiplatform.v1.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.v1.schema.predict.params.VideoClassificationPredictionParams + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/params/VideoClassificationPredictionParamsOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/params/VideoClassificationPredictionParamsOrBuilder.java new file mode 100644 index 000000000..c2b27e58f --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/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/v1/schema/predict/params/video_classification.proto + +package com.google.cloud.aiplatform.v1.schema.predict.params; + +public interface VideoClassificationPredictionParamsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.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-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/params/VideoClassificationPredictionParamsProto.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/params/VideoClassificationPredictionParamsProto.java new file mode 100644 index 000000000..486ea761e --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/params/VideoClassificationPredictionParamsProto.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/v1/schema/predict/params/video_classification.proto + +package com.google.cloud.aiplatform.v1.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_v1_schema_predict_params_VideoClassificationPredictionParams_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_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 = { + "\nKgoogle/cloud/aiplatform/v1/schema/pred" + + "ict/params/video_classification.proto\0220g" + + "oogle.cloud.aiplatform.v1.schema.predict" + + ".params\032\034google/api/annotations.proto\"\302\001" + + "\n#VideoClassificationPredictionParams\022\034\n" + + "\024confidence_threshold\030\001 \001(\002\022\027\n\017max_predi" + + "ctions\030\002 \001(\005\022\036\n\026segment_classification\030\003" + + " \001(\010\022\033\n\023shot_classification\030\004 \001(\010\022\'\n\037one" + + "_sec_interval_classification\030\005 \001(\010B\272\001\n4c" + + "om.google.cloud.aiplatform.v1.schema.pre" + + "dict.paramsB(VideoClassificationPredicti" + + "onParamsProtoP\001ZVgoogle.golang.org/genpr" + + "oto/googleapis/cloud/aiplatform/v1/schem" + + "a/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_v1_schema_predict_params_VideoClassificationPredictionParams_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_schema_predict_params_VideoClassificationPredictionParams_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_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-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/params/VideoObjectTrackingPredictionParams.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/params/VideoObjectTrackingPredictionParams.java new file mode 100644 index 000000000..52e35ae1a --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/params/VideoObjectTrackingPredictionParams.java @@ -0,0 +1,808 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/schema/predict/params/video_object_tracking.proto + +package com.google.cloud.aiplatform.v1.schema.predict.params; + +/** + * + * + *
+ * Prediction model parameters for Video Object Tracking.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1.schema.predict.params.VideoObjectTrackingPredictionParams} + */ +public final class VideoObjectTrackingPredictionParams + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.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.v1.schema.predict.params + .VideoObjectTrackingPredictionParamsProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_params_VideoObjectTrackingPredictionParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.predict.params + .VideoObjectTrackingPredictionParamsProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_params_VideoObjectTrackingPredictionParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.predict.params.VideoObjectTrackingPredictionParams + .class, + com.google.cloud.aiplatform.v1.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.v1.schema.predict.params.VideoObjectTrackingPredictionParams)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.schema.predict.params.VideoObjectTrackingPredictionParams other = + (com.google.cloud.aiplatform.v1.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.v1.schema.predict.params + .VideoObjectTrackingPredictionParams + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.predict.params + .VideoObjectTrackingPredictionParams + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.schema.predict.params.VideoObjectTrackingPredictionParams} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.schema.predict.params.VideoObjectTrackingPredictionParams) + com.google.cloud.aiplatform.v1.schema.predict.params + .VideoObjectTrackingPredictionParamsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.schema.predict.params + .VideoObjectTrackingPredictionParamsProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_params_VideoObjectTrackingPredictionParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.predict.params + .VideoObjectTrackingPredictionParamsProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_params_VideoObjectTrackingPredictionParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.predict.params + .VideoObjectTrackingPredictionParams.class, + com.google.cloud.aiplatform.v1.schema.predict.params + .VideoObjectTrackingPredictionParams.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.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.v1.schema.predict.params + .VideoObjectTrackingPredictionParamsProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_params_VideoObjectTrackingPredictionParams_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.params.VideoObjectTrackingPredictionParams + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.schema.predict.params + .VideoObjectTrackingPredictionParams.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.params.VideoObjectTrackingPredictionParams + build() { + com.google.cloud.aiplatform.v1.schema.predict.params.VideoObjectTrackingPredictionParams + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.params.VideoObjectTrackingPredictionParams + buildPartial() { + com.google.cloud.aiplatform.v1.schema.predict.params.VideoObjectTrackingPredictionParams + result = + new com.google.cloud.aiplatform.v1.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.v1.schema.predict.params + .VideoObjectTrackingPredictionParams) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.schema.predict.params + .VideoObjectTrackingPredictionParams) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.schema.predict.params.VideoObjectTrackingPredictionParams + other) { + if (other + == com.google.cloud.aiplatform.v1.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.v1.schema.predict.params.VideoObjectTrackingPredictionParams + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.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.v1.schema.predict.params.VideoObjectTrackingPredictionParams) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.schema.predict.params.VideoObjectTrackingPredictionParams) + private static final com.google.cloud.aiplatform.v1.schema.predict.params + .VideoObjectTrackingPredictionParams + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.schema.predict.params + .VideoObjectTrackingPredictionParams(); + } + + public static com.google.cloud.aiplatform.v1.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.v1.schema.predict.params.VideoObjectTrackingPredictionParams + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/params/VideoObjectTrackingPredictionParamsOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/params/VideoObjectTrackingPredictionParamsOrBuilder.java new file mode 100644 index 000000000..f58998b36 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/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/v1/schema/predict/params/video_object_tracking.proto + +package com.google.cloud.aiplatform.v1.schema.predict.params; + +public interface VideoObjectTrackingPredictionParamsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.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-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/params/VideoObjectTrackingPredictionParamsProto.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/params/VideoObjectTrackingPredictionParamsProto.java new file mode 100644 index 000000000..11b7fd7d4 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/params/VideoObjectTrackingPredictionParamsProto.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/v1/schema/predict/params/video_object_tracking.proto + +package com.google.cloud.aiplatform.v1.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_v1_schema_predict_params_VideoObjectTrackingPredictionParams_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_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 = { + "\nLgoogle/cloud/aiplatform/v1/schema/pred" + + "ict/params/video_object_tracking.proto\0220" + + "google.cloud.aiplatform.v1.schema.predic" + + "t.params\032\034google/api/annotations.proto\"{" + + "\n#VideoObjectTrackingPredictionParams\022\034\n" + + "\024confidence_threshold\030\001 \001(\002\022\027\n\017max_predi" + + "ctions\030\002 \001(\005\022\035\n\025min_bounding_box_size\030\003 " + + "\001(\002B\272\001\n4com.google.cloud.aiplatform.v1.s" + + "chema.predict.paramsB(VideoObjectTrackin" + + "gPredictionParamsProtoP\001ZVgoogle.golang." + + "org/genproto/googleapis/cloud/aiplatform" + + "/v1/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_v1_schema_predict_params_VideoObjectTrackingPredictionParams_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_schema_predict_params_VideoObjectTrackingPredictionParams_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_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-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/ClassificationPredictionResult.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/ClassificationPredictionResult.java new file mode 100644 index 000000000..d34f39d3f --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/ClassificationPredictionResult.java @@ -0,0 +1,1315 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/schema/predict/prediction/classification.proto + +package com.google.cloud.aiplatform.v1.schema.predict.prediction; + +/** + * + * + *
+ * Prediction output format for Image and Text Classification.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1.schema.predict.prediction.ClassificationPredictionResult} + */ +public final class ClassificationPredictionResult extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.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.v1.schema.predict.prediction + .ClassificationPredictionResultProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_prediction_ClassificationPredictionResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.predict.prediction + .ClassificationPredictionResultProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_prediction_ClassificationPredictionResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.predict.prediction.ClassificationPredictionResult + .class, + com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction.ClassificationPredictionResult)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.schema.predict.prediction.ClassificationPredictionResult other = + (com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction + .ClassificationPredictionResult + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.predict.prediction + .ClassificationPredictionResult + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.schema.predict.prediction.ClassificationPredictionResult} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.schema.predict.prediction.ClassificationPredictionResult) + com.google.cloud.aiplatform.v1.schema.predict.prediction + .ClassificationPredictionResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.schema.predict.prediction + .ClassificationPredictionResultProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_prediction_ClassificationPredictionResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.predict.prediction + .ClassificationPredictionResultProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_prediction_ClassificationPredictionResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.predict.prediction + .ClassificationPredictionResult.class, + com.google.cloud.aiplatform.v1.schema.predict.prediction + .ClassificationPredictionResult.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction + .ClassificationPredictionResultProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_prediction_ClassificationPredictionResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.prediction.ClassificationPredictionResult + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.schema.predict.prediction.ClassificationPredictionResult + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.prediction.ClassificationPredictionResult + build() { + com.google.cloud.aiplatform.v1.schema.predict.prediction.ClassificationPredictionResult + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.prediction.ClassificationPredictionResult + buildPartial() { + com.google.cloud.aiplatform.v1.schema.predict.prediction.ClassificationPredictionResult + result = + new com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction.ClassificationPredictionResult) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.schema.predict.prediction + .ClassificationPredictionResult) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.schema.predict.prediction.ClassificationPredictionResult + other) { + if (other + == com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction.ClassificationPredictionResult + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction.ClassificationPredictionResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.schema.predict.prediction.ClassificationPredictionResult) + private static final com.google.cloud.aiplatform.v1.schema.predict.prediction + .ClassificationPredictionResult + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.schema.predict.prediction + .ClassificationPredictionResult(); + } + + public static com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction.ClassificationPredictionResult + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/ClassificationPredictionResultOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/ClassificationPredictionResultOrBuilder.java new file mode 100644 index 000000000..491faa3c9 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/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/v1/schema/predict/prediction/classification.proto + +package com.google.cloud.aiplatform.v1.schema.predict.prediction; + +public interface ClassificationPredictionResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.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-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/ClassificationPredictionResultProto.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/ClassificationPredictionResultProto.java new file mode 100644 index 000000000..176d646ce --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/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/v1/schema/predict/prediction/classification.proto + +package com.google.cloud.aiplatform.v1.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_v1_schema_predict_prediction_ClassificationPredictionResult_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_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 = { + "\nIgoogle/cloud/aiplatform/v1/schema/pred" + + "ict/prediction/classification.proto\0224goo" + + "gle.cloud.aiplatform.v1.schema.predict.p" + + "rediction\032\034google/api/annotations.proto\"" + + "Y\n\036ClassificationPredictionResult\022\013\n\003ids" + + "\030\001 \003(\003\022\025\n\rdisplay_names\030\002 \003(\t\022\023\n\013confide" + + "nces\030\003 \003(\002B\301\001\n8com.google.cloud.aiplatfo" + + "rm.v1.schema.predict.predictionB#Classif" + + "icationPredictionResultProtoP\001Z^google.g" + + "olang.org/genproto/googleapis/cloud/aipl" + + "atform/v1/schema/predict/prediction;pred" + + "ictionb\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_v1_schema_predict_prediction_ClassificationPredictionResult_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_schema_predict_prediction_ClassificationPredictionResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_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-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/ImageObjectDetectionPredictionResult.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/ImageObjectDetectionPredictionResult.java new file mode 100644 index 000000000..a0943e783 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/ImageObjectDetectionPredictionResult.java @@ -0,0 +1,1922 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/schema/predict/prediction/image_object_detection.proto + +package com.google.cloud.aiplatform.v1.schema.predict.prediction; + +/** + * + * + *
+ * Prediction output format for Image Object Detection.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1.schema.predict.prediction.ImageObjectDetectionPredictionResult} + */ +public final class ImageObjectDetectionPredictionResult + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.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.v1.schema.predict.prediction + .ImageObjectDetectionPredictionResultProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_prediction_ImageObjectDetectionPredictionResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.predict.prediction + .ImageObjectDetectionPredictionResultProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_prediction_ImageObjectDetectionPredictionResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.predict.prediction + .ImageObjectDetectionPredictionResult.class, + com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction + .ImageObjectDetectionPredictionResult)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.schema.predict.prediction.ImageObjectDetectionPredictionResult + other = + (com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction + .ImageObjectDetectionPredictionResult + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.predict.prediction + .ImageObjectDetectionPredictionResult + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.schema.predict.prediction.ImageObjectDetectionPredictionResult} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.schema.predict.prediction.ImageObjectDetectionPredictionResult) + com.google.cloud.aiplatform.v1.schema.predict.prediction + .ImageObjectDetectionPredictionResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.schema.predict.prediction + .ImageObjectDetectionPredictionResultProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_prediction_ImageObjectDetectionPredictionResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.predict.prediction + .ImageObjectDetectionPredictionResultProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_prediction_ImageObjectDetectionPredictionResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.predict.prediction + .ImageObjectDetectionPredictionResult.class, + com.google.cloud.aiplatform.v1.schema.predict.prediction + .ImageObjectDetectionPredictionResult.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction + .ImageObjectDetectionPredictionResultProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_prediction_ImageObjectDetectionPredictionResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.prediction + .ImageObjectDetectionPredictionResult + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.schema.predict.prediction + .ImageObjectDetectionPredictionResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.prediction + .ImageObjectDetectionPredictionResult + build() { + com.google.cloud.aiplatform.v1.schema.predict.prediction.ImageObjectDetectionPredictionResult + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.prediction + .ImageObjectDetectionPredictionResult + buildPartial() { + com.google.cloud.aiplatform.v1.schema.predict.prediction.ImageObjectDetectionPredictionResult + result = + new com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction + .ImageObjectDetectionPredictionResult) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.schema.predict.prediction + .ImageObjectDetectionPredictionResult) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.schema.predict.prediction + .ImageObjectDetectionPredictionResult + other) { + if (other + == com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction.ImageObjectDetectionPredictionResult + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction.ImageObjectDetectionPredictionResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.schema.predict.prediction.ImageObjectDetectionPredictionResult) + private static final com.google.cloud.aiplatform.v1.schema.predict.prediction + .ImageObjectDetectionPredictionResult + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.schema.predict.prediction + .ImageObjectDetectionPredictionResult(); + } + + public static com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction + .ImageObjectDetectionPredictionResult + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/ImageObjectDetectionPredictionResultOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/ImageObjectDetectionPredictionResultOrBuilder.java new file mode 100644 index 000000000..ea192f2e2 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/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/v1/schema/predict/prediction/image_object_detection.proto + +package com.google.cloud.aiplatform.v1.schema.predict.prediction; + +public interface ImageObjectDetectionPredictionResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.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-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/ImageObjectDetectionPredictionResultProto.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/ImageObjectDetectionPredictionResultProto.java new file mode 100644 index 000000000..c888cc6e4 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/ImageObjectDetectionPredictionResultProto.java @@ -0,0 +1,78 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/schema/predict/prediction/image_object_detection.proto + +package com.google.cloud.aiplatform.v1.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_v1_schema_predict_prediction_ImageObjectDetectionPredictionResult_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_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 = { + "\nQgoogle/cloud/aiplatform/v1/schema/pred" + + "ict/prediction/image_object_detection.pr" + + "oto\0224google.cloud.aiplatform.v1.schema.p" + + "redict.prediction\032\034google/protobuf/struc" + + "t.proto\032\034google/api/annotations.proto\"\213\001" + + "\n$ImageObjectDetectionPredictionResult\022\013" + + "\n\003ids\030\001 \003(\003\022\025\n\rdisplay_names\030\002 \003(\t\022\023\n\013co" + + "nfidences\030\003 \003(\002\022*\n\006bboxes\030\004 \003(\0132\032.google" + + ".protobuf.ListValueB\307\001\n8com.google.cloud" + + ".aiplatform.v1.schema.predict.prediction" + + "B)ImageObjectDetectionPredictionResultPr" + + "otoP\001Z^google.golang.org/genproto/google" + + "apis/cloud/aiplatform/v1/schema/predict/" + + "prediction;predictionb\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_v1_schema_predict_prediction_ImageObjectDetectionPredictionResult_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_schema_predict_prediction_ImageObjectDetectionPredictionResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_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-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/ImageSegmentationPredictionResult.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/ImageSegmentationPredictionResult.java new file mode 100644 index 000000000..abdf9812a --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/ImageSegmentationPredictionResult.java @@ -0,0 +1,947 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/schema/predict/prediction/image_segmentation.proto + +package com.google.cloud.aiplatform.v1.schema.predict.prediction; + +/** + * + * + *
+ * Prediction output format for Image Segmentation.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1.schema.predict.prediction.ImageSegmentationPredictionResult} + */ +public final class ImageSegmentationPredictionResult extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.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_ = ""; + confidenceMask_ = ""; + } + + @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: + { + java.lang.String s = input.readStringRequireUtf8(); + + categoryMask_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + confidenceMask_ = 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.v1.schema.predict.prediction + .ImageSegmentationPredictionResultProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_prediction_ImageSegmentationPredictionResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.predict.prediction + .ImageSegmentationPredictionResultProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_prediction_ImageSegmentationPredictionResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.predict.prediction + .ImageSegmentationPredictionResult.class, + com.google.cloud.aiplatform.v1.schema.predict.prediction + .ImageSegmentationPredictionResult.Builder.class); + } + + public static final int CATEGORY_MASK_FIELD_NUMBER = 1; + private volatile java.lang.Object 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.
+   * 
+ * + * string category_mask = 1; + * + * @return The categoryMask. + */ + @java.lang.Override + public java.lang.String getCategoryMask() { + java.lang.Object ref = categoryMask_; + 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(); + categoryMask_ = s; + return s; + } + } + /** + * + * + *
+   * 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.
+   * 
+ * + * string category_mask = 1; + * + * @return The bytes for categoryMask. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCategoryMaskBytes() { + java.lang.Object ref = categoryMask_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + categoryMask_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONFIDENCE_MASK_FIELD_NUMBER = 2; + private volatile java.lang.Object 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.
+   * 
+ * + * string confidence_mask = 2; + * + * @return The confidenceMask. + */ + @java.lang.Override + public java.lang.String getConfidenceMask() { + java.lang.Object ref = confidenceMask_; + 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(); + confidenceMask_ = s; + return s; + } + } + /** + * + * + *
+   * 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.
+   * 
+ * + * string confidence_mask = 2; + * + * @return The bytes for confidenceMask. + */ + @java.lang.Override + public com.google.protobuf.ByteString getConfidenceMaskBytes() { + java.lang.Object ref = confidenceMask_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + confidenceMask_ = 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 (!getCategoryMaskBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, categoryMask_); + } + if (!getConfidenceMaskBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, confidenceMask_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getCategoryMaskBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, categoryMask_); + } + if (!getConfidenceMaskBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(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.v1.schema.predict.prediction + .ImageSegmentationPredictionResult)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.schema.predict.prediction.ImageSegmentationPredictionResult + other = + (com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction + .ImageSegmentationPredictionResult + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.predict.prediction + .ImageSegmentationPredictionResult + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.schema.predict.prediction.ImageSegmentationPredictionResult} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.schema.predict.prediction.ImageSegmentationPredictionResult) + com.google.cloud.aiplatform.v1.schema.predict.prediction + .ImageSegmentationPredictionResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.schema.predict.prediction + .ImageSegmentationPredictionResultProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_prediction_ImageSegmentationPredictionResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.predict.prediction + .ImageSegmentationPredictionResultProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_prediction_ImageSegmentationPredictionResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.predict.prediction + .ImageSegmentationPredictionResult.class, + com.google.cloud.aiplatform.v1.schema.predict.prediction + .ImageSegmentationPredictionResult.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.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_ = ""; + + confidenceMask_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.schema.predict.prediction + .ImageSegmentationPredictionResultProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_prediction_ImageSegmentationPredictionResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.prediction + .ImageSegmentationPredictionResult + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.schema.predict.prediction + .ImageSegmentationPredictionResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.prediction + .ImageSegmentationPredictionResult + build() { + com.google.cloud.aiplatform.v1.schema.predict.prediction.ImageSegmentationPredictionResult + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.prediction + .ImageSegmentationPredictionResult + buildPartial() { + com.google.cloud.aiplatform.v1.schema.predict.prediction.ImageSegmentationPredictionResult + result = + new com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction + .ImageSegmentationPredictionResult) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.schema.predict.prediction + .ImageSegmentationPredictionResult) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.schema.predict.prediction.ImageSegmentationPredictionResult + other) { + if (other + == com.google.cloud.aiplatform.v1.schema.predict.prediction + .ImageSegmentationPredictionResult.getDefaultInstance()) return this; + if (!other.getCategoryMask().isEmpty()) { + categoryMask_ = other.categoryMask_; + onChanged(); + } + if (!other.getConfidenceMask().isEmpty()) { + confidenceMask_ = other.confidenceMask_; + 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.v1.schema.predict.prediction.ImageSegmentationPredictionResult + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.schema.predict.prediction + .ImageSegmentationPredictionResult) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object 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.
+     * 
+ * + * string category_mask = 1; + * + * @return The categoryMask. + */ + public java.lang.String getCategoryMask() { + java.lang.Object ref = categoryMask_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + categoryMask_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * 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.
+     * 
+ * + * string category_mask = 1; + * + * @return The bytes for categoryMask. + */ + public com.google.protobuf.ByteString getCategoryMaskBytes() { + java.lang.Object ref = categoryMask_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + categoryMask_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * 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.
+     * 
+ * + * string category_mask = 1; + * + * @param value The categoryMask to set. + * @return This builder for chaining. + */ + public Builder setCategoryMask(java.lang.String 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.
+     * 
+ * + * string category_mask = 1; + * + * @return This builder for chaining. + */ + public Builder clearCategoryMask() { + + categoryMask_ = getDefaultInstance().getCategoryMask(); + 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.
+     * 
+ * + * string category_mask = 1; + * + * @param value The bytes for categoryMask to set. + * @return This builder for chaining. + */ + public Builder setCategoryMaskBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + categoryMask_ = value; + onChanged(); + return this; + } + + private java.lang.Object 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.
+     * 
+ * + * string confidence_mask = 2; + * + * @return The confidenceMask. + */ + public java.lang.String getConfidenceMask() { + java.lang.Object ref = confidenceMask_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + confidenceMask_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * 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.
+     * 
+ * + * string confidence_mask = 2; + * + * @return The bytes for confidenceMask. + */ + public com.google.protobuf.ByteString getConfidenceMaskBytes() { + java.lang.Object ref = confidenceMask_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + confidenceMask_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * 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.
+     * 
+ * + * string confidence_mask = 2; + * + * @param value The confidenceMask to set. + * @return This builder for chaining. + */ + public Builder setConfidenceMask(java.lang.String 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.
+     * 
+ * + * string confidence_mask = 2; + * + * @return This builder for chaining. + */ + public Builder clearConfidenceMask() { + + confidenceMask_ = getDefaultInstance().getConfidenceMask(); + 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.
+     * 
+ * + * string confidence_mask = 2; + * + * @param value The bytes for confidenceMask to set. + * @return This builder for chaining. + */ + public Builder setConfidenceMaskBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + confidenceMask_ = 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.v1.schema.predict.prediction.ImageSegmentationPredictionResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.schema.predict.prediction.ImageSegmentationPredictionResult) + private static final com.google.cloud.aiplatform.v1.schema.predict.prediction + .ImageSegmentationPredictionResult + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.schema.predict.prediction + .ImageSegmentationPredictionResult(); + } + + public static com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction.ImageSegmentationPredictionResult + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/ImageSegmentationPredictionResultOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/ImageSegmentationPredictionResultOrBuilder.java new file mode 100644 index 000000000..feb4784e0 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/ImageSegmentationPredictionResultOrBuilder.java @@ -0,0 +1,93 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/schema/predict/prediction/image_segmentation.proto + +package com.google.cloud.aiplatform.v1.schema.predict.prediction; + +public interface ImageSegmentationPredictionResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.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.
+   * 
+ * + * string category_mask = 1; + * + * @return The categoryMask. + */ + java.lang.String getCategoryMask(); + /** + * + * + *
+   * 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.
+   * 
+ * + * string category_mask = 1; + * + * @return The bytes for categoryMask. + */ + com.google.protobuf.ByteString getCategoryMaskBytes(); + + /** + * + * + *
+   * 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.
+   * 
+ * + * string confidence_mask = 2; + * + * @return The confidenceMask. + */ + java.lang.String getConfidenceMask(); + /** + * + * + *
+   * 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.
+   * 
+ * + * string confidence_mask = 2; + * + * @return The bytes for confidenceMask. + */ + com.google.protobuf.ByteString getConfidenceMaskBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/ImageSegmentationPredictionResultProto.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/ImageSegmentationPredictionResultProto.java new file mode 100644 index 000000000..2881820be --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/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/v1/schema/predict/prediction/image_segmentation.proto + +package com.google.cloud.aiplatform.v1.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_v1_schema_predict_prediction_ImageSegmentationPredictionResult_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_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 = { + "\nMgoogle/cloud/aiplatform/v1/schema/pred" + + "ict/prediction/image_segmentation.proto\022" + + "4google.cloud.aiplatform.v1.schema.predi" + + "ct.prediction\032\034google/api/annotations.pr" + + "oto\"S\n!ImageSegmentationPredictionResult" + + "\022\025\n\rcategory_mask\030\001 \001(\t\022\027\n\017confidence_ma" + + "sk\030\002 \001(\tB\304\001\n8com.google.cloud.aiplatform" + + ".v1.schema.predict.predictionB&ImageSegm" + + "entationPredictionResultProtoP\001Z^google." + + "golang.org/genproto/googleapis/cloud/aip" + + "latform/v1/schema/predict/prediction;pre" + + "dictionb\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_v1_schema_predict_prediction_ImageSegmentationPredictionResult_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_schema_predict_prediction_ImageSegmentationPredictionResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_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-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/TabularClassificationPredictionResult.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/TabularClassificationPredictionResult.java new file mode 100644 index 000000000..522477425 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/TabularClassificationPredictionResult.java @@ -0,0 +1,1084 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/schema/predict/prediction/tabular_classification.proto + +package com.google.cloud.aiplatform.v1.schema.predict.prediction; + +/** + * + * + *
+ * Prediction output format for Tabular Classification.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1.schema.predict.prediction.TabularClassificationPredictionResult} + */ +public final class TabularClassificationPredictionResult + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.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.v1.schema.predict.prediction + .TabularClassificationPredictionResultProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_prediction_TabularClassificationPredictionResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.predict.prediction + .TabularClassificationPredictionResultProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_prediction_TabularClassificationPredictionResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.predict.prediction + .TabularClassificationPredictionResult.class, + com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction + .TabularClassificationPredictionResult)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.schema.predict.prediction.TabularClassificationPredictionResult + other = + (com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction + .TabularClassificationPredictionResult + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.predict.prediction + .TabularClassificationPredictionResult + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.schema.predict.prediction.TabularClassificationPredictionResult} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.schema.predict.prediction.TabularClassificationPredictionResult) + com.google.cloud.aiplatform.v1.schema.predict.prediction + .TabularClassificationPredictionResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.schema.predict.prediction + .TabularClassificationPredictionResultProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_prediction_TabularClassificationPredictionResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.predict.prediction + .TabularClassificationPredictionResultProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_prediction_TabularClassificationPredictionResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.predict.prediction + .TabularClassificationPredictionResult.class, + com.google.cloud.aiplatform.v1.schema.predict.prediction + .TabularClassificationPredictionResult.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction + .TabularClassificationPredictionResultProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_prediction_TabularClassificationPredictionResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.prediction + .TabularClassificationPredictionResult + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.schema.predict.prediction + .TabularClassificationPredictionResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.prediction + .TabularClassificationPredictionResult + build() { + com.google.cloud.aiplatform.v1.schema.predict.prediction.TabularClassificationPredictionResult + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.prediction + .TabularClassificationPredictionResult + buildPartial() { + com.google.cloud.aiplatform.v1.schema.predict.prediction.TabularClassificationPredictionResult + result = + new com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction + .TabularClassificationPredictionResult) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.schema.predict.prediction + .TabularClassificationPredictionResult) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.schema.predict.prediction + .TabularClassificationPredictionResult + other) { + if (other + == com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction.TabularClassificationPredictionResult + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction.TabularClassificationPredictionResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.schema.predict.prediction.TabularClassificationPredictionResult) + private static final com.google.cloud.aiplatform.v1.schema.predict.prediction + .TabularClassificationPredictionResult + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.schema.predict.prediction + .TabularClassificationPredictionResult(); + } + + public static com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction + .TabularClassificationPredictionResult + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/TabularClassificationPredictionResultOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/TabularClassificationPredictionResultOrBuilder.java new file mode 100644 index 000000000..aabc523e5 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/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/v1/schema/predict/prediction/tabular_classification.proto + +package com.google.cloud.aiplatform.v1.schema.predict.prediction; + +public interface TabularClassificationPredictionResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.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-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/TabularClassificationPredictionResultProto.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/TabularClassificationPredictionResultProto.java new file mode 100644 index 000000000..6820220e2 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/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/v1/schema/predict/prediction/tabular_classification.proto + +package com.google.cloud.aiplatform.v1.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_v1_schema_predict_prediction_TabularClassificationPredictionResult_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_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 = { + "\nQgoogle/cloud/aiplatform/v1/schema/pred" + + "ict/prediction/tabular_classification.pr" + + "oto\0224google.cloud.aiplatform.v1.schema.p" + + "redict.prediction\032\034google/api/annotation" + + "s.proto\"H\n%TabularClassificationPredicti" + + "onResult\022\017\n\007classes\030\001 \003(\t\022\016\n\006scores\030\002 \003(" + + "\002B\310\001\n8com.google.cloud.aiplatform.v1.sch" + + "ema.predict.predictionB*TabularClassific" + + "ationPredictionResultProtoP\001Z^google.gol" + + "ang.org/genproto/googleapis/cloud/aiplat" + + "form/v1/schema/predict/prediction;predic" + + "tionb\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_v1_schema_predict_prediction_TabularClassificationPredictionResult_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_schema_predict_prediction_TabularClassificationPredictionResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_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-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/TabularRegressionPredictionResult.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/TabularRegressionPredictionResult.java new file mode 100644 index 000000000..388897084 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/TabularRegressionPredictionResult.java @@ -0,0 +1,798 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/schema/predict/prediction/tabular_regression.proto + +package com.google.cloud.aiplatform.v1.schema.predict.prediction; + +/** + * + * + *
+ * Prediction output format for Tabular Regression.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1.schema.predict.prediction.TabularRegressionPredictionResult} + */ +public final class TabularRegressionPredictionResult extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.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.v1.schema.predict.prediction + .TabularRegressionPredictionResultProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_prediction_TabularRegressionPredictionResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.predict.prediction + .TabularRegressionPredictionResultProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_prediction_TabularRegressionPredictionResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.predict.prediction + .TabularRegressionPredictionResult.class, + com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction + .TabularRegressionPredictionResult)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.schema.predict.prediction.TabularRegressionPredictionResult + other = + (com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction + .TabularRegressionPredictionResult + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.predict.prediction + .TabularRegressionPredictionResult + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.schema.predict.prediction.TabularRegressionPredictionResult} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.schema.predict.prediction.TabularRegressionPredictionResult) + com.google.cloud.aiplatform.v1.schema.predict.prediction + .TabularRegressionPredictionResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.schema.predict.prediction + .TabularRegressionPredictionResultProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_prediction_TabularRegressionPredictionResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.predict.prediction + .TabularRegressionPredictionResultProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_prediction_TabularRegressionPredictionResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.predict.prediction + .TabularRegressionPredictionResult.class, + com.google.cloud.aiplatform.v1.schema.predict.prediction + .TabularRegressionPredictionResult.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction + .TabularRegressionPredictionResultProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_prediction_TabularRegressionPredictionResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.prediction + .TabularRegressionPredictionResult + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.schema.predict.prediction + .TabularRegressionPredictionResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.prediction + .TabularRegressionPredictionResult + build() { + com.google.cloud.aiplatform.v1.schema.predict.prediction.TabularRegressionPredictionResult + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.prediction + .TabularRegressionPredictionResult + buildPartial() { + com.google.cloud.aiplatform.v1.schema.predict.prediction.TabularRegressionPredictionResult + result = + new com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction + .TabularRegressionPredictionResult) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.schema.predict.prediction + .TabularRegressionPredictionResult) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.schema.predict.prediction.TabularRegressionPredictionResult + other) { + if (other + == com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction.TabularRegressionPredictionResult + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction.TabularRegressionPredictionResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.schema.predict.prediction.TabularRegressionPredictionResult) + private static final com.google.cloud.aiplatform.v1.schema.predict.prediction + .TabularRegressionPredictionResult + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.schema.predict.prediction + .TabularRegressionPredictionResult(); + } + + public static com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction.TabularRegressionPredictionResult + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/TabularRegressionPredictionResultOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/TabularRegressionPredictionResultOrBuilder.java new file mode 100644 index 000000000..dfe4777aa --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/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/v1/schema/predict/prediction/tabular_regression.proto + +package com.google.cloud.aiplatform.v1.schema.predict.prediction; + +public interface TabularRegressionPredictionResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.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-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/TabularRegressionPredictionResultProto.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/TabularRegressionPredictionResultProto.java new file mode 100644 index 000000000..2b530712e --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/TabularRegressionPredictionResultProto.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/v1/schema/predict/prediction/tabular_regression.proto + +package com.google.cloud.aiplatform.v1.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_v1_schema_predict_prediction_TabularRegressionPredictionResult_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_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 = { + "\nMgoogle/cloud/aiplatform/v1/schema/pred" + + "ict/prediction/tabular_regression.proto\022" + + "4google.cloud.aiplatform.v1.schema.predi" + + "ct.prediction\032\034google/api/annotations.pr" + + "oto\"\\\n!TabularRegressionPredictionResult" + + "\022\r\n\005value\030\001 \001(\002\022\023\n\013lower_bound\030\002 \001(\002\022\023\n\013" + + "upper_bound\030\003 \001(\002B\304\001\n8com.google.cloud.a" + + "iplatform.v1.schema.predict.predictionB&" + + "TabularRegressionPredictionResultProtoP\001" + + "Z^google.golang.org/genproto/googleapis/" + + "cloud/aiplatform/v1/schema/predict/predi" + + "ction;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_v1_schema_predict_prediction_TabularRegressionPredictionResult_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_schema_predict_prediction_TabularRegressionPredictionResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_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-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/TextExtractionPredictionResult.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/TextExtractionPredictionResult.java new file mode 100644 index 000000000..7f4ebd2fc --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/TextExtractionPredictionResult.java @@ -0,0 +1,1848 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/schema/predict/prediction/text_extraction.proto + +package com.google.cloud.aiplatform.v1.schema.predict.prediction; + +/** + * + * + *
+ * Prediction output format for Text Extraction.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1.schema.predict.prediction.TextExtractionPredictionResult} + */ +public final class TextExtractionPredictionResult extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.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.v1.schema.predict.prediction + .TextExtractionPredictionResultProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_prediction_TextExtractionPredictionResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.predict.prediction + .TextExtractionPredictionResultProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_prediction_TextExtractionPredictionResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.predict.prediction.TextExtractionPredictionResult + .class, + com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction.TextExtractionPredictionResult)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.schema.predict.prediction.TextExtractionPredictionResult other = + (com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction + .TextExtractionPredictionResult + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.predict.prediction + .TextExtractionPredictionResult + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.schema.predict.prediction.TextExtractionPredictionResult} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.schema.predict.prediction.TextExtractionPredictionResult) + com.google.cloud.aiplatform.v1.schema.predict.prediction + .TextExtractionPredictionResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.schema.predict.prediction + .TextExtractionPredictionResultProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_prediction_TextExtractionPredictionResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.predict.prediction + .TextExtractionPredictionResultProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_prediction_TextExtractionPredictionResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.predict.prediction + .TextExtractionPredictionResult.class, + com.google.cloud.aiplatform.v1.schema.predict.prediction + .TextExtractionPredictionResult.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction + .TextExtractionPredictionResultProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_prediction_TextExtractionPredictionResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.prediction.TextExtractionPredictionResult + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.schema.predict.prediction.TextExtractionPredictionResult + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.prediction.TextExtractionPredictionResult + build() { + com.google.cloud.aiplatform.v1.schema.predict.prediction.TextExtractionPredictionResult + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.prediction.TextExtractionPredictionResult + buildPartial() { + com.google.cloud.aiplatform.v1.schema.predict.prediction.TextExtractionPredictionResult + result = + new com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction.TextExtractionPredictionResult) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.schema.predict.prediction + .TextExtractionPredictionResult) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.schema.predict.prediction.TextExtractionPredictionResult + other) { + if (other + == com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction.TextExtractionPredictionResult + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction.TextExtractionPredictionResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.schema.predict.prediction.TextExtractionPredictionResult) + private static final com.google.cloud.aiplatform.v1.schema.predict.prediction + .TextExtractionPredictionResult + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.schema.predict.prediction + .TextExtractionPredictionResult(); + } + + public static com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction.TextExtractionPredictionResult + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/TextExtractionPredictionResultOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/TextExtractionPredictionResultOrBuilder.java new file mode 100644 index 000000000..c08d061f9 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/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/v1/schema/predict/prediction/text_extraction.proto + +package com.google.cloud.aiplatform.v1.schema.predict.prediction; + +public interface TextExtractionPredictionResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.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-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/TextExtractionPredictionResultProto.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/TextExtractionPredictionResultProto.java new file mode 100644 index 000000000..546d8be44 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/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/v1/schema/predict/prediction/text_extraction.proto + +package com.google.cloud.aiplatform.v1.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_v1_schema_predict_prediction_TextExtractionPredictionResult_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_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 = { + "\nJgoogle/cloud/aiplatform/v1/schema/pred" + + "ict/prediction/text_extraction.proto\0224go" + + "ogle.cloud.aiplatform.v1.schema.predict." + + "prediction\032\034google/api/annotations.proto" + + "\"\237\001\n\036TextExtractionPredictionResult\022\013\n\003i" + + "ds\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_segm" + + "ent_end_offsets\030\004 \003(\003\022\023\n\013confidences\030\005 \003" + + "(\002B\301\001\n8com.google.cloud.aiplatform.v1.sc" + + "hema.predict.predictionB#TextExtractionP" + + "redictionResultProtoP\001Z^google.golang.or" + + "g/genproto/googleapis/cloud/aiplatform/v" + + "1/schema/predict/prediction;predictionb\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_v1_schema_predict_prediction_TextExtractionPredictionResult_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_schema_predict_prediction_TextExtractionPredictionResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_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-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/TextSentimentPredictionResult.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/TextSentimentPredictionResult.java new file mode 100644 index 000000000..c5cb57099 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/TextSentimentPredictionResult.java @@ -0,0 +1,621 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/schema/predict/prediction/text_sentiment.proto + +package com.google.cloud.aiplatform.v1.schema.predict.prediction; + +/** + * + * + *
+ * Prediction output format for Text Sentiment
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1.schema.predict.prediction.TextSentimentPredictionResult} + */ +public final class TextSentimentPredictionResult extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.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 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.v1.schema.predict.prediction + .TextSentimentPredictionResultProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_prediction_TextSentimentPredictionResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.predict.prediction + .TextSentimentPredictionResultProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_prediction_TextSentimentPredictionResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.predict.prediction.TextSentimentPredictionResult + .class, + com.google.cloud.aiplatform.v1.schema.predict.prediction.TextSentimentPredictionResult + .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.v1.schema.predict.prediction.TextSentimentPredictionResult)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.schema.predict.prediction.TextSentimentPredictionResult other = + (com.google.cloud.aiplatform.v1.schema.predict.prediction.TextSentimentPredictionResult) + 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.v1.schema.predict.prediction + .TextSentimentPredictionResult + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.predict.prediction + .TextSentimentPredictionResult + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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; + } + /** + * + * + *
+   * Prediction output format for Text Sentiment
+   * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1.schema.predict.prediction.TextSentimentPredictionResult} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.schema.predict.prediction.TextSentimentPredictionResult) + com.google.cloud.aiplatform.v1.schema.predict.prediction + .TextSentimentPredictionResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.schema.predict.prediction + .TextSentimentPredictionResultProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_prediction_TextSentimentPredictionResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.predict.prediction + .TextSentimentPredictionResultProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_prediction_TextSentimentPredictionResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.predict.prediction.TextSentimentPredictionResult + .class, + com.google.cloud.aiplatform.v1.schema.predict.prediction.TextSentimentPredictionResult + .Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.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(); + sentiment_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.schema.predict.prediction + .TextSentimentPredictionResultProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_prediction_TextSentimentPredictionResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.prediction.TextSentimentPredictionResult + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.schema.predict.prediction.TextSentimentPredictionResult + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.prediction.TextSentimentPredictionResult + build() { + com.google.cloud.aiplatform.v1.schema.predict.prediction.TextSentimentPredictionResult + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.prediction.TextSentimentPredictionResult + buildPartial() { + com.google.cloud.aiplatform.v1.schema.predict.prediction.TextSentimentPredictionResult + result = + new com.google.cloud.aiplatform.v1.schema.predict.prediction + .TextSentimentPredictionResult(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.v1.schema.predict.prediction.TextSentimentPredictionResult) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.schema.predict.prediction.TextSentimentPredictionResult) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.schema.predict.prediction.TextSentimentPredictionResult + other) { + if (other + == com.google.cloud.aiplatform.v1.schema.predict.prediction.TextSentimentPredictionResult + .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.v1.schema.predict.prediction.TextSentimentPredictionResult + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.schema.predict.prediction.TextSentimentPredictionResult) + 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.v1.schema.predict.prediction.TextSentimentPredictionResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.schema.predict.prediction.TextSentimentPredictionResult) + private static final com.google.cloud.aiplatform.v1.schema.predict.prediction + .TextSentimentPredictionResult + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.schema.predict.prediction + .TextSentimentPredictionResult(); + } + + public static com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction.TextSentimentPredictionResult + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/TextSentimentPredictionResultOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/TextSentimentPredictionResultOrBuilder.java new file mode 100644 index 000000000..a9699d80f --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/TextSentimentPredictionResultOrBuilder.java @@ -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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/schema/predict/prediction/text_sentiment.proto + +package com.google.cloud.aiplatform.v1.schema.predict.prediction; + +public interface TextSentimentPredictionResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.schema.predict.prediction.TextSentimentPredictionResult) + 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(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/TextSentimentPredictionResultProto.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/TextSentimentPredictionResultProto.java new file mode 100644 index 000000000..e32494fe3 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/TextSentimentPredictionResultProto.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/v1/schema/predict/prediction/text_sentiment.proto + +package com.google.cloud.aiplatform.v1.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_v1_schema_predict_prediction_TextSentimentPredictionResult_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_schema_predict_prediction_TextSentimentPredictionResult_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\nIgoogle/cloud/aiplatform/v1/schema/pred" + + "ict/prediction/text_sentiment.proto\0224goo" + + "gle.cloud.aiplatform.v1.schema.predict.p" + + "rediction\032\034google/api/annotations.proto\"" + + "2\n\035TextSentimentPredictionResult\022\021\n\tsent" + + "iment\030\001 \001(\005B\300\001\n8com.google.cloud.aiplatf" + + "orm.v1.schema.predict.predictionB\"TextSe" + + "ntimentPredictionResultProtoP\001Z^google.g" + + "olang.org/genproto/googleapis/cloud/aipl" + + "atform/v1/schema/predict/prediction;pred" + + "ictionb\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_v1_schema_predict_prediction_TextSentimentPredictionResult_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_schema_predict_prediction_TextSentimentPredictionResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_schema_predict_prediction_TextSentimentPredictionResult_descriptor, + new java.lang.String[] { + "Sentiment", + }); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/VideoActionRecognitionPredictionResult.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/VideoActionRecognitionPredictionResult.java new file mode 100644 index 000000000..6d180cb58 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/VideoActionRecognitionPredictionResult.java @@ -0,0 +1,1801 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/schema/predict/prediction/video_action_recognition.proto + +package com.google.cloud.aiplatform.v1.schema.predict.prediction; + +/** + * + * + *
+ * Prediction output format for Video Action Recognition.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1.schema.predict.prediction.VideoActionRecognitionPredictionResult} + */ +public final class VideoActionRecognitionPredictionResult + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.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.v1.schema.predict.prediction + .VideoActionRecognitionPredictionResultProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_prediction_VideoActionRecognitionPredictionResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.predict.prediction + .VideoActionRecognitionPredictionResultProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_prediction_VideoActionRecognitionPredictionResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.predict.prediction + .VideoActionRecognitionPredictionResult.class, + com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction + .VideoActionRecognitionPredictionResult)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.schema.predict.prediction.VideoActionRecognitionPredictionResult + other = + (com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction + .VideoActionRecognitionPredictionResult + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.predict.prediction + .VideoActionRecognitionPredictionResult + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.schema.predict.prediction.VideoActionRecognitionPredictionResult} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.schema.predict.prediction.VideoActionRecognitionPredictionResult) + com.google.cloud.aiplatform.v1.schema.predict.prediction + .VideoActionRecognitionPredictionResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.schema.predict.prediction + .VideoActionRecognitionPredictionResultProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_prediction_VideoActionRecognitionPredictionResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.predict.prediction + .VideoActionRecognitionPredictionResultProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_prediction_VideoActionRecognitionPredictionResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.predict.prediction + .VideoActionRecognitionPredictionResult.class, + com.google.cloud.aiplatform.v1.schema.predict.prediction + .VideoActionRecognitionPredictionResult.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction + .VideoActionRecognitionPredictionResultProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_prediction_VideoActionRecognitionPredictionResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.prediction + .VideoActionRecognitionPredictionResult + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.schema.predict.prediction + .VideoActionRecognitionPredictionResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.prediction + .VideoActionRecognitionPredictionResult + build() { + com.google.cloud.aiplatform.v1.schema.predict.prediction + .VideoActionRecognitionPredictionResult + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.prediction + .VideoActionRecognitionPredictionResult + buildPartial() { + com.google.cloud.aiplatform.v1.schema.predict.prediction + .VideoActionRecognitionPredictionResult + result = + new com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction + .VideoActionRecognitionPredictionResult) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.schema.predict.prediction + .VideoActionRecognitionPredictionResult) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.schema.predict.prediction + .VideoActionRecognitionPredictionResult + other) { + if (other + == com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction + .VideoActionRecognitionPredictionResult + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction.VideoActionRecognitionPredictionResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.schema.predict.prediction.VideoActionRecognitionPredictionResult) + private static final com.google.cloud.aiplatform.v1.schema.predict.prediction + .VideoActionRecognitionPredictionResult + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.schema.predict.prediction + .VideoActionRecognitionPredictionResult(); + } + + public static com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction + .VideoActionRecognitionPredictionResult + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/VideoActionRecognitionPredictionResultOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/VideoActionRecognitionPredictionResultOrBuilder.java new file mode 100644 index 000000000..1522445bd --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/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/v1/schema/predict/prediction/video_action_recognition.proto + +package com.google.cloud.aiplatform.v1.schema.predict.prediction; + +public interface VideoActionRecognitionPredictionResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.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-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/VideoActionRecognitionPredictionResultProto.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/VideoActionRecognitionPredictionResultProto.java new file mode 100644 index 000000000..87a7e6f90 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/VideoActionRecognitionPredictionResultProto.java @@ -0,0 +1,83 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1/schema/predict/prediction/video_action_recognition.proto + +package com.google.cloud.aiplatform.v1.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_v1_schema_predict_prediction_VideoActionRecognitionPredictionResult_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_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 = { + "\nSgoogle/cloud/aiplatform/v1/schema/pred" + + "ict/prediction/video_action_recognition." + + "proto\0224google.cloud.aiplatform.v1.schema" + + ".predict.prediction\032\036google/protobuf/dur" + + "ation.proto\032\036google/protobuf/wrappers.pr" + + "oto\032\034google/api/annotations.proto\"\347\001\n&Vi" + + "deoActionRecognitionPredictionResult\022\n\n\002" + + "id\030\001 \001(\t\022\024\n\014display_name\030\002 \001(\t\0225\n\022time_s" + + "egment_start\030\004 \001(\0132\031.google.protobuf.Dur" + + "ation\0223\n\020time_segment_end\030\005 \001(\0132\031.google" + + ".protobuf.Duration\022/\n\nconfidence\030\006 \001(\0132\033" + + ".google.protobuf.FloatValueB\311\001\n8com.goog" + + "le.cloud.aiplatform.v1.schema.predict.pr" + + "edictionB+VideoActionRecognitionPredicti" + + "onResultProtoP\001Z^google.golang.org/genpr" + + "oto/googleapis/cloud/aiplatform/v1/schem" + + "a/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_v1_schema_predict_prediction_VideoActionRecognitionPredictionResult_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_schema_predict_prediction_VideoActionRecognitionPredictionResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_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-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/VideoClassificationPredictionResult.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/VideoClassificationPredictionResult.java new file mode 100644 index 000000000..a9ec96573 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/VideoClassificationPredictionResult.java @@ -0,0 +1,2075 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/schema/predict/prediction/video_classification.proto + +package com.google.cloud.aiplatform.v1.schema.predict.prediction; + +/** + * + * + *
+ * Prediction output format for Video Classification.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1.schema.predict.prediction.VideoClassificationPredictionResult} + */ +public final class VideoClassificationPredictionResult + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.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.v1.schema.predict.prediction + .VideoClassificationPredictionResultProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_prediction_VideoClassificationPredictionResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.predict.prediction + .VideoClassificationPredictionResultProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_prediction_VideoClassificationPredictionResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.predict.prediction + .VideoClassificationPredictionResult.class, + com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction + .VideoClassificationPredictionResult)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.schema.predict.prediction.VideoClassificationPredictionResult + other = + (com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction + .VideoClassificationPredictionResult + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.predict.prediction + .VideoClassificationPredictionResult + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.schema.predict.prediction.VideoClassificationPredictionResult} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.schema.predict.prediction.VideoClassificationPredictionResult) + com.google.cloud.aiplatform.v1.schema.predict.prediction + .VideoClassificationPredictionResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.schema.predict.prediction + .VideoClassificationPredictionResultProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_prediction_VideoClassificationPredictionResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.predict.prediction + .VideoClassificationPredictionResultProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_prediction_VideoClassificationPredictionResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.predict.prediction + .VideoClassificationPredictionResult.class, + com.google.cloud.aiplatform.v1.schema.predict.prediction + .VideoClassificationPredictionResult.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction + .VideoClassificationPredictionResultProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_prediction_VideoClassificationPredictionResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.prediction + .VideoClassificationPredictionResult + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.schema.predict.prediction + .VideoClassificationPredictionResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.prediction + .VideoClassificationPredictionResult + build() { + com.google.cloud.aiplatform.v1.schema.predict.prediction.VideoClassificationPredictionResult + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.prediction + .VideoClassificationPredictionResult + buildPartial() { + com.google.cloud.aiplatform.v1.schema.predict.prediction.VideoClassificationPredictionResult + result = + new com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction + .VideoClassificationPredictionResult) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.schema.predict.prediction + .VideoClassificationPredictionResult) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.schema.predict.prediction.VideoClassificationPredictionResult + other) { + if (other + == com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction.VideoClassificationPredictionResult + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction.VideoClassificationPredictionResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.schema.predict.prediction.VideoClassificationPredictionResult) + private static final com.google.cloud.aiplatform.v1.schema.predict.prediction + .VideoClassificationPredictionResult + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.schema.predict.prediction + .VideoClassificationPredictionResult(); + } + + public static com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction + .VideoClassificationPredictionResult + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/VideoClassificationPredictionResultOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/VideoClassificationPredictionResultOrBuilder.java new file mode 100644 index 000000000..8b7e01111 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/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/v1/schema/predict/prediction/video_classification.proto + +package com.google.cloud.aiplatform.v1.schema.predict.prediction; + +public interface VideoClassificationPredictionResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.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-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/VideoClassificationPredictionResultProto.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/VideoClassificationPredictionResultProto.java new file mode 100644 index 000000000..50ca407b7 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/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/v1/schema/predict/prediction/video_classification.proto + +package com.google.cloud.aiplatform.v1.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_v1_schema_predict_prediction_VideoClassificationPredictionResult_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_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 = { + "\nOgoogle/cloud/aiplatform/v1/schema/pred" + + "ict/prediction/video_classification.prot" + + "o\0224google.cloud.aiplatform.v1.schema.pre" + + "dict.prediction\032\036google/protobuf/duratio" + + "n.proto\032\036google/protobuf/wrappers.proto\032" + + "\034google/api/annotations.proto\"\362\001\n#VideoC" + + "lassificationPredictionResult\022\n\n\002id\030\001 \001(" + + "\t\022\024\n\014display_name\030\002 \001(\t\022\014\n\004type\030\003 \001(\t\0225\n" + + "\022time_segment_start\030\004 \001(\0132\031.google.proto" + + "buf.Duration\0223\n\020time_segment_end\030\005 \001(\0132\031" + + ".google.protobuf.Duration\022/\n\nconfidence\030" + + "\006 \001(\0132\033.google.protobuf.FloatValueB\306\001\n8c" + + "om.google.cloud.aiplatform.v1.schema.pre" + + "dict.predictionB(VideoClassificationPred" + + "ictionResultProtoP\001Z^google.golang.org/g" + + "enproto/googleapis/cloud/aiplatform/v1/s" + + "chema/predict/prediction;predictionb\006pro" + + "to3" + }; + 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_v1_schema_predict_prediction_VideoClassificationPredictionResult_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_schema_predict_prediction_VideoClassificationPredictionResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_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-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/VideoObjectTrackingPredictionResult.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/VideoObjectTrackingPredictionResult.java new file mode 100644 index 000000000..c3ee8c13d --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/VideoObjectTrackingPredictionResult.java @@ -0,0 +1,4530 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/schema/predict/prediction/video_object_tracking.proto + +package com.google.cloud.aiplatform.v1.schema.predict.prediction; + +/** + * + * + *
+ * Prediction output format for Video Object Tracking.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1.schema.predict.prediction.VideoObjectTrackingPredictionResult} + */ +public final class VideoObjectTrackingPredictionResult + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.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.v1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame>(); + mutable_bitField0_ |= 0x00000001; + } + frames_.add( + input.readMessage( + com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction + .VideoObjectTrackingPredictionResultProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_prediction_VideoObjectTrackingPredictionResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.predict.prediction + .VideoObjectTrackingPredictionResultProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_prediction_VideoObjectTrackingPredictionResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.class, + com.google.cloud.aiplatform.v1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Builder.class); + } + + public interface FrameOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.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.v1.schema.predict.prediction.VideoObjectTrackingPredictionResult.Frame} + */ + public static final class Frame extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.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.v1.schema.predict.prediction + .VideoObjectTrackingPredictionResultProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_prediction_VideoObjectTrackingPredictionResult_Frame_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.predict.prediction + .VideoObjectTrackingPredictionResultProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_prediction_VideoObjectTrackingPredictionResult_Frame_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame.class, + com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.schema.predict.prediction.VideoObjectTrackingPredictionResult + .Frame + other = + (com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.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.v1.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.v1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.schema.predict.prediction.VideoObjectTrackingPredictionResult.Frame) + com.google.cloud.aiplatform.v1.schema.predict.prediction.VideoObjectTrackingPredictionResult + .FrameOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.schema.predict.prediction + .VideoObjectTrackingPredictionResultProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_prediction_VideoObjectTrackingPredictionResult_Frame_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.predict.prediction + .VideoObjectTrackingPredictionResultProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_prediction_VideoObjectTrackingPredictionResult_Frame_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame.class, + com.google.cloud.aiplatform.v1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction + .VideoObjectTrackingPredictionResultProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_prediction_VideoObjectTrackingPredictionResult_Frame_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame + build() { + com.google.cloud.aiplatform.v1.schema.predict.prediction.VideoObjectTrackingPredictionResult + .Frame + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame + buildPartial() { + com.google.cloud.aiplatform.v1.schema.predict.prediction.VideoObjectTrackingPredictionResult + .Frame + result = + new com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame + other) { + if (other + == com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction.VideoObjectTrackingPredictionResult + .Frame + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction.VideoObjectTrackingPredictionResult.Frame) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.schema.predict.prediction.VideoObjectTrackingPredictionResult.Frame) + private static final com.google.cloud.aiplatform.v1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame(); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.predict.prediction.VideoObjectTrackingPredictionResult.Frame frames = 6; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction.VideoObjectTrackingPredictionResult.Frame frames = 6; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.aiplatform.v1.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.v1.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.v1.schema.predict.prediction.VideoObjectTrackingPredictionResult.Frame frames = 6; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction.VideoObjectTrackingPredictionResult.Frame frames = 6; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction + .VideoObjectTrackingPredictionResult)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.schema.predict.prediction.VideoObjectTrackingPredictionResult + other = + (com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction + .VideoObjectTrackingPredictionResult + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.predict.prediction + .VideoObjectTrackingPredictionResult + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.schema.predict.prediction.VideoObjectTrackingPredictionResult} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.schema.predict.prediction.VideoObjectTrackingPredictionResult) + com.google.cloud.aiplatform.v1.schema.predict.prediction + .VideoObjectTrackingPredictionResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.schema.predict.prediction + .VideoObjectTrackingPredictionResultProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_prediction_VideoObjectTrackingPredictionResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.predict.prediction + .VideoObjectTrackingPredictionResultProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_prediction_VideoObjectTrackingPredictionResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.class, + com.google.cloud.aiplatform.v1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction + .VideoObjectTrackingPredictionResultProto + .internal_static_google_cloud_aiplatform_v1_schema_predict_prediction_VideoObjectTrackingPredictionResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.prediction + .VideoObjectTrackingPredictionResult + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.prediction + .VideoObjectTrackingPredictionResult + build() { + com.google.cloud.aiplatform.v1.schema.predict.prediction.VideoObjectTrackingPredictionResult + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.predict.prediction + .VideoObjectTrackingPredictionResult + buildPartial() { + com.google.cloud.aiplatform.v1.schema.predict.prediction.VideoObjectTrackingPredictionResult + result = + new com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction + .VideoObjectTrackingPredictionResult) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.schema.predict.prediction + .VideoObjectTrackingPredictionResult) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.schema.predict.prediction.VideoObjectTrackingPredictionResult + other) { + if (other + == com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction.VideoObjectTrackingPredictionResult + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.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.v1.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.v1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame>(frames_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame, + com.google.cloud.aiplatform.v1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame.Builder, + com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction.VideoObjectTrackingPredictionResult.Frame frames = 6; + * + */ + public java.util.List< + com.google.cloud.aiplatform.v1.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.v1.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.v1.schema.predict.prediction.VideoObjectTrackingPredictionResult.Frame frames = 6; + * + */ + public com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction.VideoObjectTrackingPredictionResult.Frame frames = 6; + * + */ + public Builder setFrames( + int index, + com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction.VideoObjectTrackingPredictionResult.Frame frames = 6; + * + */ + public Builder setFrames( + int index, + com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction.VideoObjectTrackingPredictionResult.Frame frames = 6; + * + */ + public Builder addFrames( + com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction.VideoObjectTrackingPredictionResult.Frame frames = 6; + * + */ + public Builder addFrames( + int index, + com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction.VideoObjectTrackingPredictionResult.Frame frames = 6; + * + */ + public Builder addFrames( + com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction.VideoObjectTrackingPredictionResult.Frame frames = 6; + * + */ + public Builder addFrames( + int index, + com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction.VideoObjectTrackingPredictionResult.Frame frames = 6; + * + */ + public Builder addAllFrames( + java.lang.Iterable< + ? extends + com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.predict.prediction.VideoObjectTrackingPredictionResult.Frame frames = 6; + * + */ + public com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction.VideoObjectTrackingPredictionResult.Frame frames = 6; + * + */ + public com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction.VideoObjectTrackingPredictionResult.Frame frames = 6; + * + */ + public java.util.List< + ? extends + com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction.VideoObjectTrackingPredictionResult.Frame frames = 6; + * + */ + public com.google.cloud.aiplatform.v1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame.Builder + addFramesBuilder() { + return getFramesFieldBuilder() + .addBuilder( + com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction.VideoObjectTrackingPredictionResult.Frame frames = 6; + * + */ + public com.google.cloud.aiplatform.v1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame.Builder + addFramesBuilder(int index) { + return getFramesFieldBuilder() + .addBuilder( + index, + com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction.VideoObjectTrackingPredictionResult.Frame frames = 6; + * + */ + public java.util.List< + com.google.cloud.aiplatform.v1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame.Builder> + getFramesBuilderList() { + return getFramesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame, + com.google.cloud.aiplatform.v1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame.Builder, + com.google.cloud.aiplatform.v1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.FrameOrBuilder> + getFramesFieldBuilder() { + if (framesBuilder_ == null) { + framesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame, + com.google.cloud.aiplatform.v1.schema.predict.prediction + .VideoObjectTrackingPredictionResult.Frame.Builder, + com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction.VideoObjectTrackingPredictionResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.schema.predict.prediction.VideoObjectTrackingPredictionResult) + private static final com.google.cloud.aiplatform.v1.schema.predict.prediction + .VideoObjectTrackingPredictionResult + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.schema.predict.prediction + .VideoObjectTrackingPredictionResult(); + } + + public static com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction + .VideoObjectTrackingPredictionResult + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/VideoObjectTrackingPredictionResultOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/VideoObjectTrackingPredictionResultOrBuilder.java new file mode 100644 index 000000000..441695099 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/VideoObjectTrackingPredictionResultOrBuilder.java @@ -0,0 +1,277 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/schema/predict/prediction/video_object_tracking.proto + +package com.google.cloud.aiplatform.v1.schema.predict.prediction; + +public interface VideoObjectTrackingPredictionResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.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.v1.schema.predict.prediction.VideoObjectTrackingPredictionResult.Frame frames = 6; + * + */ + java.util.List< + com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction.VideoObjectTrackingPredictionResult.Frame frames = 6; + * + */ + com.google.cloud.aiplatform.v1.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.v1.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.v1.schema.predict.prediction.VideoObjectTrackingPredictionResult.Frame frames = 6; + * + */ + java.util.List< + ? extends + com.google.cloud.aiplatform.v1.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.v1.schema.predict.prediction.VideoObjectTrackingPredictionResult.Frame frames = 6; + * + */ + com.google.cloud.aiplatform.v1.schema.predict.prediction.VideoObjectTrackingPredictionResult + .FrameOrBuilder + getFramesOrBuilder(int index); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/VideoObjectTrackingPredictionResultProto.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/VideoObjectTrackingPredictionResultProto.java new file mode 100644 index 000000000..ea1041140 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/predict/prediction/VideoObjectTrackingPredictionResultProto.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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/schema/predict/prediction/video_object_tracking.proto + +package com.google.cloud.aiplatform.v1.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_v1_schema_predict_prediction_VideoObjectTrackingPredictionResult_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_schema_predict_prediction_VideoObjectTrackingPredictionResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_schema_predict_prediction_VideoObjectTrackingPredictionResult_Frame_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_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 = { + "\nPgoogle/cloud/aiplatform/v1/schema/pred" + + "ict/prediction/video_object_tracking.pro" + + "to\0224google.cloud.aiplatform.v1.schema.pr" + + "edict.prediction\032\036google/protobuf/durati" + + "on.proto\032\036google/protobuf/wrappers.proto" + + "\032\034google/api/annotations.proto\"\277\004\n#Video" + + "ObjectTrackingPredictionResult\022\n\n\002id\030\001 \001" + + "(\t\022\024\n\014display_name\030\002 \001(\t\0225\n\022time_segment" + + "_start\030\003 \001(\0132\031.google.protobuf.Duration\022" + + "3\n\020time_segment_end\030\004 \001(\0132\031.google.proto" + + "buf.Duration\022/\n\nconfidence\030\005 \001(\0132\033.googl" + + "e.protobuf.FloatValue\022o\n\006frames\030\006 \003(\0132_." + + "google.cloud.aiplatform.v1.schema.predic" + + "t.prediction.VideoObjectTrackingPredicti" + + "onResult.Frame\032\347\001\n\005Frame\022.\n\013time_offset\030" + + "\001 \001(\0132\031.google.protobuf.Duration\022*\n\005x_mi" + + "n\030\002 \001(\0132\033.google.protobuf.FloatValue\022*\n\005" + + "x_max\030\003 \001(\0132\033.google.protobuf.FloatValue" + + "\022*\n\005y_min\030\004 \001(\0132\033.google.protobuf.FloatV" + + "alue\022*\n\005y_max\030\005 \001(\0132\033.google.protobuf.Fl" + + "oatValueB\306\001\n8com.google.cloud.aiplatform" + + ".v1.schema.predict.predictionB(VideoObje" + + "ctTrackingPredictionResultProtoP\001Z^googl" + + "e.golang.org/genproto/googleapis/cloud/a" + + "iplatform/v1/schema/predict/prediction;p" + + "redictionb\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_v1_schema_predict_prediction_VideoObjectTrackingPredictionResult_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_schema_predict_prediction_VideoObjectTrackingPredictionResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_schema_predict_prediction_VideoObjectTrackingPredictionResult_descriptor, + new java.lang.String[] { + "Id", "DisplayName", "TimeSegmentStart", "TimeSegmentEnd", "Confidence", "Frames", + }); + internal_static_google_cloud_aiplatform_v1_schema_predict_prediction_VideoObjectTrackingPredictionResult_Frame_descriptor = + internal_static_google_cloud_aiplatform_v1_schema_predict_prediction_VideoObjectTrackingPredictionResult_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_aiplatform_v1_schema_predict_prediction_VideoObjectTrackingPredictionResult_Frame_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_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-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMLImageClassificationProto.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMLImageClassificationProto.java new file mode 100644 index 000000000..0f0167e84 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMLImageClassificationProto.java @@ -0,0 +1,126 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: +// google/cloud/aiplatform/v1/schema/trainingjob/definition/automl_image_classification.proto + +package com.google.cloud.aiplatform.v1.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_v1_schema_trainingjob_definition_AutoMlImageClassification_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlImageClassification_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlImageClassificationInputs_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlImageClassificationInputs_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlImageClassificationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_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 = { + "\nZgoogle/cloud/aiplatform/v1/schema/trai" + + "ningjob/definition/automl_image_classifi" + + "cation.proto\0228google.cloud.aiplatform.v1" + + ".schema.trainingjob.definition\032\034google/a" + + "pi/annotations.proto\"\365\001\n\031AutoMlImageClas" + + "sification\022i\n\006inputs\030\001 \001(\0132Y.google.clou" + + "d.aiplatform.v1.schema.trainingjob.defin" + + "ition.AutoMlImageClassificationInputs\022m\n" + + "\010metadata\030\002 \001(\0132[.google.cloud.aiplatfor" + + "m.v1.schema.trainingjob.definition.AutoM" + + "lImageClassificationMetadata\"\223\003\n\037AutoMlI" + + "mageClassificationInputs\022w\n\nmodel_type\030\001" + + " \001(\0162c.google.cloud.aiplatform.v1.schema" + + ".trainingjob.definition.AutoMlImageClass" + + "ificationInputs.ModelType\022\025\n\rbase_model_" + + "id\030\002 \001(\t\022\037\n\027budget_milli_node_hours\030\003 \001(" + + "\003\022\036\n\026disable_early_stopping\030\004 \001(\010\022\023\n\013mul" + + "ti_label\030\005 \001(\010\"\211\001\n\tModelType\022\032\n\026MODEL_TY" + + "PE_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_TF_HIGH_ACCURACY_1\020\004\"\276\002\n!A" + + "utoMlImageClassificationMetadata\022\035\n\025cost" + + "_milli_node_hours\030\001 \001(\003\022\220\001\n\026successful_s" + + "top_reason\030\002 \001(\0162p.google.cloud.aiplatfo" + + "rm.v1.schema.trainingjob.definition.Auto" + + "MlImageClassificationMetadata.Successful" + + "StopReason\"g\n\024SuccessfulStopReason\022&\n\"SU" + + "CCESSFUL_STOP_REASON_UNSPECIFIED\020\000\022\022\n\016BU" + + "DGET_REACHED\020\001\022\023\n\017MODEL_CONVERGED\020\002B\304\001\n<" + + "com.google.cloud.aiplatform.v1.schema.tr" + + "ainingjob.definitionB\036AutoMLImageClassif" + + "icationProtoP\001Zbgoogle.golang.org/genpro" + + "to/googleapis/cloud/aiplatform/v1/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_v1_schema_trainingjob_definition_AutoMlImageClassification_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlImageClassification_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlImageClassification_descriptor, + new java.lang.String[] { + "Inputs", "Metadata", + }); + internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlImageClassificationInputs_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlImageClassificationInputs_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlImageClassificationInputs_descriptor, + new java.lang.String[] { + "ModelType", + "BaseModelId", + "BudgetMilliNodeHours", + "DisableEarlyStopping", + "MultiLabel", + }); + internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlImageClassificationMetadata_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlImageClassificationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_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-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMLImageObjectDetectionProto.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMLImageObjectDetectionProto.java new file mode 100644 index 000000000..e535fde9e --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMLImageObjectDetectionProto.java @@ -0,0 +1,122 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/schema/trainingjob/definition/automl_image_object_detection.proto + +package com.google.cloud.aiplatform.v1.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_v1_schema_trainingjob_definition_AutoMlImageObjectDetection_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlImageObjectDetection_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlImageObjectDetectionInputs_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlImageObjectDetectionInputs_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlImageObjectDetectionMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_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 = { + "\n\\google/cloud/aiplatform/v1/schema/trai" + + "ningjob/definition/automl_image_object_d" + + "etection.proto\0228google.cloud.aiplatform." + + "v1.schema.trainingjob.definition\032\034google" + + "/api/annotations.proto\"\370\001\n\032AutoMlImageOb" + + "jectDetection\022j\n\006inputs\030\001 \001(\0132Z.google.c" + + "loud.aiplatform.v1.schema.trainingjob.de" + + "finition.AutoMlImageObjectDetectionInput" + + "s\022n\n\010metadata\030\002 \001(\0132\\.google.cloud.aipla" + + "tform.v1.schema.trainingjob.definition.A" + + "utoMlImageObjectDetectionMetadata\"\222\003\n Au" + + "toMlImageObjectDetectionInputs\022x\n\nmodel_" + + "type\030\001 \001(\0162d.google.cloud.aiplatform.v1." + + "schema.trainingjob.definition.AutoMlImag" + + "eObjectDetectionInputs.ModelType\022\037\n\027budg" + + "et_milli_node_hours\030\002 \001(\003\022\036\n\026disable_ear" + + "ly_stopping\030\003 \001(\010\"\262\001\n\tModelType\022\032\n\026MODEL" + + "_TYPE_UNSPECIFIED\020\000\022\031\n\025CLOUD_HIGH_ACCURA" + + "CY_1\020\001\022\027\n\023CLOUD_LOW_LATENCY_1\020\002\022\033\n\027MOBIL" + + "E_TF_LOW_LATENCY_1\020\003\022\031\n\025MOBILE_TF_VERSAT" + + "ILE_1\020\004\022\035\n\031MOBILE_TF_HIGH_ACCURACY_1\020\005\"\300" + + "\002\n\"AutoMlImageObjectDetectionMetadata\022\035\n" + + "\025cost_milli_node_hours\030\001 \001(\003\022\221\001\n\026success" + + "ful_stop_reason\030\002 \001(\0162q.google.cloud.aip" + + "latform.v1.schema.trainingjob.definition" + + ".AutoMlImageObjectDetectionMetadata.Succ" + + "essfulStopReason\"g\n\024SuccessfulStopReason" + + "\022&\n\"SUCCESSFUL_STOP_REASON_UNSPECIFIED\020\000" + + "\022\022\n\016BUDGET_REACHED\020\001\022\023\n\017MODEL_CONVERGED\020" + + "\002B\305\001\n + * A TrainingJob that trains and uploads an AutoML Image Classification Model. + * + * + * Protobuf type {@code + * google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageClassification} + */ +public final class AutoMlImageClassification extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMlImageClassificationInputs.Builder + subBuilder = null; + if (inputs_ != null) { + subBuilder = inputs_.toBuilder(); + } + inputs_ = + input.readMessage( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationInputs.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(inputs_); + inputs_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata.Builder + subBuilder = null; + if (metadata_ != null) { + subBuilder = metadata_.toBuilder(); + } + metadata_ = + input.readMessage( + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMLImageClassificationProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlImageClassification_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMLImageClassificationProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlImageClassification_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageClassification + .class, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageClassification + .Builder.class); + } + + public static final int INPUTS_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationInputs + inputs_; + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlImageClassificationInputs inputs = 1; + * + * + * @return The inputs. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationInputs + getInputs() { + return inputs_ == null + ? com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationInputs.getDefaultInstance() + : inputs_; + } + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageClassificationInputs inputs = 1; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationInputsOrBuilder + getInputsOrBuilder() { + return getInputs(); + } + + public static final int METADATA_FIELD_NUMBER = 2; + private com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata + metadata_; + /** + * + * + *
+   * The metadata information.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlImageClassificationMetadata metadata = 2; + * + * + * @return The metadata. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata + getMetadata() { + return metadata_ == null + ? com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata.getDefaultInstance() + : metadata_; + } + /** + * + * + *
+   * The metadata information.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageClassificationMetadata metadata = 2; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlImageClassification)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageClassification other = + (com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMlImageClassification + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition + .AutoMlImageClassification + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlImageClassification} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageClassification) + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMLImageClassificationProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlImageClassification_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMLImageClassificationProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlImageClassification_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageClassification + .class, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageClassification + .Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMLImageClassificationProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlImageClassification_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageClassification + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageClassification + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageClassification + build() { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageClassification + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageClassification + buildPartial() { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageClassification + result = + new com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlImageClassification) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageClassification) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageClassification + other) { + if (other + == com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlImageClassification + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageClassification) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationInputs + inputs_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationInputs, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationInputs.Builder, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationInputsOrBuilder> + inputsBuilder_; + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlImageClassificationInputs inputs = 1; + * + * + * @return The inputs. + */ + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationInputs + getInputs() { + if (inputsBuilder_ == null) { + return inputs_ == null + ? com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationInputs.getDefaultInstance() + : inputs_; + } else { + return inputsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageClassificationInputs inputs = 1; + * + */ + public Builder setInputs( + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlImageClassificationInputs inputs = 1; + * + */ + public Builder setInputs( + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlImageClassificationInputs inputs = 1; + * + */ + public Builder mergeInputs( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageClassificationInputs + value) { + if (inputsBuilder_ == null) { + if (inputs_ != null) { + inputs_ = + com.google.cloud.aiplatform.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlImageClassificationInputs inputs = 1; + * + */ + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationInputs.Builder + getInputsBuilder() { + + onChanged(); + return getInputsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageClassificationInputs inputs = 1; + * + */ + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationInputsOrBuilder + getInputsOrBuilder() { + if (inputsBuilder_ != null) { + return inputsBuilder_.getMessageOrBuilder(); + } else { + return inputs_ == null + ? com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationInputs.getDefaultInstance() + : inputs_; + } + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageClassificationInputs inputs = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationInputs, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationInputs.Builder, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationInputsOrBuilder> + getInputsFieldBuilder() { + if (inputsBuilder_ == null) { + inputsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationInputs, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationInputs.Builder, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationInputsOrBuilder>( + getInputs(), getParentForChildren(), isClean()); + inputs_ = null; + } + return inputsBuilder_; + } + + private com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata + metadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata.Builder, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationMetadataOrBuilder> + metadataBuilder_; + /** + * + * + *
+     * The metadata information.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlImageClassificationMetadata metadata = 2; + * + * + * @return The metadata. + */ + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata + getMetadata() { + if (metadataBuilder_ == null) { + return metadata_ == null + ? com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata.getDefaultInstance() + : metadata_; + } else { + return metadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The metadata information.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageClassificationMetadata metadata = 2; + * + */ + public Builder setMetadata( + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlImageClassificationMetadata metadata = 2; + * + */ + public Builder setMetadata( + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlImageClassificationMetadata metadata = 2; + * + */ + public Builder mergeMetadata( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata + value) { + if (metadataBuilder_ == null) { + if (metadata_ != null) { + metadata_ = + com.google.cloud.aiplatform.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlImageClassificationMetadata metadata = 2; + * + */ + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata.Builder + getMetadataBuilder() { + + onChanged(); + return getMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The metadata information.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageClassificationMetadata metadata = 2; + * + */ + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationMetadataOrBuilder + getMetadataOrBuilder() { + if (metadataBuilder_ != null) { + return metadataBuilder_.getMessageOrBuilder(); + } else { + return metadata_ == null + ? com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata.getDefaultInstance() + : metadata_; + } + } + /** + * + * + *
+     * The metadata information.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageClassificationMetadata metadata = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata.Builder, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationMetadataOrBuilder> + getMetadataFieldBuilder() { + if (metadataBuilder_ == null) { + metadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata.Builder, + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlImageClassification) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageClassification) + private static final com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassification + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassification(); + } + + public static com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlImageClassification + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlImageClassificationInputs.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlImageClassificationInputs.java new file mode 100644 index 000000000..39b60da99 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlImageClassificationInputs.java @@ -0,0 +1,1443 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/schema/trainingjob/definition/automl_image_classification.proto + +package com.google.cloud.aiplatform.v1.schema.trainingjob.definition; + +/** + * Protobuf type {@code + * google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageClassificationInputs} + */ +public final class AutoMlImageClassificationInputs extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMLImageClassificationProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlImageClassificationInputs_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMLImageClassificationProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlImageClassificationInputs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationInputs.class, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationInputs.Builder.class); + } + + /** + * Protobuf enum {@code + * google.cloud.aiplatform.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlImageClassificationInputs.ModelType) + } + + public static final int MODEL_TYPE_FIELD_NUMBER = 1; + private int modelType_; + /** + * + * .google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlImageClassificationInputs.ModelType model_type = 1; + * + * + * @return The modelType. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationInputs.ModelType + getModelType() { + @SuppressWarnings("deprecation") + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageClassificationInputs + .ModelType + result = + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationInputs.ModelType.valueOf(modelType_); + return result == null + ? com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition + .AutoMlImageClassificationInputs)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageClassificationInputs + other = + (com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMlImageClassificationInputs + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition + .AutoMlImageClassificationInputs + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlImageClassificationInputs} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageClassificationInputs) + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationInputsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMLImageClassificationProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlImageClassificationInputs_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMLImageClassificationProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlImageClassificationInputs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationInputs.class, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationInputs.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMLImageClassificationProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlImageClassificationInputs_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationInputs + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationInputs.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationInputs + build() { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageClassificationInputs + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationInputs + buildPartial() { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageClassificationInputs + result = + new com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMlImageClassificationInputs) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationInputs) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageClassificationInputs + other) { + if (other + == com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlImageClassificationInputs + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationInputs) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int modelType_ = 0; + /** + * + * .google.cloud.aiplatform.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlImageClassificationInputs.ModelType model_type = 1; + * + * + * @return The modelType. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationInputs.ModelType + getModelType() { + @SuppressWarnings("deprecation") + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageClassificationInputs + .ModelType + result = + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationInputs.ModelType.valueOf(modelType_); + return result == null + ? com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationInputs.ModelType.UNRECOGNIZED + : result; + } + /** + * + * .google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlImageClassificationInputs + .ModelType + value) { + if (value == null) { + throw new NullPointerException(); + } + + modelType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * .google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlImageClassificationInputs) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageClassificationInputs) + private static final com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationInputs + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationInputs(); + } + + public static com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMlImageClassificationInputs + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlImageClassificationInputsOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlImageClassificationInputsOrBuilder.java new file mode 100644 index 000000000..111ae0956 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/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/v1/schema/trainingjob/definition/automl_image_classification.proto + +package com.google.cloud.aiplatform.v1.schema.trainingjob.definition; + +public interface AutoMlImageClassificationInputsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageClassificationInputs) + com.google.protobuf.MessageOrBuilder { + + /** + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageClassificationInputs.ModelType model_type = 1; + * + * + * @return The enum numeric value on the wire for modelType. + */ + int getModelTypeValue(); + /** + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageClassificationInputs.ModelType model_type = 1; + * + * + * @return The modelType. + */ + com.google.cloud.aiplatform.v1.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-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlImageClassificationMetadata.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlImageClassificationMetadata.java new file mode 100644 index 000000000..c3c655ccb --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlImageClassificationMetadata.java @@ -0,0 +1,975 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/schema/trainingjob/definition/automl_image_classification.proto + +package com.google.cloud.aiplatform.v1.schema.trainingjob.definition; + +/** + * Protobuf type {@code + * google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageClassificationMetadata} + */ +public final class AutoMlImageClassificationMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMLImageClassificationProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlImageClassificationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMLImageClassificationProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlImageClassificationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata.class, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata.Builder.class); + } + + /** + * Protobuf enum {@code + * google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlImageClassificationMetadata.SuccessfulStopReason successful_stop_reason = 2; + * + * + * @return The successfulStopReason. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata.SuccessfulStopReason + getSuccessfulStopReason() { + @SuppressWarnings("deprecation") + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageClassificationMetadata + .SuccessfulStopReason + result = + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata.SuccessfulStopReason.valueOf( + successfulStopReason_); + return result == null + ? com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageClassificationMetadata + other = + (com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlImageClassificationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageClassificationMetadata) + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMLImageClassificationProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlImageClassificationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMLImageClassificationProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlImageClassificationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata.class, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMLImageClassificationProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlImageClassificationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata + build() { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageClassificationMetadata + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata + buildPartial() { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageClassificationMetadata + result = + new com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata + other) { + if (other + == com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlImageClassificationMetadata + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlImageClassificationMetadata.SuccessfulStopReason successful_stop_reason = 2; + * + * + * @return The successfulStopReason. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata.SuccessfulStopReason + getSuccessfulStopReason() { + @SuppressWarnings("deprecation") + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageClassificationMetadata + .SuccessfulStopReason + result = + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata.SuccessfulStopReason.valueOf( + successfulStopReason_); + return result == null + ? com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata.SuccessfulStopReason.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * For successful job completions, this is the reason why the job has
+     * finished.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlImageClassificationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageClassificationMetadata) + private static final com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata(); + } + + public static com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMlImageClassificationMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlImageClassificationMetadataOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlImageClassificationMetadataOrBuilder.java new file mode 100644 index 000000000..5b580b199 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/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/v1/schema/trainingjob/definition/automl_image_classification.proto + +package com.google.cloud.aiplatform.v1.schema.trainingjob.definition; + +public interface AutoMlImageClassificationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlImageClassificationMetadata.SuccessfulStopReason successful_stop_reason = 2; + * + * + * @return The successfulStopReason. + */ + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageClassificationMetadata + .SuccessfulStopReason + getSuccessfulStopReason(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlImageClassificationOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlImageClassificationOrBuilder.java new file mode 100644 index 000000000..b2d2afc01 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlImageClassificationOrBuilder.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/v1/schema/trainingjob/definition/automl_image_classification.proto + +package com.google.cloud.aiplatform.v1.schema.trainingjob.definition; + +public interface AutoMlImageClassificationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageClassification) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageClassificationInputs inputs = 1; + * + * + * @return Whether the inputs field is set. + */ + boolean hasInputs(); + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageClassificationInputs inputs = 1; + * + * + * @return The inputs. + */ + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageClassificationInputs + getInputs(); + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageClassificationInputs inputs = 1; + * + */ + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationInputsOrBuilder + getInputsOrBuilder(); + + /** + * + * + *
+   * The metadata information.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageClassificationMetadata metadata = 2; + * + * + * @return Whether the metadata field is set. + */ + boolean hasMetadata(); + /** + * + * + *
+   * The metadata information.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageClassificationMetadata metadata = 2; + * + * + * @return The metadata. + */ + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageClassificationMetadata + getMetadata(); + /** + * + * + *
+   * The metadata information.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageClassificationMetadata metadata = 2; + * + */ + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageClassificationMetadataOrBuilder + getMetadataOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlImageObjectDetection.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlImageObjectDetection.java new file mode 100644 index 000000000..7e6de8a0a --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlImageObjectDetection.java @@ -0,0 +1,1200 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/schema/trainingjob/definition/automl_image_object_detection.proto + +package com.google.cloud.aiplatform.v1.schema.trainingjob.definition; + +/** + * + * + *
+ * A TrainingJob that trains and uploads an AutoML Image Object Detection Model.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageObjectDetection} + */ +public final class AutoMlImageObjectDetection extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs.Builder + subBuilder = null; + if (inputs_ != null) { + subBuilder = inputs_.toBuilder(); + } + inputs_ = + input.readMessage( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(inputs_); + inputs_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata.Builder + subBuilder = null; + if (metadata_ != null) { + subBuilder = metadata_.toBuilder(); + } + metadata_ = + input.readMessage( + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMLImageObjectDetectionProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlImageObjectDetection_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMLImageObjectDetectionProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlImageObjectDetection_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageObjectDetection + .class, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageObjectDetection + .Builder.class); + } + + public static final int INPUTS_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs + inputs_; + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlImageObjectDetectionInputs inputs = 1; + * + * + * @return The inputs. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs + getInputs() { + return inputs_ == null + ? com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs.getDefaultInstance() + : inputs_; + } + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageObjectDetectionInputs inputs = 1; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputsOrBuilder + getInputsOrBuilder() { + return getInputs(); + } + + public static final int METADATA_FIELD_NUMBER = 2; + private com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata + metadata_; + /** + * + * + *
+   * The metadata information
+   * 
+ * + * + * .google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlImageObjectDetectionMetadata metadata = 2; + * + * + * @return The metadata. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata + getMetadata() { + return metadata_ == null + ? com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata.getDefaultInstance() + : metadata_; + } + /** + * + * + *
+   * The metadata information
+   * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageObjectDetectionMetadata metadata = 2; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlImageObjectDetection)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageObjectDetection other = + (com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMlImageObjectDetection + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition + .AutoMlImageObjectDetection + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlImageObjectDetection} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageObjectDetection) + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMLImageObjectDetectionProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlImageObjectDetection_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMLImageObjectDetectionProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlImageObjectDetection_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetection.class, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetection.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMLImageObjectDetectionProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlImageObjectDetection_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageObjectDetection + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageObjectDetection + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageObjectDetection + build() { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageObjectDetection + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageObjectDetection + buildPartial() { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageObjectDetection + result = + new com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlImageObjectDetection) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetection) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageObjectDetection + other) { + if (other + == com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlImageObjectDetection + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetection) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs + inputs_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs.Builder, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputsOrBuilder> + inputsBuilder_; + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlImageObjectDetectionInputs inputs = 1; + * + * + * @return The inputs. + */ + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs + getInputs() { + if (inputsBuilder_ == null) { + return inputs_ == null + ? com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs.getDefaultInstance() + : inputs_; + } else { + return inputsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageObjectDetectionInputs inputs = 1; + * + */ + public Builder setInputs( + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlImageObjectDetectionInputs inputs = 1; + * + */ + public Builder setInputs( + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlImageObjectDetectionInputs inputs = 1; + * + */ + public Builder mergeInputs( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs + value) { + if (inputsBuilder_ == null) { + if (inputs_ != null) { + inputs_ = + com.google.cloud.aiplatform.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlImageObjectDetectionInputs inputs = 1; + * + */ + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs.Builder + getInputsBuilder() { + + onChanged(); + return getInputsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageObjectDetectionInputs inputs = 1; + * + */ + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputsOrBuilder + getInputsOrBuilder() { + if (inputsBuilder_ != null) { + return inputsBuilder_.getMessageOrBuilder(); + } else { + return inputs_ == null + ? com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs.getDefaultInstance() + : inputs_; + } + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageObjectDetectionInputs inputs = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs.Builder, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputsOrBuilder> + getInputsFieldBuilder() { + if (inputsBuilder_ == null) { + inputsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs.Builder, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputsOrBuilder>( + getInputs(), getParentForChildren(), isClean()); + inputs_ = null; + } + return inputsBuilder_; + } + + private com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata + metadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata.Builder, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadataOrBuilder> + metadataBuilder_; + /** + * + * + *
+     * The metadata information
+     * 
+ * + * + * .google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlImageObjectDetectionMetadata metadata = 2; + * + * + * @return The metadata. + */ + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata + getMetadata() { + if (metadataBuilder_ == null) { + return metadata_ == null + ? com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata.getDefaultInstance() + : metadata_; + } else { + return metadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The metadata information
+     * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageObjectDetectionMetadata metadata = 2; + * + */ + public Builder setMetadata( + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlImageObjectDetectionMetadata metadata = 2; + * + */ + public Builder setMetadata( + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlImageObjectDetectionMetadata metadata = 2; + * + */ + public Builder mergeMetadata( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata + value) { + if (metadataBuilder_ == null) { + if (metadata_ != null) { + metadata_ = + com.google.cloud.aiplatform.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlImageObjectDetectionMetadata metadata = 2; + * + */ + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata.Builder + getMetadataBuilder() { + + onChanged(); + return getMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The metadata information
+     * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageObjectDetectionMetadata metadata = 2; + * + */ + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadataOrBuilder + getMetadataOrBuilder() { + if (metadataBuilder_ != null) { + return metadataBuilder_.getMessageOrBuilder(); + } else { + return metadata_ == null + ? com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata.getDefaultInstance() + : metadata_; + } + } + /** + * + * + *
+     * The metadata information
+     * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageObjectDetectionMetadata metadata = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata.Builder, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadataOrBuilder> + getMetadataFieldBuilder() { + if (metadataBuilder_ == null) { + metadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata.Builder, + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlImageObjectDetection) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageObjectDetection) + private static final com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetection + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetection(); + } + + public static com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlImageObjectDetection + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlImageObjectDetectionInputs.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlImageObjectDetectionInputs.java new file mode 100644 index 000000000..62c290f38 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlImageObjectDetectionInputs.java @@ -0,0 +1,1161 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/schema/trainingjob/definition/automl_image_object_detection.proto + +package com.google.cloud.aiplatform.v1.schema.trainingjob.definition; + +/** + * Protobuf type {@code + * google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageObjectDetectionInputs} + */ +public final class AutoMlImageObjectDetectionInputs extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMLImageObjectDetectionProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlImageObjectDetectionInputs_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMLImageObjectDetectionProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlImageObjectDetectionInputs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs.class, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs.Builder.class); + } + + /** + * Protobuf enum {@code + * google.cloud.aiplatform.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlImageObjectDetectionInputs.ModelType) + } + + public static final int MODEL_TYPE_FIELD_NUMBER = 1; + private int modelType_; + /** + * + * .google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlImageObjectDetectionInputs.ModelType model_type = 1; + * + * + * @return The modelType. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs.ModelType + getModelType() { + @SuppressWarnings("deprecation") + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageObjectDetectionInputs + .ModelType + result = + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs.ModelType.valueOf(modelType_); + return result == null + ? com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageObjectDetectionInputs + other = + (com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlImageObjectDetectionInputs} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageObjectDetectionInputs) + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMLImageObjectDetectionProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlImageObjectDetectionInputs_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMLImageObjectDetectionProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlImageObjectDetectionInputs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs.class, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMLImageObjectDetectionProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlImageObjectDetectionInputs_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs + build() { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageObjectDetectionInputs + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs + buildPartial() { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageObjectDetectionInputs + result = + new com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs + other) { + if (other + == com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlImageObjectDetectionInputs + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int modelType_ = 0; + /** + * + * .google.cloud.aiplatform.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlImageObjectDetectionInputs.ModelType model_type = 1; + * + * + * @return The modelType. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs.ModelType + getModelType() { + @SuppressWarnings("deprecation") + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageObjectDetectionInputs + .ModelType + result = + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs.ModelType.valueOf(modelType_); + return result == null + ? com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs.ModelType.UNRECOGNIZED + : result; + } + /** + * + * .google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs.ModelType + value) { + if (value == null) { + throw new NullPointerException(); + } + + modelType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * .google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlImageObjectDetectionInputs) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageObjectDetectionInputs) + private static final com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs(); + } + + public static com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputs + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlImageObjectDetectionInputsOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlImageObjectDetectionInputsOrBuilder.java new file mode 100644 index 000000000..8c4afb6fa --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/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/v1/schema/trainingjob/definition/automl_image_object_detection.proto + +package com.google.cloud.aiplatform.v1.schema.trainingjob.definition; + +public interface AutoMlImageObjectDetectionInputsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageObjectDetectionInputs) + com.google.protobuf.MessageOrBuilder { + + /** + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageObjectDetectionInputs.ModelType model_type = 1; + * + * + * @return The enum numeric value on the wire for modelType. + */ + int getModelTypeValue(); + /** + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageObjectDetectionInputs.ModelType model_type = 1; + * + * + * @return The modelType. + */ + com.google.cloud.aiplatform.v1.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-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlImageObjectDetectionMetadata.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlImageObjectDetectionMetadata.java new file mode 100644 index 000000000..2226fd2d4 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlImageObjectDetectionMetadata.java @@ -0,0 +1,979 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/schema/trainingjob/definition/automl_image_object_detection.proto + +package com.google.cloud.aiplatform.v1.schema.trainingjob.definition; + +/** + * Protobuf type {@code + * google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageObjectDetectionMetadata} + */ +public final class AutoMlImageObjectDetectionMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMLImageObjectDetectionProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlImageObjectDetectionMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMLImageObjectDetectionProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlImageObjectDetectionMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata.class, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata.Builder.class); + } + + /** + * Protobuf enum {@code + * google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlImageObjectDetectionMetadata.SuccessfulStopReason successful_stop_reason = 2; + * + * + * @return The successfulStopReason. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata.SuccessfulStopReason + getSuccessfulStopReason() { + @SuppressWarnings("deprecation") + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageObjectDetectionMetadata + .SuccessfulStopReason + result = + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata.SuccessfulStopReason.valueOf( + successfulStopReason_); + return result == null + ? com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageObjectDetectionMetadata + other = + (com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlImageObjectDetectionMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageObjectDetectionMetadata) + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMLImageObjectDetectionProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlImageObjectDetectionMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMLImageObjectDetectionProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlImageObjectDetectionMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata.class, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMLImageObjectDetectionProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlImageObjectDetectionMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata + build() { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata + buildPartial() { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata + result = + new com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata + other) { + if (other + == com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlImageObjectDetectionMetadata.SuccessfulStopReason successful_stop_reason = 2; + * + * + * @return The successfulStopReason. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata.SuccessfulStopReason + getSuccessfulStopReason() { + @SuppressWarnings("deprecation") + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata.SuccessfulStopReason + result = + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata.SuccessfulStopReason.valueOf( + successfulStopReason_); + return result == null + ? com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata.SuccessfulStopReason.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * For successful job completions, this is the reason why the job has
+     * finished.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlImageObjectDetectionMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageObjectDetectionMetadata) + private static final com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata(); + } + + public static com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlImageObjectDetectionMetadataOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlImageObjectDetectionMetadataOrBuilder.java new file mode 100644 index 000000000..34f07672c --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/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/v1/schema/trainingjob/definition/automl_image_object_detection.proto + +package com.google.cloud.aiplatform.v1.schema.trainingjob.definition; + +public interface AutoMlImageObjectDetectionMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlImageObjectDetectionMetadata.SuccessfulStopReason successful_stop_reason = 2; + * + * + * @return The successfulStopReason. + */ + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageObjectDetectionMetadata + .SuccessfulStopReason + getSuccessfulStopReason(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlImageObjectDetectionOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlImageObjectDetectionOrBuilder.java new file mode 100644 index 000000000..db01eb64c --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlImageObjectDetectionOrBuilder.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/v1/schema/trainingjob/definition/automl_image_object_detection.proto + +package com.google.cloud.aiplatform.v1.schema.trainingjob.definition; + +public interface AutoMlImageObjectDetectionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageObjectDetection) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageObjectDetectionInputs inputs = 1; + * + * + * @return Whether the inputs field is set. + */ + boolean hasInputs(); + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageObjectDetectionInputs inputs = 1; + * + * + * @return The inputs. + */ + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageObjectDetectionInputs + getInputs(); + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageObjectDetectionInputs inputs = 1; + * + */ + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionInputsOrBuilder + getInputsOrBuilder(); + + /** + * + * + *
+   * The metadata information
+   * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageObjectDetectionMetadata metadata = 2; + * + * + * @return Whether the metadata field is set. + */ + boolean hasMetadata(); + /** + * + * + *
+   * The metadata information
+   * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageObjectDetectionMetadata metadata = 2; + * + * + * @return The metadata. + */ + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageObjectDetectionMetadata + getMetadata(); + /** + * + * + *
+   * The metadata information
+   * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageObjectDetectionMetadata metadata = 2; + * + */ + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageObjectDetectionMetadataOrBuilder + getMetadataOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlImageSegmentation.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlImageSegmentation.java new file mode 100644 index 000000000..ab0aac43d --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlImageSegmentation.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/v1/schema/trainingjob/definition/automl_image_segmentation.proto + +package com.google.cloud.aiplatform.v1.schema.trainingjob.definition; + +/** + * + * + *
+ * A TrainingJob that trains and uploads an AutoML Image Segmentation Model.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageSegmentation} + */ +public final class AutoMlImageSegmentation extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs.Builder + subBuilder = null; + if (inputs_ != null) { + subBuilder = inputs_.toBuilder(); + } + inputs_ = + input.readMessage( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(inputs_); + inputs_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata.Builder + subBuilder = null; + if (metadata_ != null) { + subBuilder = metadata_.toBuilder(); + } + metadata_ = + input.readMessage( + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMLImageSegmentationProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlImageSegmentation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMLImageSegmentationProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlImageSegmentation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageSegmentation + .class, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageSegmentation + .Builder.class); + } + + public static final int INPUTS_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageSegmentationInputs + inputs_; + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlImageSegmentationInputs inputs = 1; + * + * + * @return The inputs. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageSegmentationInputs + getInputs() { + return inputs_ == null + ? com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageSegmentationInputs + .getDefaultInstance() + : inputs_; + } + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageSegmentationInputs inputs = 1; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageSegmentationInputsOrBuilder + getInputsOrBuilder() { + return getInputs(); + } + + public static final int METADATA_FIELD_NUMBER = 2; + private com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata + metadata_; + /** + * + * + *
+   * The metadata information.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlImageSegmentationMetadata metadata = 2; + * + * + * @return The metadata. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata + getMetadata() { + return metadata_ == null + ? com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata.getDefaultInstance() + : metadata_; + } + /** + * + * + *
+   * The metadata information.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageSegmentationMetadata metadata = 2; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlImageSegmentation)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageSegmentation other = + (com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlImageSegmentation + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlImageSegmentation + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlImageSegmentation} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageSegmentation) + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageSegmentationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMLImageSegmentationProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlImageSegmentation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMLImageSegmentationProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlImageSegmentation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageSegmentation + .class, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageSegmentation + .Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMLImageSegmentationProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlImageSegmentation_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageSegmentation + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageSegmentation + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageSegmentation + build() { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageSegmentation result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageSegmentation + buildPartial() { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageSegmentation result = + new com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlImageSegmentation) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageSegmentation) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageSegmentation + other) { + if (other + == com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlImageSegmentation + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageSegmentation) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs + inputs_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs.Builder, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageSegmentationInputsOrBuilder> + inputsBuilder_; + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlImageSegmentationInputs inputs = 1; + * + * + * @return The inputs. + */ + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs + getInputs() { + if (inputsBuilder_ == null) { + return inputs_ == null + ? com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs.getDefaultInstance() + : inputs_; + } else { + return inputsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageSegmentationInputs inputs = 1; + * + */ + public Builder setInputs( + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlImageSegmentationInputs inputs = 1; + * + */ + public Builder setInputs( + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlImageSegmentationInputs inputs = 1; + * + */ + public Builder mergeInputs( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageSegmentationInputs + value) { + if (inputsBuilder_ == null) { + if (inputs_ != null) { + inputs_ = + com.google.cloud.aiplatform.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlImageSegmentationInputs inputs = 1; + * + */ + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs.Builder + getInputsBuilder() { + + onChanged(); + return getInputsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageSegmentationInputs inputs = 1; + * + */ + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageSegmentationInputsOrBuilder + getInputsOrBuilder() { + if (inputsBuilder_ != null) { + return inputsBuilder_.getMessageOrBuilder(); + } else { + return inputs_ == null + ? com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs.getDefaultInstance() + : inputs_; + } + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageSegmentationInputs inputs = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs.Builder, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageSegmentationInputsOrBuilder> + getInputsFieldBuilder() { + if (inputsBuilder_ == null) { + inputsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs.Builder, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageSegmentationInputsOrBuilder>( + getInputs(), getParentForChildren(), isClean()); + inputs_ = null; + } + return inputsBuilder_; + } + + private com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata + metadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata.Builder, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadataOrBuilder> + metadataBuilder_; + /** + * + * + *
+     * The metadata information.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlImageSegmentationMetadata metadata = 2; + * + * + * @return The metadata. + */ + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata + getMetadata() { + if (metadataBuilder_ == null) { + return metadata_ == null + ? com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata.getDefaultInstance() + : metadata_; + } else { + return metadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The metadata information.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageSegmentationMetadata metadata = 2; + * + */ + public Builder setMetadata( + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlImageSegmentationMetadata metadata = 2; + * + */ + public Builder setMetadata( + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlImageSegmentationMetadata metadata = 2; + * + */ + public Builder mergeMetadata( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageSegmentationMetadata + value) { + if (metadataBuilder_ == null) { + if (metadata_ != null) { + metadata_ = + com.google.cloud.aiplatform.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlImageSegmentationMetadata metadata = 2; + * + */ + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata.Builder + getMetadataBuilder() { + + onChanged(); + return getMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The metadata information.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageSegmentationMetadata metadata = 2; + * + */ + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadataOrBuilder + getMetadataOrBuilder() { + if (metadataBuilder_ != null) { + return metadataBuilder_.getMessageOrBuilder(); + } else { + return metadata_ == null + ? com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata.getDefaultInstance() + : metadata_; + } + } + /** + * + * + *
+     * The metadata information.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageSegmentationMetadata metadata = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata.Builder, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadataOrBuilder> + getMetadataFieldBuilder() { + if (metadataBuilder_ == null) { + metadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata.Builder, + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlImageSegmentation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageSegmentation) + private static final com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageSegmentation + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageSegmentation(); + } + + public static com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlImageSegmentation + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlImageSegmentationInputs.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlImageSegmentationInputs.java new file mode 100644 index 000000000..8f7980293 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlImageSegmentationInputs.java @@ -0,0 +1,1194 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/schema/trainingjob/definition/automl_image_segmentation.proto + +package com.google.cloud.aiplatform.v1.schema.trainingjob.definition; + +/** + * Protobuf type {@code + * google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageSegmentationInputs} + */ +public final class AutoMlImageSegmentationInputs extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMLImageSegmentationProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlImageSegmentationInputs_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMLImageSegmentationProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlImageSegmentationInputs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs.class, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs.Builder.class); + } + + /** + * Protobuf enum {@code + * google.cloud.aiplatform.v1.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), + /** + * + * + *
+     * A model that, in addition to being available within Google
+     * Cloud, can also be exported (see ModelService.ExportModel) as TensorFlow
+     * 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 = 3; + */ + MOBILE_TF_LOW_LATENCY_1(3), + 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; + /** + * + * + *
+     * A model that, in addition to being available within Google
+     * Cloud, can also be exported (see ModelService.ExportModel) as TensorFlow
+     * 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 = 3; + */ + public static final int MOBILE_TF_LOW_LATENCY_1_VALUE = 3; + + 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; + case 3: + return MOBILE_TF_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.v1.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.v1.schema.trainingjob.definition.AutoMlImageSegmentationInputs.ModelType) + } + + public static final int MODEL_TYPE_FIELD_NUMBER = 1; + private int modelType_; + /** + * + * .google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlImageSegmentationInputs.ModelType model_type = 1; + * + * + * @return The modelType. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageSegmentationInputs + .ModelType + getModelType() { + @SuppressWarnings("deprecation") + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageSegmentationInputs + .ModelType + result = + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs.ModelType.valueOf(modelType_); + return result == null + ? com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageSegmentationInputs + other = + (com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlImageSegmentationInputs} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageSegmentationInputs) + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageSegmentationInputsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMLImageSegmentationProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlImageSegmentationInputs_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMLImageSegmentationProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlImageSegmentationInputs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs.class, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMLImageSegmentationProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlImageSegmentationInputs_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs + build() { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageSegmentationInputs + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs + buildPartial() { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageSegmentationInputs + result = + new com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageSegmentationInputs + other) { + if (other + == com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlImageSegmentationInputs + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int modelType_ = 0; + /** + * + * .google.cloud.aiplatform.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlImageSegmentationInputs.ModelType model_type = 1; + * + * + * @return The modelType. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs.ModelType + getModelType() { + @SuppressWarnings("deprecation") + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageSegmentationInputs + .ModelType + result = + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs.ModelType.valueOf(modelType_); + return result == null + ? com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs.ModelType.UNRECOGNIZED + : result; + } + /** + * + * .google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlImageSegmentationInputs + .ModelType + value) { + if (value == null) { + throw new NullPointerException(); + } + + modelType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * .google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlImageSegmentationInputs) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageSegmentationInputs) + private static final com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageSegmentationInputs(); + } + + public static com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlImageSegmentationInputs + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlImageSegmentationInputsOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlImageSegmentationInputsOrBuilder.java new file mode 100644 index 000000000..ca469b8a9 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlImageSegmentationInputsOrBuilder.java @@ -0,0 +1,102 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/schema/trainingjob/definition/automl_image_segmentation.proto + +package com.google.cloud.aiplatform.v1.schema.trainingjob.definition; + +public interface AutoMlImageSegmentationInputsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageSegmentationInputs) + com.google.protobuf.MessageOrBuilder { + + /** + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageSegmentationInputs.ModelType model_type = 1; + * + * + * @return The enum numeric value on the wire for modelType. + */ + int getModelTypeValue(); + /** + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageSegmentationInputs.ModelType model_type = 1; + * + * + * @return The modelType. + */ + com.google.cloud.aiplatform.v1.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-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlImageSegmentationMetadata.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlImageSegmentationMetadata.java new file mode 100644 index 000000000..9b22a497d --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlImageSegmentationMetadata.java @@ -0,0 +1,969 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/schema/trainingjob/definition/automl_image_segmentation.proto + +package com.google.cloud.aiplatform.v1.schema.trainingjob.definition; + +/** + * Protobuf type {@code + * google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageSegmentationMetadata} + */ +public final class AutoMlImageSegmentationMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMLImageSegmentationProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlImageSegmentationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMLImageSegmentationProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlImageSegmentationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata.class, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata.Builder.class); + } + + /** + * Protobuf enum {@code + * google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlImageSegmentationMetadata.SuccessfulStopReason successful_stop_reason = 2; + * + * + * @return The successfulStopReason. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata.SuccessfulStopReason + getSuccessfulStopReason() { + @SuppressWarnings("deprecation") + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageSegmentationMetadata + .SuccessfulStopReason + result = + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata.SuccessfulStopReason.valueOf( + successfulStopReason_); + return result == null + ? com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageSegmentationMetadata + other = + (com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlImageSegmentationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageSegmentationMetadata) + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMLImageSegmentationProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlImageSegmentationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMLImageSegmentationProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlImageSegmentationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata.class, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMLImageSegmentationProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlImageSegmentationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata + build() { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageSegmentationMetadata + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata + buildPartial() { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageSegmentationMetadata + result = + new com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageSegmentationMetadata + other) { + if (other + == com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlImageSegmentationMetadata + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlImageSegmentationMetadata.SuccessfulStopReason successful_stop_reason = 2; + * + * + * @return The successfulStopReason. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata.SuccessfulStopReason + getSuccessfulStopReason() { + @SuppressWarnings("deprecation") + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageSegmentationMetadata + .SuccessfulStopReason + result = + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata.SuccessfulStopReason.valueOf( + successfulStopReason_); + return result == null + ? com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata.SuccessfulStopReason.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * For successful job completions, this is the reason why the job has
+     * finished.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlImageSegmentationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageSegmentationMetadata) + private static final com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata(); + } + + public static com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlImageSegmentationMetadataOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlImageSegmentationMetadataOrBuilder.java new file mode 100644 index 000000000..ebeabbacf --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlImageSegmentationMetadataOrBuilder.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/v1/schema/trainingjob/definition/automl_image_segmentation.proto + +package com.google.cloud.aiplatform.v1.schema.trainingjob.definition; + +public interface AutoMlImageSegmentationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlImageSegmentationMetadata.SuccessfulStopReason successful_stop_reason = 2; + * + * + * @return The successfulStopReason. + */ + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageSegmentationMetadata + .SuccessfulStopReason + getSuccessfulStopReason(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlImageSegmentationOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlImageSegmentationOrBuilder.java new file mode 100644 index 000000000..e66556a07 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlImageSegmentationOrBuilder.java @@ -0,0 +1,113 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/schema/trainingjob/definition/automl_image_segmentation.proto + +package com.google.cloud.aiplatform.v1.schema.trainingjob.definition; + +public interface AutoMlImageSegmentationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageSegmentation) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageSegmentationInputs inputs = 1; + * + * + * @return Whether the inputs field is set. + */ + boolean hasInputs(); + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageSegmentationInputs inputs = 1; + * + * + * @return The inputs. + */ + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageSegmentationInputs + getInputs(); + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageSegmentationInputs inputs = 1; + * + */ + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageSegmentationInputsOrBuilder + getInputsOrBuilder(); + + /** + * + * + *
+   * The metadata information.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageSegmentationMetadata metadata = 2; + * + * + * @return Whether the metadata field is set. + */ + boolean hasMetadata(); + /** + * + * + *
+   * The metadata information.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageSegmentationMetadata metadata = 2; + * + * + * @return The metadata. + */ + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageSegmentationMetadata + getMetadata(); + /** + * + * + *
+   * The metadata information.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlImageSegmentationMetadata metadata = 2; + * + */ + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlImageSegmentationMetadataOrBuilder + getMetadataOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlTables.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlTables.java new file mode 100644 index 000000000..b0837efaa --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlTables.java @@ -0,0 +1,1121 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/schema/trainingjob/definition/automl_tables.proto + +package com.google.cloud.aiplatform.v1.schema.trainingjob.definition; + +/** + * + * + *
+ * A TrainingJob that trains and uploads an AutoML Tables Model.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTables} + */ +public final class AutoMlTables extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Builder + subBuilder = null; + if (inputs_ != null) { + subBuilder = inputs_.toBuilder(); + } + inputs_ = + input.readMessage( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTablesInputs.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(inputs_); + inputs_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesMetadata + .Builder + subBuilder = null; + if (metadata_ != null) { + subBuilder = metadata_.toBuilder(); + } + metadata_ = + input.readMessage( + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTables_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTables_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTables.class, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTables.Builder + .class); + } + + public static final int INPUTS_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs inputs_; + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * .google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs inputs = 1; + * + * + * @return The inputs. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + getInputs() { + return inputs_ == null + ? com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .getDefaultInstance() + : inputs_; + } + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs inputs = 1; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputsOrBuilder + getInputsOrBuilder() { + return getInputs(); + } + + public static final int METADATA_FIELD_NUMBER = 2; + private com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesMetadata + metadata_; + /** + * + * + *
+   * The metadata information.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesMetadata metadata = 2; + * + * + * @return The metadata. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesMetadata + getMetadata() { + return metadata_ == null + ? com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesMetadata + .getDefaultInstance() + : metadata_; + } + /** + * + * + *
+   * The metadata information.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesMetadata metadata = 2; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTables)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTables other = + (com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTables parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlTables parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlTables} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTables) + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTables_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTables_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTables.class, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTables.Builder + .class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTables_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTables + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTables + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTables build() { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTables result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTables + buildPartial() { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTables result = + new com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTables) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTables) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTables other) { + if (other + == com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTables parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTables) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs inputs_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Builder, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTablesInputsOrBuilder> + inputsBuilder_; + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs inputs = 1; + * + * + * @return The inputs. + */ + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + getInputs() { + if (inputsBuilder_ == null) { + return inputs_ == null + ? com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .getDefaultInstance() + : inputs_; + } else { + return inputsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs inputs = 1; + * + */ + public Builder setInputs( + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs inputs = 1; + * + */ + public Builder setInputs( + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs inputs = 1; + * + */ + public Builder mergeInputs( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs value) { + if (inputsBuilder_ == null) { + if (inputs_ != null) { + inputs_ = + com.google.cloud.aiplatform.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs inputs = 1; + * + */ + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Builder + getInputsBuilder() { + + onChanged(); + return getInputsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs inputs = 1; + * + */ + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputsOrBuilder + getInputsOrBuilder() { + if (inputsBuilder_ != null) { + return inputsBuilder_.getMessageOrBuilder(); + } else { + return inputs_ == null + ? com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .getDefaultInstance() + : inputs_; + } + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs inputs = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Builder, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTablesInputsOrBuilder> + getInputsFieldBuilder() { + if (inputsBuilder_ == null) { + inputsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Builder, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTablesInputsOrBuilder>(getInputs(), getParentForChildren(), isClean()); + inputs_ = null; + } + return inputsBuilder_; + } + + private com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesMetadata + metadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesMetadata, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesMetadata + .Builder, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTablesMetadataOrBuilder> + metadataBuilder_; + /** + * + * + *
+     * The metadata information.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesMetadata metadata = 2; + * + * + * @return The metadata. + */ + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesMetadata + getMetadata() { + if (metadataBuilder_ == null) { + return metadata_ == null + ? com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesMetadata + .getDefaultInstance() + : metadata_; + } else { + return metadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The metadata information.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesMetadata metadata = 2; + * + */ + public Builder setMetadata( + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesMetadata metadata = 2; + * + */ + public Builder setMetadata( + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesMetadata metadata = 2; + * + */ + public Builder mergeMetadata( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesMetadata value) { + if (metadataBuilder_ == null) { + if (metadata_ != null) { + metadata_ = + com.google.cloud.aiplatform.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlTablesMetadata metadata = 2; + * + */ + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesMetadata.Builder + getMetadataBuilder() { + + onChanged(); + return getMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The metadata information.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesMetadata metadata = 2; + * + */ + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTablesMetadataOrBuilder + getMetadataOrBuilder() { + if (metadataBuilder_ != null) { + return metadataBuilder_.getMessageOrBuilder(); + } else { + return metadata_ == null + ? com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesMetadata + .getDefaultInstance() + : metadata_; + } + } + /** + * + * + *
+     * The metadata information.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesMetadata metadata = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesMetadata, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesMetadata + .Builder, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTablesMetadataOrBuilder> + getMetadataFieldBuilder() { + if (metadataBuilder_ == null) { + metadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesMetadata, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesMetadata + .Builder, + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTables) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTables) + private static final com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTables + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTables(); + } + + public static com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTables + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlTablesInputs.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlTablesInputs.java new file mode 100644 index 000000000..a678839d4 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlTablesInputs.java @@ -0,0 +1,12499 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/schema/trainingjob/definition/automl_tables.proto + +package com.google.cloud.aiplatform.v1.schema.trainingjob.definition; + +/** + * Protobuf type {@code google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs} + */ +public final class AutoMlTablesInputs extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation>(); + mutable_bitField0_ |= 0x00000001; + } + transformations_.add( + input.readMessage( + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig.Builder + subBuilder = null; + if (exportEvaluatedDataItemsConfig_ != null) { + subBuilder = exportEvaluatedDataItemsConfig_.toBuilder(); + } + exportEvaluatedDataItemsConfig_ = + input.readMessage( + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTablesInputs_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTablesInputs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.class, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Builder + .class); + } + + public interface TransformationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation) + com.google.protobuf.MessageOrBuilder { + + /** + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.AutoTransformation auto = 1; + * + * + * @return Whether the auto field is set. + */ + boolean hasAuto(); + /** + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.AutoTransformation auto = 1; + * + * + * @return The auto. + */ + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation + .AutoTransformation + getAuto(); + /** + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.AutoTransformation auto = 1; + * + */ + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation + .AutoTransformationOrBuilder + getAutoOrBuilder(); + + /** + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericTransformation numeric = 2; + * + * + * @return Whether the numeric field is set. + */ + boolean hasNumeric(); + /** + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericTransformation numeric = 2; + * + * + * @return The numeric. + */ + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation + .NumericTransformation + getNumeric(); + /** + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericTransformation numeric = 2; + * + */ + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation + .NumericTransformationOrBuilder + getNumericOrBuilder(); + + /** + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalTransformation categorical = 3; + * + * + * @return Whether the categorical field is set. + */ + boolean hasCategorical(); + /** + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalTransformation categorical = 3; + * + * + * @return The categorical. + */ + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation + .CategoricalTransformation + getCategorical(); + /** + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalTransformation categorical = 3; + * + */ + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation + .CategoricalTransformationOrBuilder + getCategoricalOrBuilder(); + + /** + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TimestampTransformation timestamp = 4; + * + * + * @return Whether the timestamp field is set. + */ + boolean hasTimestamp(); + /** + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TimestampTransformation timestamp = 4; + * + * + * @return The timestamp. + */ + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation + .TimestampTransformation + getTimestamp(); + /** + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TimestampTransformation timestamp = 4; + * + */ + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation + .TimestampTransformationOrBuilder + getTimestampOrBuilder(); + + /** + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextTransformation text = 5; + * + * + * @return Whether the text field is set. + */ + boolean hasText(); + /** + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextTransformation text = 5; + * + * + * @return The text. + */ + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation + .TextTransformation + getText(); + /** + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextTransformation text = 5; + * + */ + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation + .TextTransformationOrBuilder + getTextOrBuilder(); + + /** + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericArrayTransformation repeated_numeric = 6; + * + * + * @return Whether the repeatedNumeric field is set. + */ + boolean hasRepeatedNumeric(); + /** + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericArrayTransformation repeated_numeric = 6; + * + * + * @return The repeatedNumeric. + */ + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation + .NumericArrayTransformation + getRepeatedNumeric(); + /** + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericArrayTransformation repeated_numeric = 6; + * + */ + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation + .NumericArrayTransformationOrBuilder + getRepeatedNumericOrBuilder(); + + /** + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalArrayTransformation repeated_categorical = 7; + * + * + * @return Whether the repeatedCategorical field is set. + */ + boolean hasRepeatedCategorical(); + /** + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalArrayTransformation repeated_categorical = 7; + * + * + * @return The repeatedCategorical. + */ + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation + .CategoricalArrayTransformation + getRepeatedCategorical(); + /** + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalArrayTransformation repeated_categorical = 7; + * + */ + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation + .CategoricalArrayTransformationOrBuilder + getRepeatedCategoricalOrBuilder(); + + /** + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextArrayTransformation repeated_text = 8; + * + * + * @return Whether the repeatedText field is set. + */ + boolean hasRepeatedText(); + /** + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextArrayTransformation repeated_text = 8; + * + * + * @return The repeatedText. + */ + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation + .TextArrayTransformation + getRepeatedText(); + /** + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextArrayTransformation repeated_text = 8; + * + */ + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation + .TextArrayTransformationOrBuilder + getRepeatedTextOrBuilder(); + + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TransformationDetailCase + getTransformationDetailCase(); + } + /** + * Protobuf type {@code + * google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation} + */ + public static final class Transformation extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation.Builder + subBuilder = null; + if (transformationDetailCase_ == 1) { + subBuilder = + ((com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.AutoTransformation) + transformationDetail_) + .toBuilder(); + } + transformationDetail_ = + input.readMessage( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.AutoTransformation.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.AutoTransformation) + transformationDetail_); + transformationDetail_ = subBuilder.buildPartial(); + } + transformationDetailCase_ = 1; + break; + } + case 18: + { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation.Builder + subBuilder = null; + if (transformationDetailCase_ == 2) { + subBuilder = + ((com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericTransformation) + transformationDetail_) + .toBuilder(); + } + transformationDetail_ = + input.readMessage( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericTransformation.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericTransformation) + transformationDetail_); + transformationDetail_ = subBuilder.buildPartial(); + } + transformationDetailCase_ = 2; + break; + } + case 26: + { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation.Builder + subBuilder = null; + if (transformationDetailCase_ == 3) { + subBuilder = + ((com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalTransformation) + transformationDetail_) + .toBuilder(); + } + transformationDetail_ = + input.readMessage( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalTransformation.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalTransformation) + transformationDetail_); + transformationDetail_ = subBuilder.buildPartial(); + } + transformationDetailCase_ = 3; + break; + } + case 34: + { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation.Builder + subBuilder = null; + if (transformationDetailCase_ == 4) { + subBuilder = + ((com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TimestampTransformation) + transformationDetail_) + .toBuilder(); + } + transformationDetail_ = + input.readMessage( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TimestampTransformation.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TimestampTransformation) + transformationDetail_); + transformationDetail_ = subBuilder.buildPartial(); + } + transformationDetailCase_ = 4; + break; + } + case 42: + { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation.Builder + subBuilder = null; + if (transformationDetailCase_ == 5) { + subBuilder = + ((com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextTransformation) + transformationDetail_) + .toBuilder(); + } + transformationDetail_ = + input.readMessage( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextTransformation.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextTransformation) + transformationDetail_); + transformationDetail_ = subBuilder.buildPartial(); + } + transformationDetailCase_ = 5; + break; + } + case 50: + { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation.Builder + subBuilder = null; + if (transformationDetailCase_ == 6) { + subBuilder = + ((com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericArrayTransformation) + transformationDetail_) + .toBuilder(); + } + transformationDetail_ = + input.readMessage( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericArrayTransformation.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericArrayTransformation) + transformationDetail_); + transformationDetail_ = subBuilder.buildPartial(); + } + transformationDetailCase_ = 6; + break; + } + case 58: + { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation.Builder + subBuilder = null; + if (transformationDetailCase_ == 7) { + subBuilder = + ((com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalArrayTransformation) + transformationDetail_) + .toBuilder(); + } + transformationDetail_ = + input.readMessage( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalArrayTransformation + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalArrayTransformation) + transformationDetail_); + transformationDetail_ = subBuilder.buildPartial(); + } + transformationDetailCase_ = 7; + break; + } + case 66: + { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformation.Builder + subBuilder = null; + if (transformationDetailCase_ == 8) { + subBuilder = + ((com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextArrayTransformation) + transformationDetail_) + .toBuilder(); + } + transformationDetail_ = + input.readMessage( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextArrayTransformation.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.class, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.Builder.class); + } + + public interface AutoTransformationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_AutoTransformation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_AutoTransformation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation.class, + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation + other = + (com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.AutoTransformation) + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_AutoTransformation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_AutoTransformation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation.class, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_AutoTransformation_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation + build() { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation + buildPartial() { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation + result = + new com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation + other) { + if (other + == com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.AutoTransformation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.AutoTransformation) + private static final com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.AutoTransformation + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation(); + } + + public static com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface NumericTransformationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_NumericTransformation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_NumericTransformation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation.class, + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation + other = + (com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericTransformation) + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_NumericTransformation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_NumericTransformation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation.class, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_NumericTransformation_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation + build() { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation + buildPartial() { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation + result = + new com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation + other) { + if (other + == com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericTransformation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericTransformation) + private static final com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericTransformation + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation(); + } + + public static com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface CategoricalTransformationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_CategoricalTransformation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_CategoricalTransformation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation.class, + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation + other = + (com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalTransformation) + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_CategoricalTransformation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_CategoricalTransformation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation.class, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_CategoricalTransformation_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation + build() { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation + buildPartial() { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation + result = + new com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation + other) { + if (other + == com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalTransformation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalTransformation) + private static final com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalTransformation + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation(); + } + + public static com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface TimestampTransformationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_TimestampTransformation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_TimestampTransformation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation.class, + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation + other = + (com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TimestampTransformation) + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_TimestampTransformation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_TimestampTransformation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation.class, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_TimestampTransformation_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation + build() { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation + buildPartial() { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation + result = + new com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation + other) { + if (other + == com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TimestampTransformation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TimestampTransformation) + private static final com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TimestampTransformation + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation(); + } + + public static com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface TextTransformationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_TextTransformation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_TextTransformation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation.class, + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation + other = + (com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextTransformation) + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_TextTransformation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_TextTransformation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation.class, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_TextTransformation_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation + build() { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation + buildPartial() { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation + result = + new com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation + other) { + if (other + == com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextTransformation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextTransformation) + private static final com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextTransformation + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation(); + } + + public static com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface NumericArrayTransformationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_NumericArrayTransformation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_NumericArrayTransformation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation.class, + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation + other = + (com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericArrayTransformation) + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_NumericArrayTransformation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_NumericArrayTransformation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation.class, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_NumericArrayTransformation_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation + build() { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation + buildPartial() { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation + result = + new com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation + other) { + if (other + == com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericArrayTransformation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericArrayTransformation) + private static final com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.NumericArrayTransformation + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation(); + } + + public static com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface CategoricalArrayTransformationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_CategoricalArrayTransformation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_CategoricalArrayTransformation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation.class, + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation + other = + (com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalArrayTransformation) + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_CategoricalArrayTransformation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_CategoricalArrayTransformation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation.class, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_CategoricalArrayTransformation_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation + build() { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation + buildPartial() { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation + result = + new com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation + other) { + if (other + == com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalArrayTransformation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalArrayTransformation) + private static final com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.CategoricalArrayTransformation + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation(); + } + + public static com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface TextArrayTransformationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_TextArrayTransformation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_TextArrayTransformation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformation.class, + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformation)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformation + other = + (com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformation + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextArrayTransformation) + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_TextArrayTransformation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_TextArrayTransformation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformation.class, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformation.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_TextArrayTransformation_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformation + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformation + build() { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformation + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformation + buildPartial() { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformation + result = + new com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformation) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformation) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformation + other) { + if (other + == com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextArrayTransformation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextArrayTransformation) + private static final com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation.TextArrayTransformation + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformation(); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.AutoTransformation auto = 1; + * + * + * @return The auto. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation + getAuto() { + if (transformationDetailCase_ == 1) { + return (com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation.getDefaultInstance(); + } + /** + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.AutoTransformation auto = 1; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformationOrBuilder + getAutoOrBuilder() { + if (transformationDetailCase_ == 1) { + return (com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation.getDefaultInstance(); + } + + public static final int NUMERIC_FIELD_NUMBER = 2; + /** + * + * .google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericTransformation numeric = 2; + * + * + * @return The numeric. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation + getNumeric() { + if (transformationDetailCase_ == 2) { + return (com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation.getDefaultInstance(); + } + /** + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericTransformation numeric = 2; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformationOrBuilder + getNumericOrBuilder() { + if (transformationDetailCase_ == 2) { + return (com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation.getDefaultInstance(); + } + + public static final int CATEGORICAL_FIELD_NUMBER = 3; + /** + * + * .google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalTransformation categorical = 3; + * + * + * @return The categorical. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation + getCategorical() { + if (transformationDetailCase_ == 3) { + return (com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation.getDefaultInstance(); + } + /** + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalTransformation categorical = 3; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformationOrBuilder + getCategoricalOrBuilder() { + if (transformationDetailCase_ == 3) { + return (com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation.getDefaultInstance(); + } + + public static final int TIMESTAMP_FIELD_NUMBER = 4; + /** + * + * .google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TimestampTransformation timestamp = 4; + * + * + * @return The timestamp. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation + getTimestamp() { + if (transformationDetailCase_ == 4) { + return (com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation.getDefaultInstance(); + } + /** + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TimestampTransformation timestamp = 4; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformationOrBuilder + getTimestampOrBuilder() { + if (transformationDetailCase_ == 4) { + return (com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation.getDefaultInstance(); + } + + public static final int TEXT_FIELD_NUMBER = 5; + /** + * + * .google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextTransformation text = 5; + * + * + * @return The text. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation + getText() { + if (transformationDetailCase_ == 5) { + return (com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation.getDefaultInstance(); + } + /** + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextTransformation text = 5; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformationOrBuilder + getTextOrBuilder() { + if (transformationDetailCase_ == 5) { + return (com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation.getDefaultInstance(); + } + + public static final int REPEATED_NUMERIC_FIELD_NUMBER = 6; + /** + * + * .google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericArrayTransformation repeated_numeric = 6; + * + * + * @return The repeatedNumeric. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation + getRepeatedNumeric() { + if (transformationDetailCase_ == 6) { + return (com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation.getDefaultInstance(); + } + /** + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericArrayTransformation repeated_numeric = 6; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformationOrBuilder + getRepeatedNumericOrBuilder() { + if (transformationDetailCase_ == 6) { + return (com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation.getDefaultInstance(); + } + + public static final int REPEATED_CATEGORICAL_FIELD_NUMBER = 7; + /** + * + * .google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalArrayTransformation repeated_categorical = 7; + * + * + * @return The repeatedCategorical. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation + getRepeatedCategorical() { + if (transformationDetailCase_ == 7) { + return (com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation.getDefaultInstance(); + } + /** + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalArrayTransformation repeated_categorical = 7; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformationOrBuilder + getRepeatedCategoricalOrBuilder() { + if (transformationDetailCase_ == 7) { + return (com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation.getDefaultInstance(); + } + + public static final int REPEATED_TEXT_FIELD_NUMBER = 8; + /** + * + * .google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextArrayTransformation repeated_text = 8; + * + * + * @return The repeatedText. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformation + getRepeatedText() { + if (transformationDetailCase_ == 8) { + return (com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformation.getDefaultInstance(); + } + /** + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextArrayTransformation repeated_text = 8; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformationOrBuilder + getRepeatedTextOrBuilder() { + if (transformationDetailCase_ == 8) { + return (com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation) + transformationDetail_); + } + if (transformationDetailCase_ == 2) { + output.writeMessage( + 2, + (com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation) + transformationDetail_); + } + if (transformationDetailCase_ == 3) { + output.writeMessage( + 3, + (com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation) + transformationDetail_); + } + if (transformationDetailCase_ == 4) { + output.writeMessage( + 4, + (com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation) + transformationDetail_); + } + if (transformationDetailCase_ == 5) { + output.writeMessage( + 5, + (com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation) + transformationDetail_); + } + if (transformationDetailCase_ == 6) { + output.writeMessage( + 6, + (com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation) + transformationDetail_); + } + if (transformationDetailCase_ == 7) { + output.writeMessage( + 7, + (com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation) + transformationDetail_); + } + if (transformationDetailCase_ == 8) { + output.writeMessage( + 8, + (com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation) + transformationDetail_); + } + if (transformationDetailCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, + (com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation) + transformationDetail_); + } + if (transformationDetailCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, + (com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation) + transformationDetail_); + } + if (transformationDetailCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, + (com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation) + transformationDetail_); + } + if (transformationDetailCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, + (com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation) + transformationDetail_); + } + if (transformationDetailCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, + (com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation) + transformationDetail_); + } + if (transformationDetailCase_ == 7) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, + (com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation) + transformationDetail_); + } + if (transformationDetailCase_ == 8) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 8, + (com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation + other = + (com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation) + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .TransformationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.class, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTablesInputs_Transformation_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation + build() { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation + buildPartial() { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation + result = + new com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation + other) { + if (other + == com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation.Builder, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformationOrBuilder> + autoBuilder_; + /** + * + * .google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.AutoTransformation auto = 1; + * + * + * @return The auto. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation + getAuto() { + if (autoBuilder_ == null) { + if (transformationDetailCase_ == 1) { + return (com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation.getDefaultInstance(); + } else { + if (transformationDetailCase_ == 1) { + return autoBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation.getDefaultInstance(); + } + } + /** + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.AutoTransformation auto = 1; + * + */ + public Builder setAuto( + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.AutoTransformation auto = 1; + * + */ + public Builder setAuto( + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.AutoTransformation auto = 1; + * + */ + public Builder mergeAuto( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation + value) { + if (autoBuilder_ == null) { + if (transformationDetailCase_ == 1 + && transformationDetail_ + != com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation.getDefaultInstance()) { + transformationDetail_ = + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation.newBuilder( + (com.google.cloud.aiplatform.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.AutoTransformation auto = 1; + * + */ + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation.Builder + getAutoBuilder() { + return getAutoFieldBuilder().getBuilder(); + } + /** + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.AutoTransformation auto = 1; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformationOrBuilder + getAutoOrBuilder() { + if ((transformationDetailCase_ == 1) && (autoBuilder_ != null)) { + return autoBuilder_.getMessageOrBuilder(); + } else { + if (transformationDetailCase_ == 1) { + return (com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation.getDefaultInstance(); + } + } + /** + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.AutoTransformation auto = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation.Builder, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformationOrBuilder> + getAutoFieldBuilder() { + if (autoBuilder_ == null) { + if (!(transformationDetailCase_ == 1)) { + transformationDetail_ = + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation.getDefaultInstance(); + } + autoBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformation.Builder, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.AutoTransformationOrBuilder>( + (com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation.Builder, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformationOrBuilder> + numericBuilder_; + /** + * + * .google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericTransformation numeric = 2; + * + * + * @return The numeric. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation + getNumeric() { + if (numericBuilder_ == null) { + if (transformationDetailCase_ == 2) { + return (com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation.getDefaultInstance(); + } else { + if (transformationDetailCase_ == 2) { + return numericBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation.getDefaultInstance(); + } + } + /** + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericTransformation numeric = 2; + * + */ + public Builder setNumeric( + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericTransformation numeric = 2; + * + */ + public Builder setNumeric( + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericTransformation numeric = 2; + * + */ + public Builder mergeNumeric( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation + value) { + if (numericBuilder_ == null) { + if (transformationDetailCase_ == 2 + && transformationDetail_ + != com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation.getDefaultInstance()) { + transformationDetail_ = + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation.newBuilder( + (com.google.cloud.aiplatform.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericTransformation numeric = 2; + * + */ + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation.Builder + getNumericBuilder() { + return getNumericFieldBuilder().getBuilder(); + } + /** + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericTransformation numeric = 2; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformationOrBuilder + getNumericOrBuilder() { + if ((transformationDetailCase_ == 2) && (numericBuilder_ != null)) { + return numericBuilder_.getMessageOrBuilder(); + } else { + if (transformationDetailCase_ == 2) { + return (com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation.getDefaultInstance(); + } + } + /** + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericTransformation numeric = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation.Builder, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformationOrBuilder> + getNumericFieldBuilder() { + if (numericBuilder_ == null) { + if (!(transformationDetailCase_ == 2)) { + transformationDetail_ = + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation.getDefaultInstance(); + } + numericBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformation.Builder, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericTransformationOrBuilder>( + (com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation.Builder, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformationOrBuilder> + categoricalBuilder_; + /** + * + * .google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalTransformation categorical = 3; + * + * + * @return The categorical. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation + getCategorical() { + if (categoricalBuilder_ == null) { + if (transformationDetailCase_ == 3) { + return (com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation.getDefaultInstance(); + } else { + if (transformationDetailCase_ == 3) { + return categoricalBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation.getDefaultInstance(); + } + } + /** + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalTransformation categorical = 3; + * + */ + public Builder setCategorical( + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalTransformation categorical = 3; + * + */ + public Builder setCategorical( + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalTransformation categorical = 3; + * + */ + public Builder mergeCategorical( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation + value) { + if (categoricalBuilder_ == null) { + if (transformationDetailCase_ == 3 + && transformationDetail_ + != com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation.getDefaultInstance()) { + transformationDetail_ = + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation.newBuilder( + (com.google.cloud.aiplatform.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalTransformation categorical = 3; + * + */ + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation.Builder + getCategoricalBuilder() { + return getCategoricalFieldBuilder().getBuilder(); + } + /** + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalTransformation categorical = 3; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformationOrBuilder + getCategoricalOrBuilder() { + if ((transformationDetailCase_ == 3) && (categoricalBuilder_ != null)) { + return categoricalBuilder_.getMessageOrBuilder(); + } else { + if (transformationDetailCase_ == 3) { + return (com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation.getDefaultInstance(); + } + } + /** + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalTransformation categorical = 3; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation.Builder, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformationOrBuilder> + getCategoricalFieldBuilder() { + if (categoricalBuilder_ == null) { + if (!(transformationDetailCase_ == 3)) { + transformationDetail_ = + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation.getDefaultInstance(); + } + categoricalBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformation.Builder, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalTransformationOrBuilder>( + (com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation.Builder, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformationOrBuilder> + timestampBuilder_; + /** + * + * .google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TimestampTransformation timestamp = 4; + * + * + * @return The timestamp. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation + getTimestamp() { + if (timestampBuilder_ == null) { + if (transformationDetailCase_ == 4) { + return (com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation.getDefaultInstance(); + } else { + if (transformationDetailCase_ == 4) { + return timestampBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation.getDefaultInstance(); + } + } + /** + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TimestampTransformation timestamp = 4; + * + */ + public Builder setTimestamp( + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TimestampTransformation timestamp = 4; + * + */ + public Builder setTimestamp( + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TimestampTransformation timestamp = 4; + * + */ + public Builder mergeTimestamp( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation + value) { + if (timestampBuilder_ == null) { + if (transformationDetailCase_ == 4 + && transformationDetail_ + != com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation.getDefaultInstance()) { + transformationDetail_ = + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation.newBuilder( + (com.google.cloud.aiplatform.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TimestampTransformation timestamp = 4; + * + */ + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation.Builder + getTimestampBuilder() { + return getTimestampFieldBuilder().getBuilder(); + } + /** + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TimestampTransformation timestamp = 4; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformationOrBuilder + getTimestampOrBuilder() { + if ((transformationDetailCase_ == 4) && (timestampBuilder_ != null)) { + return timestampBuilder_.getMessageOrBuilder(); + } else { + if (transformationDetailCase_ == 4) { + return (com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation.getDefaultInstance(); + } + } + /** + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TimestampTransformation timestamp = 4; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation.Builder, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformationOrBuilder> + getTimestampFieldBuilder() { + if (timestampBuilder_ == null) { + if (!(transformationDetailCase_ == 4)) { + transformationDetail_ = + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation.getDefaultInstance(); + } + timestampBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformation.Builder, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TimestampTransformationOrBuilder>( + (com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation.Builder, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformationOrBuilder> + textBuilder_; + /** + * + * .google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextTransformation text = 5; + * + * + * @return The text. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation + getText() { + if (textBuilder_ == null) { + if (transformationDetailCase_ == 5) { + return (com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation.getDefaultInstance(); + } else { + if (transformationDetailCase_ == 5) { + return textBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation.getDefaultInstance(); + } + } + /** + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextTransformation text = 5; + * + */ + public Builder setText( + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextTransformation text = 5; + * + */ + public Builder setText( + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextTransformation text = 5; + * + */ + public Builder mergeText( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation + value) { + if (textBuilder_ == null) { + if (transformationDetailCase_ == 5 + && transformationDetail_ + != com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation.getDefaultInstance()) { + transformationDetail_ = + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation.newBuilder( + (com.google.cloud.aiplatform.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextTransformation text = 5; + * + */ + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation.Builder + getTextBuilder() { + return getTextFieldBuilder().getBuilder(); + } + /** + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextTransformation text = 5; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformationOrBuilder + getTextOrBuilder() { + if ((transformationDetailCase_ == 5) && (textBuilder_ != null)) { + return textBuilder_.getMessageOrBuilder(); + } else { + if (transformationDetailCase_ == 5) { + return (com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation.getDefaultInstance(); + } + } + /** + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextTransformation text = 5; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation.Builder, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformationOrBuilder> + getTextFieldBuilder() { + if (textBuilder_ == null) { + if (!(transformationDetailCase_ == 5)) { + transformationDetail_ = + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation.getDefaultInstance(); + } + textBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformation.Builder, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextTransformationOrBuilder>( + (com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation.Builder, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformationOrBuilder> + repeatedNumericBuilder_; + /** + * + * .google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericArrayTransformation repeated_numeric = 6; + * + * + * @return The repeatedNumeric. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation + getRepeatedNumeric() { + if (repeatedNumericBuilder_ == null) { + if (transformationDetailCase_ == 6) { + return (com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation.getDefaultInstance(); + } else { + if (transformationDetailCase_ == 6) { + return repeatedNumericBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation.getDefaultInstance(); + } + } + /** + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericArrayTransformation repeated_numeric = 6; + * + */ + public Builder setRepeatedNumeric( + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericArrayTransformation repeated_numeric = 6; + * + */ + public Builder setRepeatedNumeric( + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericArrayTransformation repeated_numeric = 6; + * + */ + public Builder mergeRepeatedNumeric( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation + value) { + if (repeatedNumericBuilder_ == null) { + if (transformationDetailCase_ == 6 + && transformationDetail_ + != com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation.getDefaultInstance()) { + transformationDetail_ = + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation.newBuilder( + (com.google.cloud.aiplatform.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericArrayTransformation repeated_numeric = 6; + * + */ + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation.Builder + getRepeatedNumericBuilder() { + return getRepeatedNumericFieldBuilder().getBuilder(); + } + /** + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericArrayTransformation repeated_numeric = 6; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformationOrBuilder + getRepeatedNumericOrBuilder() { + if ((transformationDetailCase_ == 6) && (repeatedNumericBuilder_ != null)) { + return repeatedNumericBuilder_.getMessageOrBuilder(); + } else { + if (transformationDetailCase_ == 6) { + return (com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation.getDefaultInstance(); + } + } + /** + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.NumericArrayTransformation repeated_numeric = 6; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation.Builder, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformationOrBuilder> + getRepeatedNumericFieldBuilder() { + if (repeatedNumericBuilder_ == null) { + if (!(transformationDetailCase_ == 6)) { + transformationDetail_ = + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation.getDefaultInstance(); + } + repeatedNumericBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformation.Builder, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.NumericArrayTransformationOrBuilder>( + (com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation.Builder, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformationOrBuilder> + repeatedCategoricalBuilder_; + /** + * + * .google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalArrayTransformation repeated_categorical = 7; + * + * + * @return The repeatedCategorical. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation + getRepeatedCategorical() { + if (repeatedCategoricalBuilder_ == null) { + if (transformationDetailCase_ == 7) { + return (com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation.getDefaultInstance(); + } else { + if (transformationDetailCase_ == 7) { + return repeatedCategoricalBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation.getDefaultInstance(); + } + } + /** + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalArrayTransformation repeated_categorical = 7; + * + */ + public Builder setRepeatedCategorical( + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalArrayTransformation repeated_categorical = 7; + * + */ + public Builder setRepeatedCategorical( + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalArrayTransformation repeated_categorical = 7; + * + */ + public Builder mergeRepeatedCategorical( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation + value) { + if (repeatedCategoricalBuilder_ == null) { + if (transformationDetailCase_ == 7 + && transformationDetail_ + != com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation.getDefaultInstance()) { + transformationDetail_ = + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation.newBuilder( + (com.google.cloud.aiplatform.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalArrayTransformation repeated_categorical = 7; + * + */ + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation.Builder + getRepeatedCategoricalBuilder() { + return getRepeatedCategoricalFieldBuilder().getBuilder(); + } + /** + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalArrayTransformation repeated_categorical = 7; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformationOrBuilder + getRepeatedCategoricalOrBuilder() { + if ((transformationDetailCase_ == 7) && (repeatedCategoricalBuilder_ != null)) { + return repeatedCategoricalBuilder_.getMessageOrBuilder(); + } else { + if (transformationDetailCase_ == 7) { + return (com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation.getDefaultInstance(); + } + } + /** + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.CategoricalArrayTransformation repeated_categorical = 7; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation.Builder, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformationOrBuilder> + getRepeatedCategoricalFieldBuilder() { + if (repeatedCategoricalBuilder_ == null) { + if (!(transformationDetailCase_ == 7)) { + transformationDetail_ = + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation.getDefaultInstance(); + } + repeatedCategoricalBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformation.Builder, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.CategoricalArrayTransformationOrBuilder>( + (com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformation, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformation.Builder, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformationOrBuilder> + repeatedTextBuilder_; + /** + * + * .google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextArrayTransformation repeated_text = 8; + * + * + * @return The repeatedText. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformation + getRepeatedText() { + if (repeatedTextBuilder_ == null) { + if (transformationDetailCase_ == 8) { + return (com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformation.getDefaultInstance(); + } else { + if (transformationDetailCase_ == 8) { + return repeatedTextBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformation.getDefaultInstance(); + } + } + /** + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextArrayTransformation repeated_text = 8; + * + */ + public Builder setRepeatedText( + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextArrayTransformation repeated_text = 8; + * + */ + public Builder setRepeatedText( + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextArrayTransformation repeated_text = 8; + * + */ + public Builder mergeRepeatedText( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformation + value) { + if (repeatedTextBuilder_ == null) { + if (transformationDetailCase_ == 8 + && transformationDetail_ + != com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformation.getDefaultInstance()) { + transformationDetail_ = + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformation.newBuilder( + (com.google.cloud.aiplatform.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextArrayTransformation repeated_text = 8; + * + */ + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformation.Builder + getRepeatedTextBuilder() { + return getRepeatedTextFieldBuilder().getBuilder(); + } + /** + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextArrayTransformation repeated_text = 8; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformationOrBuilder + getRepeatedTextOrBuilder() { + if ((transformationDetailCase_ == 8) && (repeatedTextBuilder_ != null)) { + return repeatedTextBuilder_.getMessageOrBuilder(); + } else { + if (transformationDetailCase_ == 8) { + return (com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformation) + transformationDetail_; + } + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformation.getDefaultInstance(); + } + } + /** + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TextArrayTransformation repeated_text = 8; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformation, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformation.Builder, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformationOrBuilder> + getRepeatedTextFieldBuilder() { + if (repeatedTextBuilder_ == null) { + if (!(transformationDetailCase_ == 8)) { + transformationDetail_ = + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformation.getDefaultInstance(); + } + repeatedTextBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformation, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformation.Builder, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.TextArrayTransformationOrBuilder>( + (com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation) + private static final com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTablesInputs.Transformation + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation(); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation transformations = 3; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation transformations = 3; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.aiplatform.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation transformations = 3; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation transformations = 3; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.ExportEvaluatedDataItemsConfig export_evaluated_data_items_config = 10; + * + * + * @return The exportEvaluatedDataItemsConfig. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.ExportEvaluatedDataItemsConfig + getExportEvaluatedDataItemsConfig() { + return exportEvaluatedDataItemsConfig_ == null + ? com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.ExportEvaluatedDataItemsConfig export_evaluated_data_items_config = 10; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs other = + (com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs) + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTablesInputs_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTablesInputs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs.class, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTablesInputs_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs build() { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + buildPartial() { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs result = + new com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs other) { + if (other + == com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation>(transformations_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.Builder, + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation transformations = 3; + * + */ + public java.util.List< + com.google.cloud.aiplatform.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation transformations = 3; + * + */ + public com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation transformations = 3; + * + */ + public Builder setTransformations( + int index, + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation transformations = 3; + * + */ + public Builder setTransformations( + int index, + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation transformations = 3; + * + */ + public Builder addTransformations( + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation transformations = 3; + * + */ + public Builder addTransformations( + int index, + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation transformations = 3; + * + */ + public Builder addTransformations( + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation transformations = 3; + * + */ + public Builder addTransformations( + int index, + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation transformations = 3; + * + */ + public Builder addAllTransformations( + java.lang.Iterable< + ? extends + com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation transformations = 3; + * + */ + public com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation transformations = 3; + * + */ + public com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation transformations = 3; + * + */ + public java.util.List< + ? extends + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation transformations = 3; + * + */ + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.Builder + addTransformationsBuilder() { + return getTransformationsFieldBuilder() + .addBuilder( + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation transformations = 3; + * + */ + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.Builder + addTransformationsBuilder(int index) { + return getTransformationsFieldBuilder() + .addBuilder( + index, + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation transformations = 3; + * + */ + public java.util.List< + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.Builder> + getTransformationsBuilderList() { + return getTransformationsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.Builder, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .TransformationOrBuilder> + getTransformationsFieldBuilder() { + if (transformationsBuilder_ == null) { + transformationsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .Transformation.Builder, + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig + exportEvaluatedDataItemsConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig.Builder, + com.google.cloud.aiplatform.v1.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.v1.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.v1.schema.trainingjob.definition.ExportEvaluatedDataItemsConfig export_evaluated_data_items_config = 10; + * + * + * @return The exportEvaluatedDataItemsConfig. + */ + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig + getExportEvaluatedDataItemsConfig() { + if (exportEvaluatedDataItemsConfigBuilder_ == null) { + return exportEvaluatedDataItemsConfig_ == null + ? com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.ExportEvaluatedDataItemsConfig export_evaluated_data_items_config = 10; + * + */ + public Builder setExportEvaluatedDataItemsConfig( + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.ExportEvaluatedDataItemsConfig export_evaluated_data_items_config = 10; + * + */ + public Builder setExportEvaluatedDataItemsConfig( + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.ExportEvaluatedDataItemsConfig export_evaluated_data_items_config = 10; + * + */ + public Builder mergeExportEvaluatedDataItemsConfig( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.ExportEvaluatedDataItemsConfig + value) { + if (exportEvaluatedDataItemsConfigBuilder_ == null) { + if (exportEvaluatedDataItemsConfig_ != null) { + exportEvaluatedDataItemsConfig_ = + com.google.cloud.aiplatform.v1.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.v1.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.v1.schema.trainingjob.definition.ExportEvaluatedDataItemsConfig export_evaluated_data_items_config = 10; + * + */ + public com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.ExportEvaluatedDataItemsConfig export_evaluated_data_items_config = 10; + * + */ + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfigOrBuilder + getExportEvaluatedDataItemsConfigOrBuilder() { + if (exportEvaluatedDataItemsConfigBuilder_ != null) { + return exportEvaluatedDataItemsConfigBuilder_.getMessageOrBuilder(); + } else { + return exportEvaluatedDataItemsConfig_ == null + ? com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.ExportEvaluatedDataItemsConfig export_evaluated_data_items_config = 10; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig.Builder, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfigOrBuilder> + getExportEvaluatedDataItemsConfigFieldBuilder() { + if (exportEvaluatedDataItemsConfigBuilder_ == null) { + exportEvaluatedDataItemsConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig.Builder, + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs) + private static final com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTablesInputs + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs(); + } + + public static com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlTablesInputsOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlTablesInputsOrBuilder.java new file mode 100644 index 000000000..7997df6c8 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlTablesInputsOrBuilder.java @@ -0,0 +1,388 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/schema/trainingjob/definition/automl_tables.proto + +package com.google.cloud.aiplatform.v1.schema.trainingjob.definition; + +public interface AutoMlTablesInputsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation transformations = 3; + * + */ + java.util.List< + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation transformations = 3; + * + */ + com.google.cloud.aiplatform.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation transformations = 3; + * + */ + java.util.List< + ? extends + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation transformations = 3; + * + */ + com.google.cloud.aiplatform.v1.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.v1.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.v1.schema.trainingjob.definition.ExportEvaluatedDataItemsConfig export_evaluated_data_items_config = 10; + * + * + * @return The exportEvaluatedDataItemsConfig. + */ + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.ExportEvaluatedDataItemsConfig export_evaluated_data_items_config = 10; + * + */ + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfigOrBuilder + getExportEvaluatedDataItemsConfigOrBuilder(); + + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs + .AdditionalOptimizationObjectiveConfigCase + getAdditionalOptimizationObjectiveConfigCase(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlTablesMetadata.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlTablesMetadata.java new file mode 100644 index 000000000..ea075b70b --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlTablesMetadata.java @@ -0,0 +1,588 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/schema/trainingjob/definition/automl_tables.proto + +package com.google.cloud.aiplatform.v1.schema.trainingjob.definition; + +/** + * + * + *
+ * Model metadata specific to AutoML Tables.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesMetadata} + */ +public final class AutoMlTablesMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTablesMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTablesMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesMetadata.class, + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesMetadata)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesMetadata other = + (com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesMetadata + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlTablesMetadata + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlTablesMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesMetadata) + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTablesMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTablesMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesMetadata + .class, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesMetadata + .Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMLTablesProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTablesMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesMetadata + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesMetadata + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesMetadata + build() { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesMetadata result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesMetadata + buildPartial() { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesMetadata result = + new com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesMetadata) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesMetadata) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesMetadata other) { + if (other + == com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesMetadata + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesMetadata) + private static final com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTablesMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesMetadata(); + } + + public static com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTablesMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlTablesMetadataOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlTablesMetadataOrBuilder.java new file mode 100644 index 000000000..dda28f50a --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/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/v1/schema/trainingjob/definition/automl_tables.proto + +package com.google.cloud.aiplatform.v1.schema.trainingjob.definition; + +public interface AutoMlTablesMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.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-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlTablesOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlTablesOrBuilder.java new file mode 100644 index 000000000..541ba0292 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlTablesOrBuilder.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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/schema/trainingjob/definition/automl_tables.proto + +package com.google.cloud.aiplatform.v1.schema.trainingjob.definition; + +public interface AutoMlTablesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTables) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs inputs = 1; + * + * + * @return Whether the inputs field is set. + */ + boolean hasInputs(); + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs inputs = 1; + * + * + * @return The inputs. + */ + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs getInputs(); + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputs inputs = 1; + * + */ + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesInputsOrBuilder + getInputsOrBuilder(); + + /** + * + * + *
+   * The metadata information.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesMetadata metadata = 2; + * + * + * @return Whether the metadata field is set. + */ + boolean hasMetadata(); + /** + * + * + *
+   * The metadata information.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesMetadata metadata = 2; + * + * + * @return The metadata. + */ + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesMetadata getMetadata(); + /** + * + * + *
+   * The metadata information.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesMetadata metadata = 2; + * + */ + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTablesMetadataOrBuilder + getMetadataOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlTextClassification.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlTextClassification.java new file mode 100644 index 000000000..1963c4e5e --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlTextClassification.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/v1/schema/trainingjob/definition/automl_text_classification.proto + +package com.google.cloud.aiplatform.v1.schema.trainingjob.definition; + +/** + * + * + *
+ * A TrainingJob that trains and uploads an AutoML Text Classification Model.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextClassification} + */ +public final class AutoMlTextClassification extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMlTextClassificationInputs.Builder + subBuilder = null; + if (inputs_ != null) { + subBuilder = inputs_.toBuilder(); + } + inputs_ = + input.readMessage( + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMLTextClassificationProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTextClassification_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMLTextClassificationProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTextClassification_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextClassification + .class, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextClassification + .Builder.class); + } + + public static final int INPUTS_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTextClassificationInputs + inputs_; + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTextClassificationInputs inputs = 1; + * + * + * @return The inputs. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextClassificationInputs + getInputs() { + return inputs_ == null + ? com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTextClassificationInputs.getDefaultInstance() + : inputs_; + } + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextClassificationInputs inputs = 1; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTextClassification)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextClassification other = + (com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMlTextClassification + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition + .AutoMlTextClassification + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlTextClassification} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextClassification) + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTextClassificationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMLTextClassificationProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTextClassification_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMLTextClassificationProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTextClassification_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextClassification + .class, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextClassification + .Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMLTextClassificationProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTextClassification_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextClassification + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextClassification + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextClassification + build() { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextClassification result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextClassification + buildPartial() { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextClassification result = + new com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTextClassification) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextClassification) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextClassification + other) { + if (other + == com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTextClassification + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextClassification) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTextClassificationInputs + inputs_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTextClassificationInputs, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTextClassificationInputs.Builder, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTextClassificationInputsOrBuilder> + inputsBuilder_; + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTextClassificationInputs inputs = 1; + * + * + * @return The inputs. + */ + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTextClassificationInputs + getInputs() { + if (inputsBuilder_ == null) { + return inputs_ == null + ? com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTextClassificationInputs.getDefaultInstance() + : inputs_; + } else { + return inputsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextClassificationInputs inputs = 1; + * + */ + public Builder setInputs( + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTextClassificationInputs inputs = 1; + * + */ + public Builder setInputs( + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTextClassificationInputs inputs = 1; + * + */ + public Builder mergeInputs( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextClassificationInputs + value) { + if (inputsBuilder_ == null) { + if (inputs_ != null) { + inputs_ = + com.google.cloud.aiplatform.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlTextClassificationInputs inputs = 1; + * + */ + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTextClassificationInputs.Builder + getInputsBuilder() { + + onChanged(); + return getInputsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextClassificationInputs inputs = 1; + * + */ + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTextClassificationInputsOrBuilder + getInputsOrBuilder() { + if (inputsBuilder_ != null) { + return inputsBuilder_.getMessageOrBuilder(); + } else { + return inputs_ == null + ? com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTextClassificationInputs.getDefaultInstance() + : inputs_; + } + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextClassificationInputs inputs = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTextClassificationInputs, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTextClassificationInputs.Builder, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTextClassificationInputsOrBuilder> + getInputsFieldBuilder() { + if (inputsBuilder_ == null) { + inputsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTextClassificationInputs, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTextClassificationInputs.Builder, + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTextClassification) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextClassification) + private static final com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTextClassification + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextClassification(); + } + + public static com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTextClassification + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlTextClassificationInputs.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlTextClassificationInputs.java new file mode 100644 index 000000000..38239e730 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlTextClassificationInputs.java @@ -0,0 +1,579 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/schema/trainingjob/definition/automl_text_classification.proto + +package com.google.cloud.aiplatform.v1.schema.trainingjob.definition; + +/** + * Protobuf type {@code + * google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextClassificationInputs} + */ +public final class AutoMlTextClassificationInputs extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMLTextClassificationProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTextClassificationInputs_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMLTextClassificationProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTextClassificationInputs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTextClassificationInputs.class, + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMlTextClassificationInputs)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextClassificationInputs + other = + (com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMlTextClassificationInputs + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition + .AutoMlTextClassificationInputs + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlTextClassificationInputs} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextClassificationInputs) + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTextClassificationInputsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMLTextClassificationProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTextClassificationInputs_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMLTextClassificationProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTextClassificationInputs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTextClassificationInputs.class, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTextClassificationInputs.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMLTextClassificationProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTextClassificationInputs_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTextClassificationInputs + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTextClassificationInputs.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTextClassificationInputs + build() { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextClassificationInputs + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTextClassificationInputs + buildPartial() { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextClassificationInputs + result = + new com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMlTextClassificationInputs) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTextClassificationInputs) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextClassificationInputs + other) { + if (other + == com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTextClassificationInputs + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTextClassificationInputs) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextClassificationInputs) + private static final com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTextClassificationInputs + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTextClassificationInputs(); + } + + public static com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTextClassificationInputs + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlTextClassificationInputsOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlTextClassificationInputsOrBuilder.java new file mode 100644 index 000000000..74ed45ca7 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlTextClassificationInputsOrBuilder.java @@ -0,0 +1,32 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/schema/trainingjob/definition/automl_text_classification.proto + +package com.google.cloud.aiplatform.v1.schema.trainingjob.definition; + +public interface AutoMlTextClassificationInputsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextClassificationInputs) + com.google.protobuf.MessageOrBuilder { + + /** + * bool multi_label = 1; + * + * @return The multiLabel. + */ + boolean getMultiLabel(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlTextClassificationOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlTextClassificationOrBuilder.java new file mode 100644 index 000000000..6c6cdc499 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlTextClassificationOrBuilder.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/v1/schema/trainingjob/definition/automl_text_classification.proto + +package com.google.cloud.aiplatform.v1.schema.trainingjob.definition; + +public interface AutoMlTextClassificationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextClassification) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextClassificationInputs inputs = 1; + * + * + * @return Whether the inputs field is set. + */ + boolean hasInputs(); + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextClassificationInputs inputs = 1; + * + * + * @return The inputs. + */ + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextClassificationInputs + getInputs(); + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextClassificationInputs inputs = 1; + * + */ + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTextClassificationInputsOrBuilder + getInputsOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlTextExtraction.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlTextExtraction.java new file mode 100644 index 000000000..51e7ab30f --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlTextExtraction.java @@ -0,0 +1,823 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/schema/trainingjob/definition/automl_text_extraction.proto + +package com.google.cloud.aiplatform.v1.schema.trainingjob.definition; + +/** + * + * + *
+ * A TrainingJob that trains and uploads an AutoML Text Extraction Model.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextExtraction} + */ +public final class AutoMlTextExtraction extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMlTextExtractionInputs.Builder + subBuilder = null; + if (inputs_ != null) { + subBuilder = inputs_.toBuilder(); + } + inputs_ = + input.readMessage( + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMLTextExtractionProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTextExtraction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMLTextExtractionProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTextExtraction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextExtraction.class, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextExtraction + .Builder.class); + } + + public static final int INPUTS_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextExtractionInputs + inputs_; + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTextExtractionInputs inputs = 1; + * + * + * @return The inputs. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextExtractionInputs + getInputs() { + return inputs_ == null + ? com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextExtractionInputs + .getDefaultInstance() + : inputs_; + } + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextExtractionInputs inputs = 1; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTextExtraction)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextExtraction other = + (com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTextExtraction + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlTextExtraction + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlTextExtraction} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextExtraction) + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextExtractionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMLTextExtractionProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTextExtraction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMLTextExtractionProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTextExtraction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextExtraction + .class, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextExtraction + .Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMLTextExtractionProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTextExtraction_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextExtraction + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextExtraction + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextExtraction + build() { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextExtraction result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextExtraction + buildPartial() { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextExtraction result = + new com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTextExtraction) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextExtraction) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextExtraction other) { + if (other + == com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTextExtraction + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextExtraction) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextExtractionInputs + inputs_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextExtractionInputs, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextExtractionInputs + .Builder, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTextExtractionInputsOrBuilder> + inputsBuilder_; + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTextExtractionInputs inputs = 1; + * + * + * @return The inputs. + */ + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextExtractionInputs + getInputs() { + if (inputsBuilder_ == null) { + return inputs_ == null + ? com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTextExtractionInputs.getDefaultInstance() + : inputs_; + } else { + return inputsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextExtractionInputs inputs = 1; + * + */ + public Builder setInputs( + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTextExtractionInputs inputs = 1; + * + */ + public Builder setInputs( + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTextExtractionInputs inputs = 1; + * + */ + public Builder mergeInputs( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextExtractionInputs + value) { + if (inputsBuilder_ == null) { + if (inputs_ != null) { + inputs_ = + com.google.cloud.aiplatform.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlTextExtractionInputs inputs = 1; + * + */ + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextExtractionInputs + .Builder + getInputsBuilder() { + + onChanged(); + return getInputsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextExtractionInputs inputs = 1; + * + */ + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTextExtractionInputsOrBuilder + getInputsOrBuilder() { + if (inputsBuilder_ != null) { + return inputsBuilder_.getMessageOrBuilder(); + } else { + return inputs_ == null + ? com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTextExtractionInputs.getDefaultInstance() + : inputs_; + } + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextExtractionInputs inputs = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextExtractionInputs, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextExtractionInputs + .Builder, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTextExtractionInputsOrBuilder> + getInputsFieldBuilder() { + if (inputsBuilder_ == null) { + inputsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTextExtractionInputs, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTextExtractionInputs.Builder, + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTextExtraction) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextExtraction) + private static final com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTextExtraction + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextExtraction(); + } + + public static com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTextExtraction + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlTextExtractionInputs.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlTextExtractionInputs.java new file mode 100644 index 000000000..8adfc9df5 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlTextExtractionInputs.java @@ -0,0 +1,500 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/schema/trainingjob/definition/automl_text_extraction.proto + +package com.google.cloud.aiplatform.v1.schema.trainingjob.definition; + +/** + * Protobuf type {@code + * google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextExtractionInputs} + */ +public final class AutoMlTextExtractionInputs extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMLTextExtractionProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTextExtractionInputs_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMLTextExtractionProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTextExtractionInputs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextExtractionInputs + .class, + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTextExtractionInputs)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextExtractionInputs other = + (com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMlTextExtractionInputs + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition + .AutoMlTextExtractionInputs + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlTextExtractionInputs} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextExtractionInputs) + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTextExtractionInputsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMLTextExtractionProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTextExtractionInputs_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMLTextExtractionProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTextExtractionInputs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTextExtractionInputs.class, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTextExtractionInputs.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMLTextExtractionProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTextExtractionInputs_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextExtractionInputs + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextExtractionInputs + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextExtractionInputs + build() { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextExtractionInputs + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextExtractionInputs + buildPartial() { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextExtractionInputs + result = + new com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTextExtractionInputs) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTextExtractionInputs) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextExtractionInputs + other) { + if (other + == com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTextExtractionInputs + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTextExtractionInputs) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextExtractionInputs) + private static final com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTextExtractionInputs + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTextExtractionInputs(); + } + + public static com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTextExtractionInputs + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlTextExtractionInputsOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlTextExtractionInputsOrBuilder.java new file mode 100644 index 000000000..804082607 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlTextExtractionInputsOrBuilder.java @@ -0,0 +1,24 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/schema/trainingjob/definition/automl_text_extraction.proto + +package com.google.cloud.aiplatform.v1.schema.trainingjob.definition; + +public interface AutoMlTextExtractionInputsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextExtractionInputs) + com.google.protobuf.MessageOrBuilder {} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlTextExtractionOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlTextExtractionOrBuilder.java new file mode 100644 index 000000000..1e1f129f6 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlTextExtractionOrBuilder.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/v1/schema/trainingjob/definition/automl_text_extraction.proto + +package com.google.cloud.aiplatform.v1.schema.trainingjob.definition; + +public interface AutoMlTextExtractionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextExtraction) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextExtractionInputs inputs = 1; + * + * + * @return Whether the inputs field is set. + */ + boolean hasInputs(); + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextExtractionInputs inputs = 1; + * + * + * @return The inputs. + */ + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextExtractionInputs + getInputs(); + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextExtractionInputs inputs = 1; + * + */ + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextExtractionInputsOrBuilder + getInputsOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlTextSentiment.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlTextSentiment.java new file mode 100644 index 000000000..f877ff6b6 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlTextSentiment.java @@ -0,0 +1,823 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/schema/trainingjob/definition/automl_text_sentiment.proto + +package com.google.cloud.aiplatform.v1.schema.trainingjob.definition; + +/** + * + * + *
+ * A TrainingJob that trains and uploads an AutoML Text Sentiment Model.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextSentiment} + */ +public final class AutoMlTextSentiment extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTextSentimentInputs + .Builder + subBuilder = null; + if (inputs_ != null) { + subBuilder = inputs_.toBuilder(); + } + inputs_ = + input.readMessage( + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMLTextSentimentProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTextSentiment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMLTextSentimentProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTextSentiment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextSentiment.class, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextSentiment.Builder + .class); + } + + public static final int INPUTS_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextSentimentInputs + inputs_; + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTextSentimentInputs inputs = 1; + * + * + * @return The inputs. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextSentimentInputs + getInputs() { + return inputs_ == null + ? com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextSentimentInputs + .getDefaultInstance() + : inputs_; + } + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextSentimentInputs inputs = 1; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTextSentiment)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextSentiment other = + (com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTextSentiment + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlTextSentiment + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlTextSentiment} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextSentiment) + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextSentimentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMLTextSentimentProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTextSentiment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMLTextSentimentProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTextSentiment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextSentiment + .class, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextSentiment + .Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMLTextSentimentProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTextSentiment_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextSentiment + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextSentiment + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextSentiment + build() { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextSentiment result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextSentiment + buildPartial() { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextSentiment result = + new com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTextSentiment) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextSentiment) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextSentiment other) { + if (other + == com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTextSentiment + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextSentiment) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextSentimentInputs + inputs_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextSentimentInputs, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextSentimentInputs + .Builder, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTextSentimentInputsOrBuilder> + inputsBuilder_; + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTextSentimentInputs inputs = 1; + * + * + * @return The inputs. + */ + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextSentimentInputs + getInputs() { + if (inputsBuilder_ == null) { + return inputs_ == null + ? com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextSentimentInputs + .getDefaultInstance() + : inputs_; + } else { + return inputsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextSentimentInputs inputs = 1; + * + */ + public Builder setInputs( + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTextSentimentInputs inputs = 1; + * + */ + public Builder setInputs( + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTextSentimentInputs inputs = 1; + * + */ + public Builder mergeInputs( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextSentimentInputs + value) { + if (inputsBuilder_ == null) { + if (inputs_ != null) { + inputs_ = + com.google.cloud.aiplatform.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlTextSentimentInputs inputs = 1; + * + */ + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextSentimentInputs + .Builder + getInputsBuilder() { + + onChanged(); + return getInputsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextSentimentInputs inputs = 1; + * + */ + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTextSentimentInputsOrBuilder + getInputsOrBuilder() { + if (inputsBuilder_ != null) { + return inputsBuilder_.getMessageOrBuilder(); + } else { + return inputs_ == null + ? com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextSentimentInputs + .getDefaultInstance() + : inputs_; + } + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextSentimentInputs inputs = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextSentimentInputs, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextSentimentInputs + .Builder, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTextSentimentInputsOrBuilder> + getInputsFieldBuilder() { + if (inputsBuilder_ == null) { + inputsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTextSentimentInputs, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTextSentimentInputs.Builder, + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTextSentiment) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextSentiment) + private static final com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTextSentiment + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextSentiment(); + } + + public static com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTextSentiment + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlTextSentimentInputs.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlTextSentimentInputs.java new file mode 100644 index 000000000..7d439dcc4 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlTextSentimentInputs.java @@ -0,0 +1,612 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/schema/trainingjob/definition/automl_text_sentiment.proto + +package com.google.cloud.aiplatform.v1.schema.trainingjob.definition; + +/** + * Protobuf type {@code + * google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextSentimentInputs} + */ +public final class AutoMlTextSentimentInputs extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMLTextSentimentProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTextSentimentInputs_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMLTextSentimentProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTextSentimentInputs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextSentimentInputs + .class, + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTextSentimentInputs)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextSentimentInputs other = + (com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMlTextSentimentInputs + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition + .AutoMlTextSentimentInputs + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlTextSentimentInputs} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextSentimentInputs) + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTextSentimentInputsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMLTextSentimentProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTextSentimentInputs_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMLTextSentimentProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTextSentimentInputs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextSentimentInputs + .class, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextSentimentInputs + .Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMLTextSentimentProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlTextSentimentInputs_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextSentimentInputs + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextSentimentInputs + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextSentimentInputs + build() { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextSentimentInputs + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextSentimentInputs + buildPartial() { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextSentimentInputs + result = + new com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTextSentimentInputs) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextSentimentInputs) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextSentimentInputs + other) { + if (other + == com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTextSentimentInputs + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTextSentimentInputs) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextSentimentInputs) + private static final com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTextSentimentInputs + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlTextSentimentInputs(); + } + + public static com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlTextSentimentInputs + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlTextSentimentInputsOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlTextSentimentInputsOrBuilder.java new file mode 100644 index 000000000..0a9109fa4 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/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/v1/schema/trainingjob/definition/automl_text_sentiment.proto + +package com.google.cloud.aiplatform.v1.schema.trainingjob.definition; + +public interface AutoMlTextSentimentInputsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.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-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlTextSentimentOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlTextSentimentOrBuilder.java new file mode 100644 index 000000000..5832ba881 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlTextSentimentOrBuilder.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/v1/schema/trainingjob/definition/automl_text_sentiment.proto + +package com.google.cloud.aiplatform.v1.schema.trainingjob.definition; + +public interface AutoMlTextSentimentOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextSentiment) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextSentimentInputs inputs = 1; + * + * + * @return Whether the inputs field is set. + */ + boolean hasInputs(); + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextSentimentInputs inputs = 1; + * + * + * @return The inputs. + */ + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextSentimentInputs + getInputs(); + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextSentimentInputs inputs = 1; + * + */ + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlTextSentimentInputsOrBuilder + getInputsOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlVideoActionRecognition.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlVideoActionRecognition.java new file mode 100644 index 000000000..9be2a544b --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlVideoActionRecognition.java @@ -0,0 +1,865 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/schema/trainingjob/definition/automl_video_action_recognition.proto + +package com.google.cloud.aiplatform.v1.schema.trainingjob.definition; + +/** + * + * + *
+ * A TrainingJob that trains and uploads an AutoML Video Action Recognition
+ * Model.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoActionRecognition} + */ +public final class AutoMlVideoActionRecognition extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs.Builder + subBuilder = null; + if (inputs_ != null) { + subBuilder = inputs_.toBuilder(); + } + inputs_ = + input.readMessage( + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMLVideoActionRecognitionProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlVideoActionRecognition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMLVideoActionRecognitionProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlVideoActionRecognition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoActionRecognition.class, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoActionRecognition.Builder.class); + } + + public static final int INPUTS_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs + inputs_; + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlVideoActionRecognitionInputs inputs = 1; + * + * + * @return The inputs. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs + getInputs() { + return inputs_ == null + ? com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs.getDefaultInstance() + : inputs_; + } + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoActionRecognitionInputs inputs = 1; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMlVideoActionRecognition)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoActionRecognition + other = + (com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMlVideoActionRecognition + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition + .AutoMlVideoActionRecognition + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlVideoActionRecognition} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoActionRecognition) + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMLVideoActionRecognitionProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlVideoActionRecognition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMLVideoActionRecognitionProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlVideoActionRecognition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoActionRecognition.class, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoActionRecognition.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMLVideoActionRecognitionProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlVideoActionRecognition_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoActionRecognition + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoActionRecognition.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoActionRecognition + build() { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoActionRecognition + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoActionRecognition + buildPartial() { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoActionRecognition + result = + new com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMlVideoActionRecognition) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoActionRecognition) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoActionRecognition + other) { + if (other + == com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlVideoActionRecognition + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoActionRecognition) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs + inputs_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs.Builder, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputsOrBuilder> + inputsBuilder_; + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlVideoActionRecognitionInputs inputs = 1; + * + * + * @return The inputs. + */ + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs + getInputs() { + if (inputsBuilder_ == null) { + return inputs_ == null + ? com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs.getDefaultInstance() + : inputs_; + } else { + return inputsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoActionRecognitionInputs inputs = 1; + * + */ + public Builder setInputs( + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlVideoActionRecognitionInputs inputs = 1; + * + */ + public Builder setInputs( + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlVideoActionRecognitionInputs inputs = 1; + * + */ + public Builder mergeInputs( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs + value) { + if (inputsBuilder_ == null) { + if (inputs_ != null) { + inputs_ = + com.google.cloud.aiplatform.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlVideoActionRecognitionInputs inputs = 1; + * + */ + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs.Builder + getInputsBuilder() { + + onChanged(); + return getInputsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoActionRecognitionInputs inputs = 1; + * + */ + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputsOrBuilder + getInputsOrBuilder() { + if (inputsBuilder_ != null) { + return inputsBuilder_.getMessageOrBuilder(); + } else { + return inputs_ == null + ? com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs.getDefaultInstance() + : inputs_; + } + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoActionRecognitionInputs inputs = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs.Builder, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputsOrBuilder> + getInputsFieldBuilder() { + if (inputsBuilder_ == null) { + inputsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs.Builder, + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlVideoActionRecognition) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoActionRecognition) + private static final com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoActionRecognition + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoActionRecognition(); + } + + public static com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlVideoActionRecognition + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlVideoActionRecognitionInputs.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlVideoActionRecognitionInputs.java new file mode 100644 index 000000000..6e61c71c6 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlVideoActionRecognitionInputs.java @@ -0,0 +1,829 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/schema/trainingjob/definition/automl_video_action_recognition.proto + +package com.google.cloud.aiplatform.v1.schema.trainingjob.definition; + +/** + * Protobuf type {@code + * google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoActionRecognitionInputs} + */ +public final class AutoMlVideoActionRecognitionInputs extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMLVideoActionRecognitionProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlVideoActionRecognitionInputs_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMLVideoActionRecognitionProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlVideoActionRecognitionInputs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs.class, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs.Builder.class); + } + + /** + * Protobuf enum {@code + * google.cloud.aiplatform.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlVideoActionRecognitionInputs.ModelType) + } + + public static final int MODEL_TYPE_FIELD_NUMBER = 1; + private int modelType_; + /** + * + * .google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlVideoActionRecognitionInputs.ModelType model_type = 1; + * + * + * @return The modelType. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs.ModelType + getModelType() { + @SuppressWarnings("deprecation") + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoActionRecognitionInputs + .ModelType + result = + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs.ModelType.valueOf(modelType_); + return result == null + ? com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoActionRecognitionInputs + other = + (com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlVideoActionRecognitionInputs} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoActionRecognitionInputs) + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMLVideoActionRecognitionProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlVideoActionRecognitionInputs_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMLVideoActionRecognitionProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlVideoActionRecognitionInputs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs.class, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMLVideoActionRecognitionProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlVideoActionRecognitionInputs_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs + build() { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs + buildPartial() { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs + result = + new com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs + other) { + if (other + == com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int modelType_ = 0; + /** + * + * .google.cloud.aiplatform.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlVideoActionRecognitionInputs.ModelType model_type = 1; + * + * + * @return The modelType. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs.ModelType + getModelType() { + @SuppressWarnings("deprecation") + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs.ModelType + result = + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs.ModelType.valueOf(modelType_); + return result == null + ? com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs.ModelType.UNRECOGNIZED + : result; + } + /** + * + * .google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs.ModelType + value) { + if (value == null) { + throw new NullPointerException(); + } + + modelType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * .google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlVideoActionRecognitionInputs) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoActionRecognitionInputs) + private static final com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs(); + } + + public static com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputs + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlVideoActionRecognitionInputsOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlVideoActionRecognitionInputsOrBuilder.java new file mode 100644 index 000000000..6b43318ca --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/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/v1/schema/trainingjob/definition/automl_video_action_recognition.proto + +package com.google.cloud.aiplatform.v1.schema.trainingjob.definition; + +public interface AutoMlVideoActionRecognitionInputsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoActionRecognitionInputs) + com.google.protobuf.MessageOrBuilder { + + /** + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoActionRecognitionInputs.ModelType model_type = 1; + * + * + * @return The enum numeric value on the wire for modelType. + */ + int getModelTypeValue(); + /** + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoActionRecognitionInputs.ModelType model_type = 1; + * + * + * @return The modelType. + */ + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoActionRecognitionInputs + .ModelType + getModelType(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlVideoActionRecognitionOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlVideoActionRecognitionOrBuilder.java new file mode 100644 index 000000000..e76f417a8 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlVideoActionRecognitionOrBuilder.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/v1/schema/trainingjob/definition/automl_video_action_recognition.proto + +package com.google.cloud.aiplatform.v1.schema.trainingjob.definition; + +public interface AutoMlVideoActionRecognitionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoActionRecognition) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoActionRecognitionInputs inputs = 1; + * + * + * @return Whether the inputs field is set. + */ + boolean hasInputs(); + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoActionRecognitionInputs inputs = 1; + * + * + * @return The inputs. + */ + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoActionRecognitionInputs + getInputs(); + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoActionRecognitionInputs inputs = 1; + * + */ + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoActionRecognitionInputsOrBuilder + getInputsOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlVideoClassification.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlVideoClassification.java new file mode 100644 index 000000000..60f6361cd --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlVideoClassification.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/v1/schema/trainingjob/definition/automl_video_classification.proto + +package com.google.cloud.aiplatform.v1.schema.trainingjob.definition; + +/** + * + * + *
+ * A TrainingJob that trains and uploads an AutoML Video Classification Model.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoClassification} + */ +public final class AutoMlVideoClassification extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs.Builder + subBuilder = null; + if (inputs_ != null) { + subBuilder = inputs_.toBuilder(); + } + inputs_ = + input.readMessage( + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMLVideoClassificationProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlVideoClassification_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMLVideoClassificationProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlVideoClassification_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoClassification + .class, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoClassification + .Builder.class); + } + + public static final int INPUTS_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs + inputs_; + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlVideoClassificationInputs inputs = 1; + * + * + * @return The inputs. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs + getInputs() { + return inputs_ == null + ? com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs.getDefaultInstance() + : inputs_; + } + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoClassificationInputs inputs = 1; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlVideoClassification)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoClassification other = + (com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMlVideoClassification + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition + .AutoMlVideoClassification + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlVideoClassification} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoClassification) + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoClassificationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMLVideoClassificationProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlVideoClassification_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMLVideoClassificationProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlVideoClassification_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoClassification + .class, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoClassification + .Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMLVideoClassificationProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlVideoClassification_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoClassification + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoClassification + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoClassification + build() { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoClassification + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoClassification + buildPartial() { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoClassification + result = + new com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlVideoClassification) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoClassification) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoClassification + other) { + if (other + == com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlVideoClassification + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoClassification) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs + inputs_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs.Builder, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoClassificationInputsOrBuilder> + inputsBuilder_; + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlVideoClassificationInputs inputs = 1; + * + * + * @return The inputs. + */ + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs + getInputs() { + if (inputsBuilder_ == null) { + return inputs_ == null + ? com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs.getDefaultInstance() + : inputs_; + } else { + return inputsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoClassificationInputs inputs = 1; + * + */ + public Builder setInputs( + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlVideoClassificationInputs inputs = 1; + * + */ + public Builder setInputs( + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlVideoClassificationInputs inputs = 1; + * + */ + public Builder mergeInputs( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoClassificationInputs + value) { + if (inputsBuilder_ == null) { + if (inputs_ != null) { + inputs_ = + com.google.cloud.aiplatform.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlVideoClassificationInputs inputs = 1; + * + */ + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs.Builder + getInputsBuilder() { + + onChanged(); + return getInputsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoClassificationInputs inputs = 1; + * + */ + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoClassificationInputsOrBuilder + getInputsOrBuilder() { + if (inputsBuilder_ != null) { + return inputsBuilder_.getMessageOrBuilder(); + } else { + return inputs_ == null + ? com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs.getDefaultInstance() + : inputs_; + } + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoClassificationInputs inputs = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs.Builder, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoClassificationInputsOrBuilder> + getInputsFieldBuilder() { + if (inputsBuilder_ == null) { + inputsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs.Builder, + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlVideoClassification) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoClassification) + private static final com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoClassification + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoClassification(); + } + + public static com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlVideoClassification + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlVideoClassificationInputs.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlVideoClassificationInputs.java new file mode 100644 index 000000000..6871abc7e --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlVideoClassificationInputs.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/v1/schema/trainingjob/definition/automl_video_classification.proto + +package com.google.cloud.aiplatform.v1.schema.trainingjob.definition; + +/** + * Protobuf type {@code + * google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoClassificationInputs} + */ +public final class AutoMlVideoClassificationInputs extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMLVideoClassificationProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlVideoClassificationInputs_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMLVideoClassificationProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlVideoClassificationInputs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs.class, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs.Builder.class); + } + + /** + * Protobuf enum {@code + * google.cloud.aiplatform.v1.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), + /** + * + * + *
+     * A model that, in addition to being available within Google Cloud, can
+     * also be exported (see ModelService.ExportModel) to a Jetson device
+     * afterwards.
+     * 
+ * + * MOBILE_JETSON_VERSATILE_1 = 3; + */ + MOBILE_JETSON_VERSATILE_1(3), + 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; + /** + * + * + *
+     * A model that, in addition to being available within Google Cloud, can
+     * also be exported (see ModelService.ExportModel) to a Jetson device
+     * afterwards.
+     * 
+ * + * MOBILE_JETSON_VERSATILE_1 = 3; + */ + public static final int MOBILE_JETSON_VERSATILE_1_VALUE = 3; + + 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_JETSON_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.v1.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.v1.schema.trainingjob.definition.AutoMlVideoClassificationInputs.ModelType) + } + + public static final int MODEL_TYPE_FIELD_NUMBER = 1; + private int modelType_; + /** + * + * .google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlVideoClassificationInputs.ModelType model_type = 1; + * + * + * @return The modelType. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs.ModelType + getModelType() { + @SuppressWarnings("deprecation") + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoClassificationInputs + .ModelType + result = + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs.ModelType.valueOf(modelType_); + return result == null + ? com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoClassificationInputs + other = + (com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlVideoClassificationInputs} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoClassificationInputs) + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoClassificationInputsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMLVideoClassificationProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlVideoClassificationInputs_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMLVideoClassificationProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlVideoClassificationInputs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs.class, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMLVideoClassificationProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlVideoClassificationInputs_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs + build() { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoClassificationInputs + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs + buildPartial() { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoClassificationInputs + result = + new com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoClassificationInputs + other) { + if (other + == com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlVideoClassificationInputs + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int modelType_ = 0; + /** + * + * .google.cloud.aiplatform.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlVideoClassificationInputs.ModelType model_type = 1; + * + * + * @return The modelType. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs.ModelType + getModelType() { + @SuppressWarnings("deprecation") + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoClassificationInputs + .ModelType + result = + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs.ModelType.valueOf(modelType_); + return result == null + ? com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs.ModelType.UNRECOGNIZED + : result; + } + /** + * + * .google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlVideoClassificationInputs + .ModelType + value) { + if (value == null) { + throw new NullPointerException(); + } + + modelType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * .google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlVideoClassificationInputs) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoClassificationInputs) + private static final com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs(); + } + + public static com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMlVideoClassificationInputs + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlVideoClassificationInputsOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlVideoClassificationInputsOrBuilder.java new file mode 100644 index 000000000..632ada18b --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/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/v1/schema/trainingjob/definition/automl_video_classification.proto + +package com.google.cloud.aiplatform.v1.schema.trainingjob.definition; + +public interface AutoMlVideoClassificationInputsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoClassificationInputs) + com.google.protobuf.MessageOrBuilder { + + /** + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoClassificationInputs.ModelType model_type = 1; + * + * + * @return The enum numeric value on the wire for modelType. + */ + int getModelTypeValue(); + /** + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoClassificationInputs.ModelType model_type = 1; + * + * + * @return The modelType. + */ + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoClassificationInputs + .ModelType + getModelType(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlVideoClassificationOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlVideoClassificationOrBuilder.java new file mode 100644 index 000000000..7d942e9b8 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/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/v1/schema/trainingjob/definition/automl_video_classification.proto + +package com.google.cloud.aiplatform.v1.schema.trainingjob.definition; + +public interface AutoMlVideoClassificationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoClassification) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoClassificationInputs inputs = 1; + * + * + * @return Whether the inputs field is set. + */ + boolean hasInputs(); + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoClassificationInputs inputs = 1; + * + * + * @return The inputs. + */ + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoClassificationInputs + getInputs(); + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoClassificationInputs inputs = 1; + * + */ + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoClassificationInputsOrBuilder + getInputsOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlVideoObjectTracking.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlVideoObjectTracking.java new file mode 100644 index 000000000..e2b1e010f --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlVideoObjectTracking.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/v1/schema/trainingjob/definition/automl_video_object_tracking.proto + +package com.google.cloud.aiplatform.v1.schema.trainingjob.definition; + +/** + * + * + *
+ * A TrainingJob that trains and uploads an AutoML Video ObjectTracking Model.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoObjectTracking} + */ +public final class AutoMlVideoObjectTracking extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs.Builder + subBuilder = null; + if (inputs_ != null) { + subBuilder = inputs_.toBuilder(); + } + inputs_ = + input.readMessage( + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMLVideoObjectTrackingProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlVideoObjectTracking_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMLVideoObjectTrackingProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlVideoObjectTracking_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoObjectTracking + .class, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoObjectTracking + .Builder.class); + } + + public static final int INPUTS_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs + inputs_; + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlVideoObjectTrackingInputs inputs = 1; + * + * + * @return The inputs. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs + getInputs() { + return inputs_ == null + ? com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs.getDefaultInstance() + : inputs_; + } + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoObjectTrackingInputs inputs = 1; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlVideoObjectTracking)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoObjectTracking other = + (com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMlVideoObjectTracking + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition + .AutoMlVideoObjectTracking + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlVideoObjectTracking} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoObjectTracking) + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMLVideoObjectTrackingProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlVideoObjectTracking_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMLVideoObjectTrackingProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlVideoObjectTracking_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoObjectTracking + .class, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoObjectTracking + .Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMLVideoObjectTrackingProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlVideoObjectTracking_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoObjectTracking + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoObjectTracking + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoObjectTracking + build() { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoObjectTracking + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoObjectTracking + buildPartial() { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoObjectTracking + result = + new com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlVideoObjectTracking) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoObjectTracking) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoObjectTracking + other) { + if (other + == com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlVideoObjectTracking + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoObjectTracking) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs + inputs_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs.Builder, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputsOrBuilder> + inputsBuilder_; + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlVideoObjectTrackingInputs inputs = 1; + * + * + * @return The inputs. + */ + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs + getInputs() { + if (inputsBuilder_ == null) { + return inputs_ == null + ? com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs.getDefaultInstance() + : inputs_; + } else { + return inputsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoObjectTrackingInputs inputs = 1; + * + */ + public Builder setInputs( + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlVideoObjectTrackingInputs inputs = 1; + * + */ + public Builder setInputs( + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlVideoObjectTrackingInputs inputs = 1; + * + */ + public Builder mergeInputs( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoObjectTrackingInputs + value) { + if (inputsBuilder_ == null) { + if (inputs_ != null) { + inputs_ = + com.google.cloud.aiplatform.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlVideoObjectTrackingInputs inputs = 1; + * + */ + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs.Builder + getInputsBuilder() { + + onChanged(); + return getInputsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoObjectTrackingInputs inputs = 1; + * + */ + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputsOrBuilder + getInputsOrBuilder() { + if (inputsBuilder_ != null) { + return inputsBuilder_.getMessageOrBuilder(); + } else { + return inputs_ == null + ? com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs.getDefaultInstance() + : inputs_; + } + } + /** + * + * + *
+     * The input parameters of this TrainingJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoObjectTrackingInputs inputs = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs.Builder, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputsOrBuilder> + getInputsFieldBuilder() { + if (inputsBuilder_ == null) { + inputsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs.Builder, + com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlVideoObjectTracking) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoObjectTracking) + private static final com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoObjectTracking + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoObjectTracking(); + } + + public static com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlVideoObjectTracking + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlVideoObjectTrackingInputs.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlVideoObjectTrackingInputs.java new file mode 100644 index 000000000..7a7f80232 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlVideoObjectTrackingInputs.java @@ -0,0 +1,920 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/schema/trainingjob/definition/automl_video_object_tracking.proto + +package com.google.cloud.aiplatform.v1.schema.trainingjob.definition; + +/** + * Protobuf type {@code + * google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoObjectTrackingInputs} + */ +public final class AutoMlVideoObjectTrackingInputs extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMLVideoObjectTrackingProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlVideoObjectTrackingInputs_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMLVideoObjectTrackingProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlVideoObjectTrackingInputs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs.class, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs.Builder.class); + } + + /** + * Protobuf enum {@code + * google.cloud.aiplatform.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlVideoObjectTrackingInputs.ModelType) + } + + public static final int MODEL_TYPE_FIELD_NUMBER = 1; + private int modelType_; + /** + * + * .google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlVideoObjectTrackingInputs.ModelType model_type = 1; + * + * + * @return The modelType. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs.ModelType + getModelType() { + @SuppressWarnings("deprecation") + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoObjectTrackingInputs + .ModelType + result = + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs.ModelType.valueOf(modelType_); + return result == null + ? com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoObjectTrackingInputs + other = + (com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlVideoObjectTrackingInputs} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoObjectTrackingInputs) + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMLVideoObjectTrackingProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlVideoObjectTrackingInputs_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMLVideoObjectTrackingProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlVideoObjectTrackingInputs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs.class, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMLVideoObjectTrackingProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_AutoMlVideoObjectTrackingInputs_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs + build() { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoObjectTrackingInputs + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs + buildPartial() { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoObjectTrackingInputs + result = + new com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoObjectTrackingInputs + other) { + if (other + == com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlVideoObjectTrackingInputs + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int modelType_ = 0; + /** + * + * .google.cloud.aiplatform.v1.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.v1.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.v1.schema.trainingjob.definition.AutoMlVideoObjectTrackingInputs.ModelType model_type = 1; + * + * + * @return The modelType. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs.ModelType + getModelType() { + @SuppressWarnings("deprecation") + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoObjectTrackingInputs + .ModelType + result = + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs.ModelType.valueOf(modelType_); + return result == null + ? com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs.ModelType.UNRECOGNIZED + : result; + } + /** + * + * .google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlVideoObjectTrackingInputs + .ModelType + value) { + if (value == null) { + throw new NullPointerException(); + } + + modelType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * .google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.AutoMlVideoObjectTrackingInputs) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoObjectTrackingInputs) + private static final com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs(); + } + + public static com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputs + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlVideoObjectTrackingInputsOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlVideoObjectTrackingInputsOrBuilder.java new file mode 100644 index 000000000..bc4d7e28c --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/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/v1/schema/trainingjob/definition/automl_video_object_tracking.proto + +package com.google.cloud.aiplatform.v1.schema.trainingjob.definition; + +public interface AutoMlVideoObjectTrackingInputsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoObjectTrackingInputs) + com.google.protobuf.MessageOrBuilder { + + /** + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoObjectTrackingInputs.ModelType model_type = 1; + * + * + * @return The enum numeric value on the wire for modelType. + */ + int getModelTypeValue(); + /** + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoObjectTrackingInputs.ModelType model_type = 1; + * + * + * @return The modelType. + */ + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoObjectTrackingInputs + .ModelType + getModelType(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlVideoObjectTrackingOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/AutoMlVideoObjectTrackingOrBuilder.java new file mode 100644 index 000000000..659824dec --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/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/v1/schema/trainingjob/definition/automl_video_object_tracking.proto + +package com.google.cloud.aiplatform.v1.schema.trainingjob.definition; + +public interface AutoMlVideoObjectTrackingOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoObjectTracking) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoObjectTrackingInputs inputs = 1; + * + * + * @return Whether the inputs field is set. + */ + boolean hasInputs(); + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoObjectTrackingInputs inputs = 1; + * + * + * @return The inputs. + */ + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoObjectTrackingInputs + getInputs(); + /** + * + * + *
+   * The input parameters of this TrainingJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.schema.trainingjob.definition.AutoMlVideoObjectTrackingInputs inputs = 1; + * + */ + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .AutoMlVideoObjectTrackingInputsOrBuilder + getInputsOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/ExportEvaluatedDataItemsConfig.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/ExportEvaluatedDataItemsConfig.java new file mode 100644 index 000000000..93478f822 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/ExportEvaluatedDataItemsConfig.java @@ -0,0 +1,832 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1/schema/trainingjob/definition/export_evaluated_data_items_config.proto + +package com.google.cloud.aiplatform.v1.schema.trainingjob.definition; + +/** + * + * + *
+ * Configuration for exporting test set predictions to a BigQuery table.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1.schema.trainingjob.definition.ExportEvaluatedDataItemsConfig} + */ +public final class ExportEvaluatedDataItemsConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfigProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_ExportEvaluatedDataItemsConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfigProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_ExportEvaluatedDataItemsConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig.class, + com.google.cloud.aiplatform.v1.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. Expected format:
+   * bq://<project_id>:<dataset_id>:<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. Expected format:
+   * bq://<project_id>:<dataset_id>:<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 are overwritten. Otherwise, if the export destination already
+   * exists, then the export operation fails.
+   * 
+ * + * 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.v1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.ExportEvaluatedDataItemsConfig + other = + (com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.schema.trainingjob.definition.ExportEvaluatedDataItemsConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.schema.trainingjob.definition.ExportEvaluatedDataItemsConfig) + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfigProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_ExportEvaluatedDataItemsConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfigProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_ExportEvaluatedDataItemsConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig.class, + com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfigProto + .internal_static_google_cloud_aiplatform_v1_schema_trainingjob_definition_ExportEvaluatedDataItemsConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig + build() { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.ExportEvaluatedDataItemsConfig + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig + buildPartial() { + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.ExportEvaluatedDataItemsConfig + result = + new com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.schema.trainingjob.definition.ExportEvaluatedDataItemsConfig + other) { + if (other + == com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.ExportEvaluatedDataItemsConfig + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.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. Expected format:
+     * bq://<project_id>:<dataset_id>:<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. Expected format:
+     * bq://<project_id>:<dataset_id>:<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. Expected format:
+     * bq://<project_id>:<dataset_id>:<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. Expected format:
+     * bq://<project_id>:<dataset_id>:<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. Expected format:
+     * bq://<project_id>:<dataset_id>:<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 are overwritten. Otherwise, if the export destination already
+     * exists, then the export operation fails.
+     * 
+ * + * 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 are overwritten. Otherwise, if the export destination already
+     * exists, then the export operation fails.
+     * 
+ * + * 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 are overwritten. Otherwise, if the export destination already
+     * exists, then the export operation fails.
+     * 
+ * + * 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.v1.schema.trainingjob.definition.ExportEvaluatedDataItemsConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.schema.trainingjob.definition.ExportEvaluatedDataItemsConfig) + private static final com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.schema.trainingjob.definition + .ExportEvaluatedDataItemsConfig(); + } + + public static com.google.cloud.aiplatform.v1.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.v1.schema.trainingjob.definition.ExportEvaluatedDataItemsConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/ExportEvaluatedDataItemsConfigOrBuilder.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/ExportEvaluatedDataItemsConfigOrBuilder.java new file mode 100644 index 000000000..2fa6ea4ca --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/ExportEvaluatedDataItemsConfigOrBuilder.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/v1/schema/trainingjob/definition/export_evaluated_data_items_config.proto + +package com.google.cloud.aiplatform.v1.schema.trainingjob.definition; + +public interface ExportEvaluatedDataItemsConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.schema.trainingjob.definition.ExportEvaluatedDataItemsConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * URI of desired destination BigQuery table. Expected format:
+   * bq://<project_id>:<dataset_id>:<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. Expected format:
+   * bq://<project_id>:<dataset_id>:<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 are overwritten. Otherwise, if the export destination already
+   * exists, then the export operation fails.
+   * 
+ * + * bool override_existing_table = 2; + * + * @return The overrideExistingTable. + */ + boolean getOverrideExistingTable(); +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/ExportEvaluatedDataItemsConfigProto.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/schema/trainingjob/definition/ExportEvaluatedDataItemsConfigProto.java new file mode 100644 index 000000000..733dbc8b0 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/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/v1/schema/trainingjob/definition/export_evaluated_data_items_config.proto + +package com.google.cloud.aiplatform.v1.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_v1_schema_trainingjob_definition_ExportEvaluatedDataItemsConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_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 = { + "\nagoogle/cloud/aiplatform/v1/schema/trai" + + "ningjob/definition/export_evaluated_data" + + "_items_config.proto\0228google.cloud.aiplat" + + "form.v1.schema.trainingjob.definition\032\034g" + + "oogle/api/annotations.proto\"c\n\036ExportEva" + + "luatedDataItemsConfig\022 \n\030destination_big" + + "query_uri\030\001 \001(\t\022\037\n\027override_existing_tab" + + "le\030\002 \001(\010B\311\001\n labels = 6 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/annotation_spec.proto b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/annotation_spec.proto new file mode 100644 index 000000000..d087278a1 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/annotation_spec.proto @@ -0,0 +1,53 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.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.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1;aiplatform"; +option java_multiple_files = true; +option java_outer_classname = "AnnotationSpecProto"; +option java_package = "com.google.cloud.aiplatform.v1"; + +// Identifies a concept with which DataItems may be annotated with. +message AnnotationSpec { + option (google.api.resource) = { + type: "aiplatform.googleapis.com/AnnotationSpec" + pattern: "projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}" + }; + + // Output only. Resource name of the AnnotationSpec. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The user-defined name of the AnnotationSpec. + // The name can be up to 128 characters long and can be consist of any UTF-8 + // characters. + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Output only. Timestamp when this AnnotationSpec was created. + google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Timestamp when AnnotationSpec was last updated. + google.protobuf.Timestamp update_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Used to perform consistent read-modify-write updates. If not set, a blind + // "overwrite" update happens. + string etag = 5 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/batch_prediction_job.proto b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/batch_prediction_job.proto new file mode 100644 index 000000000..dab242c3d --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/batch_prediction_job.proto @@ -0,0 +1,249 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.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.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/aiplatform/v1/completion_stats.proto"; +import "google/cloud/aiplatform/v1/encryption_spec.proto"; +import "google/cloud/aiplatform/v1/io.proto"; +import "google/cloud/aiplatform/v1/job_state.proto"; +import "google/cloud/aiplatform/v1/machine_resources.proto"; +import "google/cloud/aiplatform/v1/manual_batch_tuning_parameters.proto"; +import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1;aiplatform"; +option java_multiple_files = true; +option java_outer_classname = "BatchPredictionJobProto"; +option java_package = "com.google.cloud.aiplatform.v1"; + +// A job that uses a [Model][google.cloud.aiplatform.v1.BatchPredictionJob.model] to produce predictions +// on multiple [input instances][google.cloud.aiplatform.v1.BatchPredictionJob.input_config]. If +// predictions for significant portion of the instances fail, the job may finish +// without attempting predictions for all remaining instances. +message BatchPredictionJob { + option (google.api.resource) = { + type: "aiplatform.googleapis.com/BatchPredictionJob" + pattern: "projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}" + }; + + // Configures the input to [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob]. + // See [Model.supported_input_storage_formats][google.cloud.aiplatform.v1.Model.supported_input_storage_formats] for Model's supported input + // formats, and how instances should be expressed via any of them. + message InputConfig { + // Required. The source of the input. + oneof source { + // The Cloud Storage location for the input instances. + GcsSource gcs_source = 2; + + // The BigQuery location of the input table. + // The schema of the table should be in the format described by the given + // context OpenAPI Schema, if one is provided. The table may contain + // additional columns that are not described by the schema, and they will + // be ignored. + BigQuerySource bigquery_source = 3; + } + + // Required. The format in which instances are given, must be one of the + // [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model] + // [supported_input_storage_formats][google.cloud.aiplatform.v1.Model.supported_input_storage_formats]. + string instances_format = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // Configures the output of [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob]. + // See [Model.supported_output_storage_formats][google.cloud.aiplatform.v1.Model.supported_output_storage_formats] for supported output + // formats, and how predictions are expressed via any of them. + message OutputConfig { + // Required. The destination of the output. + oneof destination { + // The Cloud Storage location of the directory where the output is + // to be written to. In the given directory a new directory is created. + // Its name is `prediction--`, + // where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. + // Inside of it files `predictions_0001.`, + // `predictions_0002.`, ..., `predictions_N.` + // are created where `` depends on chosen + // [predictions_format][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.predictions_format], and N may equal 0001 and depends on the total + // number of successfully predicted instances. + // If the Model has both [instance][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri] + // and [prediction][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri] schemata + // defined then each such file contains predictions as per the + // [predictions_format][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.predictions_format]. + // If prediction for any instance failed (partially or completely), then + // an additional `errors_0001.`, `errors_0002.`,..., + // `errors_N.` files are created (N depends on total number + // of failed predictions). These files contain the failed instances, + // as per their schema, followed by an additional `error` field which as + // value has + // [`google.rpc.Status`](Status) + // containing only `code` and `message` fields. + GcsDestination gcs_destination = 2; + + // The BigQuery project location where the output is to be written to. + // In the given project a new dataset is created with name + // `prediction__` + // where is made + // BigQuery-dataset-name compatible (for example, most special characters + // become underscores), and timestamp is in + // YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601" format. In the dataset + // two tables will be created, `predictions`, and `errors`. + // If the Model has both [instance][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri] + // and [prediction][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri] schemata + // defined then the tables have columns as follows: The `predictions` + // table contains instances for which the prediction succeeded, it + // has columns as per a concatenation of the Model's instance and + // prediction schemata. The `errors` table contains rows for which the + // prediction has failed, it has instance columns, as per the + // instance schema, followed by a single "errors" column, which as values + // has [`google.rpc.Status`](Status) + // represented as a STRUCT, and containing only `code` and `message`. + BigQueryDestination bigquery_destination = 3; + } + + // Required. The format in which AI Platform gives the predictions, must be one of the + // [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model] + // + // [supported_output_storage_formats][google.cloud.aiplatform.v1.Model.supported_output_storage_formats]. + string predictions_format = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // Further describes this job's output. + // Supplements [output_config][google.cloud.aiplatform.v1.BatchPredictionJob.output_config]. + message OutputInfo { + // The output location into which prediction output is written. + oneof output_location { + // Output only. The full path of the Cloud Storage directory created, into which + // the prediction output is written. + string gcs_output_directory = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The path of the BigQuery dataset created, in + // `bq://projectId.bqDatasetId` + // format, into which the prediction output is written. + string bigquery_output_dataset = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + } + + // Output only. Resource name of the BatchPredictionJob. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The user-defined name of this BatchPredictionJob. + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The name of the Model that produces the predictions via this job, + // must share the same ancestor Location. + // Starting this job has no impact on any existing deployments of the Model + // and their resources. + string model = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/Model" + } + ]; + + // Required. Input configuration of the instances on which predictions are performed. + // The schema of any single instance may be specified via + // the [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model] + // [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata] + // [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]. + InputConfig input_config = 4 [(google.api.field_behavior) = REQUIRED]; + + // The parameters that govern the predictions. The schema of the parameters + // may be specified via the [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model] + // [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata] + // [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri]. + google.protobuf.Value model_parameters = 5; + + // Required. The Configuration specifying where output predictions should + // be written. + // The schema of any single prediction may be specified as a concatenation + // of [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model] + // [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata] + // [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri] + // and + // [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri]. + OutputConfig output_config = 6 [(google.api.field_behavior) = REQUIRED]; + + // The config of resources used by the Model during the batch prediction. If + // the Model [supports][google.cloud.aiplatform.v1.Model.supported_deployment_resources_types] + // DEDICATED_RESOURCES this config may be provided (and the job will use these + // resources), if the Model doesn't support AUTOMATIC_RESOURCES, this config + // must be provided. + BatchDedicatedResources dedicated_resources = 7; + + // Immutable. Parameters configuring the batch behavior. Currently only applicable when + // [dedicated_resources][google.cloud.aiplatform.v1.BatchPredictionJob.dedicated_resources] are used (in other cases AI Platform does + // the tuning itself). + ManualBatchTuningParameters manual_batch_tuning_parameters = 8 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. Information further describing the output of this job. + OutputInfo output_info = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The detailed state of the job. + JobState state = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Only populated when the job's state is JOB_STATE_FAILED or + // JOB_STATE_CANCELLED. + google.rpc.Status error = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Partial failures encountered. + // For example, single files that can't be read. + // This field never exceeds 20 entries. + // Status details fields contain standard GCP error details. + repeated google.rpc.Status partial_failures = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Information about resources that had been consumed by this job. + // Provided in real time at best effort basis, as well as a final value + // once the job completes. + // + // Note: This field currently may be not populated for batch predictions that + // use AutoML Models. + ResourcesConsumed resources_consumed = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Statistics on completed and failed prediction instances. + CompletionStats completion_stats = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when the BatchPredictionJob was created. + google.protobuf.Timestamp create_time = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when the BatchPredictionJob for the first time entered the + // `JOB_STATE_RUNNING` state. + google.protobuf.Timestamp start_time = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when the BatchPredictionJob entered any of the following states: + // `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`. + google.protobuf.Timestamp end_time = 17 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when the BatchPredictionJob was most recently updated. + google.protobuf.Timestamp update_time = 18 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The labels with user-defined metadata to organize BatchPredictionJobs. + // + // Label keys and values can be no longer than 64 characters + // (Unicode codepoints), can only contain lowercase letters, numeric + // characters, underscores and dashes. International characters are allowed. + // + // See https://goo.gl/xmQnxf for more information and examples of labels. + map labels = 19; + + // Customer-managed encryption key options for a BatchPredictionJob. If this + // is set, then all resources created by the BatchPredictionJob will be + // encrypted with the provided encryption key. + EncryptionSpec encryption_spec = 24; +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/completion_stats.proto b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/completion_stats.proto new file mode 100644 index 000000000..2e37bcc47 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/completion_stats.proto @@ -0,0 +1,43 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.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.v1; + +import "google/api/field_behavior.proto"; +import "google/rpc/status.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1;aiplatform"; +option java_multiple_files = true; +option java_outer_classname = "CompletionStatsProto"; +option java_package = "com.google.cloud.aiplatform.v1"; + +// Success and error statistics of processing multiple entities +// (for example, DataItems or structured data rows) in batch. +message CompletionStats { + // Output only. The number of entities that had been processed successfully. + int64 successful_count = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The number of entities for which any error was encountered. + int64 failed_count = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. In cases when enough errors are encountered a job, pipeline, or operation + // may be failed as a whole. Below is the number of entities for which the + // processing had not been finished (either in successful or failed state). + // Set to -1 if the number is unknown (for example, the operation failed + // before the total entity number could be collected). + int64 incomplete_count = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/custom_job.proto b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/custom_job.proto new file mode 100644 index 000000000..eb9125ad7 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/custom_job.proto @@ -0,0 +1,216 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.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.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/aiplatform/v1/encryption_spec.proto"; +import "google/cloud/aiplatform/v1/env_var.proto"; +import "google/cloud/aiplatform/v1/io.proto"; +import "google/cloud/aiplatform/v1/job_state.proto"; +import "google/cloud/aiplatform/v1/machine_resources.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1;aiplatform"; +option java_multiple_files = true; +option java_outer_classname = "CustomJobProto"; +option java_package = "com.google.cloud.aiplatform.v1"; + +// Represents a job that runs custom workloads such as a Docker container or a +// Python package. A CustomJob can have multiple worker pools and each worker +// pool can have its own machine and input spec. A CustomJob will be cleaned up +// once the job enters terminal state (failed or succeeded). +message CustomJob { + option (google.api.resource) = { + type: "aiplatform.googleapis.com/CustomJob" + pattern: "projects/{project}/locations/{location}/customJobs/{custom_job}" + }; + + // Output only. Resource name of a CustomJob. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The display name of the CustomJob. + // The name can be up to 128 characters long and can be consist of any UTF-8 + // characters. + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Job spec. + CustomJobSpec job_spec = 4 [(google.api.field_behavior) = REQUIRED]; + + // Output only. The detailed state of the job. + JobState state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when the CustomJob was created. + google.protobuf.Timestamp create_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when the CustomJob for the first time entered the + // `JOB_STATE_RUNNING` state. + google.protobuf.Timestamp start_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when the CustomJob entered any of the following states: + // `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`. + google.protobuf.Timestamp end_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when the CustomJob was most recently updated. + google.protobuf.Timestamp update_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Only populated when job's state is `JOB_STATE_FAILED` or + // `JOB_STATE_CANCELLED`. + google.rpc.Status error = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The labels with user-defined metadata to organize CustomJobs. + // + // Label keys and values can be no longer than 64 characters + // (Unicode codepoints), can only contain lowercase letters, numeric + // characters, underscores and dashes. International characters are allowed. + // + // See https://goo.gl/xmQnxf for more information and examples of labels. + map labels = 11; + + // Customer-managed encryption key options for a CustomJob. If this is set, + // then all resources created by the CustomJob will be encrypted with the + // provided encryption key. + EncryptionSpec encryption_spec = 12; +} + +// Represents the spec of a CustomJob. +message CustomJobSpec { + // Required. The spec of the worker pools including machine type and Docker image. + repeated WorkerPoolSpec worker_pool_specs = 1 [(google.api.field_behavior) = REQUIRED]; + + // Scheduling options for a CustomJob. + Scheduling scheduling = 3; + + // Specifies the service account for workload run-as account. + // Users submitting jobs must have act-as permission on this run-as account. + // If unspecified, the AI Platform Custom Code Service Agent for the + // CustomJob's project is used. + string service_account = 4; + + // The full name of the Compute Engine + // [network](/compute/docs/networks-and-firewalls#networks) to which the Job + // should be peered. For example, `projects/12345/global/networks/myVPC`. + // [Format](/compute/docs/reference/rest/v1/networks/insert) + // is of the form `projects/{project}/global/networks/{network}`. + // Where {project} is a project number, as in `12345`, and {network} is a + // network name. + // + // Private services access must already be configured for the network. If left + // unspecified, the job is not peered with any network. + string network = 5; + + // The Cloud Storage location to store the output of this CustomJob or + // HyperparameterTuningJob. For HyperparameterTuningJob, + // the baseOutputDirectory of + // each child CustomJob backing a Trial is set to a subdirectory of name + // [id][google.cloud.aiplatform.v1.Trial.id] under its parent HyperparameterTuningJob's + // baseOutputDirectory. + // + // The following AI Platform environment variables will be passed to + // containers or python modules when this field is set: + // + // For CustomJob: + // + // * AIP_MODEL_DIR = `/model/` + // * AIP_CHECKPOINT_DIR = `/checkpoints/` + // * AIP_TENSORBOARD_LOG_DIR = `/logs/` + // + // For CustomJob backing a Trial of HyperparameterTuningJob: + // + // * AIP_MODEL_DIR = `//model/` + // * AIP_CHECKPOINT_DIR = `//checkpoints/` + // * AIP_TENSORBOARD_LOG_DIR = `//logs/` + GcsDestination base_output_directory = 6; +} + +// Represents the spec of a worker pool in a job. +message WorkerPoolSpec { + // The custom task to be executed in this worker pool. + oneof task { + // The custom container task. + ContainerSpec container_spec = 6; + + // The Python packaged task. + PythonPackageSpec python_package_spec = 7; + } + + // Optional. Immutable. The specification of a single machine. + MachineSpec machine_spec = 1 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Optional. The number of worker replicas to use for this worker pool. + int64 replica_count = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Disk spec. + DiskSpec disk_spec = 5; +} + +// The spec of a Container. +message ContainerSpec { + // Required. The URI of a container image in the Container Registry that is to be run on + // each worker replica. + string image_uri = 1 [(google.api.field_behavior) = REQUIRED]; + + // The command to be invoked when the container is started. + // It overrides the entrypoint instruction in Dockerfile when provided. + repeated string command = 2; + + // The arguments to be passed when starting the container. + repeated string args = 3; + + // Environment variables to be passed to the container. + repeated EnvVar env = 4; +} + +// The spec of a Python packaged code. +message PythonPackageSpec { + // Required. The URI of a container image in the Container Registry that will run the + // provided python package. AI Platform provides wide range of executor images + // with pre-installed packages to meet users' various use cases. Only one of + // the provided images can be set here. + string executor_image_uri = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The Google Cloud Storage location of the Python package files which are + // the training program and its dependent packages. + // The maximum number of package URIs is 100. + repeated string package_uris = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The Python module name to run after installing the packages. + string python_module = 3 [(google.api.field_behavior) = REQUIRED]; + + // Command line arguments to be passed to the Python task. + repeated string args = 4; + + // Environment variables to be passed to the python module. + repeated EnvVar env = 5; +} + +// All parameters related to queuing and scheduling of custom jobs. +message Scheduling { + // The maximum job running time. The default is 7 days. + google.protobuf.Duration timeout = 1; + + // Restarts the entire CustomJob if a worker gets restarted. + // This feature can be used by distributed training jobs that are not + // resilient to workers leaving and joining a job. + bool restart_job_on_worker_restart = 3; +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/data_item.proto b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/data_item.proto new file mode 100644 index 000000000..fdc2e5bdc --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/data_item.proto @@ -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 +// +// 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.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1;aiplatform"; +option java_multiple_files = true; +option java_outer_classname = "DataItemProto"; +option java_package = "com.google.cloud.aiplatform.v1"; + +// A piece of data in a Dataset. Could be an image, a video, a document or plain +// text. +message DataItem { + option (google.api.resource) = { + type: "aiplatform.googleapis.com/DataItem" + pattern: "projects/{project}/locations/{location}/datasets/{dataset}/dataItems/{data_item}" + }; + + // Output only. The resource name of the DataItem. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Timestamp when this DataItem was created. + google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Timestamp when this DataItem was last updated. + google.protobuf.Timestamp update_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The labels with user-defined metadata to organize your DataItems. + // + // Label keys and values can be no longer than 64 characters + // (Unicode codepoints), can only contain lowercase letters, numeric + // characters, underscores and dashes. International characters are allowed. + // No more than 64 user labels can be associated with one DataItem(System + // labels are excluded). + // + // See https://goo.gl/xmQnxf for more information and examples of labels. + // System reserved label keys are prefixed with "aiplatform.googleapis.com/" + // and are immutable. + map labels = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The data that the DataItem represents (for example, an image or a text + // snippet). The schema of the payload is stored in the parent Dataset's + // [metadata schema's][google.cloud.aiplatform.v1.Dataset.metadata_schema_uri] dataItemSchemaUri field. + google.protobuf.Value payload = 4 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Used to perform consistent read-modify-write updates. If not set, a blind + // "overwrite" update happens. + string etag = 7 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/data_labeling_job.proto b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/data_labeling_job.proto new file mode 100644 index 000000000..c6af38262 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/data_labeling_job.proto @@ -0,0 +1,207 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.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.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/aiplatform/v1/accelerator_type.proto"; +import "google/cloud/aiplatform/v1/encryption_spec.proto"; +import "google/cloud/aiplatform/v1/job_state.proto"; +import "google/cloud/aiplatform/v1/specialist_pool.proto"; +import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; +import "google/type/money.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1;aiplatform"; +option java_multiple_files = true; +option java_outer_classname = "DataLabelingJobProto"; +option java_package = "com.google.cloud.aiplatform.v1"; + +// DataLabelingJob is used to trigger a human labeling job on unlabeled data +// from the following Dataset: +message DataLabelingJob { + option (google.api.resource) = { + type: "aiplatform.googleapis.com/DataLabelingJob" + pattern: "projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}" + }; + + // Output only. Resource name of the DataLabelingJob. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The user-defined name of the DataLabelingJob. + // The name can be up to 128 characters long and can be consist of any UTF-8 + // characters. + // Display name of a DataLabelingJob. + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Dataset resource names. Right now we only support labeling from a single + // Dataset. + // Format: + // `projects/{project}/locations/{location}/datasets/{dataset}` + repeated string datasets = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/Dataset" + } + ]; + + // Labels to assign to annotations generated by this DataLabelingJob. + // + // Label keys and values can be no longer than 64 characters + // (Unicode codepoints), can only contain lowercase letters, numeric + // characters, underscores and dashes. International characters are allowed. + // See https://goo.gl/xmQnxf for more information and examples of labels. + // System reserved label keys are prefixed with "aiplatform.googleapis.com/" + // and are immutable. + map annotation_labels = 12; + + // Required. Number of labelers to work on each DataItem. + int32 labeler_count = 4 [(google.api.field_behavior) = REQUIRED]; + + // Required. The Google Cloud Storage location of the instruction pdf. This pdf is + // shared with labelers, and provides detailed description on how to label + // DataItems in Datasets. + string instruction_uri = 5 [(google.api.field_behavior) = REQUIRED]; + + // Required. Points to a YAML file stored on Google Cloud Storage describing the + // config for a specific type of DataLabelingJob. + // The schema files that can be used here are found in the + // https://storage.googleapis.com/google-cloud-aiplatform bucket in the + // /schema/datalabelingjob/inputs/ folder. + string inputs_schema_uri = 6 [(google.api.field_behavior) = REQUIRED]; + + // Required. Input config parameters for the DataLabelingJob. + google.protobuf.Value inputs = 7 [(google.api.field_behavior) = REQUIRED]; + + // Output only. The detailed state of the job. + JobState state = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Current labeling job progress percentage scaled in interval [0, 100], + // indicating the percentage of DataItems that has been finished. + int32 labeling_progress = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Estimated cost(in US dollars) that the DataLabelingJob has incurred to + // date. + google.type.Money current_spend = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Timestamp when this DataLabelingJob was created. + google.protobuf.Timestamp create_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Timestamp when this DataLabelingJob was updated most recently. + google.protobuf.Timestamp update_time = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. DataLabelingJob errors. It is only populated when job's state is + // `JOB_STATE_FAILED` or `JOB_STATE_CANCELLED`. + google.rpc.Status error = 22 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The labels with user-defined metadata to organize your DataLabelingJobs. + // + // Label keys and values can be no longer than 64 characters + // (Unicode codepoints), can only contain lowercase letters, numeric + // characters, underscores and dashes. International characters are allowed. + // + // See https://goo.gl/xmQnxf for more information and examples of labels. + // System reserved label keys are prefixed with "aiplatform.googleapis.com/" + // and are immutable. Following system labels exist for each DataLabelingJob: + // + // * "aiplatform.googleapis.com/schema": output only, its value is the + // [inputs_schema][google.cloud.aiplatform.v1.DataLabelingJob.inputs_schema_uri]'s title. + map labels = 11; + + // The SpecialistPools' resource names associated with this job. + repeated string specialist_pools = 16; + + // Customer-managed encryption key spec for a DataLabelingJob. If set, this + // DataLabelingJob will be secured by this key. + // + // Note: Annotations created in the DataLabelingJob are associated with + // the EncryptionSpec of the Dataset they are exported to. + EncryptionSpec encryption_spec = 20; + + // Parameters that configure the active learning pipeline. Active learning will + // label the data incrementally via several iterations. For every iteration, + // it will select a batch of data based on the sampling strategy. + ActiveLearningConfig active_learning_config = 21; +} + +// Parameters that configure the active learning pipeline. Active learning will +// label the data incrementally by several iterations. For every iteration, it +// will select a batch of data based on the sampling strategy. +message ActiveLearningConfig { + // Required. Max human labeling DataItems. The rest part will be labeled by + // machine. + oneof human_labeling_budget { + // Max number of human labeled DataItems. + int64 max_data_item_count = 1; + + // Max percent of total DataItems for human labeling. + int32 max_data_item_percentage = 2; + } + + // Active learning data sampling config. For every active learning labeling + // iteration, it will select a batch of data based on the sampling strategy. + SampleConfig sample_config = 3; + + // CMLE training config. For every active learning labeling iteration, system + // will train a machine learning model on CMLE. The trained model will be used + // by data sampling algorithm to select DataItems. + TrainingConfig training_config = 4; +} + +// Active learning data sampling config. For every active learning labeling +// iteration, it will select a batch of data based on the sampling strategy. +message SampleConfig { + // Sample strategy decides which subset of DataItems should be selected for + // human labeling in every batch. + enum SampleStrategy { + // Default will be treated as UNCERTAINTY. + SAMPLE_STRATEGY_UNSPECIFIED = 0; + + // Sample the most uncertain data to label. + UNCERTAINTY = 1; + } + + // Decides sample size for the initial batch. initial_batch_sample_percentage + // is used by default. + oneof initial_batch_sample_size { + // The percentage of data needed to be labeled in the first batch. + int32 initial_batch_sample_percentage = 1; + } + + // Decides sample size for the following batches. + // following_batch_sample_percentage is used by default. + oneof following_batch_sample_size { + // The percentage of data needed to be labeled in each following batch + // (except the first batch). + int32 following_batch_sample_percentage = 3; + } + + // Field to choose sampling strategy. Sampling strategy will decide which data + // should be selected for human labeling in every batch. + SampleStrategy sample_strategy = 5; +} + +// CMLE training config. For every active learning labeling iteration, system +// will train a machine learning model on CMLE. The trained model will be used +// by data sampling algorithm to select DataItems. +message TrainingConfig { + // The timeout hours for the CMLE training job, expressed in milli hours + // i.e. 1,000 value in this field means 1 hour. + int64 timeout_training_milli_hours = 1; +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/dataset.proto b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/dataset.proto new file mode 100644 index 000000000..7aabab486 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/dataset.proto @@ -0,0 +1,138 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.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.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/aiplatform/v1/encryption_spec.proto"; +import "google/cloud/aiplatform/v1/io.proto"; +import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1;aiplatform"; +option java_multiple_files = true; +option java_outer_classname = "DatasetProto"; +option java_package = "com.google.cloud.aiplatform.v1"; + +// A collection of DataItems and Annotations on them. +message Dataset { + option (google.api.resource) = { + type: "aiplatform.googleapis.com/Dataset" + pattern: "projects/{project}/locations/{location}/datasets/{dataset}" + }; + + // Output only. The resource name of the Dataset. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The user-defined name of the Dataset. + // The name can be up to 128 characters long and can be consist of any UTF-8 + // characters. + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Points to a YAML file stored on Google Cloud Storage describing additional + // information about the Dataset. + // The schema is defined as an OpenAPI 3.0.2 Schema Object. + // The schema files that can be used here are found in + // gs://google-cloud-aiplatform/schema/dataset/metadata/. + string metadata_schema_uri = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. Additional information about the Dataset. + google.protobuf.Value metadata = 8 [(google.api.field_behavior) = REQUIRED]; + + // Output only. Timestamp when this Dataset was created. + google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Timestamp when this Dataset was last updated. + google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Used to perform consistent read-modify-write updates. If not set, a blind + // "overwrite" update happens. + string etag = 6; + + // The labels with user-defined metadata to organize your Datasets. + // + // Label keys and values can be no longer than 64 characters + // (Unicode codepoints), can only contain lowercase letters, numeric + // characters, underscores and dashes. International characters are allowed. + // No more than 64 user labels can be associated with one Dataset (System + // labels are excluded). + // + // See https://goo.gl/xmQnxf for more information and examples of labels. + // System reserved label keys are prefixed with "aiplatform.googleapis.com/" + // and are immutable. Following system labels exist for each Dataset: + // + // * "aiplatform.googleapis.com/dataset_metadata_schema": output only, its + // value is the [metadata_schema's][google.cloud.aiplatform.v1.Dataset.metadata_schema_uri] title. + map labels = 7; + + // Customer-managed encryption key spec for a Dataset. If set, this Dataset + // and all sub-resources of this Dataset will be secured by this key. + EncryptionSpec encryption_spec = 11; +} + +// Describes the location from where we import data into a Dataset, together +// with the labels that will be applied to the DataItems and the Annotations. +message ImportDataConfig { + // The source of the input. + oneof source { + // The Google Cloud Storage location for the input content. + GcsSource gcs_source = 1; + } + + // Labels that will be applied to newly imported DataItems. If an identical + // DataItem as one being imported already exists in the Dataset, then these + // labels will be appended to these of the already existing one, and if labels + // with identical key is imported before, the old label value will be + // overwritten. If two DataItems are identical in the same import data + // operation, the labels will be combined and if key collision happens in this + // case, one of the values will be picked randomly. Two DataItems are + // considered identical if their content bytes are identical (e.g. image bytes + // or pdf bytes). + // These labels will be overridden by Annotation labels specified inside index + // file referenced by [import_schema_uri][google.cloud.aiplatform.v1.ImportDataConfig.import_schema_uri], e.g. jsonl file. + map data_item_labels = 2; + + // Required. Points to a YAML file stored on Google Cloud Storage describing the import + // format. Validation will be done against the schema. The schema is defined + // as an [OpenAPI 3.0.2 Schema Object](https://tinyurl.com/y538mdwt). + string import_schema_uri = 4 [(google.api.field_behavior) = REQUIRED]; +} + +// Describes what part of the Dataset is to be exported, the destination of +// the export and how to export. +message ExportDataConfig { + // The destination of the output. + oneof destination { + // The Google Cloud Storage location where the output is to be written to. + // In the given directory a new directory will be created with name: + // `export-data--` where + // timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All export + // output will be written into that directory. Inside that directory, + // annotations with the same schema will be grouped into sub directories + // which are named with the corresponding annotations' schema title. Inside + // these sub directories, a schema.yaml will be created to describe the + // output format. + GcsDestination gcs_destination = 1; + } + + // A filter on Annotations of the Dataset. Only Annotations on to-be-exported + // DataItems(specified by [data_items_filter][]) that match this filter will + // be exported. The filter syntax is the same as in + // [ListAnnotations][google.cloud.aiplatform.v1.DatasetService.ListAnnotations]. + string annotations_filter = 2; +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/dataset_service.proto b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/dataset_service.proto new file mode 100644 index 000000000..8c6ea31fe --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/dataset_service.proto @@ -0,0 +1,411 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.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.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/aiplatform/v1/annotation.proto"; +import "google/cloud/aiplatform/v1/annotation_spec.proto"; +import "google/cloud/aiplatform/v1/data_item.proto"; +import "google/cloud/aiplatform/v1/dataset.proto"; +import "google/cloud/aiplatform/v1/operation.proto"; +import "google/cloud/aiplatform/v1/training_pipeline.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/field_mask.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1;aiplatform"; +option java_multiple_files = true; +option java_outer_classname = "DatasetServiceProto"; +option java_package = "com.google.cloud.aiplatform.v1"; + +service DatasetService { + option (google.api.default_host) = "aiplatform.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Creates a Dataset. + rpc CreateDataset(CreateDatasetRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/datasets" + body: "dataset" + }; + option (google.api.method_signature) = "parent,dataset"; + option (google.longrunning.operation_info) = { + response_type: "Dataset" + metadata_type: "CreateDatasetOperationMetadata" + }; + } + + // Gets a Dataset. + rpc GetDataset(GetDatasetRequest) returns (Dataset) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/datasets/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates a Dataset. + rpc UpdateDataset(UpdateDatasetRequest) returns (Dataset) { + option (google.api.http) = { + patch: "/v1/{dataset.name=projects/*/locations/*/datasets/*}" + body: "dataset" + }; + option (google.api.method_signature) = "dataset,update_mask"; + } + + // Lists Datasets in a Location. + rpc ListDatasets(ListDatasetsRequest) returns (ListDatasetsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/datasets" + }; + option (google.api.method_signature) = "parent"; + } + + // Deletes a Dataset. + rpc DeleteDataset(DeleteDatasetRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/datasets/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "DeleteOperationMetadata" + }; + } + + // Imports data into a Dataset. + rpc ImportData(ImportDataRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/datasets/*}:import" + body: "*" + }; + option (google.api.method_signature) = "name,import_configs"; + option (google.longrunning.operation_info) = { + response_type: "ImportDataResponse" + metadata_type: "ImportDataOperationMetadata" + }; + } + + // Exports data from a Dataset. + rpc ExportData(ExportDataRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/datasets/*}:export" + body: "*" + }; + option (google.api.method_signature) = "name,export_config"; + option (google.longrunning.operation_info) = { + response_type: "ExportDataResponse" + metadata_type: "ExportDataOperationMetadata" + }; + } + + // Lists DataItems in a Dataset. + rpc ListDataItems(ListDataItemsRequest) returns (ListDataItemsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/datasets/*}/dataItems" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets an AnnotationSpec. + rpc GetAnnotationSpec(GetAnnotationSpecRequest) returns (AnnotationSpec) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/datasets/*/annotationSpecs/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists Annotations belongs to a dataitem + rpc ListAnnotations(ListAnnotationsRequest) returns (ListAnnotationsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/datasets/*/dataItems/*}/annotations" + }; + option (google.api.method_signature) = "parent"; + } +} + +// Request message for [DatasetService.CreateDataset][google.cloud.aiplatform.v1.DatasetService.CreateDataset]. +message CreateDatasetRequest { + // Required. The resource name of the Location to create the Dataset in. + // Format: `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. The Dataset to create. + Dataset dataset = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Runtime operation information for [DatasetService.CreateDataset][google.cloud.aiplatform.v1.DatasetService.CreateDataset]. +message CreateDatasetOperationMetadata { + // The operation generic information. + GenericOperationMetadata generic_metadata = 1; +} + +// Request message for [DatasetService.GetDataset][google.cloud.aiplatform.v1.DatasetService.GetDataset]. +message GetDatasetRequest { + // Required. The name of the Dataset resource. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/Dataset" + } + ]; + + // Mask specifying which fields to read. + google.protobuf.FieldMask read_mask = 2; +} + +// Request message for [DatasetService.UpdateDataset][google.cloud.aiplatform.v1.DatasetService.UpdateDataset]. +message UpdateDatasetRequest { + // Required. The Dataset which replaces the resource on the server. + Dataset dataset = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The update mask applies to the resource. + // For the `FieldMask` definition, see + // [FieldMask](https://tinyurl.com/protobufs/google.protobuf#fieldmask). + // Updatable fields: + // + // * `display_name` + // * `description` + // * `labels` + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for [DatasetService.ListDatasets][google.cloud.aiplatform.v1.DatasetService.ListDatasets]. +message ListDatasetsRequest { + // Required. The name of the Dataset's parent resource. + // Format: `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // An expression for filtering the results of the request. For field names + // both snake_case and camelCase are supported. + // + // * `display_name`: supports = and != + // * `metadata_schema_uri`: supports = and != + // * `labels` supports general map functions that is: + // * `labels.key=value` - key:value equality + // * `labels.key:* or labels:key - key existence + // * A key including a space must be quoted. `labels."a key"`. + // + // Some examples: + // * `displayName="myDisplayName"` + // * `labels.myKey="myValue"` + string filter = 2; + + // The standard list page size. + int32 page_size = 3; + + // The standard list page token. + string page_token = 4; + + // Mask specifying which fields to read. + google.protobuf.FieldMask read_mask = 5; + + // A comma-separated list of fields to order by, sorted in ascending order. + // Use "desc" after a field name for descending. + // Supported fields: + // * `display_name` + // * `create_time` + // * `update_time` + string order_by = 6; +} + +// Response message for [DatasetService.ListDatasets][google.cloud.aiplatform.v1.DatasetService.ListDatasets]. +message ListDatasetsResponse { + // A list of Datasets that matches the specified filter in the request. + repeated Dataset datasets = 1; + + // The standard List next-page token. + string next_page_token = 2; +} + +// Request message for [DatasetService.DeleteDataset][google.cloud.aiplatform.v1.DatasetService.DeleteDataset]. +message DeleteDatasetRequest { + // Required. The resource name of the Dataset to delete. + // Format: + // `projects/{project}/locations/{location}/datasets/{dataset}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/Dataset" + } + ]; +} + +// Request message for [DatasetService.ImportData][google.cloud.aiplatform.v1.DatasetService.ImportData]. +message ImportDataRequest { + // Required. The name of the Dataset resource. + // Format: + // `projects/{project}/locations/{location}/datasets/{dataset}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/Dataset" + } + ]; + + // Required. The desired input locations. The contents of all input locations will be + // imported in one batch. + repeated ImportDataConfig import_configs = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Response message for [DatasetService.ImportData][google.cloud.aiplatform.v1.DatasetService.ImportData]. +message ImportDataResponse { + +} + +// Runtime operation information for [DatasetService.ImportData][google.cloud.aiplatform.v1.DatasetService.ImportData]. +message ImportDataOperationMetadata { + // The common part of the operation metadata. + GenericOperationMetadata generic_metadata = 1; +} + +// Request message for [DatasetService.ExportData][google.cloud.aiplatform.v1.DatasetService.ExportData]. +message ExportDataRequest { + // Required. The name of the Dataset resource. + // Format: + // `projects/{project}/locations/{location}/datasets/{dataset}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/Dataset" + } + ]; + + // Required. The desired output location. + ExportDataConfig export_config = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Response message for [DatasetService.ExportData][google.cloud.aiplatform.v1.DatasetService.ExportData]. +message ExportDataResponse { + // All of the files that are exported in this export operation. + repeated string exported_files = 1; +} + +// Runtime operation information for [DatasetService.ExportData][google.cloud.aiplatform.v1.DatasetService.ExportData]. +message ExportDataOperationMetadata { + // The common part of the operation metadata. + GenericOperationMetadata generic_metadata = 1; + + // A Google Cloud Storage directory which path ends with '/'. The exported + // data is stored in the directory. + string gcs_output_directory = 2; +} + +// Request message for [DatasetService.ListDataItems][google.cloud.aiplatform.v1.DatasetService.ListDataItems]. +message ListDataItemsRequest { + // Required. The resource name of the Dataset to list DataItems from. + // Format: + // `projects/{project}/locations/{location}/datasets/{dataset}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/Dataset" + } + ]; + + // The standard list filter. + string filter = 2; + + // The standard list page size. + int32 page_size = 3; + + // The standard list page token. + string page_token = 4; + + // Mask specifying which fields to read. + google.protobuf.FieldMask read_mask = 5; + + // A comma-separated list of fields to order by, sorted in ascending order. + // Use "desc" after a field name for descending. + string order_by = 6; +} + +// Response message for [DatasetService.ListDataItems][google.cloud.aiplatform.v1.DatasetService.ListDataItems]. +message ListDataItemsResponse { + // A list of DataItems that matches the specified filter in the request. + repeated DataItem data_items = 1; + + // The standard List next-page token. + string next_page_token = 2; +} + +// Request message for [DatasetService.GetAnnotationSpec][google.cloud.aiplatform.v1.DatasetService.GetAnnotationSpec]. +message GetAnnotationSpecRequest { + // Required. The name of the AnnotationSpec resource. + // Format: + // + // `projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/AnnotationSpec" + } + ]; + + // Mask specifying which fields to read. + google.protobuf.FieldMask read_mask = 2; +} + +// Request message for [DatasetService.ListAnnotations][google.cloud.aiplatform.v1.DatasetService.ListAnnotations]. +message ListAnnotationsRequest { + // Required. The resource name of the DataItem to list Annotations from. + // Format: + // + // `projects/{project}/locations/{location}/datasets/{dataset}/dataItems/{data_item}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/DataItem" + } + ]; + + // The standard list filter. + string filter = 2; + + // The standard list page size. + int32 page_size = 3; + + // The standard list page token. + string page_token = 4; + + // Mask specifying which fields to read. + google.protobuf.FieldMask read_mask = 5; + + // A comma-separated list of fields to order by, sorted in ascending order. + // Use "desc" after a field name for descending. + string order_by = 6; +} + +// Response message for [DatasetService.ListAnnotations][google.cloud.aiplatform.v1.DatasetService.ListAnnotations]. +message ListAnnotationsResponse { + // A list of Annotations that matches the specified filter in the request. + repeated Annotation annotations = 1; + + // The standard List next-page token. + string next_page_token = 2; +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/deployed_model_ref.proto b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/deployed_model_ref.proto new file mode 100644 index 000000000..f3e6184c8 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/deployed_model_ref.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.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1;aiplatform"; +option java_multiple_files = true; +option java_outer_classname = "DeployedModelNameProto"; +option java_package = "com.google.cloud.aiplatform.v1"; + +// Points to a DeployedModel. +message DeployedModelRef { + // Immutable. A resource name of an Endpoint. + string endpoint = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/Endpoint" + } + ]; + + // Immutable. An ID of a DeployedModel in the above Endpoint. + string deployed_model_id = 2 [(google.api.field_behavior) = IMMUTABLE]; +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/encryption_spec.proto b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/encryption_spec.proto new file mode 100644 index 000000000..dd97fb48b --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/encryption_spec.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.v1; + +import "google/api/field_behavior.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1;aiplatform"; +option java_multiple_files = true; +option java_outer_classname = "EncryptionSpecProto"; +option java_package = "com.google.cloud.aiplatform.v1"; + +// Represents a customer-managed encryption key spec that can be applied to +// a top-level resource. +message EncryptionSpec { + // Required. The Cloud KMS resource identifier of the customer managed encryption key + // used to protect a resource. Has the form: + // `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`. + // The key needs to be in the same region as where the compute resource is + // created. + string kms_key_name = 1 [(google.api.field_behavior) = REQUIRED]; +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/endpoint.proto b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/endpoint.proto new file mode 100644 index 000000000..3b9afe32f --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/endpoint.proto @@ -0,0 +1,151 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.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.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/aiplatform/v1/encryption_spec.proto"; +import "google/cloud/aiplatform/v1/machine_resources.proto"; +import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1;aiplatform"; +option java_multiple_files = true; +option java_outer_classname = "EndpointProto"; +option java_package = "com.google.cloud.aiplatform.v1"; + +// Models are deployed into it, and afterwards Endpoint is called to obtain +// predictions and explanations. +message Endpoint { + option (google.api.resource) = { + type: "aiplatform.googleapis.com/Endpoint" + pattern: "projects/{project}/locations/{location}/endpoints/{endpoint}" + }; + + // Output only. The resource name of the Endpoint. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The display name of the Endpoint. + // The name can be up to 128 characters long and can be consist of any UTF-8 + // characters. + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // The description of the Endpoint. + string description = 3; + + // Output only. The models deployed in this Endpoint. + // To add or remove DeployedModels use [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel] and + // [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel] respectively. + repeated DeployedModel deployed_models = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // A map from a DeployedModel's ID to the percentage of this Endpoint's + // traffic that should be forwarded to that DeployedModel. + // + // If a DeployedModel's ID is not listed in this map, then it receives no + // traffic. + // + // The traffic percentage values must add up to 100, or map must be empty if + // the Endpoint is to not accept any traffic at a moment. + map traffic_split = 5; + + // Used to perform consistent read-modify-write updates. If not set, a blind + // "overwrite" update happens. + string etag = 6; + + // The labels with user-defined metadata to organize your Endpoints. + // + // Label keys and values can be no longer than 64 characters + // (Unicode codepoints), can only contain lowercase letters, numeric + // characters, underscores and dashes. International characters are allowed. + // + // See https://goo.gl/xmQnxf for more information and examples of labels. + map labels = 7; + + // Output only. Timestamp when this Endpoint was created. + google.protobuf.Timestamp create_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Timestamp when this Endpoint was last updated. + google.protobuf.Timestamp update_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Customer-managed encryption key spec for an Endpoint. If set, this + // Endpoint and all sub-resources of this Endpoint will be secured by + // this key. + EncryptionSpec encryption_spec = 10; +} + +// A deployment of a Model. Endpoints contain one or more DeployedModels. +message DeployedModel { + // The prediction (for example, the machine) resources that the DeployedModel + // uses. The user is billed for the resources (at least their minimal amount) + // even if the DeployedModel receives no traffic. + // Not all Models support all resources types. See + // [Model.supported_deployment_resources_types][google.cloud.aiplatform.v1.Model.supported_deployment_resources_types]. + oneof prediction_resources { + // A description of resources that are dedicated to the DeployedModel, and + // that need a higher degree of manual configuration. + DedicatedResources dedicated_resources = 7; + + // A description of resources that to large degree are decided by AI + // Platform, and require only a modest additional configuration. + AutomaticResources automatic_resources = 8; + } + + // Output only. The ID of the DeployedModel. + string id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The name of the Model that this is the deployment of. Note that the Model + // may be in a different location than the DeployedModel's Endpoint. + string model = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/Model" + } + ]; + + // The display name of the DeployedModel. If not provided upon creation, + // the Model's display_name is used. + string display_name = 3; + + // Output only. Timestamp when the DeployedModel was created. + google.protobuf.Timestamp create_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The service account that the DeployedModel's container runs as. Specify the + // email address of the service account. If this service account is not + // specified, the container runs as a service account that doesn't have access + // to the resource project. + // + // Users deploying the Model must have the `iam.serviceAccounts.actAs` + // permission on this service account. + string service_account = 11; + + // For custom-trained Models and AutoML Tabular Models, the container of the + // DeployedModel instances will send `stderr` and `stdout` streams to + // Stackdriver Logging by default. Please note that the logs incur cost, + // which are subject to [Cloud Logging + // pricing](https://cloud.google.com/stackdriver/pricing). + // + // User can disable container logging by setting this flag to true. + bool disable_container_logging = 15; + + // These logs are like standard server access logs, containing + // information like timestamp and latency for each prediction request. + // + // Note that Stackdriver logs may incur a cost, especially if your project + // receives prediction requests at a high queries per second rate (QPS). + // Estimate your costs before enabling this option. + bool enable_access_logging = 13; +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/endpoint_service.proto b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/endpoint_service.proto new file mode 100644 index 000000000..f055c6051 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/endpoint_service.proto @@ -0,0 +1,312 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.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.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/aiplatform/v1/endpoint.proto"; +import "google/cloud/aiplatform/v1/operation.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/field_mask.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1;aiplatform"; +option java_multiple_files = true; +option java_outer_classname = "EndpointServiceProto"; +option java_package = "com.google.cloud.aiplatform.v1"; + +service EndpointService { + option (google.api.default_host) = "aiplatform.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Creates an Endpoint. + rpc CreateEndpoint(CreateEndpointRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/endpoints" + body: "endpoint" + }; + option (google.api.method_signature) = "parent,endpoint"; + option (google.longrunning.operation_info) = { + response_type: "Endpoint" + metadata_type: "CreateEndpointOperationMetadata" + }; + } + + // Gets an Endpoint. + rpc GetEndpoint(GetEndpointRequest) returns (Endpoint) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/endpoints/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists Endpoints in a Location. + rpc ListEndpoints(ListEndpointsRequest) returns (ListEndpointsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/endpoints" + }; + option (google.api.method_signature) = "parent"; + } + + // Updates an Endpoint. + rpc UpdateEndpoint(UpdateEndpointRequest) returns (Endpoint) { + option (google.api.http) = { + patch: "/v1/{endpoint.name=projects/*/locations/*/endpoints/*}" + body: "endpoint" + }; + option (google.api.method_signature) = "endpoint,update_mask"; + } + + // Deletes an Endpoint. + rpc DeleteEndpoint(DeleteEndpointRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/endpoints/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "DeleteOperationMetadata" + }; + } + + // Deploys a Model into this Endpoint, creating a DeployedModel within it. + rpc DeployModel(DeployModelRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{endpoint=projects/*/locations/*/endpoints/*}:deployModel" + body: "*" + }; + option (google.api.method_signature) = "endpoint,deployed_model,traffic_split"; + option (google.longrunning.operation_info) = { + response_type: "DeployModelResponse" + metadata_type: "DeployModelOperationMetadata" + }; + } + + // Undeploys a Model from an Endpoint, removing a DeployedModel from it, and + // freeing all resources it's using. + rpc UndeployModel(UndeployModelRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{endpoint=projects/*/locations/*/endpoints/*}:undeployModel" + body: "*" + }; + option (google.api.method_signature) = "endpoint,deployed_model_id,traffic_split"; + option (google.longrunning.operation_info) = { + response_type: "UndeployModelResponse" + metadata_type: "UndeployModelOperationMetadata" + }; + } +} + +// Request message for [EndpointService.CreateEndpoint][google.cloud.aiplatform.v1.EndpointService.CreateEndpoint]. +message CreateEndpointRequest { + // Required. The resource name of the Location to create the Endpoint in. + // Format: `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. The Endpoint to create. + Endpoint endpoint = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Runtime operation information for [EndpointService.CreateEndpoint][google.cloud.aiplatform.v1.EndpointService.CreateEndpoint]. +message CreateEndpointOperationMetadata { + // The operation generic information. + GenericOperationMetadata generic_metadata = 1; +} + +// Request message for [EndpointService.GetEndpoint][google.cloud.aiplatform.v1.EndpointService.GetEndpoint] +message GetEndpointRequest { + // Required. The name of the Endpoint resource. + // Format: + // `projects/{project}/locations/{location}/endpoints/{endpoint}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/Endpoint" + } + ]; +} + +// Request message for [EndpointService.ListEndpoints][google.cloud.aiplatform.v1.EndpointService.ListEndpoints]. +message ListEndpointsRequest { + // Required. The resource name of the Location from which to list the Endpoints. + // Format: `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Optional. An expression for filtering the results of the request. For field names + // both snake_case and camelCase are supported. + // + // * `endpoint` supports = and !=. `endpoint` represents the Endpoint ID, + // i.e. the last segment of the Endpoint's [resource name][google.cloud.aiplatform.v1.Endpoint.name]. + // * `display_name` supports = and, != + // * `labels` supports general map functions that is: + // * `labels.key=value` - key:value equality + // * `labels.key:* or labels:key - key existence + // * A key including a space must be quoted. `labels."a key"`. + // + // Some examples: + // * `endpoint=1` + // * `displayName="myDisplayName"` + // * `labels.myKey="myValue"` + string filter = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The standard list page size. + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The standard list page token. + // Typically obtained via + // [ListEndpointsResponse.next_page_token][google.cloud.aiplatform.v1.ListEndpointsResponse.next_page_token] of the previous + // [EndpointService.ListEndpoints][google.cloud.aiplatform.v1.EndpointService.ListEndpoints] call. + string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Mask specifying which fields to read. + google.protobuf.FieldMask read_mask = 5 [(google.api.field_behavior) = OPTIONAL]; + + // A comma-separated list of fields to order by, sorted in ascending order. + // Use "desc" after a field name for descending. + // Supported fields: + // * `display_name` + // * `create_time` + // * `update_time` + // + // Example: `display_name, create_time desc`. + string order_by = 6; +} + +// Response message for [EndpointService.ListEndpoints][google.cloud.aiplatform.v1.EndpointService.ListEndpoints]. +message ListEndpointsResponse { + // List of Endpoints in the requested page. + repeated Endpoint endpoints = 1; + + // A token to retrieve the next page of results. + // Pass to [ListEndpointsRequest.page_token][google.cloud.aiplatform.v1.ListEndpointsRequest.page_token] to obtain that page. + string next_page_token = 2; +} + +// Request message for [EndpointService.UpdateEndpoint][google.cloud.aiplatform.v1.EndpointService.UpdateEndpoint]. +message UpdateEndpointRequest { + // Required. The Endpoint which replaces the resource on the server. + Endpoint endpoint = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The update mask applies to the resource. + // See + // [FieldMask](https://tinyurl.com/protobufs/google.protobuf#fieldmask). + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for [EndpointService.DeleteEndpoint][google.cloud.aiplatform.v1.EndpointService.DeleteEndpoint]. +message DeleteEndpointRequest { + // Required. The name of the Endpoint resource to be deleted. + // Format: + // `projects/{project}/locations/{location}/endpoints/{endpoint}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/Endpoint" + } + ]; +} + +// Request message for [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel]. +message DeployModelRequest { + // Required. The name of the Endpoint resource into which to deploy a Model. + // Format: + // `projects/{project}/locations/{location}/endpoints/{endpoint}` + string endpoint = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/Endpoint" + } + ]; + + // Required. The DeployedModel to be created within the Endpoint. Note that + // [Endpoint.traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] must be updated for the DeployedModel to start + // receiving traffic, either as part of this call, or via + // [EndpointService.UpdateEndpoint][google.cloud.aiplatform.v1.EndpointService.UpdateEndpoint]. + DeployedModel deployed_model = 2 [(google.api.field_behavior) = REQUIRED]; + + // A map from a DeployedModel's ID to the percentage of this Endpoint's + // traffic that should be forwarded to that DeployedModel. + // + // If this field is non-empty, then the Endpoint's + // [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be overwritten with it. + // To refer to the ID of the just being deployed Model, a "0" should be used, + // and the actual ID of the new DeployedModel will be filled in its place by + // this method. The traffic percentage values must add up to 100. + // + // If this field is empty, then the Endpoint's + // [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] is not updated. + map traffic_split = 3; +} + +// Response message for [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel]. +message DeployModelResponse { + // The DeployedModel that had been deployed in the Endpoint. + DeployedModel deployed_model = 1; +} + +// Runtime operation information for [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel]. +message DeployModelOperationMetadata { + // The operation generic information. + GenericOperationMetadata generic_metadata = 1; +} + +// Request message for [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel]. +message UndeployModelRequest { + // Required. The name of the Endpoint resource from which to undeploy a Model. + // Format: + // `projects/{project}/locations/{location}/endpoints/{endpoint}` + string endpoint = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/Endpoint" + } + ]; + + // Required. The ID of the DeployedModel to be undeployed from the Endpoint. + string deployed_model_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // If this field is provided, then the Endpoint's + // [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be overwritten with it. If + // last DeployedModel is being undeployed from the Endpoint, the + // [Endpoint.traffic_split] will always end up empty when this call returns. + // A DeployedModel will be successfully undeployed only if it doesn't have + // any traffic assigned to it when this method executes, or if this field + // unassigns any traffic to it. + map traffic_split = 3; +} + +// Response message for [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel]. +message UndeployModelResponse { + +} + +// Runtime operation information for [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel]. +message UndeployModelOperationMetadata { + // The operation generic information. + GenericOperationMetadata generic_metadata = 1; +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/env_var.proto b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/env_var.proto new file mode 100644 index 000000000..8071a70de --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/env_var.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.v1; + +import "google/api/field_behavior.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1;aiplatform"; +option java_multiple_files = true; +option java_outer_classname = "EnvVarProto"; +option java_package = "com.google.cloud.aiplatform.v1"; + +// Represents an environment variable present in a Container or Python Module. +message EnvVar { + // Required. Name of the environment variable. Must be a valid C identifier. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Variables that reference a $(VAR_NAME) are expanded + // using the previous defined environment variables in the container and + // any service environment variables. If a variable cannot be resolved, + // the reference in the input string will be unchanged. The $(VAR_NAME) + // syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped + // references will never be expanded, regardless of whether the variable + // exists or not. + string value = 2 [(google.api.field_behavior) = REQUIRED]; +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/hyperparameter_tuning_job.proto b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/hyperparameter_tuning_job.proto new file mode 100644 index 000000000..2f3a1011d --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/hyperparameter_tuning_job.proto @@ -0,0 +1,108 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.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.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/aiplatform/v1/custom_job.proto"; +import "google/cloud/aiplatform/v1/encryption_spec.proto"; +import "google/cloud/aiplatform/v1/job_state.proto"; +import "google/cloud/aiplatform/v1/study.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1;aiplatform"; +option java_multiple_files = true; +option java_outer_classname = "HyperparameterTuningJobProto"; +option java_package = "com.google.cloud.aiplatform.v1"; + +// Represents a HyperparameterTuningJob. A HyperparameterTuningJob +// has a Study specification and multiple CustomJobs with identical +// CustomJob specification. +message HyperparameterTuningJob { + option (google.api.resource) = { + type: "aiplatform.googleapis.com/HyperparameterTuningJob" + pattern: "projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}" + }; + + // Output only. Resource name of the HyperparameterTuningJob. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The display name of the HyperparameterTuningJob. + // The name can be up to 128 characters long and can be consist of any UTF-8 + // characters. + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Study configuration of the HyperparameterTuningJob. + StudySpec study_spec = 4 [(google.api.field_behavior) = REQUIRED]; + + // Required. The desired total number of Trials. + int32 max_trial_count = 5 [(google.api.field_behavior) = REQUIRED]; + + // Required. The desired number of Trials to run in parallel. + int32 parallel_trial_count = 6 [(google.api.field_behavior) = REQUIRED]; + + // The number of failed Trials that need to be seen before failing + // the HyperparameterTuningJob. + // + // If set to 0, AI Platform decides how many Trials must fail + // before the whole job fails. + int32 max_failed_trial_count = 7; + + // Required. The spec of a trial job. The same spec applies to the CustomJobs created + // in all the trials. + CustomJobSpec trial_job_spec = 8 [(google.api.field_behavior) = REQUIRED]; + + // Output only. Trials of the HyperparameterTuningJob. + repeated Trial trials = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The detailed state of the job. + JobState state = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when the HyperparameterTuningJob was created. + google.protobuf.Timestamp create_time = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when the HyperparameterTuningJob for the first time entered the + // `JOB_STATE_RUNNING` state. + google.protobuf.Timestamp start_time = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when the HyperparameterTuningJob entered any of the following states: + // `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`. + google.protobuf.Timestamp end_time = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when the HyperparameterTuningJob was most recently updated. + google.protobuf.Timestamp update_time = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Only populated when job's state is JOB_STATE_FAILED or + // JOB_STATE_CANCELLED. + google.rpc.Status error = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The labels with user-defined metadata to organize HyperparameterTuningJobs. + // + // Label keys and values can be no longer than 64 characters + // (Unicode codepoints), can only contain lowercase letters, numeric + // characters, underscores and dashes. International characters are allowed. + // + // See https://goo.gl/xmQnxf for more information and examples of labels. + map labels = 16; + + // Customer-managed encryption key options for a HyperparameterTuningJob. + // If this is set, then all resources created by the HyperparameterTuningJob + // will be encrypted with the provided encryption key. + EncryptionSpec encryption_spec = 17; +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/io.proto b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/io.proto new file mode 100644 index 000000000..c32c66e79 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/io.proto @@ -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 +// +// 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.v1; + +import "google/api/field_behavior.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1;aiplatform"; +option java_multiple_files = true; +option java_outer_classname = "IoProto"; +option java_package = "com.google.cloud.aiplatform.v1"; + +// The Google Cloud Storage location for the input content. +message GcsSource { + // Required. Google Cloud Storage URI(-s) to the input file(s). May contain + // wildcards. For more information on wildcards, see + // https://cloud.google.com/storage/docs/gsutil/addlhelp/WildcardNames. + repeated string uris = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// The Google Cloud Storage location where the output is to be written to. +message GcsDestination { + // Required. Google Cloud Storage URI to output directory. If the uri doesn't end with + // '/', a '/' will be automatically appended. The directory is created if it + // doesn't exist. + string output_uri_prefix = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// The BigQuery location for the input content. +message BigQuerySource { + // Required. BigQuery URI to a table, up to 2000 characters long. + // Accepted forms: + // + // * BigQuery path. For example: `bq://projectId.bqDatasetId.bqTableId`. + string input_uri = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// The BigQuery location for the output content. +message BigQueryDestination { + // Required. BigQuery URI to a project or table, up to 2000 characters long. + // + // When only the project is specified, the Dataset and Table are created. + // When the full table reference is specified, the Dataset must exist and table must + // not exist. + // + // Accepted forms: + // + // * BigQuery path. For example: + // `bq://projectId` or `bq://projectId.bqDatasetId.bqTableId`. + string output_uri = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// The Container Registry location for the container image. +message ContainerRegistryDestination { + // Required. Container Registry URI of a container image. + // Only Google Container Registry and Artifact Registry are supported now. + // Accepted forms: + // + // * Google Container Registry path. For example: + // `gcr.io/projectId/imageName:tag`. + // + // * Artifact Registry path. For example: + // `us-central1-docker.pkg.dev/projectId/repoName/imageName:tag`. + // + // If a tag is not specified, "latest" will be used as the default tag. + string output_uri = 1 [(google.api.field_behavior) = REQUIRED]; +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/job_service.proto b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/job_service.proto new file mode 100644 index 000000000..b9bff3d3e --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/job_service.proto @@ -0,0 +1,701 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.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.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/aiplatform/v1/batch_prediction_job.proto"; +import "google/cloud/aiplatform/v1/custom_job.proto"; +import "google/cloud/aiplatform/v1/data_labeling_job.proto"; +import "google/cloud/aiplatform/v1/hyperparameter_tuning_job.proto"; +import "google/cloud/aiplatform/v1/operation.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1;aiplatform"; +option java_multiple_files = true; +option java_outer_classname = "JobServiceProto"; +option java_package = "com.google.cloud.aiplatform.v1"; + +// A service for creating and managing AI Platform's jobs. +service JobService { + option (google.api.default_host) = "aiplatform.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Creates a CustomJob. A created CustomJob right away + // will be attempted to be run. + rpc CreateCustomJob(CreateCustomJobRequest) returns (CustomJob) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/customJobs" + body: "custom_job" + }; + option (google.api.method_signature) = "parent,custom_job"; + } + + // Gets a CustomJob. + rpc GetCustomJob(GetCustomJobRequest) returns (CustomJob) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/customJobs/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists CustomJobs in a Location. + rpc ListCustomJobs(ListCustomJobsRequest) returns (ListCustomJobsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/customJobs" + }; + option (google.api.method_signature) = "parent"; + } + + // Deletes a CustomJob. + rpc DeleteCustomJob(DeleteCustomJobRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/customJobs/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "DeleteOperationMetadata" + }; + } + + // 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 [JobService.GetCustomJob][google.cloud.aiplatform.v1.JobService.GetCustomJob] or + // other methods to check whether the cancellation succeeded or whether the + // job completed despite cancellation. On successful cancellation, + // the CustomJob is not deleted; instead it becomes a job with + // a [CustomJob.error][google.cloud.aiplatform.v1.CustomJob.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, + // corresponding to `Code.CANCELLED`, and [CustomJob.state][google.cloud.aiplatform.v1.CustomJob.state] is set to + // `CANCELLED`. + rpc CancelCustomJob(CancelCustomJobRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/customJobs/*}:cancel" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a DataLabelingJob. + rpc CreateDataLabelingJob(CreateDataLabelingJobRequest) returns (DataLabelingJob) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/dataLabelingJobs" + body: "data_labeling_job" + }; + option (google.api.method_signature) = "parent,data_labeling_job"; + } + + // Gets a DataLabelingJob. + rpc GetDataLabelingJob(GetDataLabelingJobRequest) returns (DataLabelingJob) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/dataLabelingJobs/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists DataLabelingJobs in a Location. + rpc ListDataLabelingJobs(ListDataLabelingJobsRequest) returns (ListDataLabelingJobsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/dataLabelingJobs" + }; + option (google.api.method_signature) = "parent"; + } + + // Deletes a DataLabelingJob. + rpc DeleteDataLabelingJob(DeleteDataLabelingJobRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/dataLabelingJobs/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "DeleteOperationMetadata" + }; + } + + // Cancels a DataLabelingJob. Success of cancellation is not guaranteed. + rpc CancelDataLabelingJob(CancelDataLabelingJobRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/dataLabelingJobs/*}:cancel" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a HyperparameterTuningJob + rpc CreateHyperparameterTuningJob(CreateHyperparameterTuningJobRequest) returns (HyperparameterTuningJob) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/hyperparameterTuningJobs" + body: "hyperparameter_tuning_job" + }; + option (google.api.method_signature) = "parent,hyperparameter_tuning_job"; + } + + // Gets a HyperparameterTuningJob + rpc GetHyperparameterTuningJob(GetHyperparameterTuningJobRequest) returns (HyperparameterTuningJob) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/hyperparameterTuningJobs/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists HyperparameterTuningJobs in a Location. + rpc ListHyperparameterTuningJobs(ListHyperparameterTuningJobsRequest) returns (ListHyperparameterTuningJobsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/hyperparameterTuningJobs" + }; + option (google.api.method_signature) = "parent"; + } + + // Deletes a HyperparameterTuningJob. + rpc DeleteHyperparameterTuningJob(DeleteHyperparameterTuningJobRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/hyperparameterTuningJobs/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "DeleteOperationMetadata" + }; + } + + // Cancels a HyperparameterTuningJob. + // Starts asynchronous cancellation on the HyperparameterTuningJob. The server + // makes a best effort to cancel the job, but success is not + // guaranteed. Clients can use [JobService.GetHyperparameterTuningJob][google.cloud.aiplatform.v1.JobService.GetHyperparameterTuningJob] or + // other methods to check whether the cancellation succeeded or whether the + // job completed despite cancellation. On successful cancellation, + // the HyperparameterTuningJob is not deleted; instead it becomes a job with + // a [HyperparameterTuningJob.error][google.cloud.aiplatform.v1.HyperparameterTuningJob.error] value with a [google.rpc.Status.code][google.rpc.Status.code] + // of 1, corresponding to `Code.CANCELLED`, and + // [HyperparameterTuningJob.state][google.cloud.aiplatform.v1.HyperparameterTuningJob.state] is set to `CANCELLED`. + rpc CancelHyperparameterTuningJob(CancelHyperparameterTuningJobRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/hyperparameterTuningJobs/*}:cancel" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a BatchPredictionJob. A BatchPredictionJob once created will + // right away be attempted to start. + rpc CreateBatchPredictionJob(CreateBatchPredictionJobRequest) returns (BatchPredictionJob) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/batchPredictionJobs" + body: "batch_prediction_job" + }; + option (google.api.method_signature) = "parent,batch_prediction_job"; + } + + // Gets a BatchPredictionJob + rpc GetBatchPredictionJob(GetBatchPredictionJobRequest) returns (BatchPredictionJob) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/batchPredictionJobs/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists BatchPredictionJobs in a Location. + rpc ListBatchPredictionJobs(ListBatchPredictionJobsRequest) returns (ListBatchPredictionJobsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/batchPredictionJobs" + }; + option (google.api.method_signature) = "parent"; + } + + // Deletes a BatchPredictionJob. Can only be called on jobs that already + // finished. + rpc DeleteBatchPredictionJob(DeleteBatchPredictionJobRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/batchPredictionJobs/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "DeleteOperationMetadata" + }; + } + + // Cancels a BatchPredictionJob. + // + // Starts asynchronous cancellation on the BatchPredictionJob. The server + // makes the best effort to cancel the job, but success is not + // guaranteed. Clients can use [JobService.GetBatchPredictionJob][google.cloud.aiplatform.v1.JobService.GetBatchPredictionJob] or + // other methods to check whether the cancellation succeeded or whether the + // job completed despite cancellation. On a successful cancellation, + // the BatchPredictionJob is not deleted;instead its + // [BatchPredictionJob.state][google.cloud.aiplatform.v1.BatchPredictionJob.state] is set to `CANCELLED`. Any files already + // outputted by the job are not deleted. + rpc CancelBatchPredictionJob(CancelBatchPredictionJobRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/batchPredictionJobs/*}:cancel" + body: "*" + }; + option (google.api.method_signature) = "name"; + } +} + +// Request message for [JobService.CreateCustomJob][google.cloud.aiplatform.v1.JobService.CreateCustomJob]. +message CreateCustomJobRequest { + // Required. The resource name of the Location to create the CustomJob in. + // Format: `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. The CustomJob to create. + CustomJob custom_job = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for [JobService.GetCustomJob][google.cloud.aiplatform.v1.JobService.GetCustomJob]. +message GetCustomJobRequest { + // Required. The name of the CustomJob resource. + // Format: + // `projects/{project}/locations/{location}/customJobs/{custom_job}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/CustomJob" + } + ]; +} + +// Request message for [JobService.ListCustomJobs][google.cloud.aiplatform.v1.JobService.ListCustomJobs]. +message ListCustomJobsRequest { + // Required. The resource name of the Location to list the CustomJobs from. + // Format: `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // The standard list filter. + // + // Supported fields: + // + // * `display_name` supports = and !=. + // + // * `state` supports = and !=. + // + // Some examples of using the filter are: + // + // * `state="JOB_STATE_SUCCEEDED" AND display_name="my_job"` + // + // * `state="JOB_STATE_RUNNING" OR display_name="my_job"` + // + // * `NOT display_name="my_job"` + // + // * `state="JOB_STATE_FAILED"` + string filter = 2; + + // The standard list page size. + int32 page_size = 3; + + // The standard list page token. + // Typically obtained via + // [ListCustomJobsResponse.next_page_token][google.cloud.aiplatform.v1.ListCustomJobsResponse.next_page_token] of the previous + // [JobService.ListCustomJobs][google.cloud.aiplatform.v1.JobService.ListCustomJobs] call. + string page_token = 4; + + // Mask specifying which fields to read. + google.protobuf.FieldMask read_mask = 5; +} + +// Response message for [JobService.ListCustomJobs][google.cloud.aiplatform.v1.JobService.ListCustomJobs] +message ListCustomJobsResponse { + // List of CustomJobs in the requested page. + repeated CustomJob custom_jobs = 1; + + // A token to retrieve the next page of results. + // Pass to [ListCustomJobsRequest.page_token][google.cloud.aiplatform.v1.ListCustomJobsRequest.page_token] to obtain that page. + string next_page_token = 2; +} + +// Request message for [JobService.DeleteCustomJob][google.cloud.aiplatform.v1.JobService.DeleteCustomJob]. +message DeleteCustomJobRequest { + // Required. The name of the CustomJob resource to be deleted. + // Format: + // `projects/{project}/locations/{location}/customJobs/{custom_job}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/CustomJob" + } + ]; +} + +// Request message for [JobService.CancelCustomJob][google.cloud.aiplatform.v1.JobService.CancelCustomJob]. +message CancelCustomJobRequest { + // Required. The name of the CustomJob to cancel. + // Format: + // `projects/{project}/locations/{location}/customJobs/{custom_job}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/CustomJob" + } + ]; +} + +// Request message for [DataLabelingJobService.CreateDataLabelingJob][]. +message CreateDataLabelingJobRequest { + // Required. The parent of the DataLabelingJob. + // Format: `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. The DataLabelingJob to create. + DataLabelingJob data_labeling_job = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for [DataLabelingJobService.GetDataLabelingJob][]. +message GetDataLabelingJobRequest { + // Required. The name of the DataLabelingJob. + // Format: + // + // `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/DataLabelingJob" + } + ]; +} + +// Request message for [DataLabelingJobService.ListDataLabelingJobs][]. +message ListDataLabelingJobsRequest { + // Required. The parent of the DataLabelingJob. + // Format: `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // The standard list filter. + // + // Supported fields: + // + // * `display_name` supports = and !=. + // + // * `state` supports = and !=. + // + // Some examples of using the filter are: + // + // * `state="JOB_STATE_SUCCEEDED" AND display_name="my_job"` + // + // * `state="JOB_STATE_RUNNING" OR display_name="my_job"` + // + // * `NOT display_name="my_job"` + // + // * `state="JOB_STATE_FAILED"` + string filter = 2; + + // The standard list page size. + int32 page_size = 3; + + // The standard list page token. + string page_token = 4; + + // Mask specifying which fields to read. FieldMask represents a set of + // symbolic field paths. For example, the mask can be `paths: "name"`. The + // "name" here is a field in DataLabelingJob. + // If this field is not set, all fields of the DataLabelingJob are returned. + google.protobuf.FieldMask read_mask = 5; + + // A comma-separated list of fields to order by, sorted in ascending order by + // default. + // Use `desc` after a field name for descending. + string order_by = 6; +} + +// Response message for [JobService.ListDataLabelingJobs][google.cloud.aiplatform.v1.JobService.ListDataLabelingJobs]. +message ListDataLabelingJobsResponse { + // A list of DataLabelingJobs that matches the specified filter in the + // request. + repeated DataLabelingJob data_labeling_jobs = 1; + + // The standard List next-page token. + string next_page_token = 2; +} + +// Request message for [JobService.DeleteDataLabelingJob][google.cloud.aiplatform.v1.JobService.DeleteDataLabelingJob]. +message DeleteDataLabelingJobRequest { + // Required. The name of the DataLabelingJob to be deleted. + // Format: + // + // `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/DataLabelingJob" + } + ]; +} + +// Request message for [DataLabelingJobService.CancelDataLabelingJob][]. +message CancelDataLabelingJobRequest { + // Required. The name of the DataLabelingJob. + // Format: + // + // `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/DataLabelingJob" + } + ]; +} + +// Request message for [JobService.CreateHyperparameterTuningJob][google.cloud.aiplatform.v1.JobService.CreateHyperparameterTuningJob]. +message CreateHyperparameterTuningJobRequest { + // Required. The resource name of the Location to create the HyperparameterTuningJob in. + // Format: `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. The HyperparameterTuningJob to create. + HyperparameterTuningJob hyperparameter_tuning_job = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for [JobService.GetHyperparameterTuningJob][google.cloud.aiplatform.v1.JobService.GetHyperparameterTuningJob]. +message GetHyperparameterTuningJobRequest { + // Required. The name of the HyperparameterTuningJob resource. + // Format: + // + // `projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/HyperparameterTuningJob" + } + ]; +} + +// Request message for [JobService.ListHyperparameterTuningJobs][google.cloud.aiplatform.v1.JobService.ListHyperparameterTuningJobs]. +message ListHyperparameterTuningJobsRequest { + // Required. The resource name of the Location to list the HyperparameterTuningJobs + // from. Format: `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // The standard list filter. + // + // Supported fields: + // + // * `display_name` supports = and !=. + // + // * `state` supports = and !=. + // + // Some examples of using the filter are: + // + // * `state="JOB_STATE_SUCCEEDED" AND display_name="my_job"` + // + // * `state="JOB_STATE_RUNNING" OR display_name="my_job"` + // + // * `NOT display_name="my_job"` + // + // * `state="JOB_STATE_FAILED"` + string filter = 2; + + // The standard list page size. + int32 page_size = 3; + + // The standard list page token. + // Typically obtained via + // [ListHyperparameterTuningJobsResponse.next_page_token][google.cloud.aiplatform.v1.ListHyperparameterTuningJobsResponse.next_page_token] of the previous + // [JobService.ListHyperparameterTuningJobs][google.cloud.aiplatform.v1.JobService.ListHyperparameterTuningJobs] call. + string page_token = 4; + + // Mask specifying which fields to read. + google.protobuf.FieldMask read_mask = 5; +} + +// Response message for [JobService.ListHyperparameterTuningJobs][google.cloud.aiplatform.v1.JobService.ListHyperparameterTuningJobs] +message ListHyperparameterTuningJobsResponse { + // List of HyperparameterTuningJobs in the requested page. + // [HyperparameterTuningJob.trials][google.cloud.aiplatform.v1.HyperparameterTuningJob.trials] of the jobs will be not be returned. + repeated HyperparameterTuningJob hyperparameter_tuning_jobs = 1; + + // A token to retrieve the next page of results. + // Pass to [ListHyperparameterTuningJobsRequest.page_token][google.cloud.aiplatform.v1.ListHyperparameterTuningJobsRequest.page_token] to obtain that + // page. + string next_page_token = 2; +} + +// Request message for [JobService.DeleteHyperparameterTuningJob][google.cloud.aiplatform.v1.JobService.DeleteHyperparameterTuningJob]. +message DeleteHyperparameterTuningJobRequest { + // Required. The name of the HyperparameterTuningJob resource to be deleted. + // Format: + // + // `projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/HyperparameterTuningJob" + } + ]; +} + +// Request message for [JobService.CancelHyperparameterTuningJob][google.cloud.aiplatform.v1.JobService.CancelHyperparameterTuningJob]. +message CancelHyperparameterTuningJobRequest { + // Required. The name of the HyperparameterTuningJob to cancel. + // Format: + // + // `projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/HyperparameterTuningJob" + } + ]; +} + +// Request message for [JobService.CreateBatchPredictionJob][google.cloud.aiplatform.v1.JobService.CreateBatchPredictionJob]. +message CreateBatchPredictionJobRequest { + // Required. The resource name of the Location to create the BatchPredictionJob in. + // Format: `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. The BatchPredictionJob to create. + BatchPredictionJob batch_prediction_job = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for [JobService.GetBatchPredictionJob][google.cloud.aiplatform.v1.JobService.GetBatchPredictionJob]. +message GetBatchPredictionJobRequest { + // Required. The name of the BatchPredictionJob resource. + // Format: + // + // `projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/BatchPredictionJob" + } + ]; +} + +// Request message for [JobService.ListBatchPredictionJobs][google.cloud.aiplatform.v1.JobService.ListBatchPredictionJobs]. +message ListBatchPredictionJobsRequest { + // Required. The resource name of the Location to list the BatchPredictionJobs + // from. Format: `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // The standard list filter. + // + // Supported fields: + // + // * `display_name` supports = and !=. + // + // * `state` supports = and !=. + // + // Some examples of using the filter are: + // + // * `state="JOB_STATE_SUCCEEDED" AND display_name="my_job"` + // + // * `state="JOB_STATE_RUNNING" OR display_name="my_job"` + // + // * `NOT display_name="my_job"` + // + // * `state="JOB_STATE_FAILED"` + string filter = 2; + + // The standard list page size. + int32 page_size = 3; + + // The standard list page token. + // Typically obtained via + // [ListBatchPredictionJobsResponse.next_page_token][google.cloud.aiplatform.v1.ListBatchPredictionJobsResponse.next_page_token] of the previous + // [JobService.ListBatchPredictionJobs][google.cloud.aiplatform.v1.JobService.ListBatchPredictionJobs] call. + string page_token = 4; + + // Mask specifying which fields to read. + google.protobuf.FieldMask read_mask = 5; +} + +// Response message for [JobService.ListBatchPredictionJobs][google.cloud.aiplatform.v1.JobService.ListBatchPredictionJobs] +message ListBatchPredictionJobsResponse { + // List of BatchPredictionJobs in the requested page. + repeated BatchPredictionJob batch_prediction_jobs = 1; + + // A token to retrieve the next page of results. + // Pass to [ListBatchPredictionJobsRequest.page_token][google.cloud.aiplatform.v1.ListBatchPredictionJobsRequest.page_token] to obtain that + // page. + string next_page_token = 2; +} + +// Request message for [JobService.DeleteBatchPredictionJob][google.cloud.aiplatform.v1.JobService.DeleteBatchPredictionJob]. +message DeleteBatchPredictionJobRequest { + // Required. The name of the BatchPredictionJob resource to be deleted. + // Format: + // + // `projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/BatchPredictionJob" + } + ]; +} + +// Request message for [JobService.CancelBatchPredictionJob][google.cloud.aiplatform.v1.JobService.CancelBatchPredictionJob]. +message CancelBatchPredictionJobRequest { + // Required. The name of the BatchPredictionJob to cancel. + // Format: + // + // `projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/BatchPredictionJob" + } + ]; +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/job_state.proto b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/job_state.proto new file mode 100644 index 000000000..e0a600a8b --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/job_state.proto @@ -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. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1;aiplatform"; +option java_multiple_files = true; +option java_outer_classname = "JobStateProto"; +option java_package = "com.google.cloud.aiplatform.v1"; + +// Describes the state of a job. +enum JobState { + // The job state is unspecified. + JOB_STATE_UNSPECIFIED = 0; + + // The job has been just created or resumed and processing has not yet begun. + JOB_STATE_QUEUED = 1; + + // The service is preparing to run the job. + JOB_STATE_PENDING = 2; + + // The job is in progress. + JOB_STATE_RUNNING = 3; + + // The job completed successfully. + JOB_STATE_SUCCEEDED = 4; + + // The job failed. + JOB_STATE_FAILED = 5; + + // The job is being cancelled. From this state the job may only go to + // either `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED` or `JOB_STATE_CANCELLED`. + JOB_STATE_CANCELLING = 6; + + // The job has been cancelled. + JOB_STATE_CANCELLED = 7; + + // The job has been stopped, and can be resumed. + JOB_STATE_PAUSED = 8; +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/machine_resources.proto b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/machine_resources.proto new file mode 100644 index 000000000..f10cd4e1d --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/machine_resources.proto @@ -0,0 +1,139 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.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.v1; + +import "google/api/field_behavior.proto"; +import "google/cloud/aiplatform/v1/accelerator_type.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1;aiplatform"; +option java_multiple_files = true; +option java_outer_classname = "MachineResourcesProto"; +option java_package = "com.google.cloud.aiplatform.v1"; + +// Specification of a single machine. +message MachineSpec { + // Immutable. The type of the machine. For the machine types supported for prediction, + // see https://tinyurl.com/aip-docs/predictions/machine-types. + // For machine types supported for creating a custom training job, see + // https://tinyurl.com/aip-docs/training/configure-compute. + // + // For [DeployedModel][google.cloud.aiplatform.v1.DeployedModel] this field is optional, and the default + // value is `n1-standard-2`. For [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob] or as part of + // [WorkerPoolSpec][google.cloud.aiplatform.v1.WorkerPoolSpec] this field is required. + string machine_type = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. The type of accelerator(s) that may be attached to the machine as per + // [accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count]. + AcceleratorType accelerator_type = 2 [(google.api.field_behavior) = IMMUTABLE]; + + // The number of accelerators to attach to the machine. + int32 accelerator_count = 3; +} + +// A description of resources that are dedicated to a DeployedModel, and +// that need a higher degree of manual configuration. +message DedicatedResources { + // Required. Immutable. The specification of a single machine used by the prediction. + MachineSpec machine_spec = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Required. Immutable. The minimum number of machine replicas this DeployedModel will be always + // deployed on. If traffic against it increases, it may dynamically be + // deployed onto more replicas, and as traffic decreases, some of these extra + // replicas may be freed. + // Note: if [machine_spec.accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count] is + // above 0, currently the model will be always deployed precisely on + // [min_replica_count][google.cloud.aiplatform.v1.DedicatedResources.min_replica_count]. + int32 min_replica_count = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Immutable. The maximum number of replicas this DeployedModel may be deployed on when + // the traffic against it increases. If the requested value is too large, + // the deployment will error, but if deployment succeeds then the ability + // to scale the model to that many replicas is guaranteed (barring service + // outages). If traffic against the DeployedModel increases beyond what its + // replicas at maximum may handle, a portion of the traffic will be dropped. + // If this value is not provided, will use [min_replica_count][google.cloud.aiplatform.v1.DedicatedResources.min_replica_count] as the + // default value. + int32 max_replica_count = 3 [(google.api.field_behavior) = IMMUTABLE]; +} + +// A description of resources that to large degree are decided by AI Platform, +// and require only a modest additional configuration. +// Each Model supporting these resources documents its specific guidelines. +message AutomaticResources { + // Immutable. The minimum number of replicas this DeployedModel will be always deployed + // on. If traffic against it increases, it may dynamically be deployed onto + // more replicas up to [max_replica_count][google.cloud.aiplatform.v1.AutomaticResources.max_replica_count], and as traffic decreases, some + // of these extra replicas may be freed. + // If the requested value is too large, the deployment will error. + int32 min_replica_count = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. The maximum number of replicas this DeployedModel may be deployed on when + // the traffic against it increases. If the requested value is too large, + // the deployment will error, but if deployment succeeds then the ability + // to scale the model to that many replicas is guaranteed (barring service + // outages). If traffic against the DeployedModel increases beyond what its + // replicas at maximum may handle, a portion of the traffic will be dropped. + // If this value is not provided, a no upper bound for scaling under heavy + // traffic will be assume, though AI Platform may be unable to scale beyond + // certain replica number. + int32 max_replica_count = 2 [(google.api.field_behavior) = IMMUTABLE]; +} + +// A description of resources that are used for performing batch operations, are +// dedicated to a Model, and need manual configuration. +message BatchDedicatedResources { + // Required. Immutable. The specification of a single machine. + MachineSpec machine_spec = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Immutable. The number of machine replicas used at the start of the batch operation. + // If not set, AI Platform decides starting number, not greater than + // [max_replica_count][google.cloud.aiplatform.v1.BatchDedicatedResources.max_replica_count] + int32 starting_replica_count = 2 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. The maximum number of machine replicas the batch operation may be scaled + // to. The default value is 10. + int32 max_replica_count = 3 [(google.api.field_behavior) = IMMUTABLE]; +} + +// Statistics information about resource consumption. +message ResourcesConsumed { + // Output only. The number of replica hours used. Note that many replicas may run in + // parallel, and additionally any given work may be queued for some time. + // Therefore this value is not strictly related to wall time. + double replica_hours = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Represents the spec of disk options. +message DiskSpec { + // Type of the boot disk (default is "pd-ssd"). + // Valid values: "pd-ssd" (Persistent Disk Solid State Drive) or + // "pd-standard" (Persistent Disk Hard Disk Drive). + string boot_disk_type = 1; + + // Size in GB of the boot disk (default is 100GB). + int32 boot_disk_size_gb = 2; +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/manual_batch_tuning_parameters.proto b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/manual_batch_tuning_parameters.proto new file mode 100644 index 000000000..da258a7bc --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/manual_batch_tuning_parameters.proto @@ -0,0 +1,37 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.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.v1; + +import "google/api/field_behavior.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1;aiplatform"; +option java_multiple_files = true; +option java_outer_classname = "ManualBatchTuningParametersProto"; +option java_package = "com.google.cloud.aiplatform.v1"; + +// Manual batch tuning parameters. +message ManualBatchTuningParameters { + // Immutable. The number of the records (e.g. instances) of the operation given in + // each batch to a machine replica. Machine type, and size of a single + // record should be considered when setting this parameter, higher value + // speeds up the batch operation's execution, but too high value will result + // in a whole batch not fitting in a machine's memory, and the whole + // operation will fail. + // The default value is 4. + int32 batch_size = 1 [(google.api.field_behavior) = IMMUTABLE]; +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/migratable_resource.proto b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/migratable_resource.proto new file mode 100644 index 000000000..9e126901b --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/migratable_resource.proto @@ -0,0 +1,148 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.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.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1;aiplatform"; +option java_multiple_files = true; +option java_outer_classname = "MigratableResourceProto"; +option java_package = "com.google.cloud.aiplatform.v1"; +option (google.api.resource_definition) = { + type: "ml.googleapis.com/Version" + pattern: "projects/{project}/models/{model}/versions/{version}" +}; +option (google.api.resource_definition) = { + type: "automl.googleapis.com/Model" + pattern: "projects/{project}/locations/{location}/models/{model}" +}; +option (google.api.resource_definition) = { + type: "automl.googleapis.com/Dataset" + pattern: "projects/{project}/locations/{location}/datasets/{dataset}" +}; +option (google.api.resource_definition) = { + type: "datalabeling.googleapis.com/Dataset" + pattern: "projects/{project}/datasets/{dataset}" +}; +option (google.api.resource_definition) = { + type: "datalabeling.googleapis.com/AnnotatedDataset" + pattern: "projects/{project}/datasets/{dataset}/annotatedDatasets/{annotated_dataset}" +}; + +// Represents one resource that exists in automl.googleapis.com, +// datalabeling.googleapis.com or ml.googleapis.com. +message MigratableResource { + // Represents one model Version in ml.googleapis.com. + message MlEngineModelVersion { + // The ml.googleapis.com endpoint that this model Version currently lives + // in. + // Example values: + // + // * ml.googleapis.com + // * us-centrall-ml.googleapis.com + // * europe-west4-ml.googleapis.com + // * asia-east1-ml.googleapis.com + string endpoint = 1; + + // Full resource name of ml engine model Version. + // Format: `projects/{project}/models/{model}/versions/{version}`. + string version = 2 [(google.api.resource_reference) = { + type: "ml.googleapis.com/Version" + }]; + } + + // Represents one Model in automl.googleapis.com. + message AutomlModel { + // Full resource name of automl Model. + // Format: + // `projects/{project}/locations/{location}/models/{model}`. + string model = 1 [(google.api.resource_reference) = { + type: "automl.googleapis.com/Model" + }]; + + // The Model's display name in automl.googleapis.com. + string model_display_name = 3; + } + + // Represents one Dataset in automl.googleapis.com. + message AutomlDataset { + // Full resource name of automl Dataset. + // Format: + // `projects/{project}/locations/{location}/datasets/{dataset}`. + string dataset = 1 [(google.api.resource_reference) = { + type: "automl.googleapis.com/Dataset" + }]; + + // The Dataset's display name in automl.googleapis.com. + string dataset_display_name = 4; + } + + // Represents one Dataset in datalabeling.googleapis.com. + message DataLabelingDataset { + // Represents one AnnotatedDataset in datalabeling.googleapis.com. + message DataLabelingAnnotatedDataset { + // Full resource name of data labeling AnnotatedDataset. + // Format: + // + // `projects/{project}/datasets/{dataset}/annotatedDatasets/{annotated_dataset}`. + string annotated_dataset = 1 [(google.api.resource_reference) = { + type: "datalabeling.googleapis.com/AnnotatedDataset" + }]; + + // The AnnotatedDataset's display name in datalabeling.googleapis.com. + string annotated_dataset_display_name = 3; + } + + // Full resource name of data labeling Dataset. + // Format: + // `projects/{project}/datasets/{dataset}`. + string dataset = 1 [(google.api.resource_reference) = { + type: "datalabeling.googleapis.com/Dataset" + }]; + + // The Dataset's display name in datalabeling.googleapis.com. + string dataset_display_name = 4; + + // The migratable AnnotatedDataset in datalabeling.googleapis.com belongs to + // the data labeling Dataset. + repeated DataLabelingAnnotatedDataset data_labeling_annotated_datasets = 3; + } + + oneof resource { + // Output only. Represents one Version in ml.googleapis.com. + MlEngineModelVersion ml_engine_model_version = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Represents one Model in automl.googleapis.com. + AutomlModel automl_model = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Represents one Dataset in automl.googleapis.com. + AutomlDataset automl_dataset = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Represents one Dataset in datalabeling.googleapis.com. + DataLabelingDataset data_labeling_dataset = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. Timestamp when the last migration attempt on this MigratableResource started. + // Will not be set if there's no migration attempt on this MigratableResource. + google.protobuf.Timestamp last_migrate_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Timestamp when this MigratableResource was last updated. + google.protobuf.Timestamp last_update_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/migration_service.proto b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/migration_service.proto new file mode 100644 index 000000000..353bcd619 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/migration_service.proto @@ -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 +// +// 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.v1; + +import "google/cloud/aiplatform/v1/dataset.proto"; +import "google/cloud/aiplatform/v1/model.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/aiplatform/v1/migratable_resource.proto"; +import "google/cloud/aiplatform/v1/operation.proto"; +import "google/longrunning/operations.proto"; +import "google/rpc/status.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1;aiplatform"; +option java_multiple_files = true; +option java_outer_classname = "MigrationServiceProto"; +option java_package = "com.google.cloud.aiplatform.v1"; + +// A service that migrates resources from automl.googleapis.com, +// datalabeling.googleapis.com and ml.googleapis.com to AI Platform. +service MigrationService { + option (google.api.default_host) = "aiplatform.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // 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. + rpc SearchMigratableResources(SearchMigratableResourcesRequest) returns (SearchMigratableResourcesResponse) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/migratableResources:search" + body: "*" + }; + option (google.api.method_signature) = "parent"; + } + + // Batch migrates resources from ml.googleapis.com, automl.googleapis.com, + // and datalabeling.googleapis.com to AI Platform (Unified). + rpc BatchMigrateResources(BatchMigrateResourcesRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/migratableResources:batchMigrate" + body: "*" + }; + option (google.api.method_signature) = "parent,migrate_resource_requests"; + option (google.longrunning.operation_info) = { + response_type: "BatchMigrateResourcesResponse" + metadata_type: "BatchMigrateResourcesOperationMetadata" + }; + } +} + +// Request message for [MigrationService.SearchMigratableResources][google.cloud.aiplatform.v1.MigrationService.SearchMigratableResources]. +message SearchMigratableResourcesRequest { + // 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}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // The standard page size. + // The default and maximum value is 100. + int32 page_size = 2; + + // The standard page token. + string page_token = 3; + + // Supported filters are: + // * Resource type: For a specific type of MigratableResource. + // * `ml_engine_model_version:*` + // * `automl_model:*`, + // * `automl_dataset:*` + // * `data_labeling_dataset:*`. + // * Migrated or not: Filter migrated resource or not by last_migrate_time. + // * `last_migrate_time:*` will filter migrated resources. + // * `NOT last_migrate_time:*` will filter not yet migrated resources. + string filter = 4; +} + +// Response message for [MigrationService.SearchMigratableResources][google.cloud.aiplatform.v1.MigrationService.SearchMigratableResources]. +message SearchMigratableResourcesResponse { + // All migratable resources that can be migrated to the + // location specified in the request. + repeated MigratableResource migratable_resources = 1; + + // The standard next-page token. + // The migratable_resources may not fill page_size in + // SearchMigratableResourcesRequest even when there are subsequent pages. + string next_page_token = 2; +} + +// Request message for [MigrationService.BatchMigrateResources][google.cloud.aiplatform.v1.MigrationService.BatchMigrateResources]. +message BatchMigrateResourcesRequest { + // Required. The location of the migrated resource will live in. + // Format: `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. The request messages specifying the resources to migrate. + // They must be in the same location as the destination. + // Up to 50 resources can be migrated in one batch. + repeated MigrateResourceRequest migrate_resource_requests = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Config of migrating one resource from automl.googleapis.com, +// datalabeling.googleapis.com and ml.googleapis.com to AI Platform. +message MigrateResourceRequest { + // Config for migrating version in ml.googleapis.com to AI Platform's Model. + message MigrateMlEngineModelVersionConfig { + // Required. The ml.googleapis.com endpoint that this model version should be migrated + // from. + // Example values: + // + // * ml.googleapis.com + // + // * us-centrall-ml.googleapis.com + // + // * europe-west4-ml.googleapis.com + // + // * asia-east1-ml.googleapis.com + string endpoint = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Full resource name of ml engine model version. + // Format: `projects/{project}/models/{model}/versions/{version}`. + string model_version = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "ml.googleapis.com/Version" + } + ]; + + // Required. Display name of the model in AI Platform. + // System will pick a display name if unspecified. + string model_display_name = 3 [(google.api.field_behavior) = REQUIRED]; + } + + // Config for migrating Model in automl.googleapis.com to AI Platform's Model. + message MigrateAutomlModelConfig { + // Required. Full resource name of automl Model. + // Format: + // `projects/{project}/locations/{location}/models/{model}`. + string model = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "automl.googleapis.com/Model" + } + ]; + + // Optional. Display name of the model in AI Platform. + // System will pick a display name if unspecified. + string model_display_name = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // Config for migrating Dataset in automl.googleapis.com to AI Platform's + // Dataset. + message MigrateAutomlDatasetConfig { + // Required. Full resource name of automl Dataset. + // Format: + // `projects/{project}/locations/{location}/datasets/{dataset}`. + string dataset = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "automl.googleapis.com/Dataset" + } + ]; + + // Required. Display name of the Dataset in AI Platform. + // System will pick a display name if unspecified. + string dataset_display_name = 2 [(google.api.field_behavior) = REQUIRED]; + } + + // Config for migrating Dataset in datalabeling.googleapis.com to AI + // Platform's Dataset. + message MigrateDataLabelingDatasetConfig { + // Config for migrating AnnotatedDataset in datalabeling.googleapis.com to + // AI Platform's SavedQuery. + message MigrateDataLabelingAnnotatedDatasetConfig { + // Required. Full resource name of data labeling AnnotatedDataset. + // Format: + // + // `projects/{project}/datasets/{dataset}/annotatedDatasets/{annotated_dataset}`. + string annotated_dataset = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datalabeling.googleapis.com/AnnotatedDataset" + } + ]; + } + + // Required. Full resource name of data labeling Dataset. + // Format: + // `projects/{project}/datasets/{dataset}`. + string dataset = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datalabeling.googleapis.com/Dataset" + } + ]; + + // Optional. Display name of the Dataset in AI Platform. + // System will pick a display name if unspecified. + string dataset_display_name = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configs for migrating AnnotatedDataset in datalabeling.googleapis.com to + // AI Platform's SavedQuery. The specified AnnotatedDatasets have to belong + // to the datalabeling Dataset. + repeated MigrateDataLabelingAnnotatedDatasetConfig migrate_data_labeling_annotated_dataset_configs = 3 [(google.api.field_behavior) = OPTIONAL]; + } + + oneof request { + // Config for migrating Version in ml.googleapis.com to AI Platform's Model. + MigrateMlEngineModelVersionConfig migrate_ml_engine_model_version_config = 1; + + // Config for migrating Model in automl.googleapis.com to AI Platform's + // Model. + MigrateAutomlModelConfig migrate_automl_model_config = 2; + + // Config for migrating Dataset in automl.googleapis.com to AI Platform's + // Dataset. + MigrateAutomlDatasetConfig migrate_automl_dataset_config = 3; + + // Config for migrating Dataset in datalabeling.googleapis.com to + // AI Platform's Dataset. + MigrateDataLabelingDatasetConfig migrate_data_labeling_dataset_config = 4; + } +} + +// Response message for [MigrationService.BatchMigrateResources][google.cloud.aiplatform.v1.MigrationService.BatchMigrateResources]. +message BatchMigrateResourcesResponse { + // Successfully migrated resources. + repeated MigrateResourceResponse migrate_resource_responses = 1; +} + +// Describes a successfully migrated resource. +message MigrateResourceResponse { + // After migration, the resource name in AI Platform. + oneof migrated_resource { + // Migrated Dataset's resource name. + string dataset = 1 [(google.api.resource_reference) = { + type: "aiplatform.googleapis.com/Dataset" + }]; + + // Migrated Model's resource name. + string model = 2 [(google.api.resource_reference) = { + type: "aiplatform.googleapis.com/Model" + }]; + } + + // Before migration, the identifier in ml.googleapis.com, + // automl.googleapis.com or datalabeling.googleapis.com. + MigratableResource migratable_resource = 3; +} + +// Runtime operation information for [MigrationService.BatchMigrateResources][google.cloud.aiplatform.v1.MigrationService.BatchMigrateResources]. +message BatchMigrateResourcesOperationMetadata { + // Represents a partial result in batch migration operation for one + // [MigrateResourceRequest][google.cloud.aiplatform.v1.MigrateResourceRequest]. + message PartialResult { + // If the resource's migration is ongoing, none of the result will be set. + // If the resource's migration is finished, either error or one of the + // migrated resource name will be filled. + oneof result { + // The error result of the migration request in case of failure. + google.rpc.Status error = 2; + + // Migrated model resource name. + string model = 3 [(google.api.resource_reference) = { + type: "aiplatform.googleapis.com/Model" + }]; + + // Migrated dataset resource name. + string dataset = 4 [(google.api.resource_reference) = { + type: "aiplatform.googleapis.com/Dataset" + }]; + } + + // It's the same as the value in + // [MigrateResourceRequest.migrate_resource_requests][]. + MigrateResourceRequest request = 1; + } + + // The common part of the operation metadata. + GenericOperationMetadata generic_metadata = 1; + + // Partial results that reflect the latest migration operation progress. + repeated PartialResult partial_results = 2; +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/model.proto b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/model.proto new file mode 100644 index 000000000..cf003c645 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/model.proto @@ -0,0 +1,524 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.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.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/aiplatform/v1/dataset.proto"; +import "google/cloud/aiplatform/v1/deployed_model_ref.proto"; +import "google/cloud/aiplatform/v1/encryption_spec.proto"; +import "google/cloud/aiplatform/v1/env_var.proto"; +import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1;aiplatform"; +option java_multiple_files = true; +option java_outer_classname = "ModelProto"; +option java_package = "com.google.cloud.aiplatform.v1"; + +// A trained machine learning Model. +message Model { + option (google.api.resource) = { + type: "aiplatform.googleapis.com/Model" + pattern: "projects/{project}/locations/{location}/models/{model}" + }; + + // Represents export format supported by the Model. + // All formats export to Google Cloud Storage. + message ExportFormat { + // The Model content that can be exported. + enum ExportableContent { + // Should not be used. + EXPORTABLE_CONTENT_UNSPECIFIED = 0; + + // Model artifact and any of its supported files. Will be exported to the + // location specified by the `artifactDestination` field of the + // [ExportModelRequest.output_config][google.cloud.aiplatform.v1.ExportModelRequest.output_config] object. + ARTIFACT = 1; + + // The container image that is to be used when deploying this Model. Will + // be exported to the location specified by the `imageDestination` field + // of the [ExportModelRequest.output_config][google.cloud.aiplatform.v1.ExportModelRequest.output_config] object. + IMAGE = 2; + } + + // Output only. The ID of the export format. + // The possible format IDs are: + // + // * `tflite` + // Used for Android mobile devices. + // + // * `edgetpu-tflite` + // Used for [Edge TPU](https://cloud.google.com/edge-tpu/) devices. + // + // * `tf-saved-model` + // A tensorflow model in SavedModel format. + // + // * `tf-js` + // A [TensorFlow.js](https://www.tensorflow.org/js) model that can be used + // in the browser and in Node.js using JavaScript. + // + // * `core-ml` + // Used for iOS mobile devices. + // + // * `custom-trained` + // A Model that was uploaded or trained by custom code. + string id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The content of this Model that may be exported. + repeated ExportableContent exportable_contents = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Identifies a type of Model's prediction resources. + enum DeploymentResourcesType { + // Should not be used. + DEPLOYMENT_RESOURCES_TYPE_UNSPECIFIED = 0; + + // Resources that are dedicated to the [DeployedModel][google.cloud.aiplatform.v1.DeployedModel], and that need a + // higher degree of manual configuration. + DEDICATED_RESOURCES = 1; + + // Resources that to large degree are decided by AI Platform, and require + // only a modest additional configuration. + AUTOMATIC_RESOURCES = 2; + } + + // The resource name of the Model. + string name = 1; + + // Required. The display name of the Model. + // The name can be up to 128 characters long and can be consist of any UTF-8 + // characters. + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // The description of the Model. + string description = 3; + + // The schemata that describe formats of the Model's predictions and + // explanations as given and returned via + // [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] and [PredictionService.Explain][]. + PredictSchemata predict_schemata = 4; + + // Immutable. Points to a YAML file stored on Google Cloud Storage describing additional + // information about the Model, that is specific to it. Unset if the Model + // does not have any additional information. + // The schema is defined as an OpenAPI 3.0.2 + // [Schema Object](https://tinyurl.com/y538mdwt#schema-object). + // AutoML Models always have this field populated by AI Platform, if no + // additional metadata is needed, this field is set to an empty string. + // Note: The URI given on output will be immutable and probably different, + // including the URI scheme, than the one given on input. The output URI will + // point to a location where the user only has a read access. + string metadata_schema_uri = 5 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. An additional information about the Model; the schema of the metadata can + // be found in [metadata_schema][google.cloud.aiplatform.v1.Model.metadata_schema_uri]. + // Unset if the Model does not have any additional information. + google.protobuf.Value metadata = 6 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. The formats in which this Model may be exported. If empty, this Model is + // not available for export. + repeated ExportFormat supported_export_formats = 20 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The resource name of the TrainingPipeline that uploaded this Model, if any. + string training_pipeline = 7 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/TrainingPipeline" + } + ]; + + // Input only. The specification of the container that is to be used when deploying + // this Model. The specification is ingested upon + // [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel], and all binaries it contains are copied + // and stored internally by AI Platform. + // Not present for AutoML Models. + ModelContainerSpec container_spec = 9 [(google.api.field_behavior) = INPUT_ONLY]; + + // Immutable. The path to the directory containing the Model artifact and any of its + // supporting files. + // Not present for AutoML Models. + string artifact_uri = 26 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. When this Model is deployed, its prediction resources are described by the + // `prediction_resources` field of the [Endpoint.deployed_models][google.cloud.aiplatform.v1.Endpoint.deployed_models] object. + // Because not all Models support all resource configuration types, the + // configuration types this Model supports are listed here. If no + // configuration types are listed, the Model cannot be deployed to an + // [Endpoint][google.cloud.aiplatform.v1.Endpoint] and does not support + // online predictions ([PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] or + // [PredictionService.Explain][]). Such a Model can serve predictions by + // using a [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob], if it has at least one entry each in + // [supported_input_storage_formats][google.cloud.aiplatform.v1.Model.supported_input_storage_formats] and + // [supported_output_storage_formats][google.cloud.aiplatform.v1.Model.supported_output_storage_formats]. + repeated DeploymentResourcesType supported_deployment_resources_types = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The formats this Model supports in + // [BatchPredictionJob.input_config][google.cloud.aiplatform.v1.BatchPredictionJob.input_config]. If + // [PredictSchemata.instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri] exists, the instances + // should be given as per that schema. + // + // The possible formats are: + // + // * `jsonl` + // The JSON Lines format, where each instance is a single line. Uses + // [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source]. + // + // * `csv` + // The CSV format, where each instance is a single comma-separated line. + // The first line in the file is the header, containing comma-separated field + // names. Uses [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source]. + // + // * `tf-record` + // The TFRecord format, where each instance is a single record in tfrecord + // syntax. Uses [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source]. + // + // * `tf-record-gzip` + // Similar to `tf-record`, but the file is gzipped. Uses + // [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source]. + // + // * `bigquery` + // Each instance is a single row in BigQuery. Uses + // [BigQuerySource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.bigquery_source]. + // + // * `file-list` + // Each line of the file is the location of an instance to process, uses + // `gcs_source` field of the + // [InputConfig][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig] object. + // + // + // If this Model doesn't support any of these formats it means it cannot be + // used with a [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob]. However, if it has + // [supported_deployment_resources_types][google.cloud.aiplatform.v1.Model.supported_deployment_resources_types], it could serve online + // predictions by using [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] or + // [PredictionService.Explain][]. + repeated string supported_input_storage_formats = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The formats this Model supports in + // [BatchPredictionJob.output_config][google.cloud.aiplatform.v1.BatchPredictionJob.output_config]. If both + // [PredictSchemata.instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri] and + // [PredictSchemata.prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri] exist, the predictions + // are returned together with their instances. In other words, the + // prediction has the original instance data first, followed + // by the actual prediction content (as per the schema). + // + // The possible formats are: + // + // * `jsonl` + // The JSON Lines format, where each prediction is a single line. Uses + // [GcsDestination][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.gcs_destination]. + // + // * `csv` + // The CSV format, where each prediction is a single comma-separated line. + // The first line in the file is the header, containing comma-separated field + // names. Uses + // [GcsDestination][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.gcs_destination]. + // + // * `bigquery` + // Each prediction is a single row in a BigQuery table, uses + // [BigQueryDestination][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.bigquery_destination] + // . + // + // + // If this Model doesn't support any of these formats it means it cannot be + // used with a [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob]. However, if it has + // [supported_deployment_resources_types][google.cloud.aiplatform.v1.Model.supported_deployment_resources_types], it could serve online + // predictions by using [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] or + // [PredictionService.Explain][]. + repeated string supported_output_storage_formats = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Timestamp when this Model was uploaded into AI Platform. + google.protobuf.Timestamp create_time = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Timestamp when this Model was most recently updated. + google.protobuf.Timestamp update_time = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The pointers to DeployedModels created from this Model. Note that + // Model could have been deployed to Endpoints in different Locations. + repeated DeployedModelRef deployed_models = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Used to perform consistent read-modify-write updates. If not set, a blind + // "overwrite" update happens. + string etag = 16; + + // The labels with user-defined metadata to organize your Models. + // + // Label keys and values can be no longer than 64 characters + // (Unicode codepoints), can only contain lowercase letters, numeric + // characters, underscores and dashes. International characters are allowed. + // + // See https://goo.gl/xmQnxf for more information and examples of labels. + map labels = 17; + + // Customer-managed encryption key spec for a Model. If set, this + // Model and all sub-resources of this Model will be secured by this key. + EncryptionSpec encryption_spec = 24; +} + +// Contains the schemata used in Model's predictions and explanations via +// [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict], [PredictionService.Explain][] and +// [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob]. +message PredictSchemata { + // Immutable. Points to a YAML file stored on Google Cloud Storage describing the format + // of a single instance, which are used in [PredictRequest.instances][google.cloud.aiplatform.v1.PredictRequest.instances], + // [ExplainRequest.instances][] and + // [BatchPredictionJob.input_config][google.cloud.aiplatform.v1.BatchPredictionJob.input_config]. + // The schema is defined as an OpenAPI 3.0.2 + // [Schema Object](https://tinyurl.com/y538mdwt#schema-object). + // AutoML Models always have this field populated by AI Platform. + // Note: The URI given on output will be immutable and probably different, + // including the URI scheme, than the one given on input. The output URI will + // point to a location where the user only has a read access. + string instance_schema_uri = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Points to a YAML file stored on Google Cloud Storage describing the + // parameters of prediction and explanation via + // [PredictRequest.parameters][google.cloud.aiplatform.v1.PredictRequest.parameters], [ExplainRequest.parameters][] and + // [BatchPredictionJob.model_parameters][google.cloud.aiplatform.v1.BatchPredictionJob.model_parameters]. + // The schema is defined as an OpenAPI 3.0.2 + // [Schema Object](https://tinyurl.com/y538mdwt#schema-object). + // AutoML Models always have this field populated by AI Platform, if no + // parameters are supported, then it is set to an empty string. + // Note: The URI given on output will be immutable and probably different, + // including the URI scheme, than the one given on input. The output URI will + // point to a location where the user only has a read access. + string parameters_schema_uri = 2 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Points to a YAML file stored on Google Cloud Storage describing the format + // of a single prediction produced by this Model, which are returned via + // [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions], [ExplainResponse.explanations][], and + // [BatchPredictionJob.output_config][google.cloud.aiplatform.v1.BatchPredictionJob.output_config]. + // The schema is defined as an OpenAPI 3.0.2 + // [Schema Object](https://tinyurl.com/y538mdwt#schema-object). + // AutoML Models always have this field populated by AI Platform. + // Note: The URI given on output will be immutable and probably different, + // including the URI scheme, than the one given on input. The output URI will + // point to a location where the user only has a read access. + string prediction_schema_uri = 3 [(google.api.field_behavior) = IMMUTABLE]; +} + +// Specification of a container for serving predictions. This message is a +// subset of the Kubernetes Container v1 core +// [specification](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core). +message ModelContainerSpec { + // Required. Immutable. URI of the Docker image to be used as the custom container for serving + // predictions. This URI must identify an image in Artifact Registry or + // Container Registry. Learn more about the container publishing + // requirements, including permissions requirements for the AI Platform + // Service Agent, + // [here](https://tinyurl.com/cust-cont-reqs#publishing). + // + // The container image is ingested upon [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel], stored + // internally, and this original path is afterwards not used. + // + // To learn about the requirements for the Docker image itself, see + // [Custom container requirements](https://tinyurl.com/cust-cont-reqs). + string image_uri = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Immutable. Specifies the command that runs when the container starts. This overrides + // the container's + // [ENTRYPOINT](https://docs.docker.com/engine/reference/builder/#entrypoint). + // Specify this field as an array of executable and arguments, similar to a + // Docker `ENTRYPOINT`'s "exec" form, not its "shell" form. + // + // If you do not specify this field, then the container's `ENTRYPOINT` runs, + // in conjunction with the [args][google.cloud.aiplatform.v1.ModelContainerSpec.args] field or the + // container's [`CMD`](https://docs.docker.com/engine/reference/builder/#cmd), + // if either exists. If this field is not specified and the container does not + // have an `ENTRYPOINT`, then refer to the Docker documentation about how + // `CMD` and `ENTRYPOINT` + // [interact](https://tinyurl.com/h3kdcgs). + // + // If you specify this field, then you can also specify the `args` field to + // provide additional arguments for this command. However, if you specify this + // field, then the container's `CMD` is ignored. See the + // [Kubernetes documentation](https://tinyurl.com/y8bvllf4) about how the + // `command` and `args` fields interact with a container's `ENTRYPOINT` and + // `CMD`. + // + // In this field, you can reference environment variables + // [set by AI Platform](https://tinyurl.com/cust-cont-reqs#aip-variables) + // and environment variables set in the [env][google.cloud.aiplatform.v1.ModelContainerSpec.env] field. + // You cannot reference environment variables set in the Docker image. In + // order for environment variables to be expanded, reference them by using the + // following syntax: + // $(VARIABLE_NAME) + // Note that this differs from Bash variable expansion, which does not use + // parentheses. If a variable cannot be resolved, the reference in the input + // string is used unchanged. To avoid variable expansion, you can escape this + // syntax with `$$`; for example: + // $$(VARIABLE_NAME) + // This field corresponds to the `command` field of the Kubernetes Containers + // [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core). + repeated string command = 2 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Specifies arguments for the command that runs when the container starts. + // This overrides the container's + // [`CMD`](https://docs.docker.com/engine/reference/builder/#cmd). Specify + // this field as an array of executable and arguments, similar to a Docker + // `CMD`'s "default parameters" form. + // + // If you don't specify this field but do specify the + // [command][google.cloud.aiplatform.v1.ModelContainerSpec.command] field, then the command from the + // `command` field runs without any additional arguments. See the + // [Kubernetes documentation](https://tinyurl.com/y8bvllf4) about how the + // `command` and `args` fields interact with a container's `ENTRYPOINT` and + // `CMD`. + // + // If you don't specify this field and don't specify the `command` field, + // then the container's + // [`ENTRYPOINT`](https://docs.docker.com/engine/reference/builder/#cmd) and + // `CMD` determine what runs based on their default behavior. See the Docker + // documentation about how `CMD` and `ENTRYPOINT` + // [interact](https://tinyurl.com/h3kdcgs). + // + // In this field, you can reference environment variables + // [set by AI Platform](https://tinyurl.com/cust-cont-reqs#aip-variables) + // and environment variables set in the [env][google.cloud.aiplatform.v1.ModelContainerSpec.env] field. + // You cannot reference environment variables set in the Docker image. In + // order for environment variables to be expanded, reference them by using the + // following syntax: + // $(VARIABLE_NAME) + // Note that this differs from Bash variable expansion, which does not use + // parentheses. If a variable cannot be resolved, the reference in the input + // string is used unchanged. To avoid variable expansion, you can escape this + // syntax with `$$`; for example: + // $$(VARIABLE_NAME) + // This field corresponds to the `args` field of the Kubernetes Containers + // [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core). + repeated string args = 3 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. List of environment variables to set in the container. After the container + // starts running, code running in the container can read these environment + // variables. + // + // Additionally, the [command][google.cloud.aiplatform.v1.ModelContainerSpec.command] and + // [args][google.cloud.aiplatform.v1.ModelContainerSpec.args] fields can reference these variables. Later + // entries in this list can also reference earlier entries. For example, the + // following example sets the variable `VAR_2` to have the value `foo bar`: + // + // ```json + // [ + // { + // "name": "VAR_1", + // "value": "foo" + // }, + // { + // "name": "VAR_2", + // "value": "$(VAR_1) bar" + // } + // ] + // ``` + // + // If you switch the order of the variables in the example, then the expansion + // does not occur. + // + // This field corresponds to the `env` field of the Kubernetes Containers + // [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core). + repeated EnvVar env = 4 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. List of ports to expose from the container. AI Platform sends any + // prediction requests that it receives to the first port on this list. AI + // Platform also sends + // [liveness and health checks](https://tinyurl.com/cust-cont-reqs#health) + // to this port. + // + // If you do not specify this field, it defaults to following value: + // + // ```json + // [ + // { + // "containerPort": 8080 + // } + // ] + // ``` + // + // AI Platform does not use ports other than the first one listed. This field + // corresponds to the `ports` field of the Kubernetes Containers + // [v1 core API](https://tinyurl.com/k8s-io-api/v1.18/#container-v1-core). + repeated Port ports = 5 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. HTTP path on the container to send prediction requests to. AI Platform + // forwards requests sent using + // [projects.locations.endpoints.predict][google.cloud.aiplatform.v1.PredictionService.Predict] to this + // path on the container's IP address and port. AI Platform then returns the + // container's response in the API response. + // + // For example, if you set this field to `/foo`, then when AI Platform + // receives a prediction request, it forwards the request body in a POST + // request to the `/foo` path on the port of your container specified by the + // first value of this `ModelContainerSpec`'s + // [ports][google.cloud.aiplatform.v1.ModelContainerSpec.ports] field. + // + // If you don't specify this field, it defaults to the following value when + // you [deploy this Model to an Endpoint][google.cloud.aiplatform.v1.EndpointService.DeployModel]: + // /v1/endpoints/ENDPOINT/deployedModels/DEPLOYED_MODEL:predict + // The placeholders in this value are replaced as follows: + // + // * ENDPOINT: The last segment (following `endpoints/`)of the + // Endpoint.name][] field of the Endpoint where this Model has been + // deployed. (AI Platform makes this value available to your container code + // as the + // [`AIP_ENDPOINT_ID`](https://tinyurl.com/cust-cont-reqs#aip-variables) + // environment variable.) + // + // * DEPLOYED_MODEL: [DeployedModel.id][google.cloud.aiplatform.v1.DeployedModel.id] of the `DeployedModel`. + // (AI Platform makes this value available to your container code + // as the [`AIP_DEPLOYED_MODEL_ID` environment + // variable](https://tinyurl.com/cust-cont-reqs#aip-variables).) + string predict_route = 6 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. HTTP path on the container to send health checks to. AI Platform + // intermittently sends GET requests to this path on the container's IP + // address and port to check that the container is healthy. Read more about + // [health + // checks](https://tinyurl.com/cust-cont-reqs#checks). + // + // For example, if you set this field to `/bar`, then AI Platform + // intermittently sends a GET request to the `/bar` path on the port of your + // container specified by the first value of this `ModelContainerSpec`'s + // [ports][google.cloud.aiplatform.v1.ModelContainerSpec.ports] field. + // + // If you don't specify this field, it defaults to the following value when + // you [deploy this Model to an Endpoint][google.cloud.aiplatform.v1.EndpointService.DeployModel]: + // /v1/endpoints/ENDPOINT/deployedModels/DEPLOYED_MODEL:predict + // The placeholders in this value are replaced as follows: + // + // * ENDPOINT: The last segment (following `endpoints/`)of the + // Endpoint.name][] field of the Endpoint where this Model has been + // deployed. (AI Platform makes this value available to your container code + // as the + // [`AIP_ENDPOINT_ID`](https://tinyurl.com/cust-cont-reqs#aip-variables) + // environment variable.) + // + // * DEPLOYED_MODEL: [DeployedModel.id][google.cloud.aiplatform.v1.DeployedModel.id] of the `DeployedModel`. + // (AI Platform makes this value available to your container code as the + // [`AIP_DEPLOYED_MODEL_ID`](https://tinyurl.com/cust-cont-reqs#aip-variables) + // environment variable.) + string health_route = 7 [(google.api.field_behavior) = IMMUTABLE]; +} + +// Represents a network port in a container. +message Port { + // The number of the port to expose on the pod's IP address. + // Must be a valid port number, between 1 and 65535 inclusive. + int32 container_port = 3; +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/model_evaluation.proto b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/model_evaluation.proto new file mode 100644 index 000000000..6596a4fc2 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/model_evaluation.proto @@ -0,0 +1,59 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.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.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1;aiplatform"; +option java_multiple_files = true; +option java_outer_classname = "ModelEvaluationProto"; +option java_package = "com.google.cloud.aiplatform.v1"; + +// A collection of metrics calculated by comparing Model's predictions on all of +// the test data against annotations from the test data. +message ModelEvaluation { + option (google.api.resource) = { + type: "aiplatform.googleapis.com/ModelEvaluation" + pattern: "projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}" + }; + + // Output only. The resource name of the ModelEvaluation. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Points to a YAML file stored on Google Cloud Storage describing the + // [metrics][google.cloud.aiplatform.v1.ModelEvaluation.metrics] of this ModelEvaluation. The schema is + // defined as an OpenAPI 3.0.2 + // [Schema Object](https://tinyurl.com/y538mdwt#schema-object). + string metrics_schema_uri = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Evaluation metrics of the Model. The schema of the metrics is stored in + // [metrics_schema_uri][google.cloud.aiplatform.v1.ModelEvaluation.metrics_schema_uri] + google.protobuf.Value metrics = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Timestamp when this ModelEvaluation was created. + google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. All possible [dimensions][ModelEvaluationSlice.slice.dimension] of + // ModelEvaluationSlices. The dimensions can be used as the filter of the + // [ModelService.ListModelEvaluationSlices][google.cloud.aiplatform.v1.ModelService.ListModelEvaluationSlices] request, in the form of + // `slice.dimension = `. + repeated string slice_dimensions = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/model_evaluation_slice.proto b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/model_evaluation_slice.proto new file mode 100644 index 000000000..78656ed7a --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/model_evaluation_slice.proto @@ -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 +// +// 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.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1;aiplatform"; +option java_multiple_files = true; +option java_outer_classname = "ModelEvaluationSliceProto"; +option java_package = "com.google.cloud.aiplatform.v1"; + +// A collection of metrics calculated by comparing Model's predictions on a +// slice of the test data against ground truth annotations. +message ModelEvaluationSlice { + option (google.api.resource) = { + type: "aiplatform.googleapis.com/ModelEvaluationSlice" + pattern: "projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}/slices/{slice}" + }; + + // Definition of a slice. + message Slice { + // Output only. The dimension of the slice. + // Well-known dimensions are: + // * `annotationSpec`: This slice is on the test data that has either + // ground truth or prediction with [AnnotationSpec.display_name][google.cloud.aiplatform.v1.AnnotationSpec.display_name] + // equals to [value][google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.value]. + string dimension = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The value of the dimension in this slice. + string value = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. The resource name of the ModelEvaluationSlice. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The slice of the test data that is used to evaluate the Model. + Slice slice = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Points to a YAML file stored on Google Cloud Storage describing the + // [metrics][google.cloud.aiplatform.v1.ModelEvaluationSlice.metrics] of this ModelEvaluationSlice. The + // schema is defined as an OpenAPI 3.0.2 + // [Schema Object](https://tinyurl.com/y538mdwt#schema-object). + string metrics_schema_uri = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Sliced evaluation metrics of the Model. The schema of the metrics is stored + // in [metrics_schema_uri][google.cloud.aiplatform.v1.ModelEvaluationSlice.metrics_schema_uri] + google.protobuf.Value metrics = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Timestamp when this ModelEvaluationSlice was created. + google.protobuf.Timestamp create_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/model_service.proto b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/model_service.proto new file mode 100644 index 000000000..55c3bf99c --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/model_service.proto @@ -0,0 +1,439 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.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.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/aiplatform/v1/io.proto"; +import "google/cloud/aiplatform/v1/model.proto"; +import "google/cloud/aiplatform/v1/model_evaluation.proto"; +import "google/cloud/aiplatform/v1/model_evaluation_slice.proto"; +import "google/cloud/aiplatform/v1/operation.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/field_mask.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1;aiplatform"; +option java_multiple_files = true; +option java_outer_classname = "ModelServiceProto"; +option java_package = "com.google.cloud.aiplatform.v1"; + +// A service for managing AI Platform's machine learning Models. +service ModelService { + option (google.api.default_host) = "aiplatform.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Uploads a Model artifact into AI Platform. + rpc UploadModel(UploadModelRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/models:upload" + body: "*" + }; + option (google.api.method_signature) = "parent,model"; + option (google.longrunning.operation_info) = { + response_type: "UploadModelResponse" + metadata_type: "UploadModelOperationMetadata" + }; + } + + // Gets a Model. + rpc GetModel(GetModelRequest) returns (Model) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/models/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists Models in a Location. + rpc ListModels(ListModelsRequest) returns (ListModelsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/models" + }; + option (google.api.method_signature) = "parent"; + } + + // Updates a Model. + rpc UpdateModel(UpdateModelRequest) returns (Model) { + option (google.api.http) = { + patch: "/v1/{model.name=projects/*/locations/*/models/*}" + body: "model" + }; + option (google.api.method_signature) = "model,update_mask"; + } + + // Deletes a Model. + // Note: Model can only be deleted if there are no DeployedModels created + // from it. + rpc DeleteModel(DeleteModelRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/models/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "DeleteOperationMetadata" + }; + } + + // 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.v1.Model.supported_export_formats]. + rpc ExportModel(ExportModelRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/models/*}:export" + body: "*" + }; + option (google.api.method_signature) = "name,output_config"; + option (google.longrunning.operation_info) = { + response_type: "ExportModelResponse" + metadata_type: "ExportModelOperationMetadata" + }; + } + + // Gets a ModelEvaluation. + rpc GetModelEvaluation(GetModelEvaluationRequest) returns (ModelEvaluation) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/models/*/evaluations/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists ModelEvaluations in a Model. + rpc ListModelEvaluations(ListModelEvaluationsRequest) returns (ListModelEvaluationsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/models/*}/evaluations" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets a ModelEvaluationSlice. + rpc GetModelEvaluationSlice(GetModelEvaluationSliceRequest) returns (ModelEvaluationSlice) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/models/*/evaluations/*/slices/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists ModelEvaluationSlices in a ModelEvaluation. + rpc ListModelEvaluationSlices(ListModelEvaluationSlicesRequest) returns (ListModelEvaluationSlicesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/models/*/evaluations/*}/slices" + }; + option (google.api.method_signature) = "parent"; + } +} + +// Request message for [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel]. +message UploadModelRequest { + // Required. The resource name of the Location into which to upload the Model. + // Format: `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. The Model to create. + Model model = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Details of [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel] operation. +message UploadModelOperationMetadata { + // The common part of the operation metadata. + GenericOperationMetadata generic_metadata = 1; +} + +// Response message of [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel] operation. +message UploadModelResponse { + // The name of the uploaded Model resource. + // Format: `projects/{project}/locations/{location}/models/{model}` + string model = 1 [(google.api.resource_reference) = { + type: "aiplatform.googleapis.com/Model" + }]; +} + +// Request message for [ModelService.GetModel][google.cloud.aiplatform.v1.ModelService.GetModel]. +message GetModelRequest { + // Required. The name of the Model resource. + // Format: `projects/{project}/locations/{location}/models/{model}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/Model" + } + ]; +} + +// Request message for [ModelService.ListModels][google.cloud.aiplatform.v1.ModelService.ListModels]. +message ListModelsRequest { + // Required. The resource name of the Location to list the Models from. + // Format: `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // An expression for filtering the results of the request. For field names + // both snake_case and camelCase are supported. + // + // * `model` supports = and !=. `model` represents the Model ID, + // i.e. the last segment of the Model's [resource name][google.cloud.aiplatform.v1.Model.name]. + // * `display_name` supports = and != + // * `labels` supports general map functions that is: + // * `labels.key=value` - key:value equality + // * `labels.key:* or labels:key - key existence + // * A key including a space must be quoted. `labels."a key"`. + // + // Some examples: + // * `model=1234` + // * `displayName="myDisplayName"` + // * `labels.myKey="myValue"` + string filter = 2; + + // The standard list page size. + int32 page_size = 3; + + // The standard list page token. + // Typically obtained via + // [ListModelsResponse.next_page_token][google.cloud.aiplatform.v1.ListModelsResponse.next_page_token] of the previous + // [ModelService.ListModels][google.cloud.aiplatform.v1.ModelService.ListModels] call. + string page_token = 4; + + // Mask specifying which fields to read. + google.protobuf.FieldMask read_mask = 5; + + // A comma-separated list of fields to order by, sorted in ascending order. + // Use "desc" after a field name for descending. + // Supported fields: + // * `display_name` + // * `create_time` + // * `update_time` + // + // Example: `display_name, create_time desc`. + string order_by = 6; +} + +// Response message for [ModelService.ListModels][google.cloud.aiplatform.v1.ModelService.ListModels] +message ListModelsResponse { + // List of Models in the requested page. + repeated Model models = 1; + + // A token to retrieve next page of results. + // Pass to [ListModelsRequest.page_token][google.cloud.aiplatform.v1.ListModelsRequest.page_token] to obtain that page. + string next_page_token = 2; +} + +// Request message for [ModelService.UpdateModel][google.cloud.aiplatform.v1.ModelService.UpdateModel]. +message UpdateModelRequest { + // Required. The Model which replaces the resource on the server. + Model model = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The update mask applies to the resource. + // For the `FieldMask` definition, see + // [FieldMask](https://tinyurl.com/protobufs/google.protobuf#fieldmask). + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for [ModelService.DeleteModel][google.cloud.aiplatform.v1.ModelService.DeleteModel]. +message DeleteModelRequest { + // Required. The name of the Model resource to be deleted. + // Format: `projects/{project}/locations/{location}/models/{model}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/Model" + } + ]; +} + +// Request message for [ModelService.ExportModel][google.cloud.aiplatform.v1.ModelService.ExportModel]. +message ExportModelRequest { + // Output configuration for the Model export. + message OutputConfig { + // The ID of the format in which the Model must be exported. Each Model + // lists the [export formats it supports][google.cloud.aiplatform.v1.Model.supported_export_formats]. + // If no value is provided here, then the first from the list of the Model's + // supported formats is used by default. + string export_format_id = 1; + + // The Cloud Storage location where the Model artifact is to be + // written to. Under the directory given as the destination a new one with + // name "`model-export--`", + // where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format, + // will be created. Inside, the Model and any of its supporting files + // will be written. + // This field should only be set when the `exportableContent` field of the + // [Model.supported_export_formats] object contains `ARTIFACT`. + GcsDestination artifact_destination = 3; + + // The Google Container Registry or Artifact Registry uri where the + // Model container image will be copied to. + // This field should only be set when the `exportableContent` field of the + // [Model.supported_export_formats] object contains `IMAGE`. + ContainerRegistryDestination image_destination = 4; + } + + // Required. The resource name of the Model to export. + // Format: `projects/{project}/locations/{location}/models/{model}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/Model" + } + ]; + + // Required. The desired output location and configuration. + OutputConfig output_config = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Details of [ModelService.ExportModel][google.cloud.aiplatform.v1.ModelService.ExportModel] operation. +message ExportModelOperationMetadata { + // Further describes the output of the ExportModel. Supplements + // [ExportModelRequest.OutputConfig][google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig]. + message OutputInfo { + // Output only. If the Model artifact is being exported to Google Cloud Storage this is + // the full path of the directory created, into which the Model files are + // being written to. + string artifact_output_uri = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. If the Model image is being exported to Google Container Registry or + // Artifact Registry this is the full path of the image created. + string image_output_uri = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // The common part of the operation metadata. + GenericOperationMetadata generic_metadata = 1; + + // Output only. Information further describing the output of this Model export. + OutputInfo output_info = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Response message of [ModelService.ExportModel][google.cloud.aiplatform.v1.ModelService.ExportModel] operation. +message ExportModelResponse { + +} + +// Request message for [ModelService.GetModelEvaluation][google.cloud.aiplatform.v1.ModelService.GetModelEvaluation]. +message GetModelEvaluationRequest { + // Required. The name of the ModelEvaluation resource. + // Format: + // + // `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/ModelEvaluation" + } + ]; +} + +// Request message for [ModelService.ListModelEvaluations][google.cloud.aiplatform.v1.ModelService.ListModelEvaluations]. +message ListModelEvaluationsRequest { + // Required. The resource name of the Model to list the ModelEvaluations from. + // Format: `projects/{project}/locations/{location}/models/{model}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/Model" + } + ]; + + // The standard list filter. + string filter = 2; + + // The standard list page size. + int32 page_size = 3; + + // The standard list page token. + // Typically obtained via + // [ListModelEvaluationsResponse.next_page_token][google.cloud.aiplatform.v1.ListModelEvaluationsResponse.next_page_token] of the previous + // [ModelService.ListModelEvaluations][google.cloud.aiplatform.v1.ModelService.ListModelEvaluations] call. + string page_token = 4; + + // Mask specifying which fields to read. + google.protobuf.FieldMask read_mask = 5; +} + +// Response message for [ModelService.ListModelEvaluations][google.cloud.aiplatform.v1.ModelService.ListModelEvaluations]. +message ListModelEvaluationsResponse { + // List of ModelEvaluations in the requested page. + repeated ModelEvaluation model_evaluations = 1; + + // A token to retrieve next page of results. + // Pass to [ListModelEvaluationsRequest.page_token][google.cloud.aiplatform.v1.ListModelEvaluationsRequest.page_token] to obtain that page. + string next_page_token = 2; +} + +// Request message for [ModelService.GetModelEvaluationSlice][google.cloud.aiplatform.v1.ModelService.GetModelEvaluationSlice]. +message GetModelEvaluationSliceRequest { + // Required. The name of the ModelEvaluationSlice resource. + // Format: + // + // `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}/slices/{slice}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/ModelEvaluationSlice" + } + ]; +} + +// Request message for [ModelService.ListModelEvaluationSlices][google.cloud.aiplatform.v1.ModelService.ListModelEvaluationSlices]. +message ListModelEvaluationSlicesRequest { + // Required. The resource name of the ModelEvaluation to list the ModelEvaluationSlices + // from. Format: + // + // `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/ModelEvaluation" + } + ]; + + // The standard list filter. + // + // * `slice.dimension` - for =. + string filter = 2; + + // The standard list page size. + int32 page_size = 3; + + // The standard list page token. + // Typically obtained via + // [ListModelEvaluationSlicesResponse.next_page_token][google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponse.next_page_token] of the previous + // [ModelService.ListModelEvaluationSlices][google.cloud.aiplatform.v1.ModelService.ListModelEvaluationSlices] call. + string page_token = 4; + + // Mask specifying which fields to read. + google.protobuf.FieldMask read_mask = 5; +} + +// Response message for [ModelService.ListModelEvaluationSlices][google.cloud.aiplatform.v1.ModelService.ListModelEvaluationSlices]. +message ListModelEvaluationSlicesResponse { + // List of ModelEvaluations in the requested page. + repeated ModelEvaluationSlice model_evaluation_slices = 1; + + // A token to retrieve next page of results. + // Pass to [ListModelEvaluationSlicesRequest.page_token][google.cloud.aiplatform.v1.ListModelEvaluationSlicesRequest.page_token] to obtain that + // page. + string next_page_token = 2; +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/operation.proto b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/operation.proto new file mode 100644 index 000000000..e3b1d3c73 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/operation.proto @@ -0,0 +1,50 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.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.v1; + +import "google/api/field_behavior.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1;aiplatform"; +option java_multiple_files = true; +option java_outer_classname = "OperationProto"; +option java_package = "com.google.cloud.aiplatform.v1"; + +// Generic Metadata shared by all operations. +message GenericOperationMetadata { + // Output only. Partial failures encountered. + // E.g. single files that couldn't be read. + // This field should never exceed 20 entries. + // Status details field will contain standard GCP error details. + repeated google.rpc.Status partial_failures = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when the operation was created. + google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when the operation was updated for the last time. + // If the operation has finished (successfully or not), this is the finish + // time. + google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Details of operations that perform deletes of any entities. +message DeleteOperationMetadata { + // The common part of the operation metadata. + GenericOperationMetadata generic_metadata = 1; +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/pipeline_service.proto b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/pipeline_service.proto new file mode 100644 index 000000000..60d06d60c --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/pipeline_service.proto @@ -0,0 +1,202 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.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.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/aiplatform/v1/training_pipeline.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1;aiplatform"; +option java_multiple_files = true; +option java_outer_classname = "PipelineServiceProto"; +option java_package = "com.google.cloud.aiplatform.v1"; + +// A service for creating and managing AI Platform's pipelines. +service PipelineService { + option (google.api.default_host) = "aiplatform.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Creates a TrainingPipeline. A created TrainingPipeline right away will be + // attempted to be run. + rpc CreateTrainingPipeline(CreateTrainingPipelineRequest) returns (TrainingPipeline) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/trainingPipelines" + body: "training_pipeline" + }; + option (google.api.method_signature) = "parent,training_pipeline"; + } + + // Gets a TrainingPipeline. + rpc GetTrainingPipeline(GetTrainingPipelineRequest) returns (TrainingPipeline) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/trainingPipelines/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists TrainingPipelines in a Location. + rpc ListTrainingPipelines(ListTrainingPipelinesRequest) returns (ListTrainingPipelinesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/trainingPipelines" + }; + option (google.api.method_signature) = "parent"; + } + + // Deletes a TrainingPipeline. + rpc DeleteTrainingPipeline(DeleteTrainingPipelineRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/trainingPipelines/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "DeleteOperationMetadata" + }; + } + + // 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 use [PipelineService.GetTrainingPipeline][google.cloud.aiplatform.v1.PipelineService.GetTrainingPipeline] or + // other methods to check whether the cancellation succeeded or whether the + // pipeline completed despite cancellation. On successful cancellation, + // the TrainingPipeline is not deleted; instead it becomes a pipeline with + // a [TrainingPipeline.error][google.cloud.aiplatform.v1.TrainingPipeline.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, + // corresponding to `Code.CANCELLED`, and [TrainingPipeline.state][google.cloud.aiplatform.v1.TrainingPipeline.state] is set to + // `CANCELLED`. + rpc CancelTrainingPipeline(CancelTrainingPipelineRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/trainingPipelines/*}:cancel" + body: "*" + }; + option (google.api.method_signature) = "name"; + } +} + +// Request message for [PipelineService.CreateTrainingPipeline][google.cloud.aiplatform.v1.PipelineService.CreateTrainingPipeline]. +message CreateTrainingPipelineRequest { + // Required. The resource name of the Location to create the TrainingPipeline in. + // Format: `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. The TrainingPipeline to create. + TrainingPipeline training_pipeline = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for [PipelineService.GetTrainingPipeline][google.cloud.aiplatform.v1.PipelineService.GetTrainingPipeline]. +message GetTrainingPipelineRequest { + // Required. The name of the TrainingPipeline resource. + // Format: + // + // `projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/TrainingPipeline" + } + ]; +} + +// Request message for [PipelineService.ListTrainingPipelines][google.cloud.aiplatform.v1.PipelineService.ListTrainingPipelines]. +message ListTrainingPipelinesRequest { + // Required. The resource name of the Location to list the TrainingPipelines from. + // Format: `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // The standard list filter. + // Supported fields: + // + // * `display_name` supports = and !=. + // + // * `state` supports = and !=. + // + // Some examples of using the filter are: + // + // * `state="PIPELINE_STATE_SUCCEEDED" AND display_name="my_pipeline"` + // + // * `state="PIPELINE_STATE_RUNNING" OR display_name="my_pipeline"` + // + // * `NOT display_name="my_pipeline"` + // + // * `state="PIPELINE_STATE_FAILED"` + string filter = 2; + + // The standard list page size. + int32 page_size = 3; + + // The standard list page token. + // Typically obtained via + // [ListTrainingPipelinesResponse.next_page_token][google.cloud.aiplatform.v1.ListTrainingPipelinesResponse.next_page_token] of the previous + // [PipelineService.ListTrainingPipelines][google.cloud.aiplatform.v1.PipelineService.ListTrainingPipelines] call. + string page_token = 4; + + // Mask specifying which fields to read. + google.protobuf.FieldMask read_mask = 5; +} + +// Response message for [PipelineService.ListTrainingPipelines][google.cloud.aiplatform.v1.PipelineService.ListTrainingPipelines] +message ListTrainingPipelinesResponse { + // List of TrainingPipelines in the requested page. + repeated TrainingPipeline training_pipelines = 1; + + // A token to retrieve the next page of results. + // Pass to [ListTrainingPipelinesRequest.page_token][google.cloud.aiplatform.v1.ListTrainingPipelinesRequest.page_token] to obtain that page. + string next_page_token = 2; +} + +// Request message for [PipelineService.DeleteTrainingPipeline][google.cloud.aiplatform.v1.PipelineService.DeleteTrainingPipeline]. +message DeleteTrainingPipelineRequest { + // Required. The name of the TrainingPipeline resource to be deleted. + // Format: + // + // `projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/TrainingPipeline" + } + ]; +} + +// Request message for [PipelineService.CancelTrainingPipeline][google.cloud.aiplatform.v1.PipelineService.CancelTrainingPipeline]. +message CancelTrainingPipelineRequest { + // Required. The name of the TrainingPipeline to cancel. + // Format: + // + // `projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/TrainingPipeline" + } + ]; +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/pipeline_state.proto b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/pipeline_state.proto new file mode 100644 index 000000000..42abd26f1 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/pipeline_state.proto @@ -0,0 +1,57 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.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.v1; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1;aiplatform"; +option java_multiple_files = true; +option java_outer_classname = "PipelineStateProto"; +option java_package = "com.google.cloud.aiplatform.v1"; + +// Describes the state of a pipeline. +enum PipelineState { + // The pipeline state is unspecified. + PIPELINE_STATE_UNSPECIFIED = 0; + + // The pipeline has been just created or resumed and processing has not yet + // begun. + PIPELINE_STATE_QUEUED = 1; + + // The service is preparing to run the pipeline. + PIPELINE_STATE_PENDING = 2; + + // The pipeline is in progress. + PIPELINE_STATE_RUNNING = 3; + + // The pipeline completed successfully. + PIPELINE_STATE_SUCCEEDED = 4; + + // The pipeline failed. + PIPELINE_STATE_FAILED = 5; + + // The pipeline is being cancelled. From this state the pipeline may only go + // to either PIPELINE_STATE_SUCCEEDED, PIPELINE_STATE_FAILED or + // PIPELINE_STATE_CANCELLED. + PIPELINE_STATE_CANCELLING = 6; + + // The pipeline has been cancelled. + PIPELINE_STATE_CANCELLED = 7; + + // The pipeline has been stopped, and can be resumed. + PIPELINE_STATE_PAUSED = 8; +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/prediction_service.proto b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/prediction_service.proto new file mode 100644 index 000000000..146c1a47a --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/prediction_service.proto @@ -0,0 +1,86 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.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.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/struct.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1;aiplatform"; +option java_multiple_files = true; +option java_outer_classname = "PredictionServiceProto"; +option java_package = "com.google.cloud.aiplatform.v1"; + +// A service for online predictions and explanations. +service PredictionService { + option (google.api.default_host) = "aiplatform.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Perform an online prediction. + rpc Predict(PredictRequest) returns (PredictResponse) { + option (google.api.http) = { + post: "/v1/{endpoint=projects/*/locations/*/endpoints/*}:predict" + body: "*" + }; + option (google.api.method_signature) = "endpoint,instances,parameters"; + } +} + +// Request message for [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict]. +message PredictRequest { + // Required. The name of the Endpoint requested to serve the prediction. + // Format: + // `projects/{project}/locations/{location}/endpoints/{endpoint}` + string endpoint = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/Endpoint" + } + ]; + + // Required. The instances that are the input to the prediction call. + // A DeployedModel may have an upper limit on the number of instances it + // supports per request, and when it is exceeded the prediction call errors + // in case of AutoML Models, or, in case of customer created Models, the + // behaviour is as documented by that Model. + // The schema of any single instance may be specified via Endpoint's + // DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model] + // [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata] + // [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]. + repeated google.protobuf.Value instances = 2 [(google.api.field_behavior) = REQUIRED]; + + // The parameters that govern the prediction. The schema of the parameters may + // be specified via Endpoint's DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model] + // [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata] + // [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri]. + google.protobuf.Value parameters = 3; +} + +// Response message for [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict]. +message PredictResponse { + // The predictions that are the output of the predictions call. + // The schema of any single prediction may be specified via Endpoint's + // DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model] + // [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata] + // [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri]. + repeated google.protobuf.Value predictions = 1; + + // ID of the Endpoint's DeployedModel that served this prediction. + string deployed_model_id = 2; +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/schema/predict/instance/image_classification.proto b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/schema/predict/instance/image_classification.proto new file mode 100644 index 000000000..fa34d829a --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/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.v1.schema.predict.instance; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1/schema/predict/instance;instance"; +option java_multiple_files = true; +option java_outer_classname = "ImageClassificationPredictionInstanceProto"; +option java_package = "com.google.cloud.aiplatform.v1.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-v1/src/main/proto/google/cloud/aiplatform/v1/schema/predict/instance/image_object_detection.proto b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/schema/predict/instance/image_object_detection.proto new file mode 100644 index 000000000..17121a34b --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/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.v1.schema.predict.instance; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1/schema/predict/instance;instance"; +option java_multiple_files = true; +option java_outer_classname = "ImageObjectDetectionPredictionInstanceProto"; +option java_package = "com.google.cloud.aiplatform.v1.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-v1/src/main/proto/google/cloud/aiplatform/v1/schema/predict/instance/image_segmentation.proto b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/schema/predict/instance/image_segmentation.proto new file mode 100644 index 000000000..dec18aad8 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/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.v1.schema.predict.instance; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1/schema/predict/instance;instance"; +option java_multiple_files = true; +option java_outer_classname = "ImageSegmentationPredictionInstanceProto"; +option java_package = "com.google.cloud.aiplatform.v1.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-v1/src/main/proto/google/cloud/aiplatform/v1/schema/predict/instance/text_classification.proto b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/schema/predict/instance/text_classification.proto new file mode 100644 index 000000000..e10d11e4d --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/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.v1.schema.predict.instance; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1/schema/predict/instance;instance"; +option java_multiple_files = true; +option java_outer_classname = "TextClassificationPredictionInstanceProto"; +option java_package = "com.google.cloud.aiplatform.v1.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-v1/src/main/proto/google/cloud/aiplatform/v1/schema/predict/instance/text_extraction.proto b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/schema/predict/instance/text_extraction.proto new file mode 100644 index 000000000..f7baf1582 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/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.v1.schema.predict.instance; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1/schema/predict/instance;instance"; +option java_multiple_files = true; +option java_outer_classname = "TextExtractionPredictionInstanceProto"; +option java_package = "com.google.cloud.aiplatform.v1.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-v1/src/main/proto/google/cloud/aiplatform/v1/schema/predict/instance/text_sentiment.proto b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/schema/predict/instance/text_sentiment.proto new file mode 100644 index 000000000..927f807a4 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/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.v1.schema.predict.instance; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1/schema/predict/instance;instance"; +option java_multiple_files = true; +option java_outer_classname = "TextSentimentPredictionInstanceProto"; +option java_package = "com.google.cloud.aiplatform.v1.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-v1/src/main/proto/google/cloud/aiplatform/v1/schema/predict/instance/video_action_recognition.proto b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/schema/predict/instance/video_action_recognition.proto new file mode 100644 index 000000000..4d5f32b98 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/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.v1.schema.predict.instance; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1/schema/predict/instance;instance"; +option java_multiple_files = true; +option java_outer_classname = "VideoActionRecognitionPredictionInstanceProto"; +option java_package = "com.google.cloud.aiplatform.v1.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 "inf" or "Infinity" is allowed, which + // means the end of the video. + string time_segment_end = 4; +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/schema/predict/instance/video_classification.proto b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/schema/predict/instance/video_classification.proto new file mode 100644 index 000000000..b3520dd82 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/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.v1.schema.predict.instance; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1/schema/predict/instance;instance"; +option java_multiple_files = true; +option java_outer_classname = "VideoClassificationPredictionInstanceProto"; +option java_package = "com.google.cloud.aiplatform.v1.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 "inf" or "Infinity" is allowed, which + // means the end of the video. + string time_segment_end = 4; +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/schema/predict/instance/video_object_tracking.proto b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/schema/predict/instance/video_object_tracking.proto new file mode 100644 index 000000000..d552a4ade --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/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.v1.schema.predict.instance; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1/schema/predict/instance;instance"; +option java_multiple_files = true; +option java_outer_classname = "VideoObjectTrackingPredictionInstanceProto"; +option java_package = "com.google.cloud.aiplatform.v1.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 "inf" or "Infinity" is allowed, which + // means the end of the video. + string time_segment_end = 4; +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/schema/predict/params/image_classification.proto b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/schema/predict/params/image_classification.proto new file mode 100644 index 000000000..ac5cb96ad --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/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.v1.schema.predict.params; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1/schema/predict/params;params"; +option java_multiple_files = true; +option java_outer_classname = "ImageClassificationPredictionParamsProto"; +option java_package = "com.google.cloud.aiplatform.v1.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-v1/src/main/proto/google/cloud/aiplatform/v1/schema/predict/params/image_object_detection.proto b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/schema/predict/params/image_object_detection.proto new file mode 100644 index 000000000..d85d8a280 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/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.v1.schema.predict.params; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1/schema/predict/params;params"; +option java_multiple_files = true; +option java_outer_classname = "ImageObjectDetectionPredictionParamsProto"; +option java_package = "com.google.cloud.aiplatform.v1.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-v1/src/main/proto/google/cloud/aiplatform/v1/schema/predict/params/image_segmentation.proto b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/schema/predict/params/image_segmentation.proto new file mode 100644 index 000000000..84c604264 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/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.v1.schema.predict.params; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1/schema/predict/params;params"; +option java_multiple_files = true; +option java_outer_classname = "ImageSegmentationPredictionParamsProto"; +option java_package = "com.google.cloud.aiplatform.v1.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-v1/src/main/proto/google/cloud/aiplatform/v1/schema/predict/params/video_action_recognition.proto b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/schema/predict/params/video_action_recognition.proto new file mode 100644 index 000000000..975dfdc1d --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/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.v1.schema.predict.params; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1/schema/predict/params;params"; +option java_multiple_files = true; +option java_outer_classname = "VideoActionRecognitionPredictionParamsProto"; +option java_package = "com.google.cloud.aiplatform.v1.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-v1/src/main/proto/google/cloud/aiplatform/v1/schema/predict/params/video_classification.proto b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/schema/predict/params/video_classification.proto new file mode 100644 index 000000000..39c0181c6 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/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.v1.schema.predict.params; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1/schema/predict/params;params"; +option java_multiple_files = true; +option java_outer_classname = "VideoClassificationPredictionParamsProto"; +option java_package = "com.google.cloud.aiplatform.v1.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-v1/src/main/proto/google/cloud/aiplatform/v1/schema/predict/params/video_object_tracking.proto b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/schema/predict/params/video_object_tracking.proto new file mode 100644 index 000000000..78a3b5043 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/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.v1.schema.predict.params; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1/schema/predict/params;params"; +option java_multiple_files = true; +option java_outer_classname = "VideoObjectTrackingPredictionParamsProto"; +option java_package = "com.google.cloud.aiplatform.v1.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-v1/src/main/proto/google/cloud/aiplatform/v1/schema/predict/prediction/classification.proto b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/schema/predict/prediction/classification.proto new file mode 100644 index 000000000..b5db64438 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/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.v1.schema.predict.prediction; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1/schema/predict/prediction;prediction"; +option java_multiple_files = true; +option java_outer_classname = "ClassificationPredictionResultProto"; +option java_package = "com.google.cloud.aiplatform.v1.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-v1/src/main/proto/google/cloud/aiplatform/v1/schema/predict/prediction/image_object_detection.proto b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/schema/predict/prediction/image_object_detection.proto new file mode 100644 index 000000000..9f7e90d15 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/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.v1.schema.predict.prediction; + +import "google/protobuf/struct.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1/schema/predict/prediction;prediction"; +option java_multiple_files = true; +option java_outer_classname = "ImageObjectDetectionPredictionResultProto"; +option java_package = "com.google.cloud.aiplatform.v1.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-v1/src/main/proto/google/cloud/aiplatform/v1/schema/predict/prediction/image_segmentation.proto b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/schema/predict/prediction/image_segmentation.proto new file mode 100644 index 000000000..d5726b149 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/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.v1.schema.predict.prediction; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1/schema/predict/prediction;prediction"; +option java_multiple_files = true; +option java_outer_classname = "ImageSegmentationPredictionResultProto"; +option java_package = "com.google.cloud.aiplatform.v1.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. + string 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. + string confidence_mask = 2; +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/schema/predict/prediction/tabular_classification.proto b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/schema/predict/prediction/tabular_classification.proto new file mode 100644 index 000000000..2fe492c5d --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/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.v1.schema.predict.prediction; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1/schema/predict/prediction;prediction"; +option java_multiple_files = true; +option java_outer_classname = "TabularClassificationPredictionResultProto"; +option java_package = "com.google.cloud.aiplatform.v1.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-v1/src/main/proto/google/cloud/aiplatform/v1/schema/predict/prediction/tabular_regression.proto b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/schema/predict/prediction/tabular_regression.proto new file mode 100644 index 000000000..b3456f4de --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/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.v1.schema.predict.prediction; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1/schema/predict/prediction;prediction"; +option java_multiple_files = true; +option java_outer_classname = "TabularRegressionPredictionResultProto"; +option java_package = "com.google.cloud.aiplatform.v1.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-v1/src/main/proto/google/cloud/aiplatform/v1/schema/predict/prediction/text_extraction.proto b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/schema/predict/prediction/text_extraction.proto new file mode 100644 index 000000000..973dcbc79 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/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.v1.schema.predict.prediction; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1/schema/predict/prediction;prediction"; +option java_multiple_files = true; +option java_outer_classname = "TextExtractionPredictionResultProto"; +option java_package = "com.google.cloud.aiplatform.v1.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-v1/src/main/proto/google/cloud/aiplatform/v1/schema/predict/prediction/text_sentiment.proto b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/schema/predict/prediction/text_sentiment.proto new file mode 100644 index 000000000..75023856a --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/schema/predict/prediction/text_sentiment.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.v1.schema.predict.prediction; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1/schema/predict/prediction;prediction"; +option java_multiple_files = true; +option java_outer_classname = "TextSentimentPredictionResultProto"; +option java_package = "com.google.cloud.aiplatform.v1.schema.predict.prediction"; + +// Prediction output format for Text Sentiment +message TextSentimentPredictionResult { + // 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; +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/schema/predict/prediction/video_action_recognition.proto b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/schema/predict/prediction/video_action_recognition.proto new file mode 100644 index 000000000..f93acb9a6 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/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.v1.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/v1/schema/predict/prediction;prediction"; +option java_multiple_files = true; +option java_outer_classname = "VideoActionRecognitionPredictionResultProto"; +option java_package = "com.google.cloud.aiplatform.v1.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-v1/src/main/proto/google/cloud/aiplatform/v1/schema/predict/prediction/video_classification.proto b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/schema/predict/prediction/video_classification.proto new file mode 100644 index 000000000..c518a73f8 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/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.v1.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/v1/schema/predict/prediction;prediction"; +option java_multiple_files = true; +option java_outer_classname = "VideoClassificationPredictionResultProto"; +option java_package = "com.google.cloud.aiplatform.v1.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-v1/src/main/proto/google/cloud/aiplatform/v1/schema/predict/prediction/video_object_tracking.proto b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/schema/predict/prediction/video_object_tracking.proto new file mode 100644 index 000000000..375bd1494 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/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.v1.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/v1/schema/predict/prediction;prediction"; +option java_multiple_files = true; +option java_outer_classname = "VideoObjectTrackingPredictionResultProto"; +option java_package = "com.google.cloud.aiplatform.v1.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-v1/src/main/proto/google/cloud/aiplatform/v1/schema/trainingjob/definition/automl_image_classification.proto b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/schema/trainingjob/definition/automl_image_classification.proto new file mode 100644 index 000000000..ef40620e6 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/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.v1.schema.trainingjob.definition; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1/schema/trainingjob/definition;definition"; +option java_multiple_files = true; +option java_outer_classname = "AutoMLImageClassificationProto"; +option java_package = "com.google.cloud.aiplatform.v1.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-v1/src/main/proto/google/cloud/aiplatform/v1/schema/trainingjob/definition/automl_image_object_detection.proto b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/schema/trainingjob/definition/automl_image_object_detection.proto new file mode 100644 index 000000000..5d01485a0 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/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.v1.schema.trainingjob.definition; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1/schema/trainingjob/definition;definition"; +option java_multiple_files = true; +option java_outer_classname = "AutoMLImageObjectDetectionProto"; +option java_package = "com.google.cloud.aiplatform.v1.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-v1/src/main/proto/google/cloud/aiplatform/v1/schema/trainingjob/definition/automl_image_segmentation.proto b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/schema/trainingjob/definition/automl_image_segmentation.proto new file mode 100644 index 000000000..2747b2968 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/schema/trainingjob/definition/automl_image_segmentation.proto @@ -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 +// +// 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.v1.schema.trainingjob.definition; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1/schema/trainingjob/definition;definition"; +option java_multiple_files = true; +option java_outer_classname = "AutoMLImageSegmentationProto"; +option java_package = "com.google.cloud.aiplatform.v1.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; + + // A model that, in addition to being available within Google + // Cloud, can also be exported (see ModelService.ExportModel) as TensorFlow + // 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 = 3; + } + + 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-v1/src/main/proto/google/cloud/aiplatform/v1/schema/trainingjob/definition/automl_tables.proto b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/schema/trainingjob/definition/automl_tables.proto new file mode 100644 index 000000000..23452641b --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/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.v1.schema.trainingjob.definition; + +import "google/cloud/aiplatform/v1/schema/trainingjob/definition/export_evaluated_data_items_config.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1/schema/trainingjob/definition;definition"; +option java_multiple_files = true; +option java_outer_classname = "AutoMLTablesProto"; +option java_package = "com.google.cloud.aiplatform.v1.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-v1/src/main/proto/google/cloud/aiplatform/v1/schema/trainingjob/definition/automl_text_classification.proto b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/schema/trainingjob/definition/automl_text_classification.proto new file mode 100644 index 000000000..f0080be30 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/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.v1.schema.trainingjob.definition; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1/schema/trainingjob/definition;definition"; +option java_multiple_files = true; +option java_outer_classname = "AutoMLTextClassificationProto"; +option java_package = "com.google.cloud.aiplatform.v1.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-v1/src/main/proto/google/cloud/aiplatform/v1/schema/trainingjob/definition/automl_text_extraction.proto b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/schema/trainingjob/definition/automl_text_extraction.proto new file mode 100644 index 000000000..157d81260 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/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.v1.schema.trainingjob.definition; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1/schema/trainingjob/definition;definition"; +option java_multiple_files = true; +option java_outer_classname = "AutoMLTextExtractionProto"; +option java_package = "com.google.cloud.aiplatform.v1.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-v1/src/main/proto/google/cloud/aiplatform/v1/schema/trainingjob/definition/automl_text_sentiment.proto b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/schema/trainingjob/definition/automl_text_sentiment.proto new file mode 100644 index 000000000..6b5b02b4a --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/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.v1.schema.trainingjob.definition; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1/schema/trainingjob/definition;definition"; +option java_multiple_files = true; +option java_outer_classname = "AutoMLTextSentimentProto"; +option java_package = "com.google.cloud.aiplatform.v1.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-v1/src/main/proto/google/cloud/aiplatform/v1/schema/trainingjob/definition/automl_video_action_recognition.proto b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/schema/trainingjob/definition/automl_video_action_recognition.proto new file mode 100644 index 000000000..b502ff78e --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/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.v1.schema.trainingjob.definition; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1/schema/trainingjob/definition;definition"; +option java_multiple_files = true; +option java_outer_classname = "AutoMLVideoActionRecognitionProto"; +option java_package = "com.google.cloud.aiplatform.v1.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-v1/src/main/proto/google/cloud/aiplatform/v1/schema/trainingjob/definition/automl_video_classification.proto b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/schema/trainingjob/definition/automl_video_classification.proto new file mode 100644 index 000000000..d20921518 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/schema/trainingjob/definition/automl_video_classification.proto @@ -0,0 +1,53 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.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.v1.schema.trainingjob.definition; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1/schema/trainingjob/definition;definition"; +option java_multiple_files = true; +option java_outer_classname = "AutoMLVideoClassificationProto"; +option java_package = "com.google.cloud.aiplatform.v1.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; + + // A model that, in addition to being available within Google Cloud, can + // also be exported (see ModelService.ExportModel) to a Jetson device + // afterwards. + MOBILE_JETSON_VERSATILE_1 = 3; + } + + ModelType model_type = 1; +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/schema/trainingjob/definition/automl_video_object_tracking.proto b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/schema/trainingjob/definition/automl_video_object_tracking.proto new file mode 100644 index 000000000..66d3ee349 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/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.v1.schema.trainingjob.definition; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1/schema/trainingjob/definition;definition"; +option java_multiple_files = true; +option java_outer_classname = "AutoMLVideoObjectTrackingProto"; +option java_package = "com.google.cloud.aiplatform.v1.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-v1/src/main/proto/google/cloud/aiplatform/v1/schema/trainingjob/definition/export_evaluated_data_items_config.proto b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/schema/trainingjob/definition/export_evaluated_data_items_config.proto new file mode 100644 index 000000000..799f4e896 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/schema/trainingjob/definition/export_evaluated_data_items_config.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.v1.schema.trainingjob.definition; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1/schema/trainingjob/definition;definition"; +option java_multiple_files = true; +option java_outer_classname = "ExportEvaluatedDataItemsConfigProto"; +option java_package = "com.google.cloud.aiplatform.v1.schema.trainingjob.definition"; + +// Configuration for exporting test set predictions to a BigQuery table. +message ExportEvaluatedDataItemsConfig { + // URI of desired destination BigQuery table. Expected format: + // bq://:: + // + // 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 are overwritten. Otherwise, if the export destination already + // exists, then the export operation fails. + bool override_existing_table = 2; +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/specialist_pool.proto b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/specialist_pool.proto new file mode 100644 index 000000000..2f2900433 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/specialist_pool.proto @@ -0,0 +1,57 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.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.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1;aiplatform"; +option java_multiple_files = true; +option java_outer_classname = "SpecialistPoolProto"; +option java_package = "com.google.cloud.aiplatform.v1"; + +// SpecialistPool represents customers' own workforce to work on their data +// labeling jobs. It includes a group of specialist managers who are responsible +// for managing the labelers in this pool as well as customers' data labeling +// jobs associated with this pool. +// Customers create specialist pool as well as start data labeling jobs on +// Cloud, managers and labelers work with the jobs using CrowdCompute console. +message SpecialistPool { + option (google.api.resource) = { + type: "aiplatform.googleapis.com/SpecialistPool" + pattern: "projects/{project}/locations/{location}/specialistPools/{specialist_pool}" + }; + + // Required. The resource name of the SpecialistPool. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The user-defined name of the SpecialistPool. + // The name can be up to 128 characters long and can be consist of any UTF-8 + // characters. + // This field should be unique on project-level. + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Output only. The number of Specialists in this SpecialistPool. + int32 specialist_managers_count = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The email addresses of the specialists in the SpecialistPool. + repeated string specialist_manager_emails = 4; + + // Output only. The resource name of the pending data labeling jobs. + repeated string pending_data_labeling_jobs = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/specialist_pool_service.proto b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/specialist_pool_service.proto new file mode 100644 index 000000000..3ac9f3889 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/specialist_pool_service.proto @@ -0,0 +1,209 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.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.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/aiplatform/v1/operation.proto"; +import "google/cloud/aiplatform/v1/specialist_pool.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/field_mask.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1;aiplatform"; +option java_multiple_files = true; +option java_outer_classname = "SpecialistPoolServiceProto"; +option java_package = "com.google.cloud.aiplatform.v1"; + +// 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 to label the data. +// Customers can add/remove Managers for the Specialist Pool on Cloud console, +// then Managers will get email notifications to manage Specialists and tasks on +// CrowdCompute console. +service SpecialistPoolService { + option (google.api.default_host) = "aiplatform.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Creates a SpecialistPool. + rpc CreateSpecialistPool(CreateSpecialistPoolRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/specialistPools" + body: "specialist_pool" + }; + option (google.api.method_signature) = "parent,specialist_pool"; + option (google.longrunning.operation_info) = { + response_type: "SpecialistPool" + metadata_type: "CreateSpecialistPoolOperationMetadata" + }; + } + + // Gets a SpecialistPool. + rpc GetSpecialistPool(GetSpecialistPoolRequest) returns (SpecialistPool) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/specialistPools/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists SpecialistPools in a Location. + rpc ListSpecialistPools(ListSpecialistPoolsRequest) returns (ListSpecialistPoolsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/specialistPools" + }; + option (google.api.method_signature) = "parent"; + } + + // Deletes a SpecialistPool as well as all Specialists in the pool. + rpc DeleteSpecialistPool(DeleteSpecialistPoolRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/specialistPools/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "DeleteOperationMetadata" + }; + } + + // Updates a SpecialistPool. + rpc UpdateSpecialistPool(UpdateSpecialistPoolRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{specialist_pool.name=projects/*/locations/*/specialistPools/*}" + body: "specialist_pool" + }; + option (google.api.method_signature) = "specialist_pool,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "SpecialistPool" + metadata_type: "UpdateSpecialistPoolOperationMetadata" + }; + } +} + +// Request message for [SpecialistPoolService.CreateSpecialistPool][google.cloud.aiplatform.v1.SpecialistPoolService.CreateSpecialistPool]. +message CreateSpecialistPoolRequest { + // Required. The parent Project name for the new SpecialistPool. + // The form is `projects/{project}/locations/{location}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. The SpecialistPool to create. + SpecialistPool specialist_pool = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Runtime operation information for +// [SpecialistPoolService.CreateSpecialistPool][google.cloud.aiplatform.v1.SpecialistPoolService.CreateSpecialistPool]. +message CreateSpecialistPoolOperationMetadata { + // The operation generic information. + GenericOperationMetadata generic_metadata = 1; +} + +// Request message for [SpecialistPoolService.GetSpecialistPool][google.cloud.aiplatform.v1.SpecialistPoolService.GetSpecialistPool]. +message GetSpecialistPoolRequest { + // Required. The name of the SpecialistPool resource. + // The form is + // + // `projects/{project}/locations/{location}/specialistPools/{specialist_pool}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/SpecialistPool" + } + ]; +} + +// Request message for [SpecialistPoolService.ListSpecialistPools][google.cloud.aiplatform.v1.SpecialistPoolService.ListSpecialistPools]. +message ListSpecialistPoolsRequest { + // Required. The name of the SpecialistPool's parent resource. + // Format: `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // The standard list page size. + int32 page_size = 2; + + // The standard list page token. + // Typically obtained by [ListSpecialistPoolsResponse.next_page_token][google.cloud.aiplatform.v1.ListSpecialistPoolsResponse.next_page_token] of + // the previous [SpecialistPoolService.ListSpecialistPools][google.cloud.aiplatform.v1.SpecialistPoolService.ListSpecialistPools] call. Return + // first page if empty. + string page_token = 3; + + // Mask specifying which fields to read. FieldMask represents a set of + google.protobuf.FieldMask read_mask = 4; +} + +// Response message for [SpecialistPoolService.ListSpecialistPools][google.cloud.aiplatform.v1.SpecialistPoolService.ListSpecialistPools]. +message ListSpecialistPoolsResponse { + // A list of SpecialistPools that matches the specified filter in the request. + repeated SpecialistPool specialist_pools = 1; + + // The standard List next-page token. + string next_page_token = 2; +} + +// Request message for [SpecialistPoolService.DeleteSpecialistPool][google.cloud.aiplatform.v1.SpecialistPoolService.DeleteSpecialistPool]. +message DeleteSpecialistPoolRequest { + // Required. The resource name of the SpecialistPool to delete. Format: + // `projects/{project}/locations/{location}/specialistPools/{specialist_pool}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/SpecialistPool" + } + ]; + + // If set to true, any specialist managers in this SpecialistPool will also be + // deleted. (Otherwise, the request will only work if the SpecialistPool has + // no specialist managers.) + bool force = 2; +} + +// Request message for [SpecialistPoolService.UpdateSpecialistPool][google.cloud.aiplatform.v1.SpecialistPoolService.UpdateSpecialistPool]. +message UpdateSpecialistPoolRequest { + // Required. The SpecialistPool which replaces the resource on the server. + SpecialistPool specialist_pool = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The update mask applies to the resource. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Runtime operation metadata for +// [SpecialistPoolService.UpdateSpecialistPool][google.cloud.aiplatform.v1.SpecialistPoolService.UpdateSpecialistPool]. +message UpdateSpecialistPoolOperationMetadata { + // Output only. The name of the SpecialistPool to which the specialists are being added. + // Format: + // + // `projects/{project_id}/locations/{location_id}/specialistPools/{specialist_pool}` + string specialist_pool = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/SpecialistPool" + } + ]; + + // The operation generic information. + GenericOperationMetadata generic_metadata = 2; +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/study.proto b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/study.proto new file mode 100644 index 000000000..7e54aa9b4 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/study.proto @@ -0,0 +1,355 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.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.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1;aiplatform"; +option java_multiple_files = true; +option java_outer_classname = "StudyProto"; +option java_package = "com.google.cloud.aiplatform.v1"; + +// A message representing a Trial. A Trial contains a unique set of Parameters +// that has been or will be evaluated, along with the objective metrics got by +// running the Trial. +message Trial { + option (google.api.resource) = { + type: "aiplatform.googleapis.com/Trial" + pattern: "projects/{project}/locations/{location}/studies/{study}/trials/{trial}" + }; + + // A message representing a parameter to be tuned. + message Parameter { + // Output only. The ID of the parameter. The parameter should be defined in + // [StudySpec's Parameters][google.cloud.aiplatform.v1.StudySpec.parameters]. + string parameter_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The value of the parameter. + // `number_value` will be set if a parameter defined in StudySpec is + // in type 'INTEGER', 'DOUBLE' or 'DISCRETE'. + // `string_value` will be set if a parameter defined in StudySpec is + // in type 'CATEGORICAL'. + google.protobuf.Value value = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Describes a Trial state. + enum State { + // The Trial state is unspecified. + STATE_UNSPECIFIED = 0; + + // Indicates that a specific Trial has been requested, but it has not yet + // been suggested by the service. + REQUESTED = 1; + + // Indicates that the Trial has been suggested. + ACTIVE = 2; + + // Indicates that the Trial should stop according to the service. + STOPPING = 3; + + // Indicates that the Trial is completed successfully. + SUCCEEDED = 4; + + // Indicates that the Trial should not be attempted again. + // The service will set a Trial to INFEASIBLE when it's done but missing + // the final_measurement. + INFEASIBLE = 5; + } + + // Output only. The identifier of the Trial assigned by the service. + string id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The detailed state of the Trial. + State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The parameters of the Trial. + repeated Parameter parameters = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The final measurement containing the objective value. + Measurement final_measurement = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when the Trial was started. + google.protobuf.Timestamp start_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when the Trial's status changed to `SUCCEEDED` or `INFEASIBLE`. + google.protobuf.Timestamp end_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The CustomJob name linked to the Trial. + // It's set for a HyperparameterTuningJob's Trial. + string custom_job = 11 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/CustomJob" + } + ]; +} + +// Represents specification of a Study. +message StudySpec { + // Represents a metric to optimize. + message MetricSpec { + // The available types of optimization goals. + enum GoalType { + // Goal Type will default to maximize. + GOAL_TYPE_UNSPECIFIED = 0; + + // Maximize the goal metric. + MAXIMIZE = 1; + + // Minimize the goal metric. + MINIMIZE = 2; + } + + // Required. The ID of the metric. Must not contain whitespaces and must be unique + // amongst all MetricSpecs. + string metric_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The optimization goal of the metric. + GoalType goal = 2 [(google.api.field_behavior) = REQUIRED]; + } + + // Represents a single parameter to optimize. + message ParameterSpec { + // Value specification for a parameter in `DOUBLE` type. + message DoubleValueSpec { + // Required. Inclusive minimum value of the parameter. + double min_value = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Inclusive maximum value of the parameter. + double max_value = 2 [(google.api.field_behavior) = REQUIRED]; + } + + // Value specification for a parameter in `INTEGER` type. + message IntegerValueSpec { + // Required. Inclusive minimum value of the parameter. + int64 min_value = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Inclusive maximum value of the parameter. + int64 max_value = 2 [(google.api.field_behavior) = REQUIRED]; + } + + // Value specification for a parameter in `CATEGORICAL` type. + message CategoricalValueSpec { + // Required. The list of possible categories. + repeated string values = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // Value specification for a parameter in `DISCRETE` type. + message DiscreteValueSpec { + // Required. A list of possible values. + // The list should be in increasing order and at least 1e-10 apart. + // For instance, this parameter might have possible settings of 1.5, 2.5, + // and 4.0. This list should not contain more than 1,000 values. + repeated double values = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // Represents a parameter spec with condition from its parent parameter. + message ConditionalParameterSpec { + // Represents the spec to match discrete values from parent parameter. + message DiscreteValueCondition { + // Required. Matches values of the parent parameter of 'DISCRETE' type. + // All values must exist in `discrete_value_spec` of parent parameter. + // + // The Epsilon of the value matching is 1e-10. + repeated double values = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // Represents the spec to match integer values from parent parameter. + message IntValueCondition { + // Required. Matches values of the parent parameter of 'INTEGER' type. + // All values must lie in `integer_value_spec` of parent parameter. + repeated int64 values = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // Represents the spec to match categorical values from parent parameter. + message CategoricalValueCondition { + // Required. Matches values of the parent parameter of 'CATEGORICAL' type. + // All values must exist in `categorical_value_spec` of parent + // parameter. + repeated string values = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // A set of parameter values from the parent ParameterSpec's feasible + // space. + oneof parent_value_condition { + // The spec for matching values from a parent parameter of + // `DISCRETE` type. + DiscreteValueCondition parent_discrete_values = 2; + + // The spec for matching values from a parent parameter of `INTEGER` + // type. + IntValueCondition parent_int_values = 3; + + // The spec for matching values from a parent parameter of + // `CATEGORICAL` type. + CategoricalValueCondition parent_categorical_values = 4; + } + + // Required. The spec for a conditional parameter. + ParameterSpec parameter_spec = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // The type of scaling that should be applied to this parameter. + enum ScaleType { + // By default, no scaling is applied. + SCALE_TYPE_UNSPECIFIED = 0; + + // Scales the feasible space to (0, 1) linearly. + UNIT_LINEAR_SCALE = 1; + + // Scales the feasible space logarithmically to (0, 1). The entire + // feasible space must be strictly positive. + UNIT_LOG_SCALE = 2; + + // Scales the feasible space "reverse" logarithmically to (0, 1). The + // result is that values close to the top of the feasible space are spread + // out more than points near the bottom. The entire feasible space must be + // strictly positive. + UNIT_REVERSE_LOG_SCALE = 3; + } + + oneof parameter_value_spec { + // The value spec for a 'DOUBLE' parameter. + DoubleValueSpec double_value_spec = 2; + + // The value spec for an 'INTEGER' parameter. + IntegerValueSpec integer_value_spec = 3; + + // The value spec for a 'CATEGORICAL' parameter. + CategoricalValueSpec categorical_value_spec = 4; + + // The value spec for a 'DISCRETE' parameter. + DiscreteValueSpec discrete_value_spec = 5; + } + + // Required. The ID of the parameter. Must not contain whitespaces and must be unique + // amongst all ParameterSpecs. + string parameter_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // How the parameter should be scaled. + // Leave unset for `CATEGORICAL` parameters. + ScaleType scale_type = 6; + + // A conditional parameter node is active if the parameter's value matches + // the conditional node's parent_value_condition. + // + // If two items in conditional_parameter_specs have the same name, they + // must have disjoint parent_value_condition. + repeated ConditionalParameterSpec conditional_parameter_specs = 10; + } + + // The available search algorithms for the Study. + enum Algorithm { + // The default algorithm used by AI Platform Optimization service. + ALGORITHM_UNSPECIFIED = 0; + + // Simple grid search within the feasible space. To use grid search, + // all parameters must be `INTEGER`, `CATEGORICAL`, or `DISCRETE`. + GRID_SEARCH = 2; + + // Simple random search within the feasible space. + RANDOM_SEARCH = 3; + } + + // Describes the noise level of the repeated observations. + // + // "Noisy" means that the repeated observations with the same Trial parameters + // may lead to different metric evaluations. + enum ObservationNoise { + // The default noise level chosen by the AI Platform service. + OBSERVATION_NOISE_UNSPECIFIED = 0; + + // AI Platform Vizier assumes that the objective function is (nearly) + // perfectly reproducible, and will never repeat the same Trial + // parameters. + LOW = 1; + + // AI Platform Vizier will estimate the amount of noise in metric + // evaluations, it may repeat the same Trial parameters more than once. + HIGH = 2; + } + + // This indicates which measurement to use if/when the service automatically + // selects the final measurement from previously reported intermediate + // measurements. Choose this based on two considerations: + // A) Do you expect your measurements to monotonically improve? + // If so, choose LAST_MEASUREMENT. On the other hand, if you're in a + // situation where your system can "over-train" and you expect the + // performance to get better for a while but then start declining, + // choose BEST_MEASUREMENT. + // B) Are your measurements significantly noisy and/or irreproducible? + // If so, BEST_MEASUREMENT will tend to be over-optimistic, and it + // may be better to choose LAST_MEASUREMENT. + // If both or neither of (A) and (B) apply, it doesn't matter which + // selection type is chosen. + enum MeasurementSelectionType { + // Will be treated as LAST_MEASUREMENT. + MEASUREMENT_SELECTION_TYPE_UNSPECIFIED = 0; + + // Use the last measurement reported. + LAST_MEASUREMENT = 1; + + // Use the best measurement reported. + BEST_MEASUREMENT = 2; + } + + // Required. Metric specs for the Study. + repeated MetricSpec metrics = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The set of parameters to tune. + repeated ParameterSpec parameters = 2 [(google.api.field_behavior) = REQUIRED]; + + // The search algorithm specified for the Study. + Algorithm algorithm = 3; + + // The observation noise level of the study. + // Currently only supported by the Vizier service. Not supported by + // HyperparamterTuningJob or TrainingPipeline. + ObservationNoise observation_noise = 6; + + // Describe which measurement selection type will be used + MeasurementSelectionType measurement_selection_type = 7; +} + +// A message representing a Measurement of a Trial. A Measurement contains +// the Metrics got by executing a Trial using suggested hyperparameter +// values. +message Measurement { + // A message representing a metric in the measurement. + message Metric { + // Output only. The ID of the Metric. The Metric should be defined in + // [StudySpec's Metrics][google.cloud.aiplatform.v1.StudySpec.metrics]. + string metric_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The value for this metric. + double value = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. The number of steps the machine learning model has been trained for. + // Must be non-negative. + int64 step_count = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A list of metrics got by evaluating the objective functions using suggested + // Parameter values. + repeated Metric metrics = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/training_pipeline.proto b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/training_pipeline.proto new file mode 100644 index 000000000..1ede99df0 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/training_pipeline.proto @@ -0,0 +1,356 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.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.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/aiplatform/v1/encryption_spec.proto"; +import "google/cloud/aiplatform/v1/io.proto"; +import "google/cloud/aiplatform/v1/machine_resources.proto"; +import "google/cloud/aiplatform/v1/manual_batch_tuning_parameters.proto"; +import "google/cloud/aiplatform/v1/model.proto"; +import "google/cloud/aiplatform/v1/pipeline_state.proto"; +import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1;aiplatform"; +option java_multiple_files = true; +option java_outer_classname = "TrainingPipelineProto"; +option java_package = "com.google.cloud.aiplatform.v1"; + +// The TrainingPipeline orchestrates tasks associated with training a Model. It +// always executes the training task, and optionally may also +// export data from AI Platform's Dataset which becomes the training input, +// [upload][google.cloud.aiplatform.v1.ModelService.UploadModel] the Model to AI Platform, and evaluate the +// Model. +message TrainingPipeline { + option (google.api.resource) = { + type: "aiplatform.googleapis.com/TrainingPipeline" + pattern: "projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}" + }; + + // Output only. Resource name of the TrainingPipeline. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The user-defined name of this TrainingPipeline. + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Specifies AI Platform owned input data that may be used for training the + // Model. The TrainingPipeline's [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition] should make + // clear whether this config is used and if there are any special requirements + // on how it should be filled. If nothing about this config is mentioned in + // the [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition], then it should be assumed that the + // TrainingPipeline does not depend on this configuration. + InputDataConfig input_data_config = 3; + + // Required. A Google Cloud Storage path to the YAML file that defines the training task + // which is responsible for producing the model artifact, and may also include + // additional auxiliary work. + // The definition files that can be used here are found in + // gs://google-cloud-aiplatform/schema/trainingjob/definition/. + // Note: The URI given on output will be immutable and probably different, + // including the URI scheme, than the one given on input. The output URI will + // point to a location where the user only has a read access. + string training_task_definition = 4 [(google.api.field_behavior) = REQUIRED]; + + // Required. The training task's parameter(s), as specified in the + // [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition]'s `inputs`. + google.protobuf.Value training_task_inputs = 5 [(google.api.field_behavior) = REQUIRED]; + + // Output only. The metadata information as specified in the [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition]'s + // `metadata`. This metadata is an auxiliary runtime and final information + // about the training task. While the pipeline is running this information is + // populated only at a best effort basis. Only present if the + // pipeline's [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition] contains `metadata` object. + google.protobuf.Value training_task_metadata = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Describes the Model that may be uploaded (via [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel]) + // by this TrainingPipeline. The TrainingPipeline's + // [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition] should make clear whether this Model + // description should be populated, and if there are any special requirements + // regarding how it should be filled. If nothing is mentioned in the + // [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition], then it should be assumed that this field + // should not be filled and the training task either uploads the Model without + // a need of this information, or that training task does not support + // uploading a Model as part of the pipeline. + // When the Pipeline's state becomes `PIPELINE_STATE_SUCCEEDED` and + // the trained Model had been uploaded into AI Platform, then the + // model_to_upload's resource [name][google.cloud.aiplatform.v1.Model.name] is populated. The Model + // is always uploaded into the Project and Location in which this pipeline + // is. + Model model_to_upload = 7; + + // Output only. The detailed state of the pipeline. + PipelineState state = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Only populated when the pipeline's state is `PIPELINE_STATE_FAILED` or + // `PIPELINE_STATE_CANCELLED`. + google.rpc.Status error = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when the TrainingPipeline was created. + google.protobuf.Timestamp create_time = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when the TrainingPipeline for the first time entered the + // `PIPELINE_STATE_RUNNING` state. + google.protobuf.Timestamp start_time = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when the TrainingPipeline entered any of the following states: + // `PIPELINE_STATE_SUCCEEDED`, `PIPELINE_STATE_FAILED`, + // `PIPELINE_STATE_CANCELLED`. + google.protobuf.Timestamp end_time = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when the TrainingPipeline was most recently updated. + google.protobuf.Timestamp update_time = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The labels with user-defined metadata to organize TrainingPipelines. + // + // Label keys and values can be no longer than 64 characters + // (Unicode codepoints), can only contain lowercase letters, numeric + // characters, underscores and dashes. International characters are allowed. + // + // See https://goo.gl/xmQnxf for more information and examples of labels. + map labels = 15; + + // Customer-managed encryption key spec for a TrainingPipeline. If set, this + // TrainingPipeline will be secured by this key. + // + // Note: Model trained by this TrainingPipeline is also secured by this key if + // [model_to_upload][google.cloud.aiplatform.v1.TrainingPipeline.encryption_spec] is not set separately. + EncryptionSpec encryption_spec = 18; +} + +// Specifies AI Platform owned input data to be used for training, and +// possibly evaluating, the Model. +message InputDataConfig { + // The instructions how the input data should be split between the + // training, validation and test sets. + // If no split type is provided, the [fraction_split][google.cloud.aiplatform.v1.InputDataConfig.fraction_split] is used by default. + oneof split { + // Split based on fractions defining the size of each set. + FractionSplit fraction_split = 2; + + // Split based on the provided filters for each set. + FilterSplit filter_split = 3; + + // Supported only for tabular Datasets. + // + // Split based on a predefined key. + PredefinedSplit predefined_split = 4; + + // Supported only for tabular Datasets. + // + // Split based on the timestamp of the input data pieces. + TimestampSplit timestamp_split = 5; + } + + // Only applicable to Custom and Hyperparameter Tuning TrainingPipelines. + // + // The destination of the training data to be written to. + // + // Supported destination file formats: + // * For non-tabular data: "jsonl". + // * For tabular data: "csv" and "bigquery". + // + // The following AI Platform environment variables are passed to containers + // or python modules of the training task when this field is set: + // + // * AIP_DATA_FORMAT : Exported data format. + // * AIP_TRAINING_DATA_URI : Sharded exported training data uris. + // * AIP_VALIDATION_DATA_URI : Sharded exported validation data uris. + // * AIP_TEST_DATA_URI : Sharded exported test data uris. + oneof destination { + // The Cloud Storage location where the training data is to be + // written to. In the given directory a new directory is created with + // name: + // `dataset---` + // where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. + // All training input data is written into that directory. + // + // The AI Platform environment variables representing Cloud Storage + // data URIs are represented in the Cloud Storage wildcard + // format to support sharded data. e.g.: "gs://.../training-*.jsonl" + // + // * AIP_DATA_FORMAT = "jsonl" for non-tabular data, "csv" for tabular data + // * AIP_TRAINING_DATA_URI = + // + // "gcs_destination/dataset---
+ // + // 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. + // destination are overwritten. Otherwise, if the export destination already + // exists, then the export operation fails. bool override_existing_table = 2; } diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index c3998bc51..317d5d9c0 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -29,13 +29,13 @@ com.google.cloud google-cloud-aiplatform - 0.1.0 + 0.2.0 com.google.cloud google-cloud-storage - 1.113.8 + 1.113.11 com.google.protobuf @@ -45,13 +45,13 @@ junit junit - 4.13.1 + 4.13.2 test com.google.truth truth - 1.1 + 1.1.2 test diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index c61908730..7c8c5cf35 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -28,13 +28,13 @@ com.google.cloud google-cloud-aiplatform - 0.2.0 + 0.3.0 com.google.cloud google-cloud-storage - 1.113.8 + 1.113.11 com.google.protobuf @@ -45,13 +45,13 @@ junit junit - 4.13.1 + 4.13.2 test com.google.truth truth - 1.1 + 1.1.2 test diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index f66b38d81..6835b635d 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -27,13 +27,13 @@ com.google.cloud google-cloud-aiplatform - 0.1.1-SNAPSHOT + 0.2.0 com.google.cloud google-cloud-storage - 1.113.8 + 1.113.11 com.google.protobuf @@ -48,15 +48,20 @@ junit junit - 4.13.1 + 4.13.2 test com.google.truth truth - 1.1 + 1.1.2 test + + com.google.api.grpc + proto-google-cloud-aiplatform-v1beta1 + 0.2.0 + diff --git a/samples/snippets/resources/caprese_salad.jpg b/samples/snippets/resources/caprese_salad.jpg deleted file mode 100644 index fbd7e6575..000000000 Binary files a/samples/snippets/resources/caprese_salad.jpg and /dev/null differ diff --git a/samples/snippets/resources/iod_caprese_salad.jpg b/samples/snippets/resources/iod_caprese_salad.jpg new file mode 100644 index 000000000..100ad677a Binary files /dev/null and b/samples/snippets/resources/iod_caprese_salad.jpg differ diff --git a/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineImageObjectDetectionSample.java b/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineImageObjectDetectionSample.java index d6b2af9ab..9136cec90 100644 --- a/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineImageObjectDetectionSample.java +++ b/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineImageObjectDetectionSample.java @@ -18,6 +18,7 @@ // [START aiplatform_create_training_pipeline_image_object_detection_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,6 +39,9 @@ import com.google.cloud.aiplatform.v1beta1.SampledShapleyAttribution; import com.google.cloud.aiplatform.v1beta1.TimestampSplit; import com.google.cloud.aiplatform.v1beta1.TrainingPipeline; +import com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageClassification; +import com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetectionInputs; +import com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlImageObjectDetectionInputs.ModelType; import com.google.protobuf.Value; import com.google.protobuf.util.JsonFormat; import com.google.rpc.Status; @@ -74,11 +78,12 @@ static void createTrainingPipelineImageObjectDetectionSample( + "automl_image_object_detection_1.0.0.yaml"; LocationName locationName = LocationName.of(project, location); - String jsonString = - "{\"modelType\": \"CLOUD_HIGH_ACCURACY_1\", \"budgetMilliNodeHours\": 20000," - + " \"disableEarlyStopping\": false}"; - Value.Builder trainingTaskInputs = Value.newBuilder(); - JsonFormat.parser().merge(jsonString, trainingTaskInputs); + AutoMlImageObjectDetectionInputs autoMlImageObjectDetectionInputs = + AutoMlImageObjectDetectionInputs.newBuilder() + .setModelType(ModelType.CLOUD_HIGH_ACCURACY_1) + .setBudgetMilliNodeHours(20000) + .setDisableEarlyStopping(false) + .build(); InputDataConfig trainingInputDataConfig = InputDataConfig.newBuilder().setDatasetId(datasetId).build(); @@ -87,7 +92,7 @@ static void createTrainingPipelineImageObjectDetectionSample( TrainingPipeline.newBuilder() .setDisplayName(trainingPipelineDisplayName) .setTrainingTaskDefinition(trainingTaskDefinition) - .setTrainingTaskInputs(trainingTaskInputs) + .setTrainingTaskInputs(ValueConverter.toValue(autoMlImageObjectDetectionInputs)) .setInputDataConfig(trainingInputDataConfig) .setModelToUpload(model) .build(); diff --git a/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineTabularClassificationSample.java b/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineTabularClassificationSample.java index 92ebb6ada..d37bbf6eb 100644 --- a/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineTabularClassificationSample.java +++ b/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineTabularClassificationSample.java @@ -18,6 +18,7 @@ // [START aiplatform_create_training_pipeline_tabular_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; @@ -37,10 +38,14 @@ import com.google.cloud.aiplatform.v1beta1.SampledShapleyAttribution; import com.google.cloud.aiplatform.v1beta1.TimestampSplit; import com.google.cloud.aiplatform.v1beta1.TrainingPipeline; +import com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs; +import com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation; +import com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.AutoTransformation; import com.google.protobuf.Value; import com.google.protobuf.util.JsonFormat; import com.google.rpc.Status; import java.io.IOException; +import java.util.ArrayList; public class CreateTrainingPipelineTabularClassificationSample { @@ -50,18 +55,15 @@ public static void main(String[] args) throws IOException { String modelDisplayName = "YOUR_DATASET_DISPLAY_NAME"; String datasetId = "YOUR_DATASET_ID"; String targetColumn = "TARGET_COLUMN"; - String transformation = - "[{TRANSFORMATION_TYPE: {columnName : COLUMN_NAME, invalidValuesAllowed : TRUE/FALSE }}]"; createTrainingPipelineTableClassification( - project, modelDisplayName, datasetId, targetColumn, transformation); + project, modelDisplayName, datasetId, targetColumn); } static void createTrainingPipelineTableClassification( String project, String modelDisplayName, String datasetId, - String targetColumn, - String transformation) + String targetColumn) throws IOException { PipelineServiceSettings pipelineServiceSettings = PipelineServiceSettings.newBuilder() @@ -77,15 +79,34 @@ static void createTrainingPipelineTableClassification( LocationName locationName = LocationName.of(project, location); String trainingTaskDefinition = "gs://google-cloud-aiplatform/schema/trainingjob/definition/automl_tables_1.0.0.yaml"; - String jsonString = - "{\"targetColumn\": \"" - + targetColumn - + "\",\"predictionType\": \"classification\",\"transformations\": " - + transformation - + ",\"trainBudgetMilliNodeHours\": 8000}"; - Value.Builder trainingTaskInputs = Value.newBuilder(); - JsonFormat.parser().merge(jsonString, trainingTaskInputs); + // Set the columns used for training and their data types + Transformation transformation1 = Transformation.newBuilder() + .setAuto(AutoTransformation.newBuilder().setColumnName("sepal_width").build()) + .build(); + Transformation transformation2 = Transformation.newBuilder() + .setAuto(AutoTransformation.newBuilder().setColumnName("sepal_length").build()) + .build(); + Transformation transformation3 = Transformation.newBuilder() + .setAuto(AutoTransformation.newBuilder().setColumnName("petal_length").build()) + .build(); + Transformation transformation4 = Transformation.newBuilder() + .setAuto(AutoTransformation.newBuilder().setColumnName("petal_width").build()) + .build(); + + ArrayList transformationArrayList = new ArrayList<>(); + transformationArrayList.add(transformation1); + transformationArrayList.add(transformation2); + transformationArrayList.add(transformation3); + transformationArrayList.add(transformation4); + + AutoMlTablesInputs autoMlTablesInputs = + AutoMlTablesInputs.newBuilder() + .setTargetColumn(targetColumn) + .setPredictionType("classification") + .addAllTransformations(transformationArrayList) + .setTrainBudgetMilliNodeHours(8000) + .build(); FractionSplit fractionSplit = FractionSplit.newBuilder() @@ -105,7 +126,7 @@ static void createTrainingPipelineTableClassification( TrainingPipeline.newBuilder() .setDisplayName(modelDisplayName) .setTrainingTaskDefinition(trainingTaskDefinition) - .setTrainingTaskInputs(trainingTaskInputs) + .setTrainingTaskInputs(ValueConverter.toValue(autoMlTablesInputs)) .setInputDataConfig(inputDataConfig) .setModelToUpload(modelToUpload) .build(); diff --git a/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineTabularRegressionSample.java b/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineTabularRegressionSample.java index 0043fdf52..ce5fff480 100644 --- a/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineTabularRegressionSample.java +++ b/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineTabularRegressionSample.java @@ -18,6 +18,7 @@ // [START aiplatform_create_training_pipeline_tabular_regression_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; @@ -37,10 +38,16 @@ import com.google.cloud.aiplatform.v1beta1.SampledShapleyAttribution; import com.google.cloud.aiplatform.v1beta1.TimestampSplit; import com.google.cloud.aiplatform.v1beta1.TrainingPipeline; +import com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTables; +import com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs; +import com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation; +import com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.AutoTransformation; +import com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTablesInputs.Transformation.TimestampTransformation; import com.google.protobuf.Value; import com.google.protobuf.util.JsonFormat; import com.google.rpc.Status; import java.io.IOException; +import java.util.ArrayList; public class CreateTrainingPipelineTabularRegressionSample { @@ -50,18 +57,15 @@ public static void main(String[] args) throws IOException { String modelDisplayName = "YOUR_DATASET_DISPLAY_NAME"; String datasetId = "YOUR_DATASET_ID"; String targetColumn = "TARGET_COLUMN"; - String transformation = - "[{TRANSFORMATION_TYPE: {columnName : COLUMN_NAME, invalidValuesAllowed : TRUE/FALSE }}]"; createTrainingPipelineTableRegression( - project, modelDisplayName, datasetId, targetColumn, transformation); + project, modelDisplayName, datasetId, targetColumn); } static void createTrainingPipelineTableRegression( String project, String modelDisplayName, String datasetId, - String targetColumn, - String transformation) + String targetColumn) throws IOException { PipelineServiceSettings pipelineServiceSettings = PipelineServiceSettings.newBuilder() @@ -77,14 +81,82 @@ static void createTrainingPipelineTableRegression( LocationName locationName = LocationName.of(project, location); String trainingTaskDefinition = "gs://google-cloud-aiplatform/schema/trainingjob/definition/automl_tables_1.0.0.yaml"; - String jsonString = - "{\"targetColumn\": \"" - + targetColumn - + "\",\"predictionType\": \"regression\",\"transformations\": " - + transformation - + ",\"trainBudgetMilliNodeHours\": 8000}"; - Value.Builder trainingTaskInputs = Value.newBuilder(); - JsonFormat.parser().merge(jsonString, trainingTaskInputs); + + // Set the columns used for training and their data types + ArrayList tranformations = new ArrayList<>(); + tranformations.add(Transformation.newBuilder() + .setAuto(AutoTransformation.newBuilder().setColumnName("STRING_5000unique_NULLABLE")) + .build()); + tranformations.add(Transformation.newBuilder() + .setAuto(AutoTransformation.newBuilder().setColumnName("INTEGER_5000unique_NULLABLE")) + .build()); + tranformations.add(Transformation.newBuilder() + .setAuto(AutoTransformation.newBuilder().setColumnName("FLOAT_5000unique_NULLABLE")) + .build()); + tranformations.add(Transformation.newBuilder() + .setAuto(AutoTransformation.newBuilder().setColumnName("FLOAT_5000unique_REPEATED")) + .build()); + tranformations.add(Transformation.newBuilder() + .setAuto(AutoTransformation.newBuilder().setColumnName("NUMERIC_5000unique_NULLABLE")) + .build()); + tranformations.add(Transformation.newBuilder() + .setAuto(AutoTransformation.newBuilder().setColumnName("BOOLEAN_2unique_NULLABLE")) + .build()); + tranformations.add(Transformation.newBuilder() + .setTimestamp(TimestampTransformation.newBuilder() + .setColumnName("TIMESTAMP_1unique_NULLABLE") + .setInvalidValuesAllowed(true)) + .build()); + tranformations.add(Transformation.newBuilder() + .setAuto(AutoTransformation.newBuilder().setColumnName("DATE_1unique_NULLABLE")) + .build()); + tranformations.add(Transformation.newBuilder() + .setAuto(AutoTransformation.newBuilder().setColumnName("TIME_1unique_NULLABLE")) + .build()); + tranformations.add(Transformation.newBuilder() + .setTimestamp(TimestampTransformation.newBuilder() + .setColumnName("DATETIME_1unique_NULLABLE") + .setInvalidValuesAllowed(true)) + .build()); + tranformations.add(Transformation.newBuilder() + .setAuto(AutoTransformation.newBuilder() + .setColumnName("STRUCT_NULLABLE.STRING_5000unique_NULLABLE")) + .build()); + tranformations.add(Transformation.newBuilder() + .setAuto(AutoTransformation.newBuilder() + .setColumnName("STRUCT_NULLABLE.INTEGER_5000unique_NULLABLE")) + .build()); + tranformations.add(Transformation.newBuilder() + .setAuto(AutoTransformation.newBuilder() + .setColumnName("STRUCT_NULLABLE.FLOAT_5000unique_NULLABLE")) + .build()); + tranformations.add(Transformation.newBuilder() + .setAuto(AutoTransformation.newBuilder() + .setColumnName("STRUCT_NULLABLE.FLOAT_5000unique_REQUIRED")) + .build()); + tranformations.add(Transformation.newBuilder() + .setAuto(AutoTransformation.newBuilder() + .setColumnName("STRUCT_NULLABLE.FLOAT_5000unique_REPEATED")) + .build()); + tranformations.add(Transformation.newBuilder() + .setAuto(AutoTransformation.newBuilder() + .setColumnName("STRUCT_NULLABLE.NUMERIC_5000unique_NULLABLE")) + .build()); + tranformations.add(Transformation.newBuilder() + .setAuto(AutoTransformation.newBuilder() + .setColumnName("STRUCT_NULLABLE.TIMESTAMP_1unique_NULLABLE")) + .build()); + + AutoMlTablesInputs trainingTaskInputs = AutoMlTablesInputs.newBuilder() + .addAllTransformations(tranformations) + .setTargetColumn(targetColumn) + .setPredictionType("regression") + .setTrainBudgetMilliNodeHours(8000) + .setDisableEarlyStopping(false) + // supported regression optimisation objectives: minimize-rmse, + // minimize-mae, minimize-rmsle + .setOptimizationObjective("minimize-rmse") + .build(); FractionSplit fractionSplit = FractionSplit.newBuilder() @@ -104,7 +176,7 @@ static void createTrainingPipelineTableRegression( TrainingPipeline.newBuilder() .setDisplayName(modelDisplayName) .setTrainingTaskDefinition(trainingTaskDefinition) - .setTrainingTaskInputs(trainingTaskInputs) + .setTrainingTaskInputs(ValueConverter.toValue(trainingTaskInputs)) .setInputDataConfig(inputDataConfig) .setModelToUpload(modelToUpload) .build(); diff --git a/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineTextClassificationSample.java b/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineTextClassificationSample.java index b5335a4c7..194f2a71d 100644 --- a/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineTextClassificationSample.java +++ b/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineTextClassificationSample.java @@ -18,6 +18,7 @@ // [START aiplatform_create_training_pipeline_text_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,8 +39,7 @@ 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.Value; -import com.google.protobuf.util.JsonFormat; +import com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextClassificationInputs; import com.google.rpc.Status; import java.io.IOException; @@ -73,12 +73,13 @@ static void createTrainingPipelineTextClassificationSample( String trainingTaskDefinition = "gs://google-cloud-aiplatform/schema/trainingjob/definition/" + "automl_text_classification_1.0.0.yaml"; - String jsonString = "{\"multiLabel\": false}"; LocationName locationName = LocationName.of(project, location); - Value.Builder trainingTaskInputs = Value.newBuilder(); - JsonFormat.parser().merge(jsonString, trainingTaskInputs); + AutoMlTextClassificationInputs trainingTaskInputs = + AutoMlTextClassificationInputs.newBuilder() + .setMultiLabel(false) + .build(); InputDataConfig trainingInputDataConfig = InputDataConfig.newBuilder().setDatasetId(datasetId).build(); @@ -87,7 +88,7 @@ static void createTrainingPipelineTextClassificationSample( TrainingPipeline.newBuilder() .setDisplayName(trainingPipelineDisplayName) .setTrainingTaskDefinition(trainingTaskDefinition) - .setTrainingTaskInputs(trainingTaskInputs) + .setTrainingTaskInputs(ValueConverter.toValue(trainingTaskInputs)) .setInputDataConfig(trainingInputDataConfig) .setModelToUpload(model) .build(); diff --git a/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineTextEntityExtractionSample.java b/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineTextEntityExtractionSample.java index 9d83a4d1e..577dc865a 100644 --- a/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineTextEntityExtractionSample.java +++ b/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineTextEntityExtractionSample.java @@ -18,6 +18,7 @@ // [START aiplatform_create_training_pipeline_text_entity_extraction_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; @@ -73,14 +74,9 @@ static void createTrainingPipelineTextEntityExtractionSample( String trainingTaskDefinition = "gs://google-cloud-aiplatform/schema/trainingjob/definition/" + "automl_text_extraction_1.0.0.yaml"; - String jsonString = "{}"; LocationName locationName = LocationName.of(project, location); - // Training task inputs are empty for text entity extraction - Value.Builder trainingTaskInputs = Value.newBuilder(); - JsonFormat.parser().merge(jsonString, trainingTaskInputs); - InputDataConfig trainingInputDataConfig = InputDataConfig.newBuilder().setDatasetId(datasetId).build(); Model model = Model.newBuilder().setDisplayName(modelDisplayName).build(); @@ -88,7 +84,7 @@ static void createTrainingPipelineTextEntityExtractionSample( TrainingPipeline.newBuilder() .setDisplayName(trainingPipelineDisplayName) .setTrainingTaskDefinition(trainingTaskDefinition) - .setTrainingTaskInputs(trainingTaskInputs) + .setTrainingTaskInputs(ValueConverter.EMPTY_VALUE) .setInputDataConfig(trainingInputDataConfig) .setModelToUpload(model) .build(); diff --git a/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineTextSentimentAnalysisSample.java b/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineTextSentimentAnalysisSample.java index f9c656ad0..0a5903ae2 100644 --- a/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineTextSentimentAnalysisSample.java +++ b/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineTextSentimentAnalysisSample.java @@ -18,6 +18,7 @@ // [START aiplatform_create_training_pipeline_text_sentiment_analysis_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,8 +39,7 @@ 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.Value; -import com.google.protobuf.util.JsonFormat; +import com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlTextSentimentInputs; import com.google.rpc.Status; import java.io.IOException; @@ -74,14 +74,14 @@ static void createTrainingPipelineTextSentimentAnalysisSample( "gs://google-cloud-aiplatform/schema/trainingjob/definition/" + "automl_text_sentiment_1.0.0.yaml"; - // Sentiment max must be between 1 and 10 inclusive. - // Higher value means positive sentiment. - String jsonString = "{\"sentimentMax\": 4 }"; - LocationName locationName = LocationName.of(project, location); - Value.Builder trainingTaskInputs = Value.newBuilder(); - JsonFormat.parser().merge(jsonString, trainingTaskInputs); + AutoMlTextSentimentInputs trainingTaskInputs = + AutoMlTextSentimentInputs.newBuilder() + // Sentiment max must be between 1 and 10 inclusive. + // Higher value means positive sentiment. + .setSentimentMax(4) + .build(); InputDataConfig trainingInputDataConfig = InputDataConfig.newBuilder().setDatasetId(datasetId).build(); @@ -90,7 +90,7 @@ static void createTrainingPipelineTextSentimentAnalysisSample( TrainingPipeline.newBuilder() .setDisplayName(trainingPipelineDisplayName) .setTrainingTaskDefinition(trainingTaskDefinition) - .setTrainingTaskInputs(trainingTaskInputs) + .setTrainingTaskInputs(ValueConverter.toValue(trainingTaskInputs)) .setInputDataConfig(trainingInputDataConfig) .setModelToUpload(model) .build(); diff --git a/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineVideoActionRecognitionSample.java b/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineVideoActionRecognitionSample.java index 70d03788e..bd7320813 100644 --- a/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineVideoActionRecognitionSample.java +++ b/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineVideoActionRecognitionSample.java @@ -17,15 +17,15 @@ package aiplatform; // [START aiplatform_create_training_pipeline_video_action_recognition_sample] +import com.google.cloud.aiplatform.util.ValueConverter; 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 com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoActionRecognitionInputs; +import com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoActionRecognitionInputs.ModelType; import java.io.IOException; public class CreateTrainingPipelineVideoActionRecognitionSample { @@ -36,17 +36,15 @@ public static void main(String[] args) throws IOException { String displayName = "DISPLAY_NAME"; String datasetId = "DATASET_ID"; String modelDisplayName = "MODEL_DISPLAY_NAME"; - String modelType = "MODEL_TYPE"; createTrainingPipelineVideoActionRecognitionSample( - project, displayName, datasetId, modelDisplayName, modelType); + project, displayName, datasetId, modelDisplayName); } static void createTrainingPipelineVideoActionRecognitionSample( String project, String displayName, String datasetId, - String modelDisplayName, - String modelType) + String modelDisplayName) throws IOException { PipelineServiceSettings settings = PipelineServiceSettings.newBuilder() @@ -58,11 +56,11 @@ static void createTrainingPipelineVideoActionRecognitionSample( // 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(); + AutoMlVideoActionRecognitionInputs trainingTaskInputs = + AutoMlVideoActionRecognitionInputs.newBuilder() + .setModelType(ModelType.CLOUD) + .build(); + InputDataConfig inputDataConfig = InputDataConfig.newBuilder().setDatasetId(datasetId).build(); Model modelToUpload = Model.newBuilder().setDisplayName(modelDisplayName).build(); @@ -72,7 +70,7 @@ static void createTrainingPipelineVideoActionRecognitionSample( .setTrainingTaskDefinition( "gs://google-cloud-aiplatform/schema/trainingjob/definition/" + "automl_video_action_recognition_1.0.0.yaml") - .setTrainingTaskInputs(trainingTaskInputs) + .setTrainingTaskInputs(ValueConverter.toValue(trainingTaskInputs)) .setInputDataConfig(inputDataConfig) .setModelToUpload(modelToUpload) .build(); diff --git a/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineVideoClassificationSample.java b/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineVideoClassificationSample.java index eacbc5123..7bb27c5ae 100644 --- a/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineVideoClassificationSample.java +++ b/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineVideoClassificationSample.java @@ -18,6 +18,7 @@ // [START aiplatform_create_training_pipeline_video_classification_sample] +import com.google.cloud.aiplatform.util.ValueConverter; import com.google.cloud.aiplatform.v1beta1.FilterSplit; import com.google.cloud.aiplatform.v1beta1.FractionSplit; import com.google.cloud.aiplatform.v1beta1.InputDataConfig; @@ -28,7 +29,6 @@ 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.Value; import com.google.rpc.Status; import java.io.IOException; @@ -75,7 +75,7 @@ static void createTrainingPipelineVideoClassification( TrainingPipeline.newBuilder() .setDisplayName(videoClassificationDisplayName) .setTrainingTaskDefinition(trainingTaskDefinition) - .setTrainingTaskInputs(Value.newBuilder()) + .setTrainingTaskInputs(ValueConverter.EMPTY_VALUE) .setInputDataConfig(inputDataConfig) .setModelToUpload(model) .build(); diff --git a/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineVideoObjectTrackingSample.java b/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineVideoObjectTrackingSample.java index a8e5ee149..5cc64fe71 100644 --- a/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineVideoObjectTrackingSample.java +++ b/samples/snippets/src/main/java/aiplatform/CreateTrainingPipelineVideoObjectTrackingSample.java @@ -18,6 +18,7 @@ // [START aiplatform_create_training_pipeline_video_object_tracking_sample] +import com.google.cloud.aiplatform.util.ValueConverter; import com.google.cloud.aiplatform.v1beta1.FilterSplit; import com.google.cloud.aiplatform.v1beta1.FractionSplit; import com.google.cloud.aiplatform.v1beta1.InputDataConfig; @@ -28,8 +29,8 @@ 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.Value; -import com.google.protobuf.util.JsonFormat; +import com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoObjectTrackingInputs; +import com.google.cloud.aiplatform.v1beta1.schema.trainingjob.definition.AutoMlVideoObjectTrackingInputs.ModelType; import com.google.rpc.Status; import java.io.IOException; @@ -67,9 +68,10 @@ static void createTrainingPipelineVideoObjectTracking( + "automl_video_object_tracking_1.0.0.yaml"; LocationName locationName = LocationName.of(project, location); - String jsonString = "{\"modelType\": \"CLOUD\"}"; - Value.Builder trainingTaskInputs = Value.newBuilder(); - JsonFormat.parser().merge(jsonString, trainingTaskInputs); + AutoMlVideoObjectTrackingInputs trainingTaskInputs = + AutoMlVideoObjectTrackingInputs.newBuilder() + .setModelType(ModelType.CLOUD) + .build(); InputDataConfig inputDataConfig = InputDataConfig.newBuilder().setDatasetId(datasetId).build(); @@ -78,7 +80,7 @@ static void createTrainingPipelineVideoObjectTracking( TrainingPipeline.newBuilder() .setDisplayName(trainingPipelineVideoObjectTracking) .setTrainingTaskDefinition(trainingTaskDefinition) - .setTrainingTaskInputs(trainingTaskInputs) + .setTrainingTaskInputs(ValueConverter.toValue(trainingTaskInputs)) .setInputDataConfig(inputDataConfig) .setModelToUpload(modelToUpload) .build(); diff --git a/samples/snippets/src/main/java/aiplatform/PredictCustomTrainedModelSample.java b/samples/snippets/src/main/java/aiplatform/PredictCustomTrainedModelSample.java index f2eb37ffb..0bbe423a6 100644 --- a/samples/snippets/src/main/java/aiplatform/PredictCustomTrainedModelSample.java +++ b/samples/snippets/src/main/java/aiplatform/PredictCustomTrainedModelSample.java @@ -42,7 +42,7 @@ static void predictCustomTrainedModel(String project, String endpointId, String throws IOException { PredictionServiceSettings predictionServiceSettings = PredictionServiceSettings.newBuilder() - .setEndpoint("us-central1-prediction-aiplatform.googleapis.com:443") + .setEndpoint("us-central1-aiplatform.googleapis.com:443") .build(); // Initialize client that will be used to send requests. This client only needs to be created diff --git a/samples/snippets/src/main/java/aiplatform/PredictImageClassificationSample.java b/samples/snippets/src/main/java/aiplatform/PredictImageClassificationSample.java index bfe6ba9b1..15519675f 100644 --- a/samples/snippets/src/main/java/aiplatform/PredictImageClassificationSample.java +++ b/samples/snippets/src/main/java/aiplatform/PredictImageClassificationSample.java @@ -49,7 +49,7 @@ static void predictImageClassification(String project, String fileName, String e throws IOException { PredictionServiceSettings settings = PredictionServiceSettings.newBuilder() - .setEndpoint("us-central1-prediction-aiplatform.googleapis.com:443") + .setEndpoint("us-central1-aiplatform.googleapis.com:443") .build(); // Initialize client that will be used to send requests. This client only needs to be created diff --git a/samples/snippets/src/main/java/aiplatform/PredictImageObjectDetectionSample.java b/samples/snippets/src/main/java/aiplatform/PredictImageObjectDetectionSample.java index b7e832871..da8d4b8d7 100644 --- a/samples/snippets/src/main/java/aiplatform/PredictImageObjectDetectionSample.java +++ b/samples/snippets/src/main/java/aiplatform/PredictImageObjectDetectionSample.java @@ -19,10 +19,14 @@ // [START aiplatform_predict_image_object_detection_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.ImageObjectDetectionPredictionInstance; +import com.google.cloud.aiplatform.v1beta1.schema.predict.params.ImageObjectDetectionPredictionParams; +import com.google.cloud.aiplatform.v1beta1.schema.predict.prediction.ImageObjectDetectionPredictionResult; import com.google.protobuf.Value; import com.google.protobuf.util.JsonFormat; import java.io.IOException; @@ -46,7 +50,7 @@ static void predictImageObjectDetection(String project, String fileName, String throws IOException { PredictionServiceSettings settings = PredictionServiceSettings.newBuilder() - .setEndpoint("us-central1-prediction-aiplatform.googleapis.com:443") + .setEndpoint("us-central1-aiplatform.googleapis.com:443") .build(); // Initialize client that will be used to send requests. This client only needs to be created @@ -60,23 +64,41 @@ static void predictImageObjectDetection(String project, String fileName, String 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(); + ImageObjectDetectionPredictionParams params = + ImageObjectDetectionPredictionParams.newBuilder() + .setConfidenceThreshold((float) (0.5)) + .setMaxPredictions(5) + .build(); - String contentDict = "{\"content\": \"" + content + "\"}"; - Value.Builder instance = Value.newBuilder(); - JsonFormat.parser().merge(contentDict, instance); + ImageObjectDetectionPredictionInstance instance = + ImageObjectDetectionPredictionInstance.newBuilder() + .setContent(content) + .build(); List instances = new ArrayList<>(); - instances.add(instance.build()); + instances.add(ValueConverter.toValue(instance)); PredictResponse predictResponse = - predictionServiceClient.predict(endpointName, instances, parameter); + predictionServiceClient.predict(endpointName, instances, ValueConverter.toValue(params)); System.out.println("Predict Image Object Detection 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); + + ImageObjectDetectionPredictionResult.Builder resultBuilder = + ImageObjectDetectionPredictionResult.newBuilder(); + + ImageObjectDetectionPredictionResult result = + (ImageObjectDetectionPredictionResult) ValueConverter + .fromValue(resultBuilder, prediction); + + for (int i = 0; i < result.getIdsCount(); i++) { + System.out.printf("\tDisplay name: %s\n", result.getDisplayNames(i)); + System.out.printf("\tConfidences: %f\n", result.getConfidences(i)); + System.out.printf("\tIDs: %d\n", result.getIds(i)); + System.out.printf("\tBounding boxes: %s\n", result.getBboxes(i)); + } } } } diff --git a/samples/snippets/src/main/java/aiplatform/PredictTabularClassificationSample.java b/samples/snippets/src/main/java/aiplatform/PredictTabularClassificationSample.java index fbfa7d7f7..f5c42327c 100644 --- a/samples/snippets/src/main/java/aiplatform/PredictTabularClassificationSample.java +++ b/samples/snippets/src/main/java/aiplatform/PredictTabularClassificationSample.java @@ -18,10 +18,12 @@ // [START aiplatform_predict_tabular_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.prediction.TabularClassificationPredictionResult; import com.google.protobuf.ListValue; import com.google.protobuf.Value; import com.google.protobuf.util.JsonFormat; @@ -42,7 +44,7 @@ static void predictTabularClassification(String instance, String project, String throws IOException { PredictionServiceSettings predictionServiceSettings = PredictionServiceSettings.newBuilder() - .setEndpoint("us-central1-prediction-aiplatform.googleapis.com:443") + .setEndpoint("us-central1-aiplatform.googleapis.com:443") .build(); // Initialize client that will be used to send requests. This client only needs to be created @@ -65,7 +67,16 @@ static void predictTabularClassification(String instance, String project, String System.out.println("Predictions"); for (Value prediction : predictResponse.getPredictionsList()) { - System.out.format("\tPrediction: %s\n", prediction); + TabularClassificationPredictionResult.Builder resultBuilder = + TabularClassificationPredictionResult.newBuilder(); + TabularClassificationPredictionResult result = + (TabularClassificationPredictionResult) ValueConverter + .fromValue(resultBuilder, prediction); + + for (int i = 0; i < result.getClassesCount(); i++) { + System.out.printf("\tClass: %s", result.getClasses(i)); + System.out.printf("\tScore: %f", result.getScores(i)); + } } } } diff --git a/samples/snippets/src/main/java/aiplatform/PredictTabularRegressionSample.java b/samples/snippets/src/main/java/aiplatform/PredictTabularRegressionSample.java index 92f51ddd3..fd5ec9e68 100644 --- a/samples/snippets/src/main/java/aiplatform/PredictTabularRegressionSample.java +++ b/samples/snippets/src/main/java/aiplatform/PredictTabularRegressionSample.java @@ -18,10 +18,12 @@ // [START aiplatform_predict_tabular_regression_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.prediction.TabularRegressionPredictionResult; import com.google.protobuf.ListValue; import com.google.protobuf.Value; import com.google.protobuf.util.JsonFormat; @@ -42,7 +44,7 @@ static void predictTabularRegression(String instance, String project, String end throws IOException { PredictionServiceSettings predictionServiceSettings = PredictionServiceSettings.newBuilder() - .setEndpoint("us-central1-prediction-aiplatform.googleapis.com:443") + .setEndpoint("us-central1-aiplatform.googleapis.com:443") .build(); // Initialize client that will be used to send requests. This client only needs to be created @@ -65,7 +67,16 @@ static void predictTabularRegression(String instance, String project, String end System.out.println("Predictions"); for (Value prediction : predictResponse.getPredictionsList()) { - System.out.format("\tPrediction: %s\n", prediction); + TabularRegressionPredictionResult.Builder resultBuilder = + TabularRegressionPredictionResult.newBuilder(); + + TabularRegressionPredictionResult result = + (TabularRegressionPredictionResult) ValueConverter + .fromValue(resultBuilder, prediction); + + System.out.printf("\tUpper bound: %f\n", result.getUpperBound()); + System.out.printf("\tLower bound: %f\n", result.getLowerBound()); + System.out.printf("\tValue: %f\n", result.getValue()); } } } diff --git a/samples/snippets/src/main/java/aiplatform/PredictTextClassificationSingleLabelSample.java b/samples/snippets/src/main/java/aiplatform/PredictTextClassificationSingleLabelSample.java index 75a4c9fe2..e8989906c 100644 --- a/samples/snippets/src/main/java/aiplatform/PredictTextClassificationSingleLabelSample.java +++ b/samples/snippets/src/main/java/aiplatform/PredictTextClassificationSingleLabelSample.java @@ -44,7 +44,7 @@ static void predictTextClassificationSingleLabel( String project, String content, String endpointId) throws IOException { PredictionServiceSettings predictionServiceSettings = PredictionServiceSettings.newBuilder() - .setEndpoint("us-central1-prediction-aiplatform.googleapis.com:443") + .setEndpoint("us-central1-aiplatform.googleapis.com:443") .build(); // Initialize client that will be used to send requests. This client only needs to be created diff --git a/samples/snippets/src/main/java/aiplatform/PredictTextEntityExtractionSample.java b/samples/snippets/src/main/java/aiplatform/PredictTextEntityExtractionSample.java index 3fb1559ec..6995e34b2 100644 --- a/samples/snippets/src/main/java/aiplatform/PredictTextEntityExtractionSample.java +++ b/samples/snippets/src/main/java/aiplatform/PredictTextEntityExtractionSample.java @@ -18,10 +18,13 @@ // [START aiplatform_predict_text_entity_extraction_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.TextExtractionPredictionInstance; +import com.google.cloud.aiplatform.v1beta1.schema.predict.prediction.TextExtractionPredictionResult; import com.google.protobuf.Value; import com.google.protobuf.util.JsonFormat; import java.io.IOException; @@ -43,7 +46,7 @@ static void predictTextEntityExtraction(String project, String content, String e throws IOException { PredictionServiceSettings predictionServiceSettings = PredictionServiceSettings.newBuilder() - .setEndpoint("us-central1-prediction-aiplatform.googleapis.com:443") + .setEndpoint("us-central1-aiplatform.googleapis.com:443") .build(); // Initialize client that will be used to send requests. This client only needs to be created @@ -56,21 +59,37 @@ static void predictTextEntityExtraction(String project, String content, String e 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); + TextExtractionPredictionInstance instance = + TextExtractionPredictionInstance.newBuilder() + .setContent(content) + .build(); List instances = new ArrayList<>(); - instances.add(instance.build()); + instances.add(ValueConverter.toValue(instance)); PredictResponse predictResponse = - predictionServiceClient.predict(endpointName, instances, parameter); + predictionServiceClient.predict(endpointName, instances, ValueConverter.EMPTY_VALUE); System.out.println("Predict Text Entity Extraction 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); + TextExtractionPredictionResult.Builder resultBuilder = + TextExtractionPredictionResult.newBuilder(); + + TextExtractionPredictionResult result = + (TextExtractionPredictionResult) ValueConverter.fromValue(resultBuilder, prediction); + + for (int i = 0; i < result.getIdsCount(); i++) { + long textStartOffset = result.getTextSegmentStartOffsets(i); + long textEndOffset = result.getTextSegmentEndOffsets(i); + String entity = content.substring((int) textStartOffset, (int) textEndOffset); + + System.out.format("\tEntity: %s\n", entity); + System.out.format("\tEntity type: %s\n", result.getDisplayNames(i)); + System.out.format("\tConfidences: %f\n", result.getConfidences(i)); + System.out.format("\tIDs: %d\n", result.getIds(i)); + } } } } diff --git a/samples/snippets/src/main/java/aiplatform/PredictTextSentimentAnalysisSample.java b/samples/snippets/src/main/java/aiplatform/PredictTextSentimentAnalysisSample.java index 8ac212a26..2a24388c0 100644 --- a/samples/snippets/src/main/java/aiplatform/PredictTextSentimentAnalysisSample.java +++ b/samples/snippets/src/main/java/aiplatform/PredictTextSentimentAnalysisSample.java @@ -43,7 +43,7 @@ static void predictTextSentimentAnalysis(String project, String content, String throws IOException { PredictionServiceSettings predictionServiceSettings = PredictionServiceSettings.newBuilder() - .setEndpoint("us-central1-prediction-aiplatform.googleapis.com:443") + .setEndpoint("us-central1-aiplatform.googleapis.com:443") .build(); // Initialize client that will be used to send requests. This client only needs to be created diff --git a/samples/snippets/src/test/java/aiplatform/CreateBatchPredictionJobVideoClassificationSampleTest.java b/samples/snippets/src/test/java/aiplatform/CreateBatchPredictionJobVideoClassificationSampleTest.java index 3fa42715c..fc6c217e8 100644 --- a/samples/snippets/src/test/java/aiplatform/CreateBatchPredictionJobVideoClassificationSampleTest.java +++ b/samples/snippets/src/test/java/aiplatform/CreateBatchPredictionJobVideoClassificationSampleTest.java @@ -34,7 +34,7 @@ public class CreateBatchPredictionJobVideoClassificationSampleTest { private static final String PROJECT = System.getenv("UCAIP_PROJECT_ID"); - private static final String MODEL_ID = System.getenv("BATCH_PREDICTION_VIDEO_CLASS_MODEL_ID"); + private static final String MODEL_ID = "8596984660557299712"; private static final String GCS_SOURCE_URI = "gs://ucaip-samples-test-output/inputs/vcn_40_batch_prediction_input.jsonl"; private static final String GCS_DESTINATION_OUTPUT_URI_PREFIX = "gs://ucaip-samples-test-output/"; @@ -53,7 +53,6 @@ private static void requireEnvVar(String varName) { public static void checkRequirements() { requireEnvVar("GOOGLE_APPLICATION_CREDENTIALS"); requireEnvVar("UCAIP_PROJECT_ID"); - requireEnvVar("BATCH_PREDICTION_VIDEO_CLASS_MODEL_ID"); } @Before diff --git a/samples/snippets/src/test/java/aiplatform/CreateBatchPredictionJobVideoObjectTrackingSampleTest.java b/samples/snippets/src/test/java/aiplatform/CreateBatchPredictionJobVideoObjectTrackingSampleTest.java index 06f934f49..b6890db18 100644 --- a/samples/snippets/src/test/java/aiplatform/CreateBatchPredictionJobVideoObjectTrackingSampleTest.java +++ b/samples/snippets/src/test/java/aiplatform/CreateBatchPredictionJobVideoObjectTrackingSampleTest.java @@ -34,7 +34,7 @@ public class CreateBatchPredictionJobVideoObjectTrackingSampleTest { private static final String PROJECT = System.getenv("UCAIP_PROJECT_ID"); - private static final String MODEL_ID = System.getenv("BATCH_PREDICTION_VIDEO_OBJECT_MODEL_ID"); + private static final String MODEL_ID = "8609932509485989888"; private static final String GCS_SOURCE_URI = "gs://ucaip-samples-test-output/inputs/vot_batch_prediction_input.jsonl"; private static final String GCS_DESTINATION_OUTPUT_URI_PREFIX = "gs://ucaip-samples-test-output/"; @@ -53,7 +53,6 @@ private static void requireEnvVar(String varName) { public static void checkRequirements() { requireEnvVar("GOOGLE_APPLICATION_CREDENTIALS"); requireEnvVar("UCAIP_PROJECT_ID"); - requireEnvVar("BATCH_PREDICTION_VIDEO_OBJECT_MODEL_ID"); } @Before diff --git a/samples/snippets/src/test/java/aiplatform/CreateTrainingPipelineTabularClassificationSampleTest.java b/samples/snippets/src/test/java/aiplatform/CreateTrainingPipelineTabularClassificationSampleTest.java index f8bc4769a..c59ed73ed 100644 --- a/samples/snippets/src/test/java/aiplatform/CreateTrainingPipelineTabularClassificationSampleTest.java +++ b/samples/snippets/src/test/java/aiplatform/CreateTrainingPipelineTabularClassificationSampleTest.java @@ -36,24 +36,7 @@ public class CreateTrainingPipelineTabularClassificationSampleTest { private static final String PROJECT = System.getenv("UCAIP_PROJECT_ID"); private static final String DATASET_ID = System.getenv("TRAINING_PIPELINE_TABLES_CLASSIFICATION_DATASET_ID"); - 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\"}}]"; + private static final String TARGET_COLUMN = "species"; private ByteArrayOutputStream bout; private PrintStream out; private PrintStream originalPrintStream; @@ -110,7 +93,7 @@ public void createTrainingPipelineTabularClassification() throws IOException { UUID.randomUUID().toString().replaceAll("-", "_").substring(0, 26)); CreateTrainingPipelineTabularClassificationSample.createTrainingPipelineTableClassification( - PROJECT, modelDisplayName, DATASET_ID, TARGET_COLUMN, TRANSFORMATION); + PROJECT, modelDisplayName, DATASET_ID, TARGET_COLUMN); // Assert String got = bout.toString(); diff --git a/samples/snippets/src/test/java/aiplatform/CreateTrainingPipelineTabularRegressionSampleTest.java b/samples/snippets/src/test/java/aiplatform/CreateTrainingPipelineTabularRegressionSampleTest.java index 3298e0eba..d5813298f 100644 --- a/samples/snippets/src/test/java/aiplatform/CreateTrainingPipelineTabularRegressionSampleTest.java +++ b/samples/snippets/src/test/java/aiplatform/CreateTrainingPipelineTabularRegressionSampleTest.java @@ -36,22 +36,7 @@ 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"); - 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\"}}]"; + private static final String TARGET_COLUMN = "FLOAT_5000unique_REQUIRED"; private ByteArrayOutputStream bout; private PrintStream out; private PrintStream originalPrintStream; @@ -87,7 +72,7 @@ public void tearDown() // Assert String cancelResponse = bout.toString(); assertThat(cancelResponse).contains("Cancelled the Training Pipeline"); - TimeUnit.MINUTES.sleep(2); + TimeUnit.MINUTES.sleep(3); // Delete the Training Pipeline DeleteTrainingPipelineSample.deleteTrainingPipelineSample(PROJECT, trainingPipelineId); @@ -108,7 +93,7 @@ public void createTrainingPipelineTabularRegression() throws IOException { UUID.randomUUID().toString().replaceAll("-", "_").substring(0, 26)); CreateTrainingPipelineTabularRegressionSample.createTrainingPipelineTableRegression( - PROJECT, modelDisplayName, DATASET_ID, TARGET_COLUMN, TRANSFORMATION); + PROJECT, modelDisplayName, DATASET_ID, TARGET_COLUMN); // Assert String got = bout.toString(); diff --git a/samples/snippets/src/test/java/aiplatform/CreateTrainingPipelineVideoActionRecognitionSampleTest.java b/samples/snippets/src/test/java/aiplatform/CreateTrainingPipelineVideoActionRecognitionSampleTest.java index 3e39be5f8..11fb905fe 100644 --- a/samples/snippets/src/test/java/aiplatform/CreateTrainingPipelineVideoActionRecognitionSampleTest.java +++ b/samples/snippets/src/test/java/aiplatform/CreateTrainingPipelineVideoActionRecognitionSampleTest.java @@ -35,7 +35,6 @@ 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; @@ -98,7 +97,7 @@ public void testCreateTrainingPipelineVideoActionRecognitionSample() throws IOEx CreateTrainingPipelineVideoActionRecognitionSample .createTrainingPipelineVideoActionRecognitionSample( - PROJECT, trainingPipelineDisplayName, DATASET_ID, modelDisplayName, MODEL); + PROJECT, trainingPipelineDisplayName, DATASET_ID, modelDisplayName); // Assert String got = bout.toString(); diff --git a/samples/snippets/src/test/java/aiplatform/ExportModelSampleTest.java b/samples/snippets/src/test/java/aiplatform/ExportModelSampleTest.java index 287e318c7..607ab5e42 100644 --- a/samples/snippets/src/test/java/aiplatform/ExportModelSampleTest.java +++ b/samples/snippets/src/test/java/aiplatform/ExportModelSampleTest.java @@ -35,7 +35,7 @@ public class ExportModelSampleTest { private static final String PROJECT_ID = "ucaip-sample-tests"; - private static final String MODEL_ID = "5359002081594179584"; + private static final String MODEL_ID = "3422489426196955136"; private static final String GCS_DESTINATION_URI_PREFIX = "gs://ucaip-samples-test-output/tmp/export_model_test"; private static final String EXPORT_FORMAT = "tf-saved-model"; diff --git a/samples/snippets/src/test/java/aiplatform/ExportModelTabularClassificationSampleTest.java b/samples/snippets/src/test/java/aiplatform/ExportModelTabularClassificationSampleTest.java index 9212dc3d9..a55ecffbf 100644 --- a/samples/snippets/src/test/java/aiplatform/ExportModelTabularClassificationSampleTest.java +++ b/samples/snippets/src/test/java/aiplatform/ExportModelTabularClassificationSampleTest.java @@ -32,8 +32,7 @@ public class ExportModelTabularClassificationSampleTest { private static final String PROJECT = System.getenv("UCAIP_PROJECT_ID"); - private static final String MODEL_ID = - System.getenv("EXPORT_MODEL_TABLES_CLASSIFICATION_MODEL_ID"); + private static final String MODEL_ID = "6036688272397172736"; private static final String GCS_DESTINATION_URI_PREFIX = "gs://ucaip-samples-test-output/tmp/export_model_test"; private ByteArrayOutputStream bout; @@ -50,7 +49,6 @@ private static void requireEnvVar(String varName) { public static void checkRequirements() { requireEnvVar("GOOGLE_APPLICATION_CREDENTIALS"); requireEnvVar("UCAIP_PROJECT_ID"); - requireEnvVar("EXPORT_MODEL_TABLES_CLASSIFICATION_MODEL_ID"); } @Before diff --git a/samples/snippets/src/test/java/aiplatform/GetModelEvaluationImageClassificationSampleTest.java b/samples/snippets/src/test/java/aiplatform/GetModelEvaluationImageClassificationSampleTest.java index 228fa6055..27174f55f 100644 --- a/samples/snippets/src/test/java/aiplatform/GetModelEvaluationImageClassificationSampleTest.java +++ b/samples/snippets/src/test/java/aiplatform/GetModelEvaluationImageClassificationSampleTest.java @@ -33,8 +33,8 @@ public class GetModelEvaluationImageClassificationSampleTest { private static final String PROJECT = System.getenv("UCAIP_PROJECT_ID"); - private static final String MODEL_ID = System.getenv("IMAGE_CLASS_MODEL_ID"); - private static final String EVALUATION_ID = System.getenv("IMAGE_CLASS_EVALUATION_ID"); + private static final String MODEL_ID = "3512561418744365056"; + private static final String EVALUATION_ID = "9035588644970168320"; private ByteArrayOutputStream bout; private PrintStream out; private PrintStream originalPrintStream; @@ -49,8 +49,6 @@ private static void requireEnvVar(String varName) { public static void checkRequirements() { requireEnvVar("GOOGLE_APPLICATION_CREDENTIALS"); requireEnvVar("UCAIP_PROJECT_ID"); - requireEnvVar("IMAGE_CLASS_MODEL_ID"); - requireEnvVar("IMAGE_CLASS_EVALUATION_ID"); } @Before diff --git a/samples/snippets/src/test/java/aiplatform/GetModelEvaluationImageObjectDetectionSampleTest.java b/samples/snippets/src/test/java/aiplatform/GetModelEvaluationImageObjectDetectionSampleTest.java index b78ec23a6..946482f6f 100644 --- a/samples/snippets/src/test/java/aiplatform/GetModelEvaluationImageObjectDetectionSampleTest.java +++ b/samples/snippets/src/test/java/aiplatform/GetModelEvaluationImageObjectDetectionSampleTest.java @@ -33,8 +33,8 @@ public class GetModelEvaluationImageObjectDetectionSampleTest { private static final String PROJECT = System.getenv("UCAIP_PROJECT_ID"); - private static final String MODEL_ID = System.getenv("IMAGE_OBJECT_DETECT_MODEL_ID"); - private static final String EVALUATION_ID = System.getenv("IMAGE_OBJECT_DETECT_EVALUATION_ID"); + private static final String MODEL_ID = "3512561418744365056"; + private static final String EVALUATION_ID = "9035588644970168320"; private ByteArrayOutputStream bout; private PrintStream out; private PrintStream originalPrintStream; @@ -49,8 +49,6 @@ private static void requireEnvVar(String varName) { public static void checkRequirements() { requireEnvVar("GOOGLE_APPLICATION_CREDENTIALS"); requireEnvVar("UCAIP_PROJECT_ID"); - requireEnvVar("IMAGE_OBJECT_DETECT_MODEL_ID"); - requireEnvVar("IMAGE_OBJECT_DETECT_EVALUATION_ID"); } @Before diff --git a/samples/snippets/src/test/java/aiplatform/GetModelEvaluationSampleTest.java b/samples/snippets/src/test/java/aiplatform/GetModelEvaluationSampleTest.java index 022be3d83..a464efe52 100644 --- a/samples/snippets/src/test/java/aiplatform/GetModelEvaluationSampleTest.java +++ b/samples/snippets/src/test/java/aiplatform/GetModelEvaluationSampleTest.java @@ -33,8 +33,8 @@ public class GetModelEvaluationSampleTest { private static final String PROJECT_ID = "ucaip-sample-tests"; - private static final String MODEL_ID = "5162251072873431040"; - private static final String EVALUATION_ID = "5615675837586029221"; + private static final String MODEL_ID = "3512561418744365056"; + private static final String EVALUATION_ID = "9035588644970168320"; private ByteArrayOutputStream bout; private PrintStream out; private PrintStream originalPrintStream; diff --git a/samples/snippets/src/test/java/aiplatform/GetModelEvaluationSliceSampleTest.java b/samples/snippets/src/test/java/aiplatform/GetModelEvaluationSliceSampleTest.java index 2b3eb41ea..fbf24ca0a 100644 --- a/samples/snippets/src/test/java/aiplatform/GetModelEvaluationSliceSampleTest.java +++ b/samples/snippets/src/test/java/aiplatform/GetModelEvaluationSliceSampleTest.java @@ -33,9 +33,9 @@ public class GetModelEvaluationSliceSampleTest { private static final String PROJECT_ID = "ucaip-sample-tests"; - private static final String MODEL_ID = "5162251072873431040"; - private static final String EVALUATION_ID = "5615675837586029221"; - private static final String SLICE_ID = "4322488217836113260"; + private static final String MODEL_ID = "3512561418744365056"; + private static final String EVALUATION_ID = "9035588644970168320"; + private static final String SLICE_ID = "6481571820677004173"; private ByteArrayOutputStream bout; private PrintStream out; private PrintStream originalPrintStream; diff --git a/samples/snippets/src/test/java/aiplatform/GetModelEvaluationTabularClassificationSampleTest.java b/samples/snippets/src/test/java/aiplatform/GetModelEvaluationTabularClassificationSampleTest.java index 6995dcd9f..23b0f2878 100644 --- a/samples/snippets/src/test/java/aiplatform/GetModelEvaluationTabularClassificationSampleTest.java +++ b/samples/snippets/src/test/java/aiplatform/GetModelEvaluationTabularClassificationSampleTest.java @@ -30,10 +30,8 @@ public class GetModelEvaluationTabularClassificationSampleTest { private static final String PROJECT = System.getenv("UCAIP_PROJECT_ID"); - private static final String MODEL_ID = - System.getenv("MODEL_EVALUATION_TABLES_CLASSIFICATION_MODEL_ID"); - private static final String EVALUATION_ID = - System.getenv("MODEL_EVALUATION_TABLES_CLASSIFICATION_EVALUATION_ID"); + private static final String MODEL_ID = "6036688272397172736"; + private static final String EVALUATION_ID = "1866113044163962838"; private ByteArrayOutputStream bout; private PrintStream out; private PrintStream originalPrintStream; @@ -48,8 +46,6 @@ private static void requireEnvVar(String varName) { public static void checkRequirements() { requireEnvVar("GOOGLE_APPLICATION_CREDENTIALS"); requireEnvVar("UCAIP_PROJECT_ID"); - requireEnvVar("MODEL_EVALUATION_TABLES_CLASSIFICATION_MODEL_ID"); - requireEnvVar("MODEL_EVALUATION_TABLES_CLASSIFICATION_EVALUATION_ID"); } @Before diff --git a/samples/snippets/src/test/java/aiplatform/GetModelEvaluationTabularRegressionSampleTest.java b/samples/snippets/src/test/java/aiplatform/GetModelEvaluationTabularRegressionSampleTest.java index 81daedecc..bb5ec79b1 100644 --- a/samples/snippets/src/test/java/aiplatform/GetModelEvaluationTabularRegressionSampleTest.java +++ b/samples/snippets/src/test/java/aiplatform/GetModelEvaluationTabularRegressionSampleTest.java @@ -30,10 +30,8 @@ public class GetModelEvaluationTabularRegressionSampleTest { private static final String PROJECT = System.getenv("UCAIP_PROJECT_ID"); - private static final String MODEL_ID = - System.getenv("MODEL_EVALUATION_TABLES_REGRESSION_MODEL_ID"); - private static final String EVALUATION_ID = - System.getenv("MODEL_EVALUATION_TABLES_REGRESSION_EVALUATION_ID"); + private static final String MODEL_ID = "8842430840248991744"; + private static final String EVALUATION_ID = "4944816689650806017"; private ByteArrayOutputStream bout; private PrintStream out; private PrintStream originalPrintStream; @@ -48,8 +46,6 @@ private static void requireEnvVar(String varName) { public static void checkRequirements() { requireEnvVar("GOOGLE_APPLICATION_CREDENTIALS"); requireEnvVar("UCAIP_PROJECT_ID"); - requireEnvVar("MODEL_EVALUATION_TABLES_REGRESSION_MODEL_ID"); - requireEnvVar("MODEL_EVALUATION_TABLES_REGRESSION_EVALUATION_ID"); } @Before diff --git a/samples/snippets/src/test/java/aiplatform/GetModelEvaluationTextClassificationSampleTest.java b/samples/snippets/src/test/java/aiplatform/GetModelEvaluationTextClassificationSampleTest.java index b0b646723..4e13470cd 100644 --- a/samples/snippets/src/test/java/aiplatform/GetModelEvaluationTextClassificationSampleTest.java +++ b/samples/snippets/src/test/java/aiplatform/GetModelEvaluationTextClassificationSampleTest.java @@ -33,8 +33,8 @@ public class GetModelEvaluationTextClassificationSampleTest { private static final String PROJECT = System.getenv("UCAIP_PROJECT_ID"); - private static final String MODEL_ID = System.getenv("TEXT_CLASS_MODEL_ID"); - private static final String EVALUATION_ID = System.getenv("TEXT_CLASS_EVALUATION_ID"); + private static final String MODEL_ID = "7827432074230366208"; + private static final String EVALUATION_ID = "5064258198559522816"; private ByteArrayOutputStream bout; private PrintStream out; private PrintStream originalPrintStream; @@ -49,8 +49,6 @@ private static void requireEnvVar(String varName) { public static void checkRequirements() { requireEnvVar("GOOGLE_APPLICATION_CREDENTIALS"); requireEnvVar("UCAIP_PROJECT_ID"); - requireEnvVar("TEXT_CLASS_MODEL_ID"); - requireEnvVar("TEXT_CLASS_EVALUATION_ID"); } @Before diff --git a/samples/snippets/src/test/java/aiplatform/GetModelEvaluationTextEntityExtractionSampleTest.java b/samples/snippets/src/test/java/aiplatform/GetModelEvaluationTextEntityExtractionSampleTest.java index 55d893702..5881a3429 100644 --- a/samples/snippets/src/test/java/aiplatform/GetModelEvaluationTextEntityExtractionSampleTest.java +++ b/samples/snippets/src/test/java/aiplatform/GetModelEvaluationTextEntityExtractionSampleTest.java @@ -33,8 +33,8 @@ public class GetModelEvaluationTextEntityExtractionSampleTest { private static final String PROJECT = System.getenv("UCAIP_PROJECT_ID"); - private static final String MODEL_ID = System.getenv("TEXT_ENTITY_MODEL_ID"); - private static final String EVALUATION_ID = System.getenv("TEXT_ENTITY_EVALUATION_ID"); + private static final String MODEL_ID = "6305215400179138560"; + private static final String EVALUATION_ID = "1754112472442208256"; private ByteArrayOutputStream bout; private PrintStream out; private PrintStream originalPrintStream; @@ -49,8 +49,6 @@ private static void requireEnvVar(String varName) { public static void checkRequirements() { requireEnvVar("GOOGLE_APPLICATION_CREDENTIALS"); requireEnvVar("UCAIP_PROJECT_ID"); - requireEnvVar("TEXT_ENTITY_MODEL_ID"); - requireEnvVar("TEXT_ENTITY_EVALUATION_ID"); } @Before diff --git a/samples/snippets/src/test/java/aiplatform/GetModelEvaluationTextSentimentAnalysisSampleTest.java b/samples/snippets/src/test/java/aiplatform/GetModelEvaluationTextSentimentAnalysisSampleTest.java index 1aeb63591..cca27c67a 100644 --- a/samples/snippets/src/test/java/aiplatform/GetModelEvaluationTextSentimentAnalysisSampleTest.java +++ b/samples/snippets/src/test/java/aiplatform/GetModelEvaluationTextSentimentAnalysisSampleTest.java @@ -33,8 +33,8 @@ public class GetModelEvaluationTextSentimentAnalysisSampleTest { private static final String PROJECT = System.getenv("UCAIP_PROJECT_ID"); - private static final String MODEL_ID = System.getenv("TEXT_SENTI_MODEL_ID"); - private static final String EVALUATION_ID = System.getenv("TEXT_SENTI_EVALUATION_ID"); + private static final String MODEL_ID = "4792568875336073216"; + private static final String EVALUATION_ID = "3347225656252432384"; private ByteArrayOutputStream bout; private PrintStream out; private PrintStream originalPrintStream; @@ -49,8 +49,6 @@ private static void requireEnvVar(String varName) { public static void checkRequirements() { requireEnvVar("GOOGLE_APPLICATION_CREDENTIALS"); requireEnvVar("UCAIP_PROJECT_ID"); - requireEnvVar("TEXT_SENTI_MODEL_ID"); - requireEnvVar("TEXT_SENTI_EVALUATION_ID"); } @Before diff --git a/samples/snippets/src/test/java/aiplatform/GetModelEvaluationVideoClassificationSampleTest.java b/samples/snippets/src/test/java/aiplatform/GetModelEvaluationVideoClassificationSampleTest.java index 4347485ef..26a4628fb 100644 --- a/samples/snippets/src/test/java/aiplatform/GetModelEvaluationVideoClassificationSampleTest.java +++ b/samples/snippets/src/test/java/aiplatform/GetModelEvaluationVideoClassificationSampleTest.java @@ -30,8 +30,8 @@ public class GetModelEvaluationVideoClassificationSampleTest { private static final String PROJECT = System.getenv("UCAIP_PROJECT_ID"); - private static final String MODEL_ID = System.getenv("VIDEO_CLASS_MODEL_ID"); - private static final String EVALUATION_ID = System.getenv("VIDEO_CLASS_EVALUATION_ID"); + private static final String MODEL_ID = "8596984660557299712"; + private static final String EVALUATION_ID = "7092045712224944128"; private ByteArrayOutputStream bout; private PrintStream out; private PrintStream originalPrintStream; @@ -46,8 +46,6 @@ private static void requireEnvVar(String varName) { public static void checkRequirements() { requireEnvVar("GOOGLE_APPLICATION_CREDENTIALS"); requireEnvVar("UCAIP_PROJECT_ID"); - requireEnvVar("VIDEO_CLASS_MODEL_ID"); - requireEnvVar("VIDEO_CLASS_EVALUATION_ID"); } @Before diff --git a/samples/snippets/src/test/java/aiplatform/GetModelEvaluationVideoObjectTrackingSampleTest.java b/samples/snippets/src/test/java/aiplatform/GetModelEvaluationVideoObjectTrackingSampleTest.java index cefe40345..7657b7255 100644 --- a/samples/snippets/src/test/java/aiplatform/GetModelEvaluationVideoObjectTrackingSampleTest.java +++ b/samples/snippets/src/test/java/aiplatform/GetModelEvaluationVideoObjectTrackingSampleTest.java @@ -30,8 +30,8 @@ public class GetModelEvaluationVideoObjectTrackingSampleTest { private static final String PROJECT = System.getenv("UCAIP_PROJECT_ID"); - private static final String MODEL_ID = System.getenv("VIDEO_OBJECT_DETECT_MODEL_ID"); - private static final String EVALUATION_ID = System.getenv("VIDEO_OBJECT_DETECT_EVALUATION_ID"); + private static final String MODEL_ID = "8609932509485989888"; + private static final String EVALUATION_ID = "6016811301190238208"; private ByteArrayOutputStream bout; private PrintStream out; private PrintStream originalPrintStream; @@ -46,8 +46,6 @@ private static void requireEnvVar(String varName) { public static void checkRequirements() { requireEnvVar("GOOGLE_APPLICATION_CREDENTIALS"); requireEnvVar("UCAIP_PROJECT_ID"); - requireEnvVar("VIDEO_OBJECT_DETECT_MODEL_ID"); - requireEnvVar("VIDEO_OBJECT_DETECT_EVALUATION_ID"); } @Before diff --git a/samples/snippets/src/test/java/aiplatform/GetModelSampleTest.java b/samples/snippets/src/test/java/aiplatform/GetModelSampleTest.java index 314d450d7..d979c5996 100644 --- a/samples/snippets/src/test/java/aiplatform/GetModelSampleTest.java +++ b/samples/snippets/src/test/java/aiplatform/GetModelSampleTest.java @@ -33,7 +33,7 @@ public class GetModelSampleTest { private static final String PROJECT_ID = "ucaip-sample-tests"; - private static final String MODEL_ID = "1478306577684365312"; + private static final String MODEL_ID = "3512561418744365056"; private ByteArrayOutputStream bout; private PrintStream out; private PrintStream originalPrintStream; diff --git a/samples/snippets/src/test/java/aiplatform/ListModelEvaluationSliceSampleTest.java b/samples/snippets/src/test/java/aiplatform/ListModelEvaluationSliceSampleTest.java index 9d99c7729..011fb8cfc 100644 --- a/samples/snippets/src/test/java/aiplatform/ListModelEvaluationSliceSampleTest.java +++ b/samples/snippets/src/test/java/aiplatform/ListModelEvaluationSliceSampleTest.java @@ -33,8 +33,8 @@ public class ListModelEvaluationSliceSampleTest { private static final String PROJECT_ID = "ucaip-sample-tests"; - private static final String MODEL_ID = "5162251072873431040"; - private static final String EVALUATION_ID = "5615675837586029221"; + private static final String MODEL_ID = "3512561418744365056"; + private static final String EVALUATION_ID = "9035588644970168320"; private ByteArrayOutputStream bout; private PrintStream out; private PrintStream originalPrintStream; diff --git a/samples/snippets/src/test/java/aiplatform/PredictImageObjectDetectionSampleTest.java b/samples/snippets/src/test/java/aiplatform/PredictImageObjectDetectionSampleTest.java index 1539c7dfb..a7d3a16ee 100644 --- a/samples/snippets/src/test/java/aiplatform/PredictImageObjectDetectionSampleTest.java +++ b/samples/snippets/src/test/java/aiplatform/PredictImageObjectDetectionSampleTest.java @@ -25,12 +25,13 @@ import org.junit.After; import org.junit.Before; import org.junit.BeforeClass; +import org.junit.Ignore; import org.junit.Test; public class PredictImageObjectDetectionSampleTest { private static final String PROJECT = System.getenv("UCAIP_PROJECT_ID"); - private static final String FILE_NAME = "resources/caprese_salad.jpg"; + private static final String FILE_NAME = "resources/iod_caprese_salad.jpg"; private static final String ENDPOINT_ID = System.getenv("IMAGE_OBJECT_DETECTION_ENDPOINT_ID"); private ByteArrayOutputStream bout; private PrintStream out; @@ -63,6 +64,7 @@ public void tearDown() { System.setOut(originalPrintStream); } + @Ignore("See https://github.com/googleapis/java-aiplatform/issues/178") @Test public void testPredictImageObjectDetection() throws IOException { // Act diff --git a/synth.metadata b/synth.metadata index bc5d9c83a..a56cf8203 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,22 +4,22 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-aiplatform.git", - "sha": "8cd53bb7d8124bb008af858672a44abb541a0d44" + "sha": "c49ac8463d342c141cf59af5c19f1ef7f28fd8a5" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "6d65640b1fcbdf26ea76cb720de0ac138cae9bed", - "internalRef": "347036369" + "sha": "e8bc4471a88ac5f60defe3ed436f517174e59ba0", + "internalRef": "357800868" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "6133907dbb3ddab204a17a15d5c53ec0aae9b033" + "sha": "6946fd71ae9215b0e7ae188f5057df765ee6d7d2" } } ], @@ -32,6 +32,15 @@ "language": "java", "generator": "bazel" } + }, + { + "client": { + "source": "googleapis", + "apiName": "aiplatform", + "apiVersion": "v1", + "language": "java", + "generator": "bazel" + } } ], "generatedFiles": [ @@ -58,7 +67,6 @@ ".kokoro/continuous/java8.cfg", ".kokoro/continuous/readme.cfg", ".kokoro/dependencies.sh", - ".kokoro/linkage-monitor.sh", ".kokoro/nightly/common.cfg", ".kokoro/nightly/integration.cfg", ".kokoro/nightly/java11.cfg", @@ -88,6 +96,8 @@ ".kokoro/release/promote.sh", ".kokoro/release/publish_javadoc.cfg", ".kokoro/release/publish_javadoc.sh", + ".kokoro/release/publish_javadoc11.cfg", + ".kokoro/release/publish_javadoc11.sh", ".kokoro/release/snapshot.cfg", ".kokoro/release/snapshot.sh", ".kokoro/release/stage.cfg", @@ -746,7 +756,6 @@ "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", @@ -773,8 +782,6 @@ "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", @@ -782,6 +789,7 @@ "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_time_series_forecasting.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", diff --git a/synth.py b/synth.py index 531d5293a..c8c045de8 100644 --- a/synth.py +++ b/synth.py @@ -19,7 +19,7 @@ import synthtool.languages.java as java service = 'aiplatform' -versions = ['v1beta1'] +versions = ['v1beta1', 'v1'] for version in versions: java.bazel_library( @@ -33,4 +33,4 @@ '.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 58baf96c7..76e9d5079 100644 --- a/versions.txt +++ b/versions.txt @@ -1,6 +1,8 @@ # Format: # module:released-version:current-version -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 +google-cloud-aiplatform:0.3.0:0.3.0 +proto-google-cloud-aiplatform-v1:0.3.0:0.3.0 +proto-google-cloud-aiplatform-v1beta1:0.3.0:0.3.0 +grpc-google-cloud-aiplatform-v1:0.3.0:0.3.0 +grpc-google-cloud-aiplatform-v1beta1:0.3.0:0.3.0 \ No newline at end of file